Bill Wendling
ed46ffe5c5
Temporarily revert r60195. It's causing an optimized bootstrap of llvm-gcc to fail.
...
llvm-svn: 60233
2008-11-29 03:43:04 +00:00
Chris Lattner
9e956ef129
Now that DepType is private, we can start cleaning up some of its uses:
...
Document the Dirty value more precisely, use it for the uninitialized
DepResultTy value. Change reverse mappings to be from an instruction*
instead of DepResultTy, and stop tracking other forms. This makes it more
clear that we only care about the instruction cases.
Eliminate a DepResultTy,bool pair by using Dirty in the local case as well,
shrinking the map and simplifying the code.
This speeds up GVN by ~3% on 403.gcc.
llvm-svn: 60232
2008-11-29 03:22:12 +00:00
Chris Lattner
6bf62f050c
Introduce and use a new MemDepResult class to hold the results of a memdep
...
query. This makes it crystal clear what cases can escape from MemDep that
the clients have to handle. This also gives the clients a nice simplified
interface to it that is easy to poke at.
This patch also makes DepResultTy and MemoryDependenceAnalysis::DepType
private, yay.
llvm-svn: 60231
2008-11-29 02:29:27 +00:00
Chris Lattner
e9295510b5
Reimplement the internal abstraction used by MemDep in terms
...
of a pointer/int pair instead of a manually bitmangled pointer.
This forces clients to think a little more about checking the
appropriate pieces and will be useful for internal
implementation improvements later.
I'm not particularly happy with this. After going through this
I don't think that the clients of memdep should be exposed to
the internal type at all. I'll fix this in a subsequent commit.
This has no functionality change.
llvm-svn: 60230
2008-11-29 01:43:36 +00:00
Chris Lattner
7ae87447ed
Fix sentinels to use correctly 'aligned' pointers.
...
llvm-svn: 60229
2008-11-29 01:36:16 +00:00
Chris Lattner
070df849e9
Fix spello, add DenseMapInfo specialization for PointerIntPair.
...
llvm-svn: 60228
2008-11-29 01:18:05 +00:00
Chris Lattner
b41c45dbdf
fix comment typo
...
llvm-svn: 60227
2008-11-28 23:57:26 +00:00
Chris Lattner
507e71fce3
fix a bug.
...
llvm-svn: 60225
2008-11-28 23:36:15 +00:00
Chris Lattner
d8b755ed95
add a generic "bitmangled pointer" class, which allows a parameterized
...
pointer and integer type to be used.
llvm-svn: 60224
2008-11-28 23:31:44 +00:00
Chris Lattner
494758e720
Fix PR3141 by ensuring that MemoryDependenceAnalysis::removeInstruction
...
properly updates the reverse dependency map when it installs updated
dependencies for instructions that depend on the removed instruction.
llvm-svn: 60222
2008-11-28 22:51:08 +00:00
Chris Lattner
aedb1385c2
don't revisit instructions off the beginning of the block.
...
llvm-svn: 60221
2008-11-28 22:50:08 +00:00
Chris Lattner
7376e32840
comment cleanups.
...
llvm-svn: 60220
2008-11-28 22:41:36 +00:00
Chris Lattner
219e9af693
more cleanups for MemoryDependenceAnalysis::removeInstruction,
...
no functionality change.
llvm-svn: 60219
2008-11-28 22:28:27 +00:00
Chris Lattner
7b984beb45
random cleanups, no functionality change.
...
llvm-svn: 60218
2008-11-28 22:04:47 +00:00
Chris Lattner
8fc7870ff1
forward declare CallSite instead of #includ'ing it.
...
llvm-svn: 60217
2008-11-28 21:47:19 +00:00
Chris Lattner
ef04ddf87c
Run verifyRemoved from removeInstruction when -debug is specified.
...
This shows the root problem behind PR3141.
llvm-svn: 60216
2008-11-28 21:45:17 +00:00
Chris Lattner
cc3a3c0c98
rename "ping" to "verifyRemoved". I don't know why 'ping' what chosen,
...
but it doesn't make any sense at all.
Also make the method const, private, and fit in 80 cols while we're at it.
llvm-svn: 60215
2008-11-28 21:42:09 +00:00
Chris Lattner
b9ef82dada
comment and indentation improvements.
...
llvm-svn: 60214
2008-11-28 21:36:43 +00:00
Chris Lattner
d7ea2954a7
simplify some code, remove escaped newline.
...
llvm-svn: 60213
2008-11-28 21:29:52 +00:00
Chris Lattner
ad6c575105
remove mysterious escaped newlines.
...
llvm-svn: 60211
2008-11-28 21:16:44 +00:00
Chris Lattner
a854ab3760
don't call MergeBasicBlockIntoOnlyPred on a block whose only
...
predecessor is itself. This doesn't make sense, and this is
a dead infinite loop anyway.
llvm-svn: 60210
2008-11-28 19:54:49 +00:00
Duncan Sands
850748f5de
Add include files needed when building with
...
gcc 4.4 (due to use of sprintf).
llvm-svn: 60209
2008-11-28 10:20:03 +00:00
Duncan Sands
7fd4ea5847
Fix build with gcc-4.4: it doesn't like PICStyle
...
being both a namespace and a variable name.
llvm-svn: 60208
2008-11-28 09:29:37 +00:00
Chris Lattner
1b70ed5140
rewrite RecursivelyDeleteTriviallyDeadInstructions to use a more efficient
...
formulation that doesn't require set lookups or scanning a set.
llvm-svn: 60203
2008-11-28 01:20:46 +00:00
Chris Lattner
b9af105cff
remove some weirdness that came from the LSR code that has
...
nothing to do with dead instruction elimination. No tests in
dejagnu depend on this, so I don't know what it was needed for.
llvm-svn: 60202
2008-11-28 00:58:15 +00:00
Chris Lattner
69e0a27f94
rewrite a big chunk of how DSE does recursive dead operand
...
elimination to use more modern infrastructure. Also do a bunch
of small cleanups.
llvm-svn: 60201
2008-11-28 00:27:14 +00:00
Mikhail Glushenkov
ee55a49632
Scrap some boilerplate.
...
llvm-svn: 60200
2008-11-28 00:14:11 +00:00
Mikhail Glushenkov
cd57fbc9c4
Support multiple compilation graph definitions. Not terribly useful, but makes the code more generic.
...
llvm-svn: 60199
2008-11-28 00:13:47 +00:00
Mikhail Glushenkov
187b171022
Add 'hidden' and 'really_hidden' option properties.
...
llvm-svn: 60198
2008-11-28 00:13:25 +00:00
Mikhail Glushenkov
45f83604cd
Documentation: clarify what is meant by 'multiple edges'.
...
llvm-svn: 60197
2008-11-28 00:12:09 +00:00
Chris Lattner
4486266c9d
delete ErasePossiblyDeadInstructionTree, replacing uses of it with
...
RecursivelyDeleteTriviallyDeadInstructions.
llvm-svn: 60196
2008-11-27 23:25:44 +00:00
Chris Lattner
8231357a92
Simplify LoopStrengthReduce::DeleteTriviallyDeadInstructions by
...
making it use RecursivelyDeleteTriviallyDeadInstructions to do
the heavy lifting.
llvm-svn: 60195
2008-11-27 23:23:35 +00:00
Chris Lattner
53ebef9cbb
enhance RecursivelyDeleteTriviallyDeadInstructions to make
...
PHIs dead if they are single-value.
llvm-svn: 60194
2008-11-27 23:18:11 +00:00
Chris Lattner
8b382de4e0
Enhance RecursivelyDeleteTriviallyDeadInstructions to optionally
...
return a list of deleted instructions.
llvm-svn: 60193
2008-11-27 23:14:34 +00:00
Chris Lattner
b2bd29b39b
use continue to reduce indentation
...
llvm-svn: 60192
2008-11-27 23:00:20 +00:00
Chris Lattner
b374a0158a
remove doConstantPropagation and dceInstruction, they are just
...
wrappers around the interesting code and use an obscure iterator
abstraction that dates back many many years.
Move EraseDeadInstructions to Transforms/Utils and name it
RecursivelyDeleteTriviallyDeadInstructions.
llvm-svn: 60191
2008-11-27 22:57:53 +00:00
Chris Lattner
740eb92968
simplify code.
...
llvm-svn: 60190
2008-11-27 22:56:14 +00:00
Chris Lattner
d3f7621acd
simplify this logic.
...
llvm-svn: 60189
2008-11-27 22:46:09 +00:00
Nick Lewycky
f5d5d6026f
Also update the README.
...
llvm-svn: 60188
2008-11-27 22:41:45 +00:00
Nick Lewycky
40db216722
Chris prefers icmp/select over udiv!
...
llvm-svn: 60187
2008-11-27 22:41:10 +00:00
Nick Lewycky
0064d6236e
Add a synthetic missed optimization.
...
llvm-svn: 60186
2008-11-27 22:12:22 +00:00
Nick Lewycky
882443585d
Add a couple of missed optimizations on integer vectors. Multiply and divide
...
by 1, as well as multiply by -1.
llvm-svn: 60182
2008-11-27 20:21:08 +00:00
Chris Lattner
8c052366b3
defensive patch: if CGP is merging a block with the entry block, make sure
...
it ends up being the entry block.
llvm-svn: 60180
2008-11-27 19:29:14 +00:00
Chris Lattner
73b251b3bf
Fix PR3138: if we merge the entry block into another block, make sure to
...
move the other block back up into the entry position!
llvm-svn: 60179
2008-11-27 19:25:19 +00:00
Nick Lewycky
847a671436
Silence a warning.
...
Despite changing the order of evaluation, this doesn't actually change the
meaning of the statement.
llvm-svn: 60177
2008-11-27 17:29:52 +00:00
Nuno Lopes
1e97b6c181
fix build on some machines. thanks buildbot
...
llvm-svn: 60175
2008-11-27 16:42:44 +00:00
Nuno Lopes
e3f6758e3c
fix my previous commit r60064: compare strings instead of pointers
...
llvm-svn: 60174
2008-11-27 16:37:02 +00:00
Chris Lattner
2959f6224e
switch InstCombine::visitLoadInst to use
...
FindAvailableLoadedValue
llvm-svn: 60169
2008-11-27 08:56:30 +00:00
Chris Lattner
dd755c74d6
improve const correctness.
...
llvm-svn: 60168
2008-11-27 08:39:18 +00:00
Chris Lattner
0bd942ecb5
enhance FindAvailableLoadedValue to make use of AliasAnalysis
...
if it has it.
llvm-svn: 60167
2008-11-27 08:18:12 +00:00