1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

1562 Commits

Author SHA1 Message Date
Owen Anderson
b9762c07cb Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.

llvm-svn: 110396
2010-08-05 23:42:04 +00:00
Dan Gohman
9ded12adcb Delete obsolete comments.
llvm-svn: 110277
2010-08-04 23:08:15 +00:00
Torok Edwin
967fc5164f Add a missing function.
llvm-svn: 110195
2010-08-04 11:42:45 +00:00
Dan Gohman
aac19e4ffe Remove PointerAccessInfo, which nothing was using.
llvm-svn: 110167
2010-08-03 23:08:10 +00:00
Dan Gohman
a087b90950 Thread const correctness through a bunch of AliasAnalysis interfaces and
eliminate several const_casts.

Make CallSite implicitly convertible to ImmutableCallSite.

Rename the getModRefBehavior for intrinsic IDs to
getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite,
which happens to be implicitly convertible to bool.

llvm-svn: 110155
2010-08-03 21:48:53 +00:00
Dan Gohman
aabb615d52 Update some comments.
llvm-svn: 110092
2010-08-03 01:07:32 +00:00
Dan Gohman
6604a72154 Introduce a symbolic constant for ~0u for use with AliasAnalysis.
llvm-svn: 110091
2010-08-03 01:03:11 +00:00
Dan Gohman
e0489ffe8e Add a convenient form of AliasAnalysis::alias for the case where the sizes
are unknown.

llvm-svn: 110090
2010-08-03 00:56:30 +00:00
Dan Gohman
68ac0492a4 Make SCEVUnknown a CallbackVH, so that it can be notified directly
of Value deletions and RAUWs, instead of relying on ScalarEvolution's
Scalars map being notified, as that's complicated at best, and
insufficient in general.

This means SCEVUnknown needs a non-trivial destructor, so introduce
a mechanism to allow ScalarEvolution to locate all the SCEVUnknowns.

llvm-svn: 110086
2010-08-02 23:49:30 +00:00
Dan Gohman
9d80b87a4d Sketch up a preliminary Type-Based Alias Analysis implementation.
llvm-svn: 110077
2010-08-02 23:11:01 +00:00
Devang Patel
f18faa5945 Add explicit constructors. Patch by Renato Golin.
llvm-svn: 110072
2010-08-02 22:51:46 +00:00
Nick Lewycky
460d1a457b LibCallAliasAnalysis uses multiple inheritance, so it needs to implement
getAdjustedAnalysisPointer. Part of a fix to PR7760.

llvm-svn: 109883
2010-07-30 20:19:09 +00:00
Eric Christopher
6a1da7b4a5 Speculatively revert r109705 since it seems to be causing some build bot
angst.

llvm-svn: 109718
2010-07-29 01:25:38 +00:00
Dan Gohman
ea1486b53c Factor out some of the code for updating old SCEVUnknown values, and
extend it to handle the case where multiple RAUWs affect a single
SCEVUnknown.

Add a ScalarEvolution unittest to test for this situation.

llvm-svn: 109705
2010-07-29 00:17:55 +00:00
Dan Gohman
b4699b3002 Add some extra friend declarations to fix a gcc-4.0 compile error.
This is a temporary fix, until more elaborate changes are ready.

llvm-svn: 109593
2010-07-28 17:09:24 +00:00
Dan Gohman
2dcafa2402 Add a comment.
llvm-svn: 109565
2010-07-28 00:21:18 +00:00
Tobias Grosser
ebc6c0cf50 RegionInfo: Add getMaxRegionExit()
getMaxRegionExit returns the exit of the maximal refined region starting
at a specific basic block.

llvm-svn: 109496
2010-07-27 08:39:43 +00:00
Tobias Grosser
16789d79fe Add function to query RegionInfo about loops.
* contains(Loop), * getOutermostLoop()
* Improve getNameStr() to return a sensible name, if basic blocks are not named.

llvm-svn: 109490
2010-07-27 04:17:13 +00:00
Dan Gohman
66b6f7d702 Use AssertingVH for InsertedValues and InsertedPostIncValues, to verify
that the values they refer to aren't being deleted underneath them.

Make sure these containters get cleared by clear(), which IndVarSimplify
and LSR both use before deleting instructions.

llvm-svn: 109478
2010-07-27 01:19:06 +00:00
Owen Anderson
12ab6162bf Add an initial implementation of LazyValueInfo updating for JumpThreading. Disabled for now.
llvm-svn: 109424
2010-07-26 18:48:03 +00:00
Dan Gohman
e6e38c1685 Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.

llvm-svn: 109270
2010-07-23 21:34:51 +00:00
Tobias Grosser
604a50cd71 Add new RegionInfo pass.
The RegionInfo pass detects single entry single exit regions in a function,
where a region is defined as any subgraph that is connected to the remaining
graph at only two spots.
Furthermore an hierarchical region tree is built.
Use it by calling "opt -regions analyze" or "opt -view-regions".

llvm-svn: 109089
2010-07-22 07:46:31 +00:00
Dan Gohman
fc3ee085a0 Disallow null as a named metadata operand.
Make MDNode::destroy private.
Fix the one thing that used MDNode::destroy, outside of MDNode itself.

One should never delete or destroy an MDNode explicitly. MDNodes
implicitly go away when there are no references to them (implementation
details aside).

llvm-svn: 109028
2010-07-21 18:54:18 +00:00
Jakob Stoklund Olesen
dcf78c06f8 Implement loop splitting analysis.
Determine which loop exit blocks need a 'pre-exit' block inserted.
Recognize when this would be impossible.

llvm-svn: 108941
2010-07-20 21:46:58 +00:00
Dan Gohman
0bfc6146bf Make getOrInsertCanonicalInductionVariable guarantee that its
result is a PHINode*.

llvm-svn: 108852
2010-07-20 16:44:52 +00:00
Stuart Hastings
587ed4918c Correct line info for declarations/definitions. Radar 8063111.
llvm-svn: 108784
2010-07-19 23:56:30 +00:00
Lang Hames
ac3a879f12 Switched to array_pod_sort as per Chris's suggestion.
llvm-svn: 108616
2010-07-17 09:21:53 +00:00
Lang Hames
48638f63ba LoopSplitter - intended to split live intervals over loop boundaries.
Still very much under development. Comments and fixes will be forthcoming.

(This commit includes some small tweaks to LiveIntervals & LoopInfo to support the splitter)

llvm-svn: 108615
2010-07-17 07:34:01 +00:00
Tobias Grosser
97dc00d1d8 Add dump() to DominanceFrontier
llvm-svn: 108512
2010-07-16 05:59:39 +00:00
Eric Christopher
bc774d339c 80-columns
llvm-svn: 108228
2010-07-13 05:50:08 +00:00
Eric Christopher
ff925e91b9 Remove tab characters and 80-col.
llvm-svn: 108127
2010-07-12 05:26:37 +00:00
Gabor Greif
4d880ebd36 fix clang selfhost issue (shadowing)
llvm-svn: 107970
2010-07-09 14:46:49 +00:00
Gabor Greif
0da64e7003 refactor type expressions and cache operator*'s result
llvm-svn: 107964
2010-07-09 14:00:56 +00:00
Gabor Greif
17ddf2d1fa two more cases of reuse result of operator*, found by inspection
llvm-svn: 107961
2010-07-09 10:42:13 +00:00
Gabor Greif
01db29c828 another case of reuse result of operator*, it is expensive to recompute
llvm-svn: 107960
2010-07-09 10:32:31 +00:00
Gabor Greif
d266b0fcd8 reuse result of operator*, it is expensive to recompute
llvm-svn: 107959
2010-07-09 09:50:51 +00:00
Stuart Hastings
a3999081cf Reverting r107918 and r107919. Radar 8063111.
llvm-svn: 107930
2010-07-08 23:25:39 +00:00
Stuart Hastings
b70d4e06e3 Fix decl/def debug info for template functions. Radar 8063111.
llvm-svn: 107919
2010-07-08 22:28:59 +00:00
Gabor Greif
3e4b85cd99 only dereference iterator once in the loop
(by caching the result we save a potentially expensive dereference)

also use typedefs to shorten type declarations

llvm-svn: 107883
2010-07-08 16:56:18 +00:00
Duncan Sands
5338c9f877 Use std::vector rather than SmallVector here because SmallVector
causes some versions of gcc to crash when building LLVM.

llvm-svn: 107869
2010-07-08 13:06:08 +00:00
Duncan Sands
dcc1398f44 Do not use std::stack because it causes obscure failures when
compiled with MSVC 2010 (PR7367).  Instead use a SmallVector.

llvm-svn: 107867
2010-07-08 11:54:27 +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
de933eddb5 Document that BasicAA respects noalias, while InterproceduralBasicAA
does not.

llvm-svn: 107546
2010-07-02 23:52:36 +00:00
Dan Gohman
6a179b2376 Remove an unused enum.
llvm-svn: 107507
2010-07-02 20:20:50 +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
d454f5c234 Generalize AAEval so that it can be used both per-function and
interprocedurally. Note that as of this writing, existing alias
analysis passes are not prepared to be used interprocedurally.

llvm-svn: 107013
2010-06-28 16:01:37 +00:00
Gabor Greif
4615fc1c93 minor enhancement to llvm::isFreeCall API: return CallInst; no functional change
llvm-svn: 106686
2010-06-23 21:51:12 +00:00
Dan Gohman
f44783ab4e Replace ScalarEvolution's private copy of getLoopPredecessor
with LoopInfo's public copy.

llvm-svn: 106603
2010-06-22 23:43:28 +00:00
Dan Gohman
29b845f3b7 Split out the code for finding a unique loop predecessor from
getLoopPreheader into a separate function, for clients which don't
require a proper preheader.

llvm-svn: 106543
2010-06-22 15:25:42 +00:00
Dan Gohman
fb091c213b Factor out duplicated code for reusing and inserting casts into
a helper function.

llvm-svn: 106388
2010-06-19 13:25:23 +00:00