- Oct 11, 2017
-
-
NAKAMURA Takumi authored
llvm-svn: 315449
-
Max Kazantsev authored
llvm-svn: 315448
-
Simon Dardis authored
llvm-svn: 315447
-
Javed Absar authored
Use range_loop where it simplifies. llvm-svn: 315446
-
Oliver Stannard authored
This adds debug tracing to the table-generated assembly instruction matcher, enabled by the -debug-only=asm-matcher option. The changes in the target AsmParsers are to add an MCInstrInfo reference under a consistent name, so that we can use it from table-generated code. This was already being used this way for targets that use deprecation warnings, but 5 targets did not have it, and Hexagon had it under a different name to the other backends. llvm-svn: 315445
-
Petr Pavlu authored
* Prevent dumping of characters in DumpDataExtractor() with item_byte_size bigger than 8 bytes. This case is not supported by the code and results in a crash because the code calls DataExtractor::GetMaxU64Bitfield() -> GetMaxU64() that asserts for byte size > 8 bytes. * Teach DataExtractor::GetMaxU64(), GetMaxU32(), GetMaxS64() and GetMaxU64_unchecked() how to handle byte sizes that are not a multiple of 2. This allows DumpDataExtractor() to dump characters and booleans with item_byte_size in the interval of [1, 8] bytes. Values that are not a multiple of 2 would previously result in a crash because they were not handled by GetMaxU64(). llvm-svn: 315444
-
Uriel Korach authored
Adding this test files now so after another commit that will add a new pattern for TESTM and TESTNM instructions will show the improvemnts that have been done. Change-Id: If3908b7f91897d764053312365a2bc1de78b291d llvm-svn: 315443
-
George Rimar authored
llvm-svn: 315442
-
George Rimar authored
This is PR34546. Currently LLD creates output sections even if it has no input sections, but its command contains an assignment. Committed code just assigns the same flag that was used in previous live section. That does not work sometimes. For example if we have following script: .ARM.exidx : { *(.ARM.exidx*) } .foo : { _foo = 0; } } Then first section has SHF_LINK_ORDER flag. But section foo should not. That was a reason of crash in OutputSection::finalize(). LLD tried to calculate Link value, calling front() on empty input sections list. We should only keep access flags and omit all others when creating such sections. Patch fixes the crash observed. Differential revision: https://reviews.llvm.org/D37736 llvm-svn: 315441
-
Max Kazantsev authored
This patch fixes the miscompile that happens when PRE hoists loads across guards and other instructions that don't always pass control flow to their successors. PRE is now prohibited to hoist across such instructions because there is no guarantee that the load standing after such instruction is still valid before such instruction. For example, a load from under a guard may be invalid before the guard in the following case: int array[LEN]; ... guard(0 <= index && index < LEN); use(array[index]); Differential Revision: https://reviews.llvm.org/D37460 llvm-svn: 315440
-
Daniel Jasper authored
This is breaking a build of https://github.com/abseil/abseil-cpp and so likely not really NFC. Also reverted subsequent r314956/7. I'll forward reproduction instructions to Richard. llvm-svn: 315439
-
Max Kazantsev authored
Sinking of unordered atomic load into loop must be disallowed because it turns a single load into multiple loads. The relevant section of the documentation is: http://llvm.org/docs/Atomics.html#unordered, specifically the Notes for Optimizers section. Here is the full text of this section: > Notes for optimizers > In terms of the optimizer, this **prohibits any transformation that > transforms a single load into multiple loads**, transforms a store into > multiple stores, narrows a store, or stores a value which would not be > stored otherwise. Some examples of unsafe optimizations are narrowing > an assignment into a bitfield, rematerializing a load, and turning loads > and stores into a memcpy call. Reordering unordered operations is safe, > though, and optimizers should take advantage of that because unordered > operations are common in languages that need them. Patch by Daniil Suchkov! Reviewed By: reames Differential Revision: https://reviews.llvm.org/D38392 llvm-svn: 315438
-
Max Kazantsev authored
IRCE should not apply when the safe iteration range is proved to be empty. In this case we do unneeded job creating pre/post loops and then never go to the main loop. This patch makes IRCE not apply to empty safe ranges, adds test for this situation and also modifies one of existing tests where it used to happen slightly. Reviewed By: anna Differential Revision: https://reviews.llvm.org/D38577 llvm-svn: 315437
-
Rui Ueyama authored
llvm-svn: 315436
-
NAKAMURA Takumi authored
llvm-svn: 315435
-
Rui Ueyama authored
llvm-svn: 315434
-
Rui Ueyama authored
Usually, a function that does symbol lookup takes symbol name as its first argument. Also, if a function takes a source location hint, it is usually the last parameter. So the previous parameter order was counter-intuitive. llvm-svn: 315433
-
Rui Ueyama authored
Because of r314495, DefinedCommon symbols cannot reach to getSymbolValue function. When they reach the fucntion, they have already been converted to DefinedRegular symbols. llvm-svn: 315432
-
Rui Ueyama authored
llvm-svn: 315431
-
Rui Ueyama authored
"process" was not a good name because everything can be named it. llvm-svn: 315430
-
Davide Italiano authored
This fixes PR34908. Patch by Alex Crichton! Differential Revision: https://reviews.llvm.org/D38765 llvm-svn: 315429
-
NAKAMURA Takumi authored
llvm-svn: 315428
-
Rui Ueyama authored
llvm-svn: 315427
-
Rui Ueyama authored
llvm-svn: 315426
-
Rui Ueyama authored
We should generally avoid static local variables. llvm-svn: 315425
-
Rui Ueyama authored
llvm-svn: 315424
-
Rui Ueyama authored
llvm-svn: 315423
-
Rui Ueyama authored
Even though they are called sequentially, they are separate operations, so it is better to split it. llvm-svn: 315422
-
Rui Ueyama authored
llvm-svn: 315421
-
Rui Ueyama authored
llvm-svn: 315420
-
Rui Ueyama authored
llvm-svn: 315419
-
Rui Ueyama authored
We used CurAddressState to capture a dynamic context just like we use lambdas to capture static contexts. So, CurAddressState is used everywhere in LinkerScript.cpp. It is worth a shorter name. llvm-svn: 315418
-
Jake Ehrlich authored
Revert "[llvm-objcopy] Add support for --strip-sections to remove all section headers leaving only program headers and loadable segment data" This reverts commit rL315412 llvm-svn: 315417
-
Rui Ueyama authored
llvm-svn: 315416
-
Rui Ueyama authored
llvm-svn: 315415
-
Rui Ueyama authored
llvm-svn: 315414
-
Peter Collingbourne authored
Should fix mingw bot. llvm-svn: 315413
-
Jake Ehrlich authored
[llvm-objcopy] Add support for --strip-sections to remove all section headers leaving only program headers and loadable segment data elf utils implements a particularly extreme form of stripping that I'd like to support. eu-strip has an option called "strip-sections" that removes all section headers and leaves only program headers and the segment data. I have implemented this option partly as a test but mainly because in Fuchsia we would like to use this option to minimize the size of our executables. The other strip options that are on my list include --strip-all and --strip-debug. This is a preliminary implementation that I'd like to start using in Fuchsia builds if possible. This change implements such a stripping option for llvm-objcopy Differential Revision: https://reviews.llvm.org/D38335 llvm-svn: 315412
-
Lang Hames authored
llvm-svn: 315411
-
Lang Hames authored
MCObjectStreamer owns its MCAsmBackend -- this fixes the types to reflect that, and allows us to remove another instance of MCObjectStreamer's weird "holding ownership via someone else's reference" trick. llvm-svn: 315410
-