summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [lanai] Make Lanai backend non-experimentalJacques Pienaar2016-08-231-0/+1
| | | | | | | | | | | | | | | Summary: Add Lanai backend to default targets. Discussion of proposal: http://lists.llvm.org/pipermail/llvm-dev/2016-July/102480.html. ISA added in r279149. Reviewers: jyknight, rengolin, eliben, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22530 llvm-svn: 279498
* [lanai] Exit early in Mem Alu combiner if sentinel reach.Jacques Pienaar2016-08-231-0/+3
| | | | | | LanaiMemAluCombiner could try to query the debug value of a list sentinel. Add check to exit early instead. llvm-svn: 279497
* [builtins] Don't always use -ffreestanding when compiling builtinsFrancis Ricci2016-08-231-1/+0
| | | | | | This can break on some sysroots. Let the user define it if necessary. llvm-svn: 279496
* [sanitizer] allocator: split the local cache class into two, one for 32-bit ↵Kostya Serebryany2016-08-234-4/+156
| | | | | | allocator and one for 64-bit one. NFC. The two imlementations will diverge in the following changes. llvm-svn: 279495
* Fix style in some Clang-tidy checks documentation.Eugene Zelenko2016-08-237-42/+70
| | | | | | Differential revision: https://reviews.llvm.org/D23728 llvm-svn: 279494
* [MemorySSA] Remove unused field. NFC.George Burgess IV2016-08-221-6/+1
| | | | | | | | Given that we're not currently using blocker info, and whether or not we will end up using it it is unclear, don't waste 8 (or 4) bytes of memory per path node. llvm-svn: 279493
* [InstSimplify] add helper function for SimplifyICmpInst(); NFCISanjay Patel2016-08-221-133/+143
| | | | | | | | | And add a FIXME because the helper excludes folds for vectors. It's not clear yet how many of these are actually testable (and therefore necessary?) because later analysis uses computeKnownBits and other methods to catch many of these cases. llvm-svn: 279492
* Typo.Adrian Prantl2016-08-221-1/+1
| | | | llvm-svn: 279491
* Add comments. NFCAdrian Prantl2016-08-221-0/+2
| | | | llvm-svn: 279490
* Add the second half of the testcase I should have added in 279485.Adrian Prantl2016-08-221-0/+18
| | | | llvm-svn: 279489
* Migrate from NodeType * to NodeRef.Tim Shen2016-08-221-1/+1
| | | | llvm-svn: 279488
* Fix crash from assert in r279466.Pete Cooper2016-08-221-1/+1
| | | | | | | | | | The assert in r279466 checks that we call the correct version of Intrinsic::getName. The version which accepts only an ID should not be used for intrinsics with overloaded types. The global-isel code was calling the wrong version. The test CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll will ensure that we call the correct version from now on. llvm-svn: 279487
* Fix regression introduced by r279164: only pass definitions as the PatternDefRichard Smith2016-08-227-61/+64
| | | | | | | | | | | | | | | | to DiagnoseUninstantiableTemplate, teach hasVisibleDefinition to correctly determine whether a function definition is visible, and mark both the function and the template as visible when merging function template definitions to provide hasVisibleDefinition with the relevant information. The change to always pass the right declaration as the PatternDef to DiagnoseUninstantiableTemplate also caused those checks to happen before other diagnostics in InstantiateFunctionDefinition, giving worse diagnostics for the same situations, so I sunk the relevant diagnostics into DiagnoseUninstantiableTemplate. Those parts of this patch are based on changes in reviews.llvm.org/D23492 by Vassil Vassilev. llvm-svn: 279486
* Module debug info: Don't assert when encountering an incomplete definitionAdrian Prantl2016-08-224-1/+27
| | | | | | | | | | in isDefinedInClangModule() and assume that the incomplete definition is not defined in the module. This broke the -gmodules self host recently. rdar://problem/27894367 llvm-svn: 279485
* ADT: Separate some list manipulation API into ilist_base, NFCDuncan P. N. Exon Smith2016-08-226-78/+295
| | | | | | | | | | | | | | | | | | Separate algorithms in iplist<T> that don't depend on T into ilist_base, and unit test them. While I was adding unit tests for these algorithms anyway, I also added unit tests for ilist_node_base and ilist_sentinel<T>. To make the algorithms and unit tests easier to write, I also did the following minor changes as a drive-by: - encapsulate Prev/Next in ilist_node_base to so that algorithms are easier to read, and - update ilist_node_access API to take nodes by reference. There should be no real functionality change here. llvm-svn: 279484
* Fix header comment for unittests/ADT/ilistTest.cppDuncan P. N. Exon Smith2016-08-221-1/+1
| | | | llvm-svn: 279483
* [ADT] Actually mutate the iterator VisitStack.back().second, not its copy.Tim Shen2016-08-225-229/+312
| | | | | | | | | | | | | | | Summary: Before the change, *Opt never actually gets updated by the end of toNext(), so for every next time the loop has to start over from child_begin(). This bug doesn't affect the correctness, since Visited prevents it from re-entering the same node again; but it's slow. Reviewers: dberris, dblaikie, dannyb Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23649 llvm-svn: 279482
* [SemaObjC] Do not RebuildObjCMessageExpr without valid method declBruno Cardoso Lopes2016-08-222-0/+18
| | | | | | | | | | | | | | Fix crash-on-invalid in ObjC Sema by avoiding to rebuild a message expression to a 'super' class in case the method to call does not exist (i.e. comes from another missing identifier). In this case, the typo transform is invoked upon the message expression in an attempt to solve a typo in a 'super' call parameters, but it crashes since it assumes the method to call has a valid declaration. rdar://problem/27305403 llvm-svn: 279481
* Add support for '|' in expressions.Rafael Espindola2016-08-222-1/+4
| | | | llvm-svn: 279480
* [AST] Remove unused function, to silence a GCC7 warning.Davide Italiano2016-08-221-4/+0
| | | | llvm-svn: 279479
* [InstCombine] change param type from Instruction to BinaryOperator for icmp ↵Sanjay Patel2016-08-222-97/+109
| | | | | | | | helpers; NFCI This saves some casting in the helper functions and eases some further refactoring. llvm-svn: 279478
* [GraphTraits] Replace all NodeType usage with NodeRefTim Shen2016-08-2229-320/+197
| | | | | | | | This should finish the GraphTraits migration. Differential Revision: http://reviews.llvm.org/D23730 llvm-svn: 279475
* ADT: Remove ilist_*sentinel_traits, NFCDuncan P. N. Exon Smith2016-08-2218-80/+3
| | | | | | | | | | Remove all the dead code around ilist_*sentinel_traits. This is a follow-up to gutting them as part of r279314 (originally r278974), staged to prevent broken builds in sub-projects. Uses were removed from clang in r279457 and lld in r279458. llvm-svn: 279473
* [InstCombine] use m_APInt to allow icmp (shr exact X, Y), 0 folds for splat ↵Sanjay Patel2016-08-222-18/+15
| | | | | | constant vectors llvm-svn: 279472
* Add ADT headers to the cmake headers directory for LLVMSupport. NFC.Pete Cooper2016-08-221-0/+1
| | | | | | | | | Xcode and MSVC list the headers and source files for each library. LLVMSupport lists included the source files for ADT but not the headers. This add the ADT headers so that they are browsable by the UI. llvm-svn: 279470
* [compiler-rt] Use flags found when configuring builtins during compilationFrancis Ricci2016-08-222-5/+15
| | | | | | | | | | | | Summary: This fixes the omission of -fPIC when building the builtins. Reviewers: compnerd, beanz Subscribers: dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D23729 llvm-svn: 279469
* [compiler-rt] Don't build ubsan cxxabi sources when unusedFrancis Ricci2016-08-221-3/+12
| | | | | | | | | | | | | | | | | | Summary: On apple targets, when SANITIZER_CAN_USE_CXXABI is false, the ubsan cxxabi sources aren't built, since they're unused. Do this on non-apple targets as well. This fixes errors when linking sanitizers if c++ abi is unavailable. Reviewers: pcc, kubabrecka, beanz Subscribers: rnk, llvm-commits, kubabrecka, compnerd, dberris Differential Revision: https://reviews.llvm.org/D23638 llvm-svn: 279467
* Add comments and an assert to follow-up on r279113. NFC.Pete Cooper2016-08-222-0/+8
| | | | | | | | | | | Philip commented on r279113 to ask for better comments as to when to use the different versions of getName. Its also possible to assert in the simple case that we aren't an overloaded intrinsic as those have to use the more capable version of getName. Thanks for the comments Philip. llvm-svn: 279466
* IDFCalculator: Remove unused field.Daniel Berlin2016-08-221-1/+0
| | | | llvm-svn: 279465
* AMDGPU: Split SILowerControlFlow into two piecesMatt Arsenault2016-08-228-365/+555
| | | | | | | | | | | | | | Do most of the lowering in a pre-RA pass. Keep the skip jump insertion late, plus a few other things that require more work to move out. One concern I have is now there may be COPY instructions which do not have the necessary implicit exec uses if they will be lowered to v_mov_b32. This has a positive effect on SGPR usage in shader-db. llvm-svn: 279464
* AMDGPU: Handle structs directly in AMDGPUABIInfoMatt Arsenault2016-08-222-1/+107
| | | | | | | | | | | | | | | | Structs are currently handled as pointer + byval, which makes AMDGPU LLVM backend generate incorrect code when structs are used. This patch changes struct argument to be handled directly and without flattening, which Clover (Mesa 3D Gallium OpenCL state tracker) will be able to handle. Flattening would expand the struct to individual elements and pass each as a separate argument, which Clover can not handle. Furthermore, such expansion does not fit the OpenCL programming model which requires to explicitely specify each argument index, size and memory location. Patch by Vedran Miletić llvm-svn: 279463
* MSSA: Factor out phi node placementDaniel Berlin2016-08-222-17/+24
| | | | llvm-svn: 279462
* MSSA: Only rename accesses whose defining access is nullptrDaniel Berlin2016-08-221-14/+6
| | | | llvm-svn: 279461
* [SimplifyCFG] Rewrite SinkThenElseCodeToEndJames Molloy2016-08-225-153/+470
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Recommitting now an unrelated assertion in SROA is sorted out] The new version has several advantages: 1) IMSHO it's more readable and neater 2) It handles loads and stores properly 3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch. With this change we can now finally sink load-modify-store idioms such as: if (a) return *b += 3; else return *b += 4; => %z = load i32, i32* %y %.sink = select i1 %a, i32 5, i32 7 %b = add i32 %z, %.sink store i32 %b, i32* %y ret i32 %b When this works for switches it'll be even more powerful. Round 4. This time we should handle all instructions correctly, and not replace any operands that need to be constant with variables. This was really hard to determine safely, so the helper function should be put into the Instruction API. I'll do that as a followup. llvm-svn: 279460
* [ELF] Only print symbol name when it is availablePetr Hosek2016-08-222-7/+10
| | | | | | | | | | | Not only symbols (like sections) have names, in case where we fail to create relocation against such symbol, we should not print out an empty string, instead we should print a generic message. Differential Revision: https://reviews.llvm.org/D23731 llvm-svn: 279459
* ADT: Remove uses of ilist_*sentinel_traits, NFCDuncan P. N. Exon Smith2016-08-222-19/+0
| | | | llvm-svn: 279458
* ADT: Remove uses of ilist_*sentinel_traits, NFCDuncan P. N. Exon Smith2016-08-221-12/+0
| | | | llvm-svn: 279457
* [ELF] ICF should respect section alignmentPetr Hosek2016-08-222-3/+7
| | | | | | | | | When performing ICF, we have to respect the alignment requirement of each section within each group. Differential Revision: https://reviews.llvm.org/D23732 llvm-svn: 279456
* [CUDA] Collapsed offload actions should not be top-level jobs.Artem Belevich2016-08-222-1/+138
| | | | | | | | | | | | If they are, we end up with the last intermediary output preserved in the current directory after compilation. Added a test case to verify that we're using appropriate filenames for outputs of different phases. Differential Revision: https://reviews.llvm.org/D23526 llvm-svn: 279455
* [SROA] Remove incorrect assertionJames Molloy2016-08-221-3/+0
| | | | | | | | | Confirmed with aprantl, this assertion is incorrect - code can get here (for example 80-bit FP types) and if it does it's benign. This is exposed by a completely unrelated patch of mine, so stop the compiler falling over. Original differential: http://reviews.llvm.org/D16187 aprantl's advice to remove assertion: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160815/382129.html llvm-svn: 279454
* Add missing include that caused a test failure on Windows. Thanks to STL for ↵Marshall Clow2016-08-221-0/+1
| | | | | | the patch. No functional change. llvm-svn: 279453
* [ELF] Define __ehdr_start symbolPetr Hosek2016-08-224-0/+32
| | | | | | | | This symbol can be used by the program to examine its own headers. Differential Revision: https://reviews.llvm.org/D23750 llvm-svn: 279452
* [compiler-rt] Make cxxabi availability configurable in cmakeFrancis Ricci2016-08-221-11/+13
| | | | | | | | | | | | | | | Summary: Allow for use of cxxabi to be disabled from cmake. This will make sanitizers usable when c++ abi is unavailable. Reviewers: pcc, rnk, samsonov, beanz, compnerd Subscribers: llvm-commits, compnerd, dberris Differential Revision: https://reviews.llvm.org/D23639 llvm-svn: 279451
* [cmake] Fix append_rtti_flag macro and bad var nameFilipe Cabecinhas2016-08-222-2/+2
| | | | llvm-svn: 279450
* [SSP] Do not set __guard_local to hidden for OpenBSD SSPTim Shen2016-08-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | __guard_local is defined as long on OpenBSD. If the source file contains a definition of __guard_local, it mismatches with the int8 pointer type used in LLVM. In that case, Module::getOrInsertGlobal() returns a cast operation instead of a GlobalVariable. Trying to set the visibility on the cast operation leads to random segfaults (seen when compiling the OpenBSD kernel, which also runs with stack protection). In the kernel, the hidden attribute does not matter. For userspace code, __guard_local is defined as hidden in the startup code. If a program re-defines __guard_local, the definition from the startup code will either win or the linker complains about multiple definitions (depending on whether the re-defined __guard_local is placed in the common segment or not). It also matches what gcc on OpenBSD does. Thanks Stefan Kempf <sisnkemp@gmail.com> for the patch! Differential Revision: http://reviews.llvm.org/D23674 llvm-svn: 279449
* [InstCombine] Allow sinking from unique predecessor with multiple edgesJun Bum Lim2016-08-222-1/+24
| | | | | | | | | | | | Summary: We can allow sinking if the single user block has only one unique predecessor, regardless of the number of edges. Note that a switch statement with multiple cases can have the same destination. Reviewers: mcrosier, majnemer, spatel, reames Subscribers: reames, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D23722 llvm-svn: 279448
* Revert "[SimplifyCFG] Rewrite SinkThenElseCodeToEnd"James Molloy2016-08-225-470/+153
| | | | | | This reverts commit r279443. It caused buildbot failures. llvm-svn: 279447
* Add a non-code-running data formatter for __NSCFBooleanEnrico Granata2016-08-222-0/+39
| | | | llvm-svn: 279446
* PR29086: DebugInfo: Improve support for fixed array dimensions in variable ↵David Blaikie2016-08-222-0/+19
| | | | | | length arrays llvm-svn: 279445
* Remove redundant testDavid Blaikie2016-08-221-9/+0
| | | | | | | test/CodeGenCXX/debug-info-zero-length-arrays.cpp tests this functionality more comprehensively llvm-svn: 279444
OpenPOWER on IntegriCloud