Eli Friedman
5f476dc3ef
PR10628: Fix getModRefInfo so it queries the underlying alias() implementation correctly while checking nocapture calls.
...
llvm-svn: 140666
2011-09-28 00:34:27 +00:00
Eli Friedman
5c91891cf3
Enhance alias analysis for atomic instructions a bit. Upgrade a couple alias-analysis tests to the new atomic instructions.
...
llvm-svn: 140557
2011-09-26 20:15:28 +00:00
Eli Friedman
3d1b307672
Fix the logic in BasicAliasAnalysis::aliasGEP for comparing GEP's with variable differences so that it actually does something sane. Fixes PR10881.
...
llvm-svn: 139276
2011-09-08 02:23:31 +00:00
Owen Anderson
653cb03191
Teach BasicAA about the aliasing properties of memset_pattern16.
...
Fixes PR10872 and <rdar://problem/10065079>.
llvm-svn: 139204
2011-09-06 23:33:25 +00:00
Rafael Espindola
7161661863
Move the loads after the calls so that the fix for
...
PR10292 doesn't show that the loads don't alias
the allocas.
llvm-svn: 134852
2011-07-09 23:53:58 +00:00
Rafael Espindola
7fbab4dcc7
Use CHECK-NEXT.
...
llvm-svn: 134850
2011-07-09 22:56:50 +00:00
Chris Lattner
80ed9dc9e5
rip out a ton of intrinsic modernization logic from AutoUpgrade.cpp, which is
...
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
2011-06-18 06:05:24 +00:00
Chris Lattner
5756c16cdf
make the asmparser reject function and type redefinitions. 'Merging' hasn't been
...
needed since llvm-gcc 3.4 days.
llvm-svn: 133248
2011-06-17 07:06:44 +00:00
Chris Lattner
def1949c00
Remove support for using "foo" as symbols instead of %"foo". This is ancient
...
syntax and has been long obsolete. As usual, updating the tests is the nasty
part of this.
llvm-svn: 133242
2011-06-17 06:36:20 +00:00
Chris Lattner
b90ed2233c
manually upgrade a bunch of tests to modern syntax, and remove some that
...
are either unreduced or only test old syntax.
llvm-svn: 133228
2011-06-17 03:14:27 +00:00
Dan Gohman
adf80ae9e4
Reapply r131781, now that the GVN bug with partially-aliasing loads
...
is disabled.
llvm-svn: 132632
2011-06-04 06:50:18 +00:00
Dan Gohman
87fdceaf73
Revert r131781 again. Apparently there is more going on here.
...
llvm-svn: 132625
2011-06-04 05:11:22 +00:00
Dan Gohman
27b82f2f91
Reapply r131781 (revert r131809), now that some BasicAA shortcomings
...
it exposed are fixed.
llvm-svn: 132611
2011-06-04 00:46:31 +00:00
Dan Gohman
fb02cec44e
Fix BasicAA's recursion detection so that it doesn't pessimize
...
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
2011-06-04 00:31:50 +00:00
Dan Gohman
4e7e7958d7
When merging MustAlias and PartialAlias, chose PartialAlias instead
...
of conservatively choosing MayAlias.
llvm-svn: 132579
2011-06-03 20:17:36 +00:00
Dan Gohman
0573b55c2b
Make DecomposeGEPExpression check SimplifyInstruction only
...
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
2011-05-24 18:24:08 +00:00
Chris Lattner
408cfef6f0
I missed a checking with my GVN change.
...
llvm-svn: 131851
2011-05-22 07:20:02 +00:00
Duncan Sands
5ec65765e6
Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.
...
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
2011-05-21 20:54:46 +00:00
Dan Gohman
8b20187c82
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: 131781
2011-05-21 01:05:08 +00:00
Dan Gohman
5394c70d1e
Teach BasicAA about arm.neon.vld1 and vst1.
...
llvm-svn: 130327
2011-04-27 20:44:28 +00:00
Dan Gohman
39b3a1ef7f
When analyzing functions known to only access argument pointees,
...
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
2011-04-27 18:39:03 +00:00
Eli Friedman
c5f22a7815
PR9634: Don't unconditionally tell the AliasSetTracker that the PreheaderLoad
...
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
2011-04-07 01:35:06 +00:00
Anders Carlsson
c4f0ab397c
Revert r128140 for now.
...
llvm-svn: 128149
2011-03-23 15:51:12 +00:00
Anders Carlsson
9ed8d93f55
A global variable with internal linkage where all uses are in one function and whose address is never taken is a non-escaping local object and can't alias anything else.
...
llvm-svn: 128140
2011-03-23 02:19:48 +00:00
Dan Gohman
4deda530c2
Add another rdar number.
...
llvm-svn: 124125
2011-01-24 17:54:01 +00:00
Dan Gohman
44da55b7be
Teach BasicAA to return PartialAlias in cases where both pointers
...
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
2011-01-18 21:16:06 +00:00
Chris Lattner
16e42128c2
fix rdar://8813415 - a miscompilation of 164.gzip that loop-idiom
...
exposed. It turns out to be a latent bug in basicaa, scary.
llvm-svn: 122772
2011-01-03 21:03:33 +00:00
Chris Lattner
12fa3c6a94
filecheckize
...
llvm-svn: 122771
2011-01-03 21:01:26 +00:00
Duncan Sands
0a2c416894
Move Sub simplifications and additional Add simplifications out of
...
instcombine and into InstructionSimplify.
llvm-svn: 121861
2010-12-15 14:07:39 +00:00
Chris Lattner
d513faf41f
remove fixme comment too.
...
llvm-svn: 120493
2010-11-30 23:25:01 +00:00
Chris Lattner
370797a1fb
check in *all* files. This is now handled by my previous DSE commit.
...
llvm-svn: 120492
2010-11-30 23:23:59 +00:00
Dan Gohman
22e0e1cecb
Delete unneeded ssp attributes.
...
llvm-svn: 118836
2010-11-11 21:08:46 +00:00
Dan Gohman
02538ac4d3
Make BasicAliasAnalysis a normal AliasAnalysis implementation which
...
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
2010-10-18 18:04:47 +00:00
Eli Friedman
ab3a128582
PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
...
targets.
llvm-svn: 114015
2010-09-15 20:08:03 +00:00
Chris Lattner
bb451461ec
remove some noise from tests.
...
llvm-svn: 112889
2010-09-02 22:35:33 +00:00
Michael J. Spencer
7983340465
Fix constant-over-index.ll test on windows.
...
llvm-svn: 112483
2010-08-30 15:08:02 +00:00
Chris Lattner
3decde9305
refix PR1143 by making basicaa analyze zexts of indices aggresively,
...
which I broke with a recent patch.
llvm-svn: 111452
2010-08-18 23:09:49 +00:00
Chris Lattner
a25c05ed15
fix a buggy test
...
llvm-svn: 111354
2010-08-18 04:55:12 +00:00
Chris Lattner
a33edcb56c
fix PR7589: In brief:
...
gep P, (zext x) != gep P, (sext x)
DecomposeGEPExpression was getting this wrong, confusing
basicaa.
llvm-svn: 111352
2010-08-18 04:28:19 +00:00
Chris Lattner
c8e38eb60b
filecheckize and detrivialize.
...
llvm-svn: 111350
2010-08-18 04:25:43 +00:00
Dan Gohman
e68958fcdf
Implement a proper getModRefInfo for va_arg.
...
llvm-svn: 110458
2010-08-06 18:24:38 +00:00
Dan Gohman
884dd752c3
Implement AccessesArguments checking in the two-callsite form
...
of BasicAA::getModRefInfo. This allows BasicAA to say that two
memset calls to non-aliasing memory locations don't interfere.
llvm-svn: 110393
2010-08-05 23:34:50 +00:00
Dan Gohman
26ef7c7ab7
Fix memdep's code for reasoning about dependences between two calls. A Ref
...
response from getModRefInfo is not useful here. Instead, check for identical
calls only in the NoModRef case.
Reapply r110270, and strengthen it to compensate for the memdep changes.
When both calls are readonly, there is no dependence between them.
llvm-svn: 110382
2010-08-05 22:09:15 +00:00
Dan Gohman
554b012f67
Revert r110270 for now. It appears to uncover a memdep bug.
...
llvm-svn: 110293
2010-08-05 00:43:10 +00:00
Dan Gohman
109561845b
The trouble with testing for "ModRef" and "NoModRef" is that
...
one is a suffix of the other, and FileCheck accepts superstrings.
Adjust the output to avoid this problem.
llvm-svn: 110280
2010-08-04 23:37:55 +00:00
Dan Gohman
bd33dab633
The two-callsite form of AliasAnalysis::getModRefInfo is documented
...
to return Ref if the left callsite only reads memory read or written
by the right callsite; fix BasicAliasAnalysis to implement this.
Add AliasAnalysisEvaluator support for testing the two-callsite
form of getModRefInfo.
llvm-svn: 110270
2010-08-04 22:56:29 +00:00
Dan Gohman
00ef93258a
Remove interprocedural-basic-aa and associated code. The AliasAnalysis
...
interface needs implementations to be consistent, so any code which
wants to support different semantics must use a different interface.
It's not currently worthwhile to add a new interface for this new
concept.
Document that AliasAnalysis doesn't support cross-function queries.
llvm-svn: 107776
2010-07-07 14:27:09 +00:00
Dan Gohman
84f90a387d
Remove context sensitivity concerns from interprocedural-basic-aa, and
...
make it more aggressive in cases where both pointers are known to live
in the same function.
llvm-svn: 107420
2010-07-01 20:08:40 +00:00
Dan Gohman
9bbd007f15
Add a few more interesting testcases.
...
llvm-svn: 107177
2010-06-29 18:17:11 +00:00
Dan Gohman
0824affeff
Add an Intraprocedural form of BasicAliasAnalysis, which aims to
...
properly handles instructions and arguments defined in different
functions, or across recursive function iterations.
llvm-svn: 107109
2010-06-29 00:50:39 +00:00