summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NVPTX] Fixed lowering of unaligned loads/stores of f16 scalars and vectors.Artem Belevich2017-03-073-11/+103
| | | | | | Differential Revision: https://reviews.llvm.org/D30672 llvm-svn: 297198
* SjLjEHPrepare: Fix the pass for swifterror argumentsArnold Schwaighofer2017-03-072-0/+49
| | | | | | | | | | | We cannot leave the identity copies 'select true, arg, undef' that this pass inserts for arguments to simplify handling of values on swifterror arguments. swifterror arguments have restrictions on their uses. rdar://30839288 llvm-svn: 297197
* Fix bugpoint to work with swifterror valuesArnold Schwaighofer2017-03-071-2/+4
| | | | llvm-svn: 297196
* [ScopDetection] Require LoadInst base pointers to be hoisted.Michael Kruse2017-03-0710-16/+109
| | | | | | | | | | | | | | | | | | Only when load-hoisted we can be sure the base pointer is invariant during the SCoP's execution. Most of the time it would be added to the required hoists for the alias checks anyway, except with -polly-ignore-aliasing, -polly-use-runtime-alias-checks=0 or if AliasAnalysis is already sure it doesn't alias with anything (for instance if there is no other pointer to alias with). Two more parts in Polly assume that this load-hoisting took place: - setNewAccessRelation() which contains an assert which tests this. - BlockGenerator which would use to the base ptr from the original code if not load-hoisted (if the access expression is regenerated) Differential Revision: https://reviews.llvm.org/D30694 llvm-svn: 297195
* Use filename in linemarker when compiling preprocessed source (Revised)Taewook Oh2017-03-073-3/+64
| | | | | | | | | | | | | | | | Summary: This is a revised version of D28796. Included test is changed to resolve the target compatibility issue reported (rL293032). Reviewers: inglorion, dblaikie, echristo, aprantl, probinson Reviewed By: inglorion Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D30663 llvm-svn: 297194
* llvm-objdump: handle line numbers and source options for amdgpu objectsKonstantin Zhuravlyov2017-03-074-0/+120
| | | | | | Differential Revision: https://reviews.llvm.org/D30679 llvm-svn: 297193
* Fix C2712 build error on WindowsKonstantin Zhuravlyov2017-03-071-6/+12
| | | | | | | | Move the __try/__except block outside of the set_thread_name function to avoid a conflict with object unwinding due to the use of the llvm::Storage. Differential Revision: https://reviews.llvm.org/D30707 llvm-svn: 297192
* Do not pass archive files containing bitcode files to the MSVC Linker.Rui Ueyama2017-03-072-2/+46
| | | | | | | | | | | | | | | | If /msvclto is specified, we compile bitcode files and pass it to the MSVC linker, stripping all bitcode files. We haven't stripped archive files, because I was thinking that the MSVC linker wouldn't touch files in archive files. When we pass an object file to link.exe, all symbols have been resolved already, so link.exe shoulnd't need any of the files in archives. It turns out that even though link.exe doesn't need to do that, it seems to try to read each file in all archives. And if there's a non- COFF file in an archive, it exists with an error message. So we need to remove archives from the command line too. llvm-svn: 297191
* [AArch64] Vulcan is now ThunderXT99Joel Jones2017-03-0710-201/+213
| | | | | | | | | | | | | | | | | Broadcom Vulcan is now Cavium ThunderX2T99. LLVM Bugzilla: http://bugs.llvm.org/show_bug.cgi?id=32113 Minor fixes for the alignments of loops and functions for ThunderX T81/T83/T88 (better performance). Patch was tested with SpecCPU2006. Patch by Stefan Teleman Differential Revision: https://reviews.llvm.org/D30510 llvm-svn: 297190
* fix test to not check optimized IR; NFCISanjay Patel2017-03-071-1966/+2536
| | | | | | | | | | | | This test broke with an LLVM instcombine patch (r297166). I changed the RUN line to only run -mem2reg (to save time checking this large chunk of tests) and updated the checks using the script attached to D17999: https://reviews.llvm.org/D17999 The goal is to make this test immune to optimizer changes. If there's something in these tests that was checking for an IR optimization, that should be tested in LLVM, not Clang. llvm-svn: 297189
* Revert r297177: Change LLT constructor string into an LLT-based object ...Daniel Sanders2017-03-0712-330/+267
| | | | | | | | | | More module problems. This time it only showed up in the stage 2 compile of clang-x86_64-linux-selfhost-modules-2 but not the stage 1 compile. Somehow, this change causes the build to need Attributes.gen before it's been generated. llvm-svn: 297188
* [analyzer] Fix crashes in CastToStruct checker for undefined structsDaniel Marjamaki2017-03-072-0/+18
| | | | | | | | This crash was reported in https://bugs.llvm.org//show_bug.cgi?id=31173 Differential Revision: https://reviews.llvm.org/D28297 llvm-svn: 297187
* [JumpThread] Simplify CmpInst-as-Condition branch-folding a bit.Xin Tong2017-03-071-4/+11
| | | | | | | | | | | | | | Summary: Simplify CmpInst-as-Condition branch-folding a bit. Reviewers: sanjoy, efriedma Reviewed By: efriedma Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30429 llvm-svn: 297186
* [cmake] Include openmp with add_llvm_external_projectPirama Arumuga Nainar2017-03-071-1/+3
| | | | | | | | | | | | | | | | Summary: Include projects/openmp into the build using add_llvm_external_project instead of add_subdirectory. This creates an option LLVM_TOOL_OPENMP_BUILD that selects whether this project gets included in an in-tree build. Reviewers: beanz, AndreyChurbanov, jlpeyton Subscribers: srhines, openmp-commits, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30470 llvm-svn: 297185
* [PowerPC] mark xray test as unsupported on powerpcle in testsuiteBill Seurer2017-03-071-0/+2
| | | | | | | | | Temporarily mark the test as unsupported so the powerpc le buildbot testers can get back to work. There was a brief discussion of this on the mailing list for r296998. llvm-svn: 297184
* [ObjectYAML] Add support for DWARF5 Unit headerChris Bieneman2017-03-075-2/+606
| | | | | | In DWARF5 the Unit header added a new field, UnitType, and swapped the order of the address size and abbreviation offset fields. llvm-svn: 297183
* Add unit tests for changes to SmallPtrSet and PointerLikeTypeTraitsDaniel Berlin2017-03-071-0/+33
| | | | llvm-svn: 297182
* Add PointerLikeTypeTraits for const things, as long as there is one for the ↵Daniel Berlin2017-03-071-0/+14
| | | | | | non-const version. Clang and other users have a number of types they use as pointers, and this avoids having to define both const and non-const versions of PointerLikeTraits. llvm-svn: 297181
* Make SmallPtrSet count and find able to take const PtrType'sDaniel Berlin2017-03-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: For our set/map types, count/find normally take const references. This works well for non-pointer types, but can suck for pointer types. DenseSet<int *> foo; const int *b = nullptr; foo.count(b) does not work but the equivalent reference version does work (patch to fix DenseSet/DenseMap coming up) For SmallPtrSet, you have no such option. The following will not work right now: SmallPtrSet<int *> foo; const int *b = nullptr; foo.count(b); This makes const correctness hard in some cases. Example: SmallPtrSet<Instruction *> InstructionsToErase; You can't make this SmallPtrSet<const Instruction *> because then you can't erase the instruction. If I want to see if something is in the set, I may only have a const Instruction *. Given that count and find are non-mutating, this should just work. The places in our code base that do this resort to const_cast :(. This patch makes count and find able to be used with const Instruction * in the above SmallPtrSet examples. This is a bit annoying because of where C++ applies the const, so we have to remove the pointer type from the passed-in-type and rebuild it with const. Reviewers: dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30608 llvm-svn: 297180
* [LV] Consider users that are memory accesses in uniforms expansion stepMatthew Simpson2017-03-072-1/+53
| | | | | | | | | | | When expanding the set of uniform instructions beyond the seed instructions (e.g., consecutive pointers), we mark a new instruction uniform if all its loop-varying users are uniform. We should also allow users that are consecutive or interleaved memory accesses. This fixes cases where we have an instruction that is used as the pointer operand of a consecutive access but also used by a non-memory instruction that later becomes uniform as part of the expansion. llvm-svn: 297179
* [X86] Add option to specify preferable loop alignmentSanjoy Das2017-03-071-1/+9
| | | | | | | | | | | | | | | | | | | | | Summary: Loop alignment can cause a significant change of the perfromance for short loops. To be able to evaluate the impact of loop alignment this change introduces the new option x86-experimental-pref-loop-alignment. The alignment will be 2^Value bytes, the default value is 4. Patch by Serguei Katkov! Reviewers: craig.topper Reviewed By: craig.topper Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D30391 llvm-svn: 297178
* [globalisel] Change LLT constructor string into an LLT-based object that ↵Daniel Sanders2017-03-0712-267/+330
| | | | | | | | | | | | | | | | | | knows how to generate it. Summary: This will allow future patches to inspect the details of the LLT. The implementation is now split between the Support and CodeGen libraries to allow TableGen to use this class without introducing layering concerns. Thanks to Ahmed Bougacha for finding a reasonable way to avoid the layering issue and providing the version of this patch without that problem. Reviewers: t.p.northover, qcolombet, rovka, aditya_nandakumar, ab, javed.absar Subscribers: arsenm, nhaehnle, mgorny, dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30046 llvm-svn: 297177
* Further reduce testcaseAdrian Prantl2017-03-071-46/+34
| | | | llvm-svn: 297176
* Tidy up the way we include EHHeaderParser.hpp.Ed Schouten2017-03-071-4/+1
| | | | | | | Other source files in the source tree tend to include this header file unconditionally. It also parses perfectly fine on ARM EHABI systems. llvm-svn: 297175
* Improve readability and correctness of the OS specific libunwind bits.Ed Schouten2017-03-071-26/+25
| | | | | | | | | | | | | | | | | | | | | | | All of the access to __exidx_*, dl_iterate_phdr(), etc. is specific to the findUnwindSections() function. Right now all of the includes and declarations related to them are scattered throughout the source file. For example, for <link.h>, we have a full list of operating systems guarding the #include, even though the code that uses dl_iterate_phdr() miraculously doesn't use the same list. Change the code so that findUnwindSections() is preceded by a block of #ifdefs that share the same structure as the function itself. First comes all of the macOS specific bits, followed by bare-metal ARM, followed by ELF EHABI + DWARF. This actually allows us to build a copy of libunwind without any specific ifdefs for NetBSD, CloudABI, etc. It likely also unbreaks the build of libunwind on FreeBSD/armv6, though I can't confirm. Reviewed by: compnerd Differential Revision: https://reviews.llvm.org/D30696 llvm-svn: 297174
* Fix test and add missing return for llvm-lto2 error caseTeresa Johnson2017-03-072-1/+4
| | | | | | | | | | | | | | | | | Summary: This test was missing the target triple. Once I fixed that, the case with the invalid character error stopped returning 1 from llvm-lto2 and the test reported a failure. Fixed by adding the missing return from llvm-lto2. Apparently we were failing when we eventually tried to get the target. Reviewers: pcc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30585 llvm-svn: 297173
* [GlobalISel] Translate floating-point negationVolkan Keles2017-03-075-3/+41
| | | | | | | | | | | | Reviewers: qcolombet, javed.absar, aditya_nandakumar, dsanders, t.p.northover, ab Reviewed By: qcolombet Subscribers: dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30671 llvm-svn: 297171
* Update comment in testcaseAdrian Prantl2017-03-071-1/+2
| | | | llvm-svn: 297170
* Update isl to isl-0.18-336-g1e193d9Tobias Grosser2017-03-0714-601/+36
| | | | | | This is a regular maintenance update llvm-svn: 297169
* Rephrase condition for better readability. NFCAdrian Prantl2017-03-071-1/+1
| | | | llvm-svn: 297168
* [fs] Make sure to check S_ISLNK() in fillStatus.Zachary Turner2017-03-071-0/+2
| | | | llvm-svn: 297167
* revert r297155 because there's a clang test that depends on InstCombine:Sanjay Patel2017-03-072-24/+6
| | | | | | tools/clang/test/CodeGen/zvector.c llvm-svn: 297166
* Revert "Strip debug info when inlining into a nodebug function."Adrian Prantl2017-03-073-70/+15
| | | | | | | | | | This reverts commit r296488. As noted by David Blaikie on llvm-commits, I overlooked the case of a debug function being inlined into a nodebug function being inlined into a debug function. llvm-svn: 297163
* Revert "Document that code inlined into a nodebug function also won't get any"Adrian Prantl2017-03-071-2/+1
| | | | | | | This reverts commit r296776. This statement is no longer true. llvm-svn: 297162
* Relax the conflicting function arg verifier to allow for inlined debugAdrian Prantl2017-03-072-0/+80
| | | | | | info in nodebug functions. llvm-svn: 297161
* Verfier: Move the reset of DebugFnArgs closer to other similar operations.Adrian Prantl2017-03-071-2/+1
| | | | | | NFC llvm-svn: 297160
* Revert r297132, it caused PR32171Nico Weber2017-03-072-124/+3
| | | | llvm-svn: 297159
* [tests] Make sure tests do not end in 'unreachable' - Part IIITobias Grosser2017-03-074-6/+6
| | | | | | | | | | There is no point in optimizing unreachable code, hence our test cases should always return. This commit is part of a series that makes Polly more robust on the presence of unreachables. llvm-svn: 297158
* [tests] Update bounds-check elimination test casesTobias Grosser2017-03-072-8/+8
| | | | | | | | | These test cases should work in combination with https://reviews.llvm.org/D12676, but became outdated over time. Update them in preparation of discussions with Daniel Berlin on how to represent unreachable in the post-dominator tree. llvm-svn: 297157
* [ScopInfo] Avoid infinite loop during schedule constructionTobias Grosser2017-03-071-3/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | Our current scop modeling enters an infinite loop when trying to model code that has unreachable instructions (e.g., test/ScopInfo/BoundChecks/single-loop.ll), as the number of basic blocks returned by the LLVM Loop* does not include unreachable basic blocks that branch off from the core loop body. This arises for example in the following piece of code: for (i = 0; i < N; i++) { if (i > 1024) abort(); <- this abort might be translated to an unreachable A[i] = ... } This patch adds these unreachable basic blocks in our per loop basic block count to ensure that the schedule construction does not assume a loop has been processed completely, despite certain unreachable basic blocks still remaining. The infinite loop is only observable in combination with https://reviews.llvm.org/D12676 or a similar patch. llvm-svn: 297156
* [InstCombine] shrink truncated splat shuffleSanjay Patel2017-03-072-6/+24
| | | | | | | | | | | | | This is one part of solving a recent bug report: http://lists.llvm.org/pipermail/llvm-dev/2017-February/110293.html This keeps with our general approach: changing arbitrary shuffles is off-limts, but changing splat is ok. The transform is very similar to the existing shrinkBitwiseLogic() canonicalization. Differential Revision: https://reviews.llvm.org/D30123 llvm-svn: 297155
* [Support] Add the option to not follow symlinks on stat.Zachary Turner2017-03-074-25/+19
| | | | llvm-svn: 297154
* [analyzer] Improve valist checks and move it out from alpha state.Gabor Horvath2017-03-075-100/+202
| | | | | | | | | This patch makes the valist check more robust to the different AST variants on different platforms and also fixes a FIXME. Differential Revision: https://reviews.llvm.org/D30157 llvm-svn: 297153
* Use 32 bits for alignment.Rafael Espindola2017-03-073-4/+4
| | | | | | This is consistent with what we do for input sections. llvm-svn: 297152
* [ScopDetection] Do not detect scops that exit to an unreachableTobias Grosser2017-03-074-1/+82
| | | | | | | | | | | | | | | Scops that exit with an unreachable are today still permitted, but make little sense to optimize. We therefore can already skip them during scop detection. This speeds up scop detection in certain cases and also ensures that bugpoint does not introduce unreachables when reducing test cases. In practice this change should have little impact, as the performance of unreachable code is unlikely to matter. This commit is part of a series that makes Polly more robust in the presence of unreachables. llvm-svn: 297151
* [tests] Make sure tests do not end in 'unreachable' - Part IITobias Grosser2017-03-0710-14/+14
| | | | | | | | | | There is no point in optimizing unreachable code, hence our test cases should always return. This commit is part of a series that makes Polly more robust on the presence of unreachables. llvm-svn: 297150
* Let arm_section_length store the number of bytes.Ed Schouten2017-03-072-9/+5
| | | | | | | | | | | | | | | | Exception section data that we extract for DWARF gets stored as the offset and the number of bytes. For ARM exception info, we seem to deviate from this by storing the number of entries. Attempt to make this more consistent. By storing the number of bytes, we can get rid of the EHTEntry structure declared in AddressSpace.hpp. In UnwindCursor.hpp we already have another structure declared for the same purpose. Reviewed by: Keith Walker Differential Revision: https://reviews.llvm.org/D30681 llvm-svn: 297149
* [clang-format] Followup of D30646 - unbreak the buildAndi-Bogdan Postelnicu2017-03-071-2/+2
| | | | llvm-svn: 297148
* [tests] Make sure tests do not end in 'unreachable'Tobias Grosser2017-03-075-5/+5
| | | | | | | | | | There is no point in optimizing unreachable code, hence our test cases should always return. This commit is part of a series that makes Polly more robust on the presence of unreachables. llvm-svn: 297147
* Rename remaining uses of Addralign to Alignment.Rafael Espindola2017-03-073-9/+9
| | | | llvm-svn: 297146
OpenPOWER on IntegriCloud