summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/BasicAA
Commit message (Collapse)AuthorAgeFilesLines
...
* Modify the LLVM assembly output so that it uses references to represent ↵Bill Wendling2013-02-202-0/+6
| | | | | | | | | | | function attributes. This makes the LLVM assembly look better. E.g.: define void @foo() #0 { ret void } attributes #0 = { nounwind noinline ssp } llvm-svn: 175605
* Optimistically analyse Phi cyclesArnold Schwaighofer2012-12-101-2/+63
| | | | | | | | | | Analyse Phis under the starting assumption that they are NoAlias. Recursively look at their inputs. If they MayAlias/MustAlias there must be an input that makes them so. Addresses bug 14351. llvm-svn: 169788
* Phi speculation improvement for BasicAAHal Finkel2012-11-171-0/+71
| | | | | | | | | | | | This is a partial solution to PR14351. It removes some of the special significance of the first incoming phi value in the phi aliasing checking logic in BasicAA. In the context of a loop, the old logic assumes that the first incoming value is the interesting one (meaning that it is the one that comes from outside the loop), but this is often not the case. With this change, we now test first the incoming value that comes from a block other than the parent of the phi being tested. llvm-svn: 168245
* Don't infer whether a value is captured in the current function from theRichard Osborne2012-11-051-0/+21
| | | | | | | | | | 'nocapture' attribute. The nocapture attribute only specifies that no copies are made that outlive the function. This isn't the same as there being no copies at all. This fixes PR14045. llvm-svn: 167381
* BasicAA: Recognize cyclic NoAlias phisArnold Schwaighofer2012-09-061-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhances basic alias analysis to recognize phis whose first incoming values are NoAlias and whose other incoming values are just the phi node itself through some amount of recursion. Example: With this change basicaa reports that ptr_phi and ptr_phi2 do not alias each other. bb: ptr = ptr2 + 1 loop: ptr_phi = phi [bb, ptr], [loop, ptr_plus_one] ptr2_phi = phi [bb, ptr2], [loop, ptr2_plus_one] ... ptr_plus_one = gep ptr_phi, 1 ptr2_plus_one = gep ptr2_phi, 1 This enables the elimination of one load in code like the following: extern int foo; int test_noalias(int *ptr, int num, int* coeff) { int *ptr2 = ptr; int result = (*ptr++) * (*coeff--); while (num--) { *ptr2++ = *ptr; result += (*coeff--) * (*ptr++); } *ptr = foo; return result; } Part 2/2 of fix for PR13564. llvm-svn: 163319
* BasicAA: GEPs of NoAlias'ing base ptr with equivalent indices are NoAliasArnold Schwaighofer2012-09-061-0/+54
| | | | | | | | | | | | If we can show that the base pointers of two GEPs don't alias each other using precise analysis and the indices and base offset are equal then the two GEPs also don't alias each other. This is primarily needed for the follow up patch that analyses NoAlias'ing PHI nodes. Part 1/2 of fix for PR13564. llvm-svn: 163317
* Convert the uses of '|&' to use '2>&1 |' instead, which works on oldChandler Carruth2012-07-0217-17/+17
| | | | | | | | | | versions of Bash. In addition, I can back out the change to the lit built-in shell test runner to support this. This should fix the majority of fallout on Darwin, but I suspect there will be a few straggling issues. llvm-svn: 159544
* FileCheck-ize these tests. Harden some of them.Bill Wendling2012-04-2428-82/+159
| | | | llvm-svn: 155432
* Duncan pointed out that if the alignment isn't explicitly specified, it ↵Eli Friedman2012-02-271-1/+1
| | | | | | defaults to the ABI alignment. Given that, make this code a bit more aggressive in such cases. llvm-svn: 151584
* Teach BasicAA about the LLVM IR rules that allow reading past the end of an ↵Eli Friedman2012-02-272-1/+26
| | | | | | object given sufficient alignment. Fixes PR12098. llvm-svn: 151553
* Replace all instances of dg.exp file with lit.local.cfg, since all tests are ↵Eli Bendersky2012-02-162-3/+1
| | | | | | | | run with LIT now and now Dejagnu. dg.exp is no longer needed. Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches. llvm-svn: 150664
* Manually upgrade the test suite to specify the flag to cttz and ctlz.Chandler Carruth2011-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | I followed three heuristics for deciding whether to set 'true' or 'false': - Everything target independent got 'true' as that is the expected common output of the GCC builtins. - If the target arch only has one way of implementing this operation, set the flag in the way that exercises the most of codegen. For most architectures this is also the likely path from a GCC builtin, with 'true' being set. It will (eventually) require lowering away that difference, and then lowering to the architecture's operation. - Otherwise, set the flag differently dependending on which target operation should be tested. Let me know if anyone has any issue with this pattern or would like specific tests of another form. This should allow the x86 codegen to just iteratively improve as I teach the backend how to differentiate between the two forms, and everything else should remain exactly the same. llvm-svn: 146370
* Upgrade syntax of tests using volatile instructions to use 'load volatile' ↵Chris Lattner2011-11-272-10/+10
| | | | | | instead of 'volatile load', which is archaic. llvm-svn: 145171
* PR10628: Fix getModRefInfo so it queries the underlying alias() ↵Eli Friedman2011-09-281-1/+16
| | | | | | implementation correctly while checking nocapture calls. llvm-svn: 140666
* Enhance alias analysis for atomic instructions a bit. Upgrade a couple ↵Eli Friedman2011-09-262-6/+2
| | | | | | alias-analysis tests to the new atomic instructions. llvm-svn: 140557
* Fix the logic in BasicAliasAnalysis::aliasGEP for comparing GEP's with ↵Eli Friedman2011-09-081-0/+32
| | | | | | variable differences so that it actually does something sane. Fixes PR10881. llvm-svn: 139276
* Teach BasicAA about the aliasing properties of memset_pattern16.Owen Anderson2011-09-061-0/+21
| | | | | | Fixes PR10872 and <rdar://problem/10065079>. llvm-svn: 139204
* Move the loads after the calls so that the fix forRafael Espindola2011-07-091-48/+48
| | | | | | | PR10292 doesn't show that the loads don't alias the allocas. llvm-svn: 134852
* Use CHECK-NEXT.Rafael Espindola2011-07-091-259/+260
| | | | llvm-svn: 134850
* rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which isChris Lattner2011-06-182-13/+15
| | | | | | | | | for pre-2.9 bitcode files. We keep x86 unaligned loads, movnt, crc32, and the target indep prefetch change. As usual, updating the testsuite is a PITA. llvm-svn: 133337
* make the asmparser reject function and type redefinitions. 'Merging' hasn't ↵Chris Lattner2011-06-171-2/+0
| | | | | | | | been needed since llvm-gcc 3.4 days. llvm-svn: 133248
* Remove support for using "foo" as symbols instead of %"foo". This is ancientChris Lattner2011-06-172-42/+0
| | | | | | | syntax and has been long obsolete. As usual, updating the tests is the nasty part of this. llvm-svn: 133242
* manually upgrade a bunch of tests to modern syntax, and remove some thatChris Lattner2011-06-171-15/+0
| | | | | | are either unreduced or only test old syntax. llvm-svn: 133228
* Reapply r131781, now that the GVN bug with partially-aliasing loadsDan Gohman2011-06-041-1/+1
| | | | | | is disabled. llvm-svn: 132632
* Revert r131781 again. Apparently there is more going on here.Dan Gohman2011-06-041-1/+1
| | | | llvm-svn: 132625
* Reapply r131781 (revert r131809), now that some BasicAA shortcomingsDan Gohman2011-06-041-1/+1
| | | | | | it exposed are fixed. llvm-svn: 132611
* Fix BasicAA's recursion detection so that it doesn't pessimizeDan Gohman2011-06-041-0/+41
| | | | | | | | | queries in the case of a DAG, where a query reaches a node visited earlier, but it's not on a cycle. This avoids MayAlias results in cases where BasicAA is expected to return MustAlias or PartialAlias in order to protect TBAA. llvm-svn: 132609
* When merging MustAlias and PartialAlias, chose PartialAlias insteadDan Gohman2011-06-031-0/+39
| | | | | | of conservatively choosing MayAlias. llvm-svn: 132579
* Make DecomposeGEPExpression check SimplifyInstruction onlyDan Gohman2011-05-241-0/+25
| | | | | | | | after checking for a GEP, so that it matches what GetUnderlyingObject does. This fixes an obscure bug turned up by bugpoint in the testcase for PR9931. llvm-svn: 131971
* I missed a checking with my GVN change. Chris Lattner2011-05-221-2/+2
| | | | llvm-svn: 131851
* Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.Duncan Sands2011-05-211-1/+1
| | | | | | | | | Original log message: When BasicAA can determine that two pointers have the same base but differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131809
* When BasicAA can determine that two pointers have the same base butDan Gohman2011-05-211-1/+1
| | | | | | | differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131781
* Teach BasicAA about arm.neon.vld1 and vst1.Dan Gohman2011-04-271-0/+16
| | | | llvm-svn: 130327
* When analyzing functions known to only access argument pointees,Dan Gohman2011-04-271-0/+23
| | | | | | | | | only check arguments with pointer types. Update the documentation of IntrReadArgMem reflect this. While here, add support for TBAA tags on intrinsic calls. llvm-svn: 130317
* PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoadEli Friedman2011-04-071-1/+1
| | | | | | | | | | | is equivalent to any other relevant value; it isn't true in general. If it is equivalent, the LoopPromoter will tell the AST the equivalence. Also, delete the PreheaderLoad if it is unused. Chris, since you were the last one to make major changes here, can you check that this is sane? llvm-svn: 129049
* Revert r128140 for now.Anders Carlsson2011-03-231-19/+0
| | | | llvm-svn: 128149
* A global variable with internal linkage where all uses are in one function ↵Anders Carlsson2011-03-231-0/+19
| | | | | | and whose address is never taken is a non-escaping local object and can't alias anything else. llvm-svn: 128140
* Add another rdar number.Dan Gohman2011-01-241-1/+1
| | | | llvm-svn: 124125
* Teach BasicAA to return PartialAlias in cases where both pointersDan Gohman2011-01-181-0/+33
| | | | | | | | are pointing to the same object, one pointer is accessing the entire object, and the other is access has a non-zero size. This prevents TBAA from kicking in and saying NoAlias in such cases. llvm-svn: 123775
* fix rdar://8813415 - a miscompilation of 164.gzip that loop-idiomChris Lattner2011-01-031-0/+22
| | | | | | exposed. It turns out to be a latent bug in basicaa, scary. llvm-svn: 122772
* filecheckizeChris Lattner2011-01-031-6/+8
| | | | llvm-svn: 122771
* Move Sub simplifications and additional Add simplifications out ofDuncan Sands2010-12-151-2/+2
| | | | | | instcombine and into InstructionSimplify. llvm-svn: 121861
* remove fixme comment too.Chris Lattner2010-11-301-3/+3
| | | | llvm-svn: 120493
* check in *all* files. This is now handled by my previous DSE commit.Chris Lattner2010-11-301-1/+1
| | | | llvm-svn: 120492
* Delete unneeded ssp attributes.Dan Gohman2010-11-112-2/+2
| | | | llvm-svn: 118836
* Make BasicAliasAnalysis a normal AliasAnalysis implementation whichDan Gohman2010-10-1825-25/+25
| | | | | | | | | | | | does normal initialization and normal chaining. Change the default AliasAnalysis implementation to NoAlias. Update StandardCompileOpts.h and friends to explicitly request BasicAliasAnalysis. Update tests to explicitly request -basicaa. llvm-svn: 116720
* PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bitEli Friedman2010-09-151-0/+15
| | | | | | targets. llvm-svn: 114015
* remove some noise from tests.Chris Lattner2010-09-021-64/+64
| | | | llvm-svn: 112889
* Fix constant-over-index.ll test on windows.Michael J. Spencer2010-08-301-2/+3
| | | | llvm-svn: 112483
* refix PR1143 by making basicaa analyze zexts of indices aggresively,Chris Lattner2010-08-181-7/+7
| | | | | | which I broke with a recent patch. llvm-svn: 111452
OpenPOWER on IntegriCloud