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
Dan Gohman
b5ec637e57
Revert r106304 (105548 and friends), which are the SCEVComplexityCompare
...
optimizations. There is still some nondeterminism remaining.
llvm-svn: 106306
2010-06-18 19:54:20 +00:00
Dan Gohman
527b570925
Reapply 105540, 105542, and 105548, and revert r105732.
...
llvm-svn: 106304
2010-06-18 19:26:04 +00:00
Dan Gohman
0422fad3a6
Don't bother calling releaseMemory before destroying the DominatorTreeBase.
...
llvm-svn: 106287
2010-06-18 16:09:11 +00:00
Dan Gohman
e20e668c7e
Remove getIntegerSCEV; it's redundant with getConstant, and getConstant
...
is more consistent with the ConstantInt API.
llvm-svn: 106281
2010-06-18 14:33:50 +00:00
Douglas Gregor
48c6838611
Revert r106117, which was the result of me misreading the C++98/03
...
specification.
llvm-svn: 106162
2010-06-16 22:32:18 +00:00
Douglas Gregor
5ca7ded45a
Eliminate a redundant "typename" keyword
...
llvm-svn: 106117
2010-06-16 17:42:01 +00:00
Stuart Hastings
f9ef9ff3d6
Support for nested functions/classes in debug output. (Again.) Radar 7424645.
...
llvm-svn: 105828
2010-06-11 20:08:44 +00:00
Evan Cheng
28c151ae52
Revert 105540, 105542, 105544, 105546, and 105548 to unbreak bootstrapping.
...
llvm-svn: 105740
2010-06-09 18:59:43 +00:00
Kenneth Uildriks
2c6b68924d
Pulled CodeMetrics out of InlineCost.h and made it a bit more general, so it can be reused from PartialSpecializationCost
...
llvm-svn: 105725
2010-06-09 15:11:37 +00:00