Kenneth Uildriks
e711736014
Make opt default to not adding a target data string and update tests that depend on target data to supply it within the test
...
llvm-svn: 85900
2009-11-03 15:29:06 +00:00
Dan Gohman
c8468855a7
Teach BasicAA how to analyze Select instructions, and make it more
...
aggressive on PHI instructions.
llvm-svn: 85158
2009-10-26 21:55:43 +00:00
Chris Lattner
eebed04912
fix test
...
llvm-svn: 84405
2009-10-18 05:03:00 +00:00
Chris Lattner
8db424f027
tighten up test3, add test3a for the converse
...
transform, which isn't happening yet.
llvm-svn: 84402
2009-10-18 04:55:26 +00:00
Chris Lattner
aff491fab6
tighten test2, add a test that it doesn't get transformed in the invalid edge case.
...
llvm-svn: 84401
2009-10-18 04:50:18 +00:00
Nick Lewycky
671ca16583
Merge tests into modref.ll. Also add a test for r84174 at Chris' behest!
...
llvm-svn: 84400
2009-10-18 04:41:36 +00:00
Nick Lewycky
d21c892821
Add a couple new testcases.
...
llvm-svn: 84385
2009-10-18 00:42:07 +00:00
Chris Lattner
1ed26100a4
replace a useless test with a useful one
...
llvm-svn: 84383
2009-10-17 23:59:51 +00:00
Nick Lewycky
0498027dec
Make use of the result of the loads even though that means adding -instcombine.
...
llvm-svn: 84125
2009-10-14 19:02:13 +00:00
Evan Cheng
907fd9c3fb
Another BasicAA fix. If a value does not alias a GEP's base pointer, then it
...
cannot alias the GEP. GEP pointer alias rule states this clearly:
A pointer value formed from a getelementptr instruction is associated with the
addresses associated with the first operand of the getelementptr.
llvm-svn: 84079
2009-10-14 06:41:49 +00:00
Evan Cheng
b193d9df99
Replace test with a simpler hand crafted one.
...
llvm-svn: 84069
2009-10-14 01:45:10 +00:00
Evan Cheng
3130aba687
Teach basic AA about PHI nodes. If all operands of a phi NoAlias another value than it's safe to declare the PHI NoAlias the value. Ditto for MustAlias.
...
llvm-svn: 84038
2009-10-13 22:02:20 +00:00
Chris Lattner
a433d8cb67
don't use dead loads as tests.
...
llvm-svn: 83985
2009-10-13 17:39:29 +00:00
Nick Lewycky
72f185f281
Teach BasicAA a little something about the atomic intrinsics: they can only
...
modify through the pointer they're given.
llvm-svn: 83959
2009-10-13 07:48:38 +00:00
Dan Gohman
c9307490ce
Eliminate more redundant llvm-as calls.
...
llvm-svn: 81540
2009-09-11 18:17:12 +00:00
Dan Gohman
205b641954
Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
...
input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.
llvm-svn: 81537
2009-09-11 18:01:28 +00:00
Dan Gohman
142428ce64
Eliminate more uses of llvm-as and llvm-dis.
...
llvm-svn: 81293
2009-09-09 00:09:15 +00:00
Dan Gohman
a3ab9b3b9e
Convert a few more opt | llvm-dis to opt -S.
...
llvm-svn: 81261
2009-09-08 22:41:33 +00:00
Dan Gohman
c95df8b6d8
Use opt -S instead of piping bitcode output through llvm-dis.
...
llvm-svn: 81257
2009-09-08 22:34:10 +00:00
Dan Gohman
8d84372836
Change these tests to feed the assembly files to opt directly, instead
...
of using llvm-as, now that opt supports this.
llvm-svn: 81226
2009-09-08 16:50:01 +00:00
Chris Lattner
4c06cf3a4f
rename test so that name reflects what it is testing for.
...
llvm-svn: 80519
2009-08-30 21:36:39 +00:00
Chris Lattner
0ad4b1ca5e
convert to filecheck format.
...
llvm-svn: 80518
2009-08-30 21:36:06 +00:00
Dan Gohman
5dd6f54a5f
Teach BasicAliasAnalysis to understand constant gep indices that fall
...
beyond their associated static array type.
I believe that this fixes a legitimate bug, because BasicAliasAnalysis
already has code to check for this condition that works for non-constant
indices, however it was missing the case of constant indices. With this
change, it checks for both.
This fixes PR4267, and miscompiles of SPEC 188.ammp and 464.h264.href.
llvm-svn: 72451
2009-05-27 01:48:27 +00:00
Chris Lattner
f8afc9ecda
change this to test for an alias result more directly.
...
llvm-svn: 67046
2009-03-16 18:28:27 +00:00
Nick Lewycky
d271c19fea
Add a replacement for 2009-02-12-GEPNoalias.ll that works without -debug.
...
llvm-svn: 67011
2009-03-14 19:40:09 +00:00
Chris Lattner
5972bc6234
remove a buggy test, it is not ok to use -debug in RUN line.
...
llvm-svn: 66918
2009-03-13 18:19:34 +00:00
Nick Lewycky
f6c8dc0825
BasicAA was making the assumption that a local allocation which hadn't escaped
...
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.
llvm-svn: 64442
2009-02-13 07:06:27 +00:00
Owen Anderson
c418b82207
Finish making AliasAnalysis aware of the fact that most atomic intrinsics only dereference their arguments, and enhance
...
BasicAA to make use of this fact when computing ModRef info.
llvm-svn: 63718
2009-02-04 05:16:46 +00:00
Nick Lewycky
8f96b51785
Resubmit support for the 'nocapture' attribute.
...
The problematic part of this patch is that we were out of attribute bits,
requiring some fancy bit hacking to make it fit (by shrinking alignment)
without breaking existing users or the file format.
This change will require users to rebuild llvm-gcc to match llvm.
llvm-svn: 61239
2008-12-19 06:39:12 +00:00
Bill Wendling
905350a341
Remove empty test.
...
llvm-svn: 61095
2008-12-16 19:07:17 +00:00
Bill Wendling
f807a68f2e
Temporarily revert r61019, r61030, and r61040. These were breaking LLVM Release
...
builds.
llvm-svn: 61094
2008-12-16 19:06:48 +00:00
Chris Lattner
0e79aa6595
Teach basicaa to use the nocapture attribute when possible. When the
...
intrinsics are properly marked nocapture, the fixme should be addressed.
llvm-svn: 61040
2008-12-15 18:59:22 +00:00
Chris Lattner
e2b5854e41
Allow basicaa to walk through geps with identical indices in
...
parallel, allowing it to decide that P/Q must alias if A/B
must alias in things like:
P = gep A, 0, i, 1
Q = gep B, 0, i, 1
This allows GVN to delete 62 more instructions out of 403.gcc.
llvm-svn: 60820
2008-12-10 01:04:47 +00:00
Nick Lewycky
47fa9bd187
Extend the 'noalias' attribute to function return values. This is intended to
...
indicate functions that allocate, such as operator new, or list::insert. The
actual definition is slightly less strict (for now).
No changes to the bitcode reader/writer, asm printer or verifier were needed.
llvm-svn: 59934
2008-11-24 03:41:24 +00:00
Owen Anderson
42c1d6c7b9
Remove GCSE and LoadVN from the testsuite.
...
llvm-svn: 54832
2008-08-16 00:00:54 +00:00
Chris Lattner
e987a3bdd1
If we are checking to see if the result of a call aliases a
...
pointer derived from a local allocation, if the local allocation
never escapes, the pointers can't alias. This implements PR2436
llvm-svn: 52301
2008-06-16 06:19:11 +00:00
Matthijs Kooijman
82d762a948
Suppress the (stderr) output of -aa-eval, this fixes 5 tests.
...
llvm-svn: 52173
2008-06-10 12:39:15 +00:00
Wojciech Matyjewicz
06e4c8a420
Fixes PR2395. Looking for a constant in a GEP tail (when the first GEP
...
is longer than the second one) should stop after finding one. Added break
instruction guarantees it. It also changes difference between offsets to
absolute value of this difference in the condition.
llvm-svn: 51875
2008-06-02 17:26:12 +00:00
Gabor Greif
807c2df887
sabre brings to my attention that the 'tr' suffix is also obsolete
...
llvm-svn: 51349
2008-05-20 21:00:03 +00:00
Gabor Greif
d8a4dbb5da
Rename the last test with .llx extension to .ll, resolve duplicate test by renaming to isnan2. Now that no test has llx ending there is no need to search for them from dg.exp too.
...
llvm-svn: 51328
2008-05-20 19:52:04 +00:00
Owen Anderson
3e607df2f8
Fix this test. It was testing broken behavior in that it required ADCE to eliminate
...
a potentially infinite loop, which is undesirable. Instead, test the LICM behavior
that we're really interested in.
llvm-svn: 51177
2008-05-16 04:25:09 +00:00
Chris Lattner
a9d8d647ca
rename *.llx -> *.ll, last batch.
...
llvm-svn: 49971
2008-04-19 22:32:52 +00:00
Owen Anderson
cd1b9c4b43
Make GVN able to remove unnecessary calls to read-only functions again.
...
llvm-svn: 49842
2008-04-17 05:36:50 +00:00
Dale Johannesen
45e14f7753
Don't assume a tail call can't reference a byval
...
argument to the outer function, this isn't correct.
llvm-svn: 49731
2008-04-15 17:41:34 +00:00
Owen Anderson
a6d1d8dec2
The functionality being tested was removed because it was horribly unsafe.
...
llvm-svn: 49610
2008-04-13 09:51:06 +00:00
Gabor Greif
fd0fb616f8
Fix http://llvm.org/bugs/show_bug.cgi?id=2104 by ordering lexicographically what gets printed. Be const-correct in PrintResults and uninline it too
...
llvm-svn: 47712
2008-02-28 08:38:45 +00:00
Tanya Lattner
f37f44f9ec
Remove llvm-upgrade.
...
llvm-svn: 47110
2008-02-14 06:56:27 +00:00
Chris Lattner
cd5013eb2f
Teach basicaa that 'byval' arguments define a new memory location that
...
can't be aliased to other known objects. This allows us to know that byval
pointer args don't alias globals, etc.
llvm-svn: 46315
2008-01-24 18:00:32 +00:00
Nick Lewycky
e05651c6d7
Accept both %y, %x and %x, %y as valid answers.
...
llvm-svn: 45649
2008-01-06 03:12:44 +00:00
Chris Lattner
95f9743c43
Fix PR1782, patch by Wojtek Matyjewicz!
...
llvm-svn: 44733
2007-12-09 07:35:13 +00:00