summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] Clarify 'uninitialized function argument' messagesDaniel Marjamaki2017-03-0813-89/+103
| | | | | | Differential Revision: https://reviews.llvm.org/D30341 llvm-svn: 297283
* Convert a few uses of uintX_t to uint64_t.Rafael Espindola2017-03-084-8/+7
| | | | llvm-svn: 297282
* [ScopDetection] Only allow SCoP-wide available base pointers.Michael Kruse2017-03-085-24/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify ScopDetection::isInvariant(). Essentially deny everything that is defined within the SCoP and is not load-hoisted. The previous understanding of "invariant" has a few holes: - Expressions without side-effects with only invariant arguments, but are defined withing the SCoP's region with the exception of selects and PHIs. These should be part of the index expression derived by ScalarEvolution and not of the base pointer. - Function calls with that are !mayHaveSideEffects() (typically functions with "readnone nounwind" attributes). An example is given below. @C = external global i32 declare float* @getNextBasePtr(float*) readnone nounwind ... %ptr = call float* @getNextBasePtr(float* %A, float %B) The call might return: * %A, so %ptr aliases with it in the SCoP * %B, so %ptr aliases with it in the SCoP * @C, so %ptr aliases with it in the SCoP * a new pointer everytime it is called, such as malloc() * a pointer into the allocated block of one of the aforementioned * any of the above, at random at each call Hence and contrast to a comment in the base_pointer.ll regression test, %ptr is not necessarily the same all the time. It might also alias with anything and no AliasAnalysis can tell otherwise if the definition is external. It is hence not suitable in the role of a base pointer. The practical problem with base pointers defined in SCoP statements is that it is not available globally in the SCoP. The statement instance must be executed first before the base pointer can be used. This is no problem if the base pointer is transferred as a scalar value between statements. Uses of MemoryAccess::setNewAccessRelation may add a use of the base pointer anywhere in the array. setNewAccessRelation is used by JSONImporter, DeLICM and D28518. Indeed, BlockGenerator currently assumes that base pointers are available globally and generates invalid code for new access relation (referring to the base pointer of the original code) if not, even if the base pointer would be available in the statement. This could be fixed with some added complexity and restrictions. The ExprBuilder must lookup the local BBMap and code that call setNewAccessRelation must check whether the base pointer is available first. The code would still be incorrect in the presence of aliasing. There is the switch -polly-ignore-aliasing to explicitly allow this, but it is hardly a justification for the additional complexity. It would still be mostly useless because in most cases either getNextBasePtr() has external linkage in which case the readnone nounwind attributes cannot be derived in the translation unit itself, or is defined in the same translation unit and gets inlined. Reviewed By: grosser Differential Revision: https://reviews.llvm.org/D30695 llvm-svn: 297281
* [InstCombine] avoid crashing on shuffle shrinkage when input type is not ↵Sanjay Patel2017-03-082-1/+15
| | | | | | same as result type llvm-svn: 297280
* Android.rules: fix computation of gcc toolchain directory on armPavel Labath2017-03-081-11/+11
| | | | | | | | The toolchain directory for arm android targets was computed incorrectly. The architecture part should be arm, and the environment part androideabi. This fixes that. llvm-svn: 297279
* Remove redundant member of InputSectionBase. NFC.Rafael Espindola2017-03-084-6/+13
| | | | | | With this InputSectionBase is now 144 bytes. llvm-svn: 297278
* Finalize content of synthetic sections prior to Thunk CreationPeter Smith2017-03-085-27/+56
| | | | | | | | | | | | This change moves the calls to finalizeContent() for each synthetic section before createThunks(). This will allow us to assign addresses prior to calling createThunks(). As addition of thunks may add to the static symbol table and may affect the size of the mips got section we introduce a couple of additional member functions to update these values. Differential revision: https://reviews.llvm.org/D29983 llvm-svn: 297277
* Honor __unaligned in codegen for declarations and expressionsRoger Ferrer Ibanez2017-03-087-0/+268
| | | | | | | | | | | This patch honors the unaligned type qualifier (currently available through he keyword __unaligned and -fms-extensions) in CodeGen. In the current form the patch affects declarations and expressions. It does not affect fields of classes. Differential Revision: https://reviews.llvm.org/D30166 llvm-svn: 297276
* Add more examples to clang-format configurationSylvestre Ledru2017-03-082-2/+196
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30734 llvm-svn: 297275
* [clang-format] Look at NoLineBreak and NoLineBreakInOperand before ↵Krasimir Georgiev2017-03-082-3/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | breakProtrudingToken Summary: This patch makes ContinuationIndenter call breakProtrudingToken only if NoLineBreak and NoLineBreakInOperand is false. Previously, clang-format required two runs to converge on the following example with 24 columns: Note that the second operand shouldn't be splitted according to NoLineBreakInOperand, but the token breaker doesn't take that into account: ``` func(a, "long long long long", c); ``` After first run: ``` func(a, "long long " "long long", c); ``` After second run, where NoLineBreakInOperand is taken into account: ``` func(a, "long long " "long long", c); ``` With the patch, clang-format now obtains in one run: ``` func(a, "long long long" "long", c); ``` which is a better token split overall. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30575 llvm-svn: 297274
* [ARM] Split up lsl-zero test into two testsJohn Brawn2017-03-082-99/+105
| | | | | | | | On Windows stderr and stdout happen to get interleaved in a way that causes the test to fail, so split it up into a test that checks for errors and a test that doesn't. llvm-svn: 297273
* [clang-tidy] misc-use-after-move: Fix failing assertionMartin Bohme2017-03-082-2/+24
| | | | | | | | | | | | | | | | | | | | | | Summary: I've added a test case that (without the fix) triggers the assertion, which happens when a move happens in an implicitly called conversion operator. This patch also fixes nondeterministic behavior in the source code location reported for the move when the move is constained in an init list; this was causing buildbot failures in the previous attempt to submit this patch (see D30569 and rL297004). Reviewers: alexfh Reviewed By: alexfh Subscribers: Eugene.Zelenko, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D30650 llvm-svn: 297272
* [XRay] Use AddCXXStdlibLibArgs. NFCI.Jonas Hahnfeld2017-03-081-4/+3
| | | | | | This function already does the very same thing. llvm-svn: 297271
* [LoopRotate] Propagate dbg.value intrinsicsSam Parker2017-03-082-3/+124
| | | | | | | | | | | | Recommitting patch which was previously reverted in r297159. These changes should address the casting issues. The original patch enables dbg.value intrinsics to be attached to newly inserted PHI nodes. Differential Review: https://reviews.llvm.org/D30701 llvm-svn: 297269
* clang-format: Get slightly better at understanding */&.Daniel Jasper2017-03-082-1/+3
| | | | | | | | | | Before: void f() { MACRO(A * const a); } After: void f() { MACRO(A *const a); } llvm-svn: 297268
* [X86][SSE] combineX86ShufflesRecursively can handle shuffle masks up to 64 ↵Simon Pilgrim2017-03-081-8/+7
| | | | | | | | elements wide By defining the mask types as SmallVector<int, 16> we were causing a lot of unnecessary heap usage. llvm-svn: 297267
* [scan-build-py] fix some line separator issuesLaszlo Nagy2017-03-082-6/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D30600 llvm-svn: 297266
* [clang-format] Fixed a typo in Format.cpp and a clang-tidy nit about ↵Krasimir Georgiev2017-03-081-3/+3
| | | | | | std::function copying; NFC llvm-svn: 297265
* [test] Unbreak OpenMP/linking.c with arch-specific libdirJonas Hahnfeld2017-03-081-8/+8
| | | | | | | After rL296927, -rpath gets added after linking the OpenMP runtime. That's why -lgcc does not immediately follow -lomp or -lgomp. llvm-svn: 297264
* [clang-format] Fix parameter name comment; NFCKrasimir Georgiev2017-03-081-1/+1
| | | | llvm-svn: 297263
* [clang-format] Reformat BreakableToken.h; NFCKrasimir Georgiev2017-03-081-19/+14
| | | | llvm-svn: 297262
* [clang-format] Enable comment reflowing in multiline comments containing pragmasKrasimir Georgiev2017-03-084-13/+38
| | | | | | | | | | | | | | | | | Summary: This patch enables comment reflowing of lines not matching the comment pragma regex in multiline comments containing comment pragma lines. Previously, these comments were dumped without being reindented to the result. Reviewers: djasper, mprobst Reviewed By: mprobst Subscribers: klimek, mprobst, cfe-commits Differential Revision: https://reviews.llvm.org/D30697 llvm-svn: 297261
* [Support] Remove unit test for fs::is_localJonas Hahnfeld2017-03-081-55/+0
| | | | | | | | | rL295768 introduced this test that fails if LLVM is built and tested on an NFS share. Delete the test as discussed on the corresponing commit thread. The only feasible solution would have been to introduce environment variables and to en/disable the test conditionally. llvm-svn: 297260
* Back to xfailing this. For some reason on our buildbotsJason Molenda2017-03-081-0/+1
| | | | | | | | it fails, but it works on the local workstations. I'll need to figure out what the difference is between these. <rdar://problem/30915340> llvm-svn: 297259
* TestQueues should be passing again, remove the expected fail.Jason Molenda2017-03-081-1/+0
| | | | llvm-svn: 297258
* [SLP] Fixed non-deterministic behavior in Loop Vectorizer.Amjad Aboud2017-03-082-11/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D30638 llvm-svn: 297257
* Revert "Revert "[PowerPC][ELFv2ABI] Allocate parameter area on-demand to ↵Tim Shen2017-03-082-5/+129
| | | | | | | | | | | | | reduce stack frame size"" After inspection, it's an UB in our code base. Someone cast a var-arg function pointer to a non-var-arg one. :/ Re-commit r296771 to continue testing on the patch. Sorry for the trouble! llvm-svn: 297256
* Work around an ICE on MSVC 2017.Zachary Turner2017-03-081-3/+9
| | | | | | | | MSVC 2017 was released today, and I found one bug in the compiler which prevents a successful build of LLVM. This patch works around the bug in a fairly benign way. llvm-svn: 297255
* Handle UnreachableInst in isGuaranteedToTransferExecutionToSuccessorSebastian Pop2017-03-082-0/+36
| | | | | | | | | | | A block with an UnreachableInst does not transfer execution to a successor. The problem was exposed by GVN-hoist. This patch fixes bug 32153. Patch by Aditya Kumar. Differential Revision: https://reviews.llvm.org/D30667 llvm-svn: 297254
* [SCCP] Merge markOverdefined and markAnythingOverdefined.Davide Italiano2017-03-081-23/+17
| | | | | | There's no need to have two separate APIs. llvm-svn: 297253
* [NVPTX] Remove unnecessary isImageReadoOnly(), isImageWriteOnly(), & ↵Justin Lebar2017-03-081-3/+1
| | | | | | | | | | | | isImageReadWrite calls This is repetition of isImage() function in NVPTXUtilities.cpp. Patch by Briana Grace! Differential Revision: https://reviews.llvm.org/D30706 llvm-svn: 297252
* AMDGPU: Don't wait at end of block with a trivial successorMatt Arsenault2017-03-082-4/+85
| | | | | | | | | | If there is only one successor, and that successor only has one predecessor the wait can obviously be delayed until uses or the end of the next block. This avoids code quality regressions when there are trivial fallthrough blocks inserted for structurization. llvm-svn: 297251
* [Driver] Consolidate tools and toolchains by target platform. (NFC)David L. Jones2017-03-0886-19213/+20919
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: (This is a move-only refactoring patch. There are no functionality changes.) This patch splits apart the Clang driver's tool and toolchain implementation files. Each target platform toolchain is moved to its own file, along with the closest-related tools. Each target platform toolchain has separate headers and implementation files, so the hierarchy of classes is unchanged. There are some remaining shared free functions, mostly from Tools.cpp. Several of these move to their own architecture-specific files, similar to r296056. Some of them are only used by a single target platform; since the tools and toolchains are now together, some helpers now live in a platform-specific file. The balance are helpers related to manipulating argument lists, so they are now in a new file pair, CommonArgs.h and .cpp. I've tried to cluster the code logically, which is fairly straightforward for most of the target platforms and shared architectures. I think I've made reasonable choices for these, as well as the various shared helpers; but of course, I'm happy to hear feedback in the review. There are some particular things I don't like about this patch, but haven't been able to find a better overall solution. The first is the proliferation of files: there are several files that are tiny because the toolchain is not very different from its base (usually the Gnu tools/toolchain). I think this is mostly a reflection of the true complexity, though, so it may not be "fixable" in any reasonable sense. The second thing I don't like are the includes like "../Something.h". I've avoided this largely by clustering into the current file structure. However, a few of these includes remain, and in those cases it doesn't make sense to me to sink an existing file any deeper. Reviewers: rsmith, mehdi_amini, compnerd, rnk, javed.absar Subscribers: emaste, jfb, danalbert, srhines, dschuff, jyknight, nemanjai, nhaehnle, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D30372 llvm-svn: 297250
* [DAGCombine] Simplify ISD::AND in GetDemandedBits.Eli Friedman2017-03-085-98/+84
| | | | | | | | | This helps in cases involving bitfields where an AND is exposed by legalization. Differential Revision: https://reviews.llvm.org/D30472 llvm-svn: 297249
* AMDGPU: Constant fold rcp nodeMatt Arsenault2017-03-085-33/+163
| | | | | | | When doing arcp optimization with a constant denominator, this was leaving behind rcps with constant inputs. llvm-svn: 297248
* [DebugInfo] Make legal and emit DW_OP_swap and DW_OP_xderefKonstantin Zhuravlyov2017-03-085-2/+33
| | | | | | Differential Revision: https://reviews.llvm.org/D29672 llvm-svn: 297247
* [ODRHash] Hash typedefs and usings statements in classes.Richard Trieu2017-03-082-0/+122
| | | | llvm-svn: 297246
* Fix additional constructor call missed by r297241.Daniel Sanders2017-03-071-1/+1
| | | | | | It was added between my build+test and my commit. llvm-svn: 297244
* AMDGPU/SI: Do not insert EndCf in an unreachable blockChangpeng Fang2017-03-073-3/+43
| | | | | | | | | | Reviewers: arsenm Differential Revision: http://reviews.llvm.org/D22025 llvm-svn: 297243
* [InstCombine] shrink truncated insertelement into undef vectorSanjay Patel2017-03-072-0/+70
| | | | | | | | | | | | This is the 2nd part of solving: http://lists.llvm.org/pipermail/llvm-dev/2017-February/110293.html D30123 moves the trunc ahead of the shuffle, and this moves the trunc ahead of the insertelement. We're limiting this transform to undef rather than any constant to avoid backend problems. Differential Revision: https://reviews.llvm.org/D30137 llvm-svn: 297242
* Recommit: [globalisel] Change LLT constructor string into an LLT-based ↵Daniel Sanders2017-03-0712-267/+330
| | | | | | | | | | | | | | | | | | | | object that 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. The problem with the previous commit appears to have been that TableGen was including CodeGen/LowLevelType.h instead of Support/LowLevelTypeImpl.h. 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: 297241
* [Hexagon] Check for presence before looking registers up in bit trackerKrzysztof Parzyszek2017-03-072-0/+68
| | | | llvm-svn: 297240
* [Hexagon] Generate bitsplit instructionKrzysztof Parzyszek2017-03-073-1/+170
| | | | llvm-svn: 297239
* [XRay] [compiler-rt] Mark arg1 logging test as failing on !x86_64.Dean Michael Berris2017-03-071-1/+1
| | | | | | | | | | | | | | | | Summary: rL297000 and rL297003 implemented arg1 logging on amd64 and made other architectures build. We need to blacklist the new test as well. Reviewers: dberris, timshen Reviewed By: dberris Subscribers: sdardis, llvm-commits Differential Revision: https://reviews.llvm.org/D30635 llvm-svn: 297238
* GlobalISel: use inserts for landingpad instead of sequences.Tim Northover2017-03-073-29/+41
| | | | llvm-svn: 297237
* Fix one-after-the-end type metadata handling in globalsplit.Evgeniy Stepanov2017-03-072-8/+23
| | | | | | | | | | Itanium ABI may have an address point one byte after the end of a vtable. When such vtable global is split, the !type metadata needs to follow the right vtable. Differential Revision: https://reviews.llvm.org/D30716 llvm-svn: 297236
* Fix GNU strerror_r check for Android.Dan Albert2017-03-071-1/+3
| | | | | | | | | | | | | | | | | Summary: Bionic didn't get a GNU style strerror_r until Android M. Until then we unconditionally exposed the POSIX one. Expand the check to account for this. Reviewers: pirama, AndreyChurbanov, jlpeyton Reviewed By: jlpeyton Subscribers: openmp-commits, srhines Differential Revision: https://reviews.llvm.org/D30056 llvm-svn: 297235
* ADT: Fix SmallPtrSet iterators in reverse modeDuncan P. N. Exon Smith2017-03-072-29/+48
| | | | | | | | | | | | | | | | | | | | | | | | Fix SmallPtrSet::iterator behaviour and creation ReverseIterate is true. - Any function that creates an iterator now uses SmallPtrSet::makeIterator, which creates an iterator that dereferences to the given pointer. - In reverse-iterate mode, initialze iterator::End with "CurArray" instead of EndPointer. - In reverse-iterate mode, the current node is iterator::Buffer[-1]. iterator::operator* and SmallPtrSet::makeIterator are the only ones that need to know. - Fix the assertions for reverse-iterate mode. This fixes the tests Danny B added in r297182, and adds a couple of others to confirm that dereferencing does the right thing, regardless of how the iterator was found, and that iteration works correctly from each return from find. llvm-svn: 297234
* Fix source-lines test on Windows.Zachary Turner2017-03-071-7/+7
| | | | llvm-svn: 297233
* [InstCombine] shrink truncated splat shuffle (2nd try)Sanjay Patel2017-03-072-6/+24
| | | | | | | | | | | | | | | | This was committed at r297155 and reverted at r297166 because of an over-reaching clang test. That should be fixed with r297189. 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: 297232
OpenPOWER on IntegriCloud