summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [BasicAliasAnalysis] Do not check ModRef table for intrinsicsIgor Laevsky2015-08-171-7/+0
| | | | | | | | All possible ModRef behaviours can be completely represented using existing LLVM IR attributes. Differential Revision: http://reviews.llvm.org/D12033 llvm-svn: 245224
* Take alignment into account in isSafeToSpeculativelyExecute and ↵Artur Pilipenko2015-08-174-52/+158
| | | | | | | | | | isSafeToLoadUnconditionally. Reviewed By: hfinkel, sanjoy, MatzeB Differential Revision: http://reviews.llvm.org/D9791 llvm-svn: 245223
* Revert "[LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValue"Pavel Labath2015-08-177-1928/+1393
| | | | | | Reverting as this commit causes an infinite loop. llvm-svn: 245222
* Extend MCAsmLexer so that it can peek forward several tokensBenjamin Kramer2015-08-173-5/+30
| | | | | | | | | | | | | | | This commit adds a virtual `peekTokens()` function to `MCAsmLexer` which can peek forward an arbitrary number of tokens. It also makes the `peekTok()` method call `peekTokens()` method, but only requesting one token. The idea is to better support targets which more more ambiguous assembly syntaxes. Patch by Dylan McKay! llvm-svn: 245221
* Correcting a -Woverflow warning where 0xFFFF was overflowing an implicit ↵Aaron Ballman2015-08-171-1/+1
| | | | | | constant conversion. llvm-svn: 245220
* [WinEHPrepare] Fix catchret successor phi demotionJoseph Tremoulet2015-08-172-0/+122
| | | | | | | | | | | | | | | | | | | | Summary: When demoting an SSA value that has a use on a phi and one of the phi's predecessors terminates with catchret, the edge needs to be split and the load inserted in the new block, else we'll still have a cross-funclet SSA value. Add a test for this, and for the similar case where a def to be spilled is on and invoke and a critical edge, which was already implemented but missing a test. Reviewers: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12065 llvm-svn: 245218
* [LLDB][MIPS] Fix offsets of all register sets and add MSA regset and FRE=1 ↵Sagar Thakur2015-08-1716-345/+1172
| | | | | | | | | | | | | | | | mode support This patch : - Fixes offsets of all register sets for Mips. - Adds MSA register set and FRE=1 mode support for FP register set. - Separates lldb register numbers and register infos of freebsd/mips64 from linux/mips64. - Re-orders the register numbers of all kinds for mips to be consistent with freebsd order of register numbers. Reviewers: jaydeep, clayborg, jasonmolenda, ovyalov, emaste Subscribers: tberghammer, ovyalov, emaste, mohit.bhakkad, nitesh.jain, bhushan Differential: http://reviews.llvm.org/D10919 llvm-svn: 245217
* [LLDB] Use llvm::APInt and llvm::APFloat in Scalar and RegisterValueSagar Thakur2015-08-177-1393/+1928
| | | | | | | | | Eliminated ENABLE_128_BIT_SUPPORT and union ValueData from Scalar.cpp and use llvm::APInt and llvm::APFloat for all integer and floating point types. Also used Scalar in RegisterValue.cpp Reviewers: jaydeep, clayborg, jasonmolenda, ovyalov, emaste Subscribers: tberghammer, ovyalov, emaste, mohit.bhakkad, nitesh.jain, bhushan Differential: http://reviews.llvm.org/D10919 llvm-svn: 245216
* [clang-tidy] Fix a use-after-free.Alexander Kornienko2015-08-171-1/+1
| | | | llvm-svn: 245215
* COFF: Fix a broken test.Rui Ueyama2015-08-171-0/+2
| | | | | | | This test couldn't be run more than once because lib.exe does not work if the files already exist. llvm-svn: 245214
* Add a field to the memory access class for a related value.Johannes Doerfert2015-08-175-51/+48
| | | | | | | | | | | | | | | | | | | | | The new field in the MemoryAccess allows us to track a value related to that access: - For real memory accesses the value is the loaded result or the stored value. - For straigt line scalar accesses it is the access instruction itself. - For PHI operand accesses it is the operand value. We use this value to simplify code which deduced information about the value later in the Polly pipeline and was known to be error prone. Reviewers: grosser, Meinsersbur Subscribers: #polly Differential Revision: http://reviews.llvm.org/D12062 llvm-svn: 245213
* Revert "Disable targetdatalayoutcheck"Tobias Grosser2015-08-172-0/+14
| | | | | | | I committed by accident a local hack that should not have made it upstream. Sorry for the noise. llvm-svn: 245212
* Fix Polly after SCEV port to new pass managerTobias Grosser2015-08-176-19/+19
| | | | | | This fixes compilation after LLVM commit r245193. llvm-svn: 245211
* Disable targetdatalayoutcheckTobias Grosser2015-08-172-14/+0
| | | | llvm-svn: 245210
* D11988: Force serial reduction when team size is 1Andrey Churbanov2015-08-171-4/+3
| | | | llvm-svn: 245209
* [mips] [IAS] Add support for the DLA pseudo-instruction and fix problems ↵Daniel Sanders2015-08-179-431/+1534
| | | | | | | | | | | | | | with DLI Summary: It is the same as LA, except that it can also load 64-bit addresses and it only works on 64-bit MIPS architectures. Reviewers: tomatabacu, seanbruno, vkalintiris Subscribers: brooks, seanbruno, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D9524 llvm-svn: 245208
* [GMR] isNonEscapingGlobalNoAlias() should look through Bitcasts/GEPs when ↵Michael Kuperstein2015-08-172-2/+3
| | | | | | | | | | looking at loads. This fixes yet another case from PR24288. Differential Revision: http://reviews.llvm.org/D12064 llvm-svn: 245207
* D11157: Fixed missed threads re-binding in case team size reduced via ↵Andrey Churbanov2015-08-171-1/+2
| | | | | | omp_set_num_threads llvm-svn: 245206
* [clang-tidy] Allow use of -list-checks option without need to pass source files.Alexander Kornienko2015-08-172-7/+18
| | | | | | | | | | | | Initialize CommonOptionsParser with ZeroOrOne NumOccurrenceFlag so callers can pass -list-checks without the need to pass additional positional parameters, then add dummy file if none were supplied. http://reviews.llvm.org/D12070 Patch by Don Hinton! llvm-svn: 245205
* [clang-tidy] Make NumOccurrenceFlag for SourcePaths configurable.Alexander Kornienko2015-08-172-4/+24
| | | | | | | | | | | | Added an additional ctor that takes a NumOccurrenceFlag parameter for the SourcePaths option. This frees applications from always having to pass at least one source file, e.g., -list-checks. http://reviews.llvm.org/D12069 Patch by Don Hinton! llvm-svn: 245204
* [FIX] Create location if a needed value was not yet demotedJohannes Doerfert2015-08-172-31/+3
| | | | | | | | | | | | | | | | | This allows the code generation to continue working even if a needed value (that is reloaded anyway) was not yet demoted. Instead of failing it will now create the location for future demotion to memory and load from that location. The stores will use the same location and by construction execute before the load even if the textual order in the generated AST is otherwise. Reviewers: grosser, Meinersbur Subscribers: #polly Differential Revision: http://reviews.llvm.org/D12072 llvm-svn: 245203
* COFF: Fix the order of the DLL import entry.Rui Ueyama2015-08-176-18/+94
| | | | | | | | | | | There are some DLLs whose initializers depends on other DLLs' initializers. The initialization order matters for them. MSVC linker uses the order of the libraries from the command line. LLD used ASCII-betical order. So they were incompatible. This patch makes LLD compatible with MSVC. llvm-svn: 245201
* COFF: Simplify Writer::createImportTables.Rui Ueyama2015-08-173-18/+17
| | | | | | | A short import library has up to two symbols, so we don't have to do a for-loop and type dispatch in createImportTables. llvm-svn: 245200
* [modules] When explicitly building a module file, don't include timestamps inRichard Smith2015-08-1711-37/+63
| | | | | | | the produced pcm file for stable file creation across distributed build systems. llvm-svn: 245199
* Remove hand-rolled matching for fmin and fmax.James Molloy2015-08-171-98/+2
| | | | | | SDAGBuilder now does this all for us. llvm-svn: 245198
* Rip out hand-rolled matching code for VMIN, VMAX, VMINNM and VMAXNMJames Molloy2015-08-171-194/+0
| | | | | | This is no longer needed - SDAGBuilder will do this for us. llvm-svn: 245197
* Generate FMINNAN/FMINNUM/FMAXNAN/FMAXNUM from SDAGBuilder.James Molloy2015-08-173-17/+38
| | | | | | | | | | These only get generated if the target supports them. If one of the variants is not legal and the other is, and it is safe to do so, the other variant will be emitted. For example on AArch32 (V8), we have scalar fminnm but not fmin. Fix up a couple of tests while we're here - one now produces better code, and the other was just plain wrong to start with. llvm-svn: 245196
* Fix PR24469 resulting from r245025 and re-enable dead store elimination ↵Karthik Bhat2015-08-173-51/+439
| | | | | | | | | | across basicblocks. PR24469 resulted because DeleteDeadInstruction in handleNonLocalStoreDeletion was deleting the next basic block iterator. Fixed the same by resetting the basic block iterator post call to DeleteDeadInstruction. llvm-svn: 245195
* Revert "[InstCombinePHI] Partial simplification of identity operations."David Majnemer2015-08-172-238/+1
| | | | | | This reverts commit r244887, it caused PR24470. llvm-svn: 245194
* [PM] Port ScalarEvolution to the new pass manager.Chandler Carruth2015-08-1743-293/+393
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes ScalarEvolution a stand-alone object and just produces one from a pass as needed. Making this work well requires making the object movable, using references instead of overwritten pointers in a number of places, and other refactorings. I've also wired it up to the new pass manager and added a RUN line to a test to exercise it under the new pass manager. This includes basic printing support much like with other analyses. But there is a big and somewhat scary change here. Prior to this patch ScalarEvolution was never *actually* invalidated!!! Re-running the pass just re-wired up the various other analyses and didn't remove any of the existing entries in the SCEV caches or clear out anything at all. This might seem OK as everything in SCEV that can uses ValueHandles to track updates to the values that serve as SCEV keys. However, this still means that as we ran SCEV over each function in the module, we kept accumulating more and more SCEVs into the cache. At the end, we would have a SCEV cache with every value that we ever needed a SCEV for in the entire module!!! Yowzers. The releaseMemory routine would dump all of this, but that isn't realy called during normal runs of the pipeline as far as I can see. To make matters worse, there *is* actually a key that we don't update with value handles -- there is a map keyed off of Loop*s. Because LoopInfo *does* release its memory from run to run, it is entirely possible to run SCEV over one function, then over another function, and then lookup a Loop* from the second function but find an entry inserted for the first function! Ouch. To make matters still worse, there are plenty of updates that *don't* trip a value handle. It seems incredibly unlikely that today GVN or another pass that invalidates SCEV can update values in *just* such a way that a subsequent run of SCEV will incorrectly find lookups in a cache, but it is theoretically possible and would be a nightmare to debug. With this refactoring, I've fixed all this by actually destroying and recreating the ScalarEvolution object from run to run. Technically, this could increase the amount of malloc traffic we see, but then again it is also technically correct. ;] I don't actually think we're suffering from tons of malloc traffic from SCEV because if we were, the fact that we never clear the memory would seem more likely to have come up as an actual problem before now. So, I've made the simple fix here. If in fact there are serious issues with too much allocation and deallocation, I can work on a clever fix that preserves the allocations (while clearing the data) between each run, but I'd prefer to do that kind of optimization with a test case / benchmark that shows why we need such cleverness (and that can test that we actually make it faster). It's possible that this will make some things faster by making the SCEV caches have higher locality (due to being significantly smaller) so until there is a clear benchmark, I think the simple change is best. Differential Revision: http://reviews.llvm.org/D12063 llvm-svn: 245193
* [ADT] Teach FoldingSet to be movable.Chandler Carruth2015-08-162-4/+34
| | | | | | | | | | This is a very minimal move support - it leaves the moved-from object in a zombie state that is only valid for destruction and move assignment. This seems fine to me, and leaving it in the default constructed state would require adding more state to the object and potentially allocating memory (!!!) and so seems like a Bad Idea. llvm-svn: 245192
* [TableGen] Use range-based for loop.Craig Topper2015-08-161-4/+2
| | | | llvm-svn: 245191
* [TableGen] Move the ConversionRow vector into the ConversionTable instead of ↵Craig Topper2015-08-161-1/+1
| | | | | | copying. llvm-svn: 245190
* [SimplifyLibCalls] Drop default template args. No functional change.Benjamin Kramer2015-08-161-4/+2
| | | | llvm-svn: 245189
* [IR] Simplify code. No functionality change.Benjamin Kramer2015-08-161-6/+4
| | | | llvm-svn: 245188
* transform fmin/fmax calls when possible (PR24314)Sanjay Patel2015-08-163-2/+169
| | | | | | | | | | | | | | | If we can ignore NaNs, fmin/fmax libcalls can become compare and select (this is what we turn std::min / std::max into). This IR should then be optimized in the backend to whatever is best for any given target. Eg, x86 can use minss/maxss instructions. This should solve PR24314: https://llvm.org/bugs/show_bug.cgi?id=24314 Differential Revision: http://reviews.llvm.org/D11866 llvm-svn: 245187
* Add 2nd test case for sdiv/srem instructions in a SCEVTobias Grosser2015-08-161-0/+43
| | | | llvm-svn: 245186
* Try to fix the lldb build on Visual C++.Yaron Keren2015-08-161-2/+2
| | | | llvm-svn: 245185
* Enable passing test on Windows + MSYS.Yaron Keren2015-08-161-1/+0
| | | | llvm-svn: 245184
* [LSR][NFC] Don’t duplicate entity name at the beginning of the comment.Sanjoy Das2015-08-161-236/+208
| | | | llvm-svn: 245183
* [LSR][NFC] Use camelCase for method names in Formula and RegUseTracker.Sanjoy Das2015-08-161-34/+34
| | | | llvm-svn: 245182
* use SDValue bool operator; NFCISanjay Patel2015-08-161-4/+3
| | | | llvm-svn: 245181
* [FIX] Add XFAIL to crashing test caseJohannes Doerfert2015-08-161-0/+4
| | | | llvm-svn: 245180
* Build the ScopStmt domain in-place.Johannes Doerfert2015-08-163-24/+16
| | | | | | | This will build the statement domains in-place, hence using the ScopStmt::Domain member instead of some intermediate isl_set. llvm-svn: 245179
* Add a crashing test case for the scalar code generationJohannes Doerfert2015-08-161-0/+66
| | | | | | | | | | | This test case crashes the scalar code generation as we are not consistent with the usage of the assumed context. To be precise, we use the assumed context for the dependence analysis but not to restrict the domains of the statements. A step by step explanation of the problem is given in the test case. llvm-svn: 245176
* Add -polly-context option to provide additional context informationTobias Grosser2015-08-163-0/+90
| | | | | | | | This option allows the user to provide additional information about parameter values as an isl_set. To specify that N has the value 1024, we can provide the context -polly-context='[N] -> {: N = 1024}'. llvm-svn: 245175
* Remove trivially true conditionJohannes Doerfert2015-08-161-3/+1
| | | | llvm-svn: 245174
* Add missing include guard.Yaron Keren2015-08-161-0/+4
| | | | llvm-svn: 245173
* Revert "Add support for cross block dse. This patch enables dead stroe ↵David Majnemer2015-08-163-404/+51
| | | | | | | | elimination across basicblocks." This reverts commit r245025, it caused PR24469. llvm-svn: 245172
* [InstCombine] Replace an and+icmp with a trunc+icmpDavid Majnemer2015-08-162-0/+40
| | | | | | | | Bitwise arithmetic can obscure a simple sign-test. If replacing the mask with a truncate is preferable if the type is legal because it permits us to rephrase the comparison more explicitly. llvm-svn: 245171
OpenPOWER on IntegriCloud