summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [TLI] Refactor "is integer division cheap" queries.Michael Kuperstein2015-08-196-41/+12
| | | | | | | | | | | | | This removes the isPow2SDivCheap() query, as it is not currently used in any meaningful way. isIntDivCheap() no longer relies on a state variable (as all in-tree target set it to false), but the interface allows querying based on the type optimization level. NFC. Differential Revision: http://reviews.llvm.org/D12082 llvm-svn: 245430
* More clean up, still NFC. Remove dead variables now that the casts are gone.Nick Lewycky2015-08-191-5/+4
| | | | llvm-svn: 245420
* Clean up this file a little. Remove dead casts, casting Values to Values. ↵Nick Lewycky2015-08-191-8/+8
| | | | | | Adjust some comments for typos and whitespace. NFC. llvm-svn: 245419
* Exposed findDefsUsedOutsideOfLoop as a loop utility functionAshutosh Nema2015-08-193-19/+23
| | | | | | | | | Exposed findDefsUsedOutsideOfLoop as a loop utility function by moving it from LoopDistribute to LoopUtils. Reviewed By: anemet llvm-svn: 245416
* [LPM] Teach the legacy pass manager to support *using* an analysisChandler Carruth2015-08-193-23/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | without *requiring* it. This allows a pass indicate that it will use an analysis if available (through getAnalysisIfAvailable). When the pass manager knows this, it will refrain from deleting that analysis if it can. Naturally, it will still get invalidated at the correct time. These passes are not considered when scheduling the pass pipeline, so typically they will require manual scheduling, but this may also allow passes with getAnalysisIfAvailable to find the analysis more often if nothing after them requires that analysis and it wasn't invalidated. I don't have a particular use case with the current passes, but with my new structure for alias analyses, this will be very useful. We want to allow people to customize the set of AAs available by scheduling additional passes. These's aren't ever *required* for obvious reasons. So we need some way to mark in the legacy pass manager that they will still be used if available. This is essentially how analysis groups already work. But this makes the feature generally available and more explicit. It should allow the AA change to not impact how people trigger a custom alias analysis being available at a certain point in compilation. Differential Revision: http://reviews.llvm.org/D12114 llvm-svn: 245409
* Fix how DependenceAnalysis calls delinearizationHal Finkel2015-08-193-27/+43
| | | | | | | | | | Fix how DependenceAnalysis calls delinearization, mirroring what is done in Delinearization.cpp (mostly by making sure to call getSCEVAtScope before delinearizing, and by removing the unnecessary 'Pairs == 1' check). Patch by Vaivaswatha Nagaraj! llvm-svn: 245408
* Revert "Fix PR24469 resulting from r245025 and re-enable dead store ↵Eric Christopher2015-08-193-439/+51
| | | | | | | | | | elimination across basicblocks." This is causing bootstrap problems, e.g.: http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/2960 This reverts r245195. llvm-svn: 245402
* Make ScalarEvolution::isKnownPredicate a little smarterHal Finkel2015-08-192-1/+85
| | | | | | | | | | | | | | | | | | | | | | Here we make ScalarEvolution::isKnownPredicate, indirectly, a little smarter. Given some relational comparison operator OP, and two AddRec SCEVs, {I,+,S} OP {J,+,T}, we can reduce this to the comparison I OP J when S == T, both AddRecs are for the same loop, and both are known not to wrap. As it turns out, because of the way that backedge-guard expressions can be leveraged when computing known predicates, this allows indvars to simplify the if-statement comparison in this loop: void foo (int *a, int *b, int n) { for (int i = 0; i < n; ++i) { if (i > n) a[i] = b[i] + 1; } } which, somewhat surprisingly, we were not previously optimizing away. llvm-svn: 245400
* Split ARM and AArch64 emutls.ll testChih-Hung Hsieh2015-08-192-252/+288
| | | | | | Differential Revision: http://reviews.llvm.org/D12127 llvm-svn: 245399
* MIR Serialization: Serialize MMI's variable debug information.Alex Lorenz2015-08-198-2/+263
| | | | llvm-svn: 245396
* [BasicAA] Add a test for PR24468 to be sure we won't regressQuentin Colombet2015-08-191-0/+48
| | | | | | when we finally get the GEP aliasing right. llvm-svn: 245395
* [BasicAA] Revert r221876 because it can produce incorrect aliasingQuentin Colombet2015-08-193-261/+4
| | | | | | information: see PR24468. llvm-svn: 245394
* Fix backward operands in call to isTruncateFree() and improve comments.Steve King2015-08-182-18/+21
| | | | llvm-svn: 245385
* MIR Parser: Return true on error when parsing standalone registers.Alex Lorenz2015-08-182-2/+26
| | | | llvm-svn: 245384
* MIR Serialization: Serialize the operand's bit mask target flags.Alex Lorenz2015-08-188-9/+218
| | | | | | | | | This commit adds support for bit mask target flag serialization to the MIR printer and the MIR parser. It also adds support for the machine operand's target flag serialization to the AArch64 target. Reviewers: Duncan P. N. Exon Smith llvm-svn: 245383
* use TLI.allowsMemoryAccess() to check if memory accesses are fast; NFCISanjay Patel2015-08-181-6/+11
| | | | | | | | | This consolidates use of isUnalignedMem32Slow() in one place. There is a slight change in logic although I'm not sure that it would ever come up in the real world: we were assuming that an alignment of the type size is always fast; now, we actually check the data layout to confirm that. llvm-svn: 245382
* Fix three typos in comments; "easilly" -> "easily".Nick Lewycky2015-08-183-4/+4
| | | | llvm-svn: 245379
* Support: Clean up TSan annotations.Peter Collingbourne2015-08-187-61/+43
| | | | | | | | | | | Remove support for Valgrind-based TSan, which hasn't been maintained for a few years. We now use the TSan annotations only if LLVM is compiled with -fsanitize=thread. We no longer need the weak function definitions as we are guaranteed that our program is linked directly with the TSan runtime. Differential Revision: http://reviews.llvm.org/D12121 llvm-svn: 245374
* MIR Serialization: Serialize the frame information's stack protector index.Alex Lorenz2015-08-188-3/+199
| | | | llvm-svn: 245372
* MIR Parser: Extract the code that parses stack object references into a newAlex Lorenz2015-08-181-2/+11
| | | | | | | | | | method. This commit extracts the code that parses the stack object references into a new method named 'parseStackFrameIndex', so that it can be reused when parsing standalone stack object references. llvm-svn: 245370
* [InstSimplify] Remove unused variableDavid Majnemer2015-08-181-6/+2
| | | | | | No functionality change is intended. llvm-svn: 245369
* [InstSimplify] Don't assume getAggregateElement will succeedDavid Majnemer2015-08-183-9/+14
| | | | | | | It isn't always possible to get a value from getAggregateElement. This fixes PR24488. llvm-svn: 245365
* [VectorUtils] Replace 'llvm::' qualification with 'using llvm'David Majnemer2015-08-181-18/+15
| | | | | | | No funcitonal change is intended, this just makes the file look more like the rest of LLVM. llvm-svn: 245364
* Load/store instructions for floating points with address space require SparcV9.Joerg Sonnenberger2015-08-183-41/+79
| | | | | | | | To properly handle this, define the *a instructions as separate instruction classes by refactoring the LoadA and StoreA multiclasses. Move the instruction tests into the sparcv9 file to test the difference. llvm-svn: 245360
* [X86] Refreshed sign extension tests.Simon Pilgrim2015-08-181-116/+124
| | | | llvm-svn: 245358
* Release script: correctly symlink clang-tools-extra into the build (PR22765)Hans Wennborg2015-08-181-2/+2
| | | | llvm-svn: 245355
* [X86][AVX] Added shuffle concatenation testsSimon Pilgrim2015-08-183-0/+80
| | | | llvm-svn: 245351
* DAGCombiner: Improve DAGCombiner select normalizationMatthias Braun2015-08-182-20/+60
| | | | | | | | | | | | | | | | The current code normalizes select(C0, x, select(C1, x, y)) towards select(C0|C1, x, y) if the targets prefers that form. This patch adds an additional rule that if the select(C1, x, y) part already exists in the function then we want to normalize into the other direction because the effects of reusing the existing value are bigger than transforming into the target preferred form. This addresses regressions following r238793, see also: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150727/290272.html Differential Revision: http://reviews.llvm.org/D11616 llvm-svn: 245350
* DAGCombiner: Optimize SELECTs first before turning them into SELECT_CCMatthias Braun2015-08-182-32/+49
| | | | | | | This is part of http://reviews.llvm.org/D11616 - I just decided to split this up into a separate commit. llvm-svn: 245349
* Updated constants to give more useful min/max constant folding testsSimon Pilgrim2015-08-182-84/+84
| | | | llvm-svn: 245348
* [PM/AA] Add using declarations to avoid hiding virtual overloads.Chandler Carruth2015-08-182-0/+3
| | | | | | | | | | Note that this actually has no functional change -- we never call these methods using the derived type. But it is still cleaner and fixes a GCC warning. Spotted by Dave in code review and the warning spotted by Joerg on IRC. llvm-svn: 245341
* [WinEH] Calculate state numbers for the new EH representationDavid Majnemer2015-08-188-34/+298
| | | | | | | | | | | State numbers are calculated by performing a walk from the innermost funclet to the outermost funclet. Rudimentary support for the new EH constructs has been added to the assembly printer, just enough to test the new machinery. Differential Revision: http://reviews.llvm.org/D12098 llvm-svn: 245331
* MachineRegisterInfo: Introduce isPhysRegUsed()Matthias Braun2015-08-184-14/+29
| | | | | | | | | | | | | | | | This method checks whether a physical regiser or any of its aliases are used in the function. Using this function in SIRegisterInfo::findUnusedReg() should also fix this reported failure: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150803/292143.html http://reviews.llvm.org/rL242173#inline-533 The report doesn't come with a testcase and I don't know enough about AMDGPU to create one myself. llvm-svn: 245329
* [LPM] Cleanup some loops to be range based for loops before hacking onChandler Carruth2015-08-181-19/+9
| | | | | | this code. NFC. llvm-svn: 245327
* [LPM] Group the addPreserved template with the non-template variants,Chandler Carruth2015-08-181-2/+1
| | | | | | NFC. llvm-svn: 245324
* [Kaleidoscope] Start C++11'ifying the kaleidoscope tutorials.Lang Hames2015-08-1815-982/+1037
| | | | llvm-svn: 245322
* [PM/AA] Remove the last relics of the separate IPA library from LLVM,Chandler Carruth2015-08-1829-105/+19
| | | | | | | | | | | | | | | | | | | | | folding the code into the main Analysis library. There already wasn't much of a distinction between Analysis and IPA. A number of the passes in Analysis are actually IPA passes, and there doesn't seem to be any advantage to separating them. Moreover, it makes it hard to have interactions between analyses that are both local and interprocedural. In trying to make the Alias Analysis infrastructure work with the new pass manager, it becomes particularly awkward to navigate this split. I've tried to find all the places where we referenced this, but I may have missed some. I have also adjusted the C API to continue to be equivalently functional after this change. Differential Revision: http://reviews.llvm.org/D12075 llvm-svn: 245318
* MIR Parser: Implicit register verifier should accept unexpected implicitAlex Lorenz2015-08-182-0/+43
| | | | | | subregister operands. llvm-svn: 245315
* [LVI] Use a SmallDenseMap instead of std::map for ValueCacheEntryTyBruno Cardoso Lopes2015-08-181-1/+2
| | | | | | | | | | | | | | Historically there seems to be some resistance regarding the change to DenseMap (r147980). However, I couldn't find cases of iterator invalidation for ValueCacheEntryTy, but only for ValueCache, which I left untouched. This reduces 20s on an internal testcase. Follow up from r245309. Differential Revision: http://reviews.llvm.org/D11651 rdar://problem/21320066 llvm-svn: 245314
* use minSize wrapper; NFCISanjay Patel2015-08-183-6/+3
| | | | | | | These were missed when other uses were switched over: http://llvm.org/viewvc/llvm-project?view=revision&revision=243994 llvm-svn: 245311
* [LVI] Improve LazyValueInfo compile time performanceBruno Cardoso Lopes2015-08-181-29/+32
| | | | | | | | | | | | | | | | | Changes in LoopUnroll in the past six months exposed scalability issues in LazyValueInfo when used from JumpThreading. One internal test that used to take 20s under -O2 now takes 6min. This commit change the OverDefinedCache from DenseSet<std::pair<AssertingVH<BasicBlock>, Value*>> to DenseMap<AssertingVH<BasicBlock>, SmallPtrSet<Value *, 4>> and reduces compile time down to 1m40s. Differential Revision: http://reviews.llvm.org/D11651 rdar://problem/21320066 llvm-svn: 245309
* [AArch64] Simplify the logic for computing in bounds offset. NFC.Chad Rosier2015-08-181-10/+6
| | | | llvm-svn: 245307
* [mips] Expand JAL instructions when PIC is enabled.Daniel Sanders2015-08-184-0/+323
| | | | | | | | | | | | | | Summary: This is the correct way to handle JAL instructions when PIC is enabled. Patch by Toma Tabacu Reviewers: seanbruno, tomatabacu Subscribers: brooks, seanbruno, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D6231 llvm-svn: 245305
* [MC] Convert another bunch of tests from macho-dump to llvm-readobj.Davide Italiano2015-08-1812-68/+196
| | | | | | | | This is (almost) everything under MC/MachO/ARM. There are still some cases missing, because llvm-readobj doesn't (yet) support some features, that macho-dump provides. I plan to reduce the gap between them shortly. llvm-svn: 245302
* [mips][microMIPS] Implement DDIV, DMOD, DDIVU and DMODU instructionsZoran Jovanovic2015-08-185-0/+72
| | | | | | Differential Revision: http://reviews.llvm.org/D10953 llvm-svn: 245297
* [mips][microMIPS] Implement SW and SWE instructionsZoran Jovanovic2015-08-187-0/+105
| | | | | | Differential Revision: http://reviews.llvm.org/D10869 llvm-svn: 245293
* [mips] Make the MipsAsmParser capable of knowing whether PIC mode is enabled ↵Daniel Sanders2015-08-181-0/+15
| | | | | | | | | | | | | | | | | | | or not. Summary: This information is needed to decide whether we do the PIC-only JAL expansions or not. It's also needed for an upcoming patch which implements the .cprestore assembler directive (which can only be used effectively in PIC mode). By making this information available to the MipsAsmParser, we will know when to insert the instructions mandated by the .cprestore assembler directive and we will be able to give some useful warnings when we encounter a potential misuse of this directive. Patch by Toma Tabacu Reviewers: dsanders, seanbruno Subscribers: brooks, seanbruno, rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D5626 llvm-svn: 245291
* [Support] On Windows, generate PDF files for graphs and open with associated ↵Michael Kruse2015-08-181-23/+49
| | | | | | | | | | | | | | viewer Summary: Windows system rarely have good PostScript viewers installed, but PDF viewers are common. So for viewing graphs, generate PDF files and open with the associated PDF viewer using cmd.exe's start command. Reviewers: Bigcheese, aaron.ballman Subscribers: aaron.ballman, JakeVanAdrighem, dwiberg, llvm-commits Differential Revision: http://reviews.llvm.org/D11877 llvm-svn: 245290
* [Support] Always wait for GraphViz before opening the viewerMichael Kruse2015-08-181-1/+1
| | | | | | | | | | | | | | | Summary: When calling DisplayGraph and a PS viewer is chosen, two programs are executed: The GraphViz generator and the PostScript viewer. Always for the generator to finish to ensure that the .ps file is written before opening the viewer for that file. DisplayGraph's wait parameter refers to whether to wait until the user closes the viewer. This happened on Windows and if none of the options to open the .dot file directly applies, also on Linux. Reviewers: Bigcheese, chandlerc, aaron.ballman Subscribers: dwiberg, aaron.ballman, llvm-commits Differential Revision: http://reviews.llvm.org/D11876 llvm-svn: 245289
* [mips] Correct -Woverflow warning in r245208 without changing signedness of ↵Daniel Sanders2015-08-181-2/+2
| | | | | | | | the constant. This was supposed to have been committed as part of r245208 llvm-svn: 245285
OpenPOWER on IntegriCloud