summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [LoopSimplifyCFG] Update MemorySSA after r353911.Alina Sbirlea2019-02-216-37/+43
| | | | | | | | | | | | | | | | | Summary: MemorySSA is not properly updated in LoopSimplifyCFG after recent changes. Use SplitBlock utility to resolve that and clear all updates once handleDeadExits is finished. All updates that follow are removal of edges which are safe to handle via the removeEdge() API. Also, deleting dead blocks is done correctly as is, i.e. delete from MemorySSA before updating the CFG and DT. Reviewers: mkazantsev, rtereshin Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58524 llvm-svn: 354613
* [EarlyCSE] Cleanup deadcode. [NFCI]Alina Sbirlea2019-02-211-5/+1
| | | | | | | | | | | | | | Summary: Cleanup nop assignments. Reviewers: george.burgess.iv, davide Subscribers: sanjoy, jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58308 llvm-svn: 354612
* [Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trapKrzysztof Parzyszek2019-02-215-2/+61
| | | | | | | | | The trap instruction is intercepted by various runtime environments, and instead of a crash it creates confusion. This reapplies r354606 with a fix. llvm-svn: 354611
* [CodeGen] Fix string literal address space casting.Michael Liao2019-02-212-3/+11
| | | | | | | | | | | | | | | | Summary: - If a string literal is reused directly, need to add necessary address space casting if the target requires that. Reviewers: yaxunl Subscribers: jvesely, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58509 llvm-svn: 354610
* Revert r354606, it breaks asan testsKrzysztof Parzyszek2019-02-215-61/+2
| | | | llvm-svn: 354609
* [test] Fix typo: 's/ ot / to /' [NFC]Mandeep Singh Grang2019-02-211-1/+1
| | | | llvm-svn: 354608
* ELF: Remove dead code. NFCI.Peter Collingbourne2019-02-211-3/+2
| | | | | | | | | RelocationBaseSection is not used in -r links, so Config->Relocatable will always be false. Differential Revision: https://reviews.llvm.org/D58489 llvm-svn: 354607
* [Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trapKrzysztof Parzyszek2019-02-215-2/+61
| | | | | | | The trap instruction is intercepted by various runtime environments, and instead of a crash it creates confusion. llvm-svn: 354606
* Update `ld.lld --version` string for monorepo.Rui Ueyama2019-02-212-25/+36
| | | | | | | | | | | | | | | | | This patch basically does the same thing as https://reviews.llvm.org/rL352729 did to clang. With this patch, lld now prints out a correct version string including a git commit id like this: $ bin/ld.lld --version LLD 9.0.0 (https://github.com/llvm/llvm-project.git c027658504fa9e68173f53dedaf223695a65e910) (compatible with GNU linkers) Fixes https://bugs.llvm.org/show_bug.cgi?id=40780 Differential Revision: https://reviews.llvm.org/D58411 llvm-svn: 354605
* [AMDGPU] remove unused AssemblerPredicatesMark Searles2019-02-211-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | An internal build is hitting asserts complaining about too many subtarget features: llvm/utils/TableGen/Types.cpp:42: const char* llvm::getMinimalTypeForEnumBitfield(uint64_t): Assertion `MaxIndex <= 64 && "Too many bits"' failed. llvm/utils/TableGen/AsmMatcherEmitter.cpp:1476: void {anonymous}::AsmMatcherInfo::buildInfo(): Assertion `SubtargetFeatures.size() <= 64 && "Too many subtarget features!"' failed. The short-term solution is to remove a few unused AssemblerPredicates to get under the limit. The long-term solution seems to be to revisit these asserts. E.g., rather than hardcoded '64', use the standard sized std::bitset like the other places that track subtarget features. Differential Revision: https://reviews.llvm.org/D58516 llvm-svn: 354604
* [llvm-objcopy][NFC] Add std::move() to fix older BBJordan Rupprecht2019-02-211-2/+2
| | | | llvm-svn: 354603
* [unittest] Fix missing user-provided default constructorJonas Devlieghere2019-02-211-0/+2
| | | | | | | error: default initialization of an object of const type 'const Pod' without a user-provided default constructor llvm-svn: 354602
* Revert "[sanitizers] Restore internal_readlink for x32"Matt Morehouse2019-02-212-6/+1
| | | | | | This reverts r354451 since it broke the Windows sanitizer bot. llvm-svn: 354601
* [llvm-objcopy][NFC] More error cleanupJordan Rupprecht2019-02-2112-100/+188
| | | | | | | | | | | | | | | | | | | Summary: This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAllUnhandledErrors()` is now the main way to print errors. There are still a few uses from within the per-arch drivers, so we can't delete them yet... but almost! Reviewers: jhenderson, alexshap, espindola Reviewed By: jhenderson Subscribers: emaste, arichardson, jakehehrlich, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58316 llvm-svn: 354600
* [WebAssembly] Don't create MSSymbolWasm object for non-symbolsSam Clegg2019-02-211-9/+4
| | | | | | | | | | | `__linear_memory` and `__indirect_function_table` are both generated as imports in wasm object files but are actually symbols and don't appear in any symbols table or relocation entry. Indeed we don't have any symbol type to meaningfully represent either of them. Differential Revision: https://reviews.llvm.org/D58487 llvm-svn: 354599
* [Kaleidoscope] Fix symbol resolver to search in reverse order.Lang Hames2019-02-211-1/+1
| | | | | | | This should allow more recent definitions of functions in the Kaleidoscope REPL to override old ones, as the tutorial text promises. llvm-svn: 354598
* [llvm-objcopy] Make removeSectionReferences batchedJordan Rupprecht2019-02-212-17/+31
| | | | | | | | | | | | | | | | | | | | | | Summary: Removing a large number of sections from a file with a lot of symbols can have abysmal (i.e. O(n^2)) performance, e.g. when running `--only-section` to extract one section out of a large file. This comes from iterating over all symbols in the symbol table each time we remove a section, to remove references to the section we just removed. Instead, do just one pass of symbol removal by passing a hash set of all the sections we'd like to remove references to. This fixes a regression when running llvm-objcopy -j <one section> on an object file with many sections and symbols -- on my machine, running `objcopy -j .keep_me huge-input.o /tmp/foo.o` takes .3s with GNU objcopy, 1.3s with an updated llvm-objcopy, and 7+ minutes with llvm-objcopy prior to this patch. Reviewers: MaskRay, jhenderson, jakehehrlich, alexshap, espindola Reviewed By: MaskRay, jhenderson Subscribers: echristo, emaste, arichardson, mgrang, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58296 llvm-svn: 354597
* Revert "[CUDA]Delayed diagnostics for the asm instructions."Alexey Bataev2019-02-215-124/+13
| | | | | | | This reverts commit r354593 to fix the problem with the crash on windows. llvm-svn: 354596
* [PPC] Add store merging testcase.Nirav Dave2019-02-211-0/+51
| | | | llvm-svn: 354595
* [DAGCombiner] prevent infinite looping by truncating 'and' (PR40793)Sanjay Patel2019-02-212-2/+29
| | | | | | | | | | | | | | This fold can occur during legalization, so it can fight with promotion to the larger type. It apparently takes a special sequence and subtarget to avoid more basic simplifications that would hide the problem. But there's a bigger question raised here: why does distributeTruncateThroughAnd() even exist? It duplicates functionality from a more minimal pattern that we already have. But getting rid of this function requires some preliminary steps. https://bugs.llvm.org/show_bug.cgi?id=40793 llvm-svn: 354594
* [CUDA]Delayed diagnostics for the asm instructions.Alexey Bataev2019-02-215-13/+124
| | | | | | | | | | | | | | | | Summary: Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and device compilation sides. Reviewers: tra, jlebar Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58463 llvm-svn: 354593
* AMDGPU/GlobalISel: Make phis legalMatt Arsenault2019-02-212-0/+1122
| | | | llvm-svn: 354592
* RegBankSelect: Allow targets to introduce control flow for mappingMatt Arsenault2019-02-211-0/+13
| | | | | | | | | | | | | For AMDGPU, if an operand requires an SGPR but is only available as a VGPR, a loop needs to be introduced to execute the instruction with each unique combination of values across all lanes. The rest of the instructions in the block will be moved to a new block following the loop. Check if the next instruction's parent changed, and update the iterators and insertion block if this happened. Tests will be included in a future patch. llvm-svn: 354591
* Fix missing C++ mode commentsMatt Arsenault2019-02-212-2/+2
| | | | llvm-svn: 354590
* [x86] regenerate checks; NFCSanjay Patel2019-02-211-8/+8
| | | | llvm-svn: 354589
* [X86] Fix copy-paste error in @ccz flag.Nirav Dave2019-02-212-3/+3
| | | | | | @ccz operand should be equivalent to @cce. llvm-svn: 354588
* AMDGPU/GlobalISel: Fix bit count ops for non-power-of-2 typesMatt Arsenault2019-02-216-1/+273
| | | | llvm-svn: 354587
* [llvm-readobj] Weaken a check in the test added by r354567Ilya Biryukov2019-02-211-1/+3
| | | | | | | The check includes a substring, configurable by PACKAGE_NAME in CMake. This leads to failures if PACKAGE_NAME is not the default. llvm-svn: 354586
* [clangd] Only report explicitly typed symbols during code navigationKadir Cetinkaya2019-02-213-65/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clangd was reporting implicit symbols, like results of implicit cast expressions during code navigation, which is not desired. For example: ``` struct Foo{ Foo(int); }; void bar(Foo); vod foo() { int x; bar(^x); } ``` Performing a GoTo on the point specified by ^ would give two results one pointing to line `int x` and the other for definition of `Foo(int);` Reviewers: ilya-biryukov, sammccall Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58495 llvm-svn: 354585
* [RISCV][NFC] IsEligibleForTailCallOptimization -> ↵Alex Bradbury2019-02-212-9/+8
| | | | | | | | isEligibleForTailCallOptimization Also clang-format the modified hunks. llvm-svn: 354584
* [RISCV] Add implied zero offset load/store alias patternsAlex Bradbury2019-02-2112-0/+180
| | | | | | | | | | Allow load/store instructions with implied zero offset for compatibility with GNU assembler. Differential Revision: https://reviews.llvm.org/D57141 Patch by James Clarke. llvm-svn: 354581
* [InferAddressSpaces] Fix fallthrough errorJoey Gouly2019-02-211-0/+1
| | | | llvm-svn: 354580
* [ARM GlobalISel] Support G_FRAME_INDEX for Thumb2Diana Picus2019-02-215-33/+85
| | | | | | Same as arm mode. llvm-svn: 354579
* Re-land part of r354244 "[DAGCombiner] Eliminate dead stores to stack."Clement Courbet2019-02-215-10/+81
| | | | | | This part introduces the lifetime node. llvm-svn: 354578
* [llvm-readobj]Add testing for ELF symbol and section table printing for a ↵James Henderson2019-02-217-0/+623
| | | | | | | | | | | | | | | wider range of values The existing ELF symbol and section table testing doesn't test many of the corner-cases or valid values for various ELF properties, including things like binding, visibility, section type and so on. This patch adds a series of tests that test these and other related edge-cases. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D58457 llvm-svn: 354577
* [InferAddressSpaces] Fix crash on select of non-ptr operandsJoey Gouly2019-02-212-2/+14
| | | | | | | | | Check the operands of a select are pointers, to determine if it is an address expression or not. https://reviews.llvm.org/D58226 llvm-svn: 354576
* [X86][SSE] combineX86ShufflesRecursively - moved to generic op input index ↵Simon Pilgrim2019-02-211-7/+3
| | | | | | | | lookup. NFCI. We currently bail if the target shuffle decodes to more than 2 input vectors, this change alters the input index to work for any number of inputs for when we drop that requirement. llvm-svn: 354575
* [yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section.George Rimar2019-02-216-9/+308
| | | | | | | | | | This patch adds support for parsing/dumping the .gnu.version section. Description of the section is: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html Differential revision: https://reviews.llvm.org/D58437 llvm-svn: 354574
* [LLD][ELF] - Simplify test case. NFC.George Rimar2019-02-211-7/+0
| | | | | | It has an excessive section declaration. llvm-svn: 354573
* [OpenMP] Fix check-openmp after r354553Jonas Hahnfeld2019-02-211-0/+2
| | | | | | | | | | | | | | | | | | Calling add_openmp_testsuite will add the tests to check-openmp unless EXCLUDE_FROM_ALL is set. This is problematic because the tests for OMPT will be included twice which doesn't work if the same test is executed concurrently by multiple threads. See: http://lab.llvm.org:8011/builders/openmp-gcc-x86_64-linux-debian/builds/163 http://lab.llvm.org:8011/builders/openmp-clang-x86_64-linux-debian/builds/184 http://lab.llvm.org:8011/builders/openmp-clang-ppc64le-linux-rhel/builds/133 (On PPC some failures are unrelated to r354553, the bot has been red before and this commit is not expected to fix that. For a proper patch please see https://reviews.llvm.org/D56286.) llvm-svn: 354572
* [llvm-readobj] Change "SHT_MIPS_DWARF" to "MIPS_DWARF"Fangrui Song2019-02-211-2/+2
| | | | | | | | | | | | | | | | | | | | Summary: This is to be consistent with the display of other MIPS section types. This string is also used by binutils-gdb/binutils/readelf.c:get_mips_section_type_name Since we are here, reorder the two enum constatns because SHT_MIPS_DWARF < SHT_MIPS_ABIFLAGS. Reviewers: jhenderson, atanasyan Reviewed By: jhenderson Subscribers: aprantl, sdardis, arichardson, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58496 llvm-svn: 354571
* [CodeComplete] Collect visited contexts when scope specifier is invalid.Eric Liu2019-02-212-4/+21
| | | | | | | | | | | | | | | | | Summary: This will allow completion consumers to guess the specified scope by putting together scopes in the context with the specified scope (e.g. when the specified namespace is not imported yet). Reviewers: ilya-biryukov Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58446 llvm-svn: 354570
* Revert 354564: [ARM] Add some missing thumb1 opcodes to enable peephole ↵David Green2019-02-213-281/+14
| | | | | | | | | optimisation of CMPs I believe it's causing bootstrap failures for A32 code. I'll take a look at what's wrong. llvm-svn: 354569
* [OpenCL] Simplify LLVM IR generated for OpenCL blocksAndrew Savonichev2019-02-215-64/+91
| | | | | | | | | | | | | | | | | | | Summary: Emit direct call of block invoke functions when possible, i.e. in case the block is not passed as a function argument. Also doing some refactoring of `CodeGenFunction::EmitBlockCallExpr()` Reviewers: Anastasia, yaxunl, svenvh Reviewed By: Anastasia Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58388 llvm-svn: 354568
* [llvm-readobj]Test basic command-line handlingJames Henderson2019-02-211-0/+36
| | | | | | | | | | | | There was no real testing for llvm-readobj/llvm-readelf's behaviour under various bad inputs and command-line switches. This patch adds some testing of this, along with basic testing of --version and --help. Reviewed by: MaskRay, grimar Differential Revision: https://reviews.llvm.org/D58455 llvm-svn: 354567
* [yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVEJames Henderson2019-02-212-25/+31
| | | | | | | | | | | | | | | | | | | | In order to test tool handling of invalid section indexes, I need to create an object containing such an invalid section index. I could create a hex-edited binary, but having the ability to use yaml2obj is preferable. Prior to this change, yaml2obj would reject any explicit section indexes less than SHN_LORESERVE. This patch changes it to allow any value. I had to change the test to use llvm-readelf instead of llvm-readobj, because llvm-readobj does not like invalid section indexes. I've also expanded the test to show that the most common SHN_* values are accepted (SHN_UNDEF, SHN_ABS, SHN_COMMON). Reviewed by: grimar, jakehehrlich Differential Revision: https://reviews.llvm.org/D58445 llvm-svn: 354566
* [AArch64] Print instruction before atomic semantic annotationsDavid Spickett2019-02-211-5/+6
| | | | | | | | | | | | | | | | | Commit r353303 added annotations when acquire semantics were dropped from an instruction. printAnnotation was called before printInstruction. So if you didn't set a separate comment output stream you got <comment><instr> instead of <instr><comment> as expected. To fix this move the new printAnnotation to after the instruction is printed. Differential Revision: https://reviews.llvm.org/D58059 llvm-svn: 354565
* [ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPsDavid Green2019-02-213-14/+281
| | | | | | | | | This adds a number of missing Thumb1 opcodes so that the peephole optimiser can remove redundant CMP instructions. Differential Revision: https://reviews.llvm.org/D57833 llvm-svn: 354564
* [ObjectYAML] Support SHT_MIPS_DWARF section type flagFangrui Song2019-02-212-1/+2
| | | | | | | Also reorder SHT_MIPS_DWARF and SHT_MIPS_ABIFLAGS in Object/ELF.cpp. The test will be added by D58457. llvm-svn: 354563
* [NFC] Replace EOL in test fileMax Kazantsev2019-02-211-41/+41
| | | | llvm-svn: 354562
OpenPOWER on IntegriCloud