1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

136 Commits

Author SHA1 Message Date
Eli Friedman
6e9cab83b0 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
483f94e8d1 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
745797b9c4 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
ec48ea17ca Use CHECK-NEXT.
llvm-svn: 134850
2011-07-09 22:56:50 +00:00
Chris Lattner
ad5400fa72 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
0899957b99 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
4eb6f76fa6 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
9ec82f54d4 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
aa7c0761db 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
8fd6804868 Revert r131781 again. Apparently there is more going on here.
llvm-svn: 132625
2011-06-04 05:11:22 +00:00
Dan Gohman
24ef4a0b7d 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
edaf7c535a 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
6d082aec26 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
5b2ad67709 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
6830c25f35 I missed a checking with my GVN change.
llvm-svn: 131851
2011-05-22 07:20:02 +00:00
Duncan Sands
c228e6bdea 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
048c261e5d 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
4e15bcfe01 Teach BasicAA about arm.neon.vld1 and vst1.
llvm-svn: 130327
2011-04-27 20:44:28 +00:00
Dan Gohman
d96c818dd2 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
b0e846a68c 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
8681fe2359 Revert r128140 for now.
llvm-svn: 128149
2011-03-23 15:51:12 +00:00
Anders Carlsson
556ad25dec 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
6f83adb763 Add another rdar number.
llvm-svn: 124125
2011-01-24 17:54:01 +00:00
Dan Gohman
df668227fb 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
a7735a573d 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
76b74870be filecheckize
llvm-svn: 122771
2011-01-03 21:01:26 +00:00
Duncan Sands
2699fb1072 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
191aa08db1 remove fixme comment too.
llvm-svn: 120493
2010-11-30 23:25:01 +00:00
Chris Lattner
eee2bb2ff0 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
139b090e0e Delete unneeded ssp attributes.
llvm-svn: 118836
2010-11-11 21:08:46 +00:00
Dan Gohman
6aff5b94ff 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
b5aea103fc 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
238f46d92e remove some noise from tests.
llvm-svn: 112889
2010-09-02 22:35:33 +00:00
Michael J. Spencer
2f463fc492 Fix constant-over-index.ll test on windows.
llvm-svn: 112483
2010-08-30 15:08:02 +00:00
Chris Lattner
7663b66c31 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
b4602679d7 fix a buggy test
llvm-svn: 111354
2010-08-18 04:55:12 +00:00
Chris Lattner
49d0f29752 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
6ac971a27f filecheckize and detrivialize.
llvm-svn: 111350
2010-08-18 04:25:43 +00:00
Dan Gohman
da3f592fb3 Implement a proper getModRefInfo for va_arg.
llvm-svn: 110458
2010-08-06 18:24:38 +00:00
Dan Gohman
9135b410fe 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
7260387710 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
c42ed0aa91 Revert r110270 for now. It appears to uncover a memdep bug.
llvm-svn: 110293
2010-08-05 00:43:10 +00:00
Dan Gohman
fc6b043376 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
dcb6099f9e 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
2a08e2ce81 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
f9365363db 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
338d04a2dd Add a few more interesting testcases.
llvm-svn: 107177
2010-06-29 18:17:11 +00:00
Dan Gohman
37bf33ccff 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
Dan Gohman
bd121d9b9f Fix Value::stripPointerCasts and BasicAA to avoid trouble on
code in unreachable blocks, which have have use-def cycles.
This fixes PR7514.

llvm-svn: 107071
2010-06-28 21:16:52 +00:00
Dan Gohman
b2a87fa39d Pointers to zero-sized objects don't point to overlapping objects.
llvm-svn: 100789
2010-04-08 18:11:50 +00:00