summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [InstCombine] Add missing commute handling to (A | B) & (B ^ (~A)) -> (A & B)Craig Topper2017-04-252-11/+10
| | | | | | | | The matching here wasn't able to handle all the possible commutes. It always assumed the not would be on the left of the xor, but that's not guaranteed. Differential Revision: https://reviews.llvm.org/D32474 llvm-svn: 301316
* [index] Index type source info for class specializationsAlex Lorenz2017-04-253-0/+37
| | | | | | rdar://31758344 llvm-svn: 301315
* [SelectionDAG] Use getBuildVector helper where possible. NFCISimon Pilgrim2017-04-254-20/+17
| | | | llvm-svn: 301314
* [AVR] Support the LDWRdPtr instruction with the same Src+Dst registerDylan McKay2017-04-254-87/+139
| | | | llvm-svn: 301313
* Revert "[DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler."Andrew Ng2017-04-254-341/+8
| | | | | | This reverts commit r301309 which is causing buildbot assertion failures. llvm-svn: 301312
* Bring back the ability opt out of padding zero-byte functions by not ↵Daniel Sanders2017-04-251-2/+7
| | | | | | | | | | | | | | providing a nop instruction. Summary: No test case since I'm not aware of an in-tree target that needs this. Reviewers: hans Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32398 llvm-svn: 301311
* [index] Record the 'SpecializationOf' relation for function specializationsAlex Lorenz2017-04-252-0/+39
| | | | | | rdar://31603531 llvm-svn: 301310
* [DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler.Andrew Ng2017-04-254-8/+341
| | | | | | | | | | | | | | | | This patch fixes a bug with the updating of DBG_VALUE's in BreakAntiDependencies. Previously, it would only attempt to update the first DBG_VALUE following the instruction whose register is being changed, potentially leaving DBG_VALUE's referring to the wrong register. Now the code will update all DBG_VALUE's that immediately follow the instruction. This issue was detected as a result of an optimized codegen difference with "-g" where an X86 byte/word fixup was not performed due to a DBG_VALUE referencing the wrong register. Differential Revision: https://reviews.llvm.org/D31755 llvm-svn: 301309
* [SelectionDAG] Pull out repeated getValueType calls. NFCI.Simon Pilgrim2017-04-252-16/+16
| | | | | | Noticed in D32391. llvm-svn: 301308
* [Compiler-rt][MIPS] Fix assert introduce with commit rl301171.Nitesh Jain2017-04-251-1/+1
| | | | llvm-svn: 301307
* Remove the home-grown android toolchain file and all references to itPavel Labath2017-04-252-186/+24
| | | | | | | | | | | | | | | Summary: The toolchain file has been deprecated in favor of the "official" toolchain file present in the Android NDK. Also update the web build instructions to reflect this. Reviewers: eugene Subscribers: srhines, mgorny, dgross, tberghammer, lldb-commits Differential Revision: https://reviews.llvm.org/D32441 llvm-svn: 301306
* [DAGCombiner] Add vector support for (srl (trunc (srl x, c1)), c2) combine.Simon Pilgrim2017-04-252-22/+22
| | | | llvm-svn: 301305
* [SimplifyLibCalls] Fix infinite loop with fast-math optimization.Andrew Ng2017-04-252-0/+78
| | | | | | | | | | | | | | | | | | One of the fast-math optimizations is to replace calls to standard double functions with their float equivalents, e.g. exp -> expf. However, this can cause infinite loops for the following: float expf(float val) { return (float) exp((double) val); } A similar inline declaration exists in the MinGW-w64 math.h header file which when compiled with -O2/3 and fast-math generates infinite loops. So this fix checks that the calling function to the standard double function that is being replaced does not match the float equivalent. Differential Revision: https://reviews.llvm.org/D31806 llvm-svn: 301304
* [SelectionDAG] Recognise splat vector isKnownToBeAPowerOfTwo one/sign bit ↵Simon Pilgrim2017-04-253-2/+142
| | | | | | shift cases. llvm-svn: 301303
* Fix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++Ismail Donmez2017-04-251-1/+1
| | | | llvm-svn: 301302
* [DeLICM] Use Known information when comparing Existing.Occupied and ↵Michael Kruse2017-04-252-8/+93
| | | | | | | | | | | | | | Proposed.Occupied. Do not conflict if the value of Existing and Proposed are the same. This change only affects unit tests, but no functional changes are expected on LLVM-IR, as no Known information is yet extracted and consequently this functionality is only triggered through unit tests. Differential Revision: https://reviews.llvm.org/D32025 llvm-svn: 301301
* [DAGCombiner] Use SDValue::getConstantOperandVal helper where possible. NFCI.Simon Pilgrim2017-04-251-7/+5
| | | | llvm-svn: 301300
* [PPCGCodeGeneration] Update PPCG Code Generation for OpenCL compatibilitySiddharth Bhat2017-04-2512-49/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | Added a small change to the way pointer arguments are set in the kernel code generation. The way the pointer is retrieved now, specifically requests global address space to be annotated. This is necessary, if the IR should be run through NVPTX to generate OpenCL compatible PTX. The changes do not affect the PTX Strings generated for the CUDA target (nvptx64-nvidia-cuda), but are necessary for OpenCL (nvptx64-nvidia-nvcl). Additionally, the data layout has been updated to what the NVPTX Backend requests/recommends. Contributed-by: Philipp Schaad Reviewers: Meinersbur, grosser, bollu Reviewed By: grosser, bollu Subscribers: jlebar, pollydev, llvm-commits, nemanjai, yaxunl, Anastasia Tags: #polly Differential Revision: https://reviews.llvm.org/D32215 llvm-svn: 301299
* [IVUsers] Don't bail out of normalizing non-affine add recsSanjoy Das2017-04-252-12/+2
| | | | | | | | | | | | | | | | | Summary: In a previous change I changed SCEV's normalization / denormalization to work with non-affine add recs. So the bailout in IVUsers can be removed. Reviewers: atrick, efriedma Reviewed By: atrick Subscribers: davide, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32105 llvm-svn: 301298
* [InstCombine] Add test cases for missing commute handling in ((A ^ C) ^ B) & ↵Craig Topper2017-04-251-0/+75
| | | | | | (B ^ A) -> (B ^ A) & ~C llvm-svn: 301297
* [InstCombine] Add test cases showing failures to handle commuted patterns ↵Craig Topper2017-04-251-0/+34
| | | | | | after tricking the operand complexity sorting. llvm-svn: 301296
* [LLDB][MIPS] Fix typo in TestStepOverWatchpoint.py.Nitesh Jain2017-04-251-1/+1
| | | | | Subscribers: jaydeep, bhushan, lldb-commits, slthakur llvm-svn: 301295
* [InstCombine] Use commutable matchers to reduce some code. NFCCraig Topper2017-04-251-4/+2
| | | | llvm-svn: 301294
* [LV] Remove redundant basic block splitGil Rapaport2017-04-251-3/+4
| | | | | | | | | | | This patch is part of D28975's breakdown. Genreating the control-flow to guard predicated instructions modified to only use SplitBlockAndInsertIfThen() for producing the if-then construct. Differential Revision: https://reviews.llvm.org/D32224 llvm-svn: 301293
* Update doc of the variadic version of getOrInsertFunctionSerge Guelton2017-04-251-1/+1
| | | | | | It no longer needs a null terminator. llvm-svn: 301292
* [CodeExtractor]: Fixup use refs of the old phi.Xinliang David Li2017-04-251-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D32468 llvm-svn: 301291
* Define __tls_get_addr as a hidden symbol even for ARM or MIPS.Rui Ueyama2017-04-251-5/+2
| | | | | | | | | | addIgnored defines a given symbol even if there is no existing symbol with the same name. So, even if libc provides __tls_get_addr, we should still be able to call addIgnored. Differential Revision: https://reviews.llvm.org/D32053 llvm-svn: 301290
* [ObjCARC] Do not sink an objc_retain past a clang.arc.use.Akira Hatanaka2017-04-253-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to do this to prevent a miscompile which sinks an objc_retain past an objc_release that releases the object objc_retain retains. This happens because the top-down and bottom-up traversals each determines the insert point for retain or release individually without knowing where the other instruction is moved. For example, when the following IR is fed to the ARC optimizer, the top-down traversal decides to insert objc_retain right before objc_release and the bottom-up traversal decides to insert objc_release right after clang.arc.use. (IR before ARC optimizer) %11 = call i8* @objc_retain(i8* %10) call void (...) @clang.arc.use(%0* %5) call void @llvm.dbg.value(...) call void @objc_release(i8* %6) This reverses the order of objc_release and objc_retain, which causes the object to be destructed prematurely. (IR after ARC optimizer) call void (...) @clang.arc.use(%0* %5) call void @objc_release(i8* %6) call void @llvm.dbg.value(...) %11 = call i8* @objc_retain(i8* %10) rdar://problem/30530580 llvm-svn: 301289
* [SimplifyLibCalls] Remove a cl::opt that's been `true` for a long time.Davide Italiano2017-04-251-5/+1
| | | | llvm-svn: 301288
* Add comments about Widnows .reloc section.Rui Ueyama2017-04-251-2/+42
| | | | llvm-svn: 301287
* Do not create temporary files in the main source tree.Rui Ueyama2017-04-251-2/+2
| | | | llvm-svn: 301286
* Placate MSVC's narrowing conversion unhappiness.Richard Smith2017-04-251-1/+1
| | | | llvm-svn: 301285
* [unittests] Derive Occupied from Unused when given.Michael Kruse2017-04-251-7/+9
| | | | | | | | | | | When both, OccupiedAndKnown and Unused are given, use the former only for the Known values. The relation Unused \union Occupied must always hold. This allows us to specify Known independently of Occupied. It is needed for an artificial test case in https://reviews.llvm.org/D32025. llvm-svn: 301284
* [unittests] Add postcondition to completeLifetime.Michael Kruse2017-04-251-0/+5
| | | | llvm-svn: 301283
* Export __progname even if a -dynamic-list is given.Rui Ueyama2017-04-252-5/+18
| | | | | | | | | | | | | | | | | BSD's __progname symbol is defined in crt1.o and linked against main executables. The libc expects that main executables export __progname symbol via .dynsym sections. In order to handle this case, we scan undefined symbols in DSOs and exported them by setting Sym->ExportDynamic to true. But it turned out that setting that variable is not enough to make sure that symbols are exported in all use cases. If a -dynamic-list option is given, all symbols not explicitly mentioned in a version script are hidden by default. That hides __progname symbol. This patch fixes the issue. Fixes https://bugs.llvm.org/show_bug.cgi?id=32703 llvm-svn: 301282
* Teach SCEV normalization to de/normalize non-affine add recsSanjoy Das2017-04-252-33/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change, SCEV Normalization would incorrectly normalize non-affine add recurrences. To work around this there was (still is) a check in place to make sure we only tried to normalize affine add recurrences. We recently found a bug in aforementioned check to bail out of normalizing non-affine add recurrences. However, instead of fixing the bailout, I have decided to teach SCEV normalization to work correctly with non-affine add recurrences, making the bailout unnecessary (I'll remove it in a subsequent change). I've also added some unit tests (which would have failed before this change). Reviewers: atrick, sunfish, efriedma Reviewed By: atrick Subscribers: mcrosier, mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D32104 llvm-svn: 301281
* Name the C++ source files for two tests correctly.Sean Callanan2017-04-242-2/+2
| | | | llvm-svn: 301280
* Replace a binary .so with a text .s.Rui Ueyama2017-04-243-20/+11
| | | | | | | Since LLD is now able to take version scripts, we no longer have to keep a pre-generated binary file for a test. llvm-svn: 301279
* Remove a useless temporary variable.Rui Ueyama2017-04-241-2/+1
| | | | llvm-svn: 301278
* Fixed two bad Makefiles that might be breaking Linux.Sean Callanan2017-04-242-2/+2
| | | | llvm-svn: 301277
* InferAddressSpaces: Use reference arguments instead of pointersMatt Arsenault2017-04-241-15/+15
| | | | llvm-svn: 301276
* [Object] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2017-04-2412-189/+287
| | | | | | other minor fixes (NFC). llvm-svn: 301275
* Revert r301089 "[builtins] Implement emulated TLS on Windows."Hans Wennborg2017-04-242-222/+67
| | | | | | | | | | | | | | | | | | | | | This broke the self-host build on Windows (PR32777). Original commit message: > [builtins] Implement emulated TLS on Windows. > > Summary: > LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows. > > Reviewers: chh, howard.hinnant > > Reviewed By: chh > > Subscribers: mgorny, llvm-commits > > Differential Revision: https://reviews.llvm.org/D30787 llvm-svn: 301274
* [Expression parser] Return both types and variablesSean Callanan2017-04-248-258/+347
| | | | | | | | | | | | | | | | | | | | | Many times a user wants to access a type when there's a variable of the same name, or a variable when there's a type of the same name. Depending on the precise context, currently the expression parser can fail to resolve one or the other. This is because ClangExpressionDeclMap has logic to limit the amount of information it searches, and that logic sometimes cuts down the search prematurely. This patch removes some of those early exits. In that sense, this patch trades performance (early exit is faster) for correctness. I've also included two new test cases showing examples of this behavior – as well as modifying an existing test case that gets it wrong. llvm-svn: 301273
* [asan] Fix Windows global dead stripping testsReid Kleckner2017-04-242-4/+4
| | | | | | | Pass /Gw to clang-cl which is equivalent to -fdata-sections. This is now necessary. llvm-svn: 301272
* [modules ts] Diagnose 'export' declarations outside of a module interface.Richard Smith2017-04-249-13/+66
| | | | llvm-svn: 301271
* InferAddressSpaces: Remove redundant assertMatt Arsenault2017-04-241-1/+0
| | | | | | | This is just asserting all the operations are handled in the switch, which the unreachable already handles. llvm-svn: 301270
* [ARM, x86] add more vector tests for bool math; NFCSanjay Patel2017-04-242-0/+64
| | | | | | | | I'm proposing a fold for increment-of-sexted-bool in: https://reviews.llvm.org/D31944 ...so we need to know what happens in more cases like these. llvm-svn: 301269
* [git-llvm] Remove CR from middle of svn propget outputReid Kleckner2017-04-241-0/+2
| | | | llvm-svn: 301268
* Make getSlotAttributes return an AttributeSet instead of a wrapper listReid Kleckner2017-04-245-34/+20
| | | | | | | | Remove the temporary, poorly named getSlotSet method which did the same thing. Also remove getSlotNode, which is a hold-over from when we were dealing with AttributeSetNode* instead of AttributeSet. llvm-svn: 301267
OpenPOWER on IntegriCloud