Chris Lattner
8c5ff516c6
Fix a thinko that manifested as a crash on clamav last night.
...
llvm-svn: 60251
2008-11-29 20:29:04 +00:00
Nick Lewycky
35847809b7
Fix spelling mistake.
...
llvm-svn: 60250
2008-11-29 20:13:25 +00:00
Anders Carlsson
77b5df6313
CXXFunctionalCastExpr inherits from ExplicitCastExpr.
...
llvm-svn: 60249
2008-11-29 19:58:11 +00:00
Zhongxing Xu
452273d9c6
To be consistent, make the index of the ElementRegion always signed.
...
llvm-svn: 60248
2008-11-29 12:05:04 +00:00
Chris Lattner
5661fead0b
tidy up some variable names.
...
llvm-svn: 60243
2008-11-29 09:22:14 +00:00
Chris Lattner
9f1988ab6c
rename some maps.
...
llvm-svn: 60242
2008-11-29 09:20:15 +00:00
Chris Lattner
5cd1cfad11
rename some variables.
...
llvm-svn: 60241
2008-11-29 09:15:21 +00:00
Chris Lattner
80c081828f
eliminate a bunch of code in favor of using AliasAnalysis::getModRefInfo.
...
Put a some code back to handle buggy behavior that GVN expects: it wants
loads to depend on each other, and accesses to depend on their allocations.
llvm-svn: 60240
2008-11-29 09:09:48 +00:00
Torok Edwin
96ce5a0bdf
protect against negative values that would exceed allowed bit width
...
llvm-svn: 60239
2008-11-29 08:52:45 +00:00
Chris Lattner
81f19e9aa4
simplify some code and rename some variables. Reduce nesting.
...
Use getTypeStoreSize instead of ABITypeSize for in-memory size
in a couple places.
llvm-svn: 60238
2008-11-29 08:51:16 +00:00
Chris Lattner
e1822ef660
apparently GCC doesn't believe that I understand C
...
precedence rules. Pacify it.
llvm-svn: 60237
2008-11-29 08:36:39 +00:00
Duncan Sands
4f96a92145
Typo fix.
...
llvm-svn: 60236
2008-11-29 08:03:35 +00:00
Douglas Gregor
3be4b122d3
Implement the GNU __null extension
...
llvm-svn: 60235
2008-11-29 04:51:27 +00:00
Chris Lattner
51ba8d0630
Split getDependency into getDependency and getDependencyFrom, the
...
former does caching, the later doesn't. This dramatically simplifies
the logic in getDependency and getDependencyFrom.
llvm-svn: 60234
2008-11-29 03:47:00 +00:00
Bill Wendling
469e3aa696
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
e4d32791ef
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
7f9c8a0f05
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
de04e1173a
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
482713e14a
Fix sentinels to use correctly 'aligned' pointers.
...
llvm-svn: 60229
2008-11-29 01:36:16 +00:00
Chris Lattner
2774a41b96
Fix spello, add DenseMapInfo specialization for PointerIntPair.
...
llvm-svn: 60228
2008-11-29 01:18:05 +00:00
Chris Lattner
06db5255c3
fix comment typo
...
llvm-svn: 60227
2008-11-28 23:57:26 +00:00
Chris Lattner
9d72ff710e
Switch QualType to use llvm::PointerIntPair internally to do the pointer
...
bitmangling.
llvm-svn: 60226
2008-11-28 23:37:31 +00:00
Chris Lattner
845d731670
fix a bug.
...
llvm-svn: 60225
2008-11-28 23:36:15 +00:00
Chris Lattner
7602e4bdbf
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
d3d9111ede
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
f3f6a801cc
don't revisit instructions off the beginning of the block.
...
llvm-svn: 60221
2008-11-28 22:50:08 +00:00
Chris Lattner
08f3c00562
comment cleanups.
...
llvm-svn: 60220
2008-11-28 22:41:36 +00:00
Chris Lattner
73c254593e
more cleanups for MemoryDependenceAnalysis::removeInstruction,
...
no functionality change.
llvm-svn: 60219
2008-11-28 22:28:27 +00:00
Chris Lattner
a25d3952c6
random cleanups, no functionality change.
...
llvm-svn: 60218
2008-11-28 22:04:47 +00:00
Chris Lattner
2916a4b589
forward declare CallSite instead of #includ'ing it.
...
llvm-svn: 60217
2008-11-28 21:47:19 +00:00
Chris Lattner
554d1221aa
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
e5fd5c29de
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
cfa414fe9e
comment and indentation improvements.
...
llvm-svn: 60214
2008-11-28 21:36:43 +00:00
Chris Lattner
f2a8ba4cf0
simplify some code, remove escaped newline.
...
llvm-svn: 60213
2008-11-28 21:29:52 +00:00
Chris Lattner
dca2cd3562
remove mysterious escaped newlines.
...
llvm-svn: 60211
2008-11-28 21:16:44 +00:00
Chris Lattner
8a172daa55
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
71ecd67b5d
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
595a4423dc
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
Zhongxing Xu
e31a8ebfdc
Fix a serious bug.
...
When initialized, the index of the ElementRegion was unsigned. But the index
value of the ArraySubscriptExpr is signed. This inconsistency caused the value
of the array element retrieved to be UnknownVal despite it was initialized to
symbolic.
This is only a hack. Real fix of this problem is required.
llvm-svn: 60207
2008-11-28 08:41:39 +00:00
Zhongxing Xu
33178a0993
Code cleanup. No functional change.
...
llvm-svn: 60206
2008-11-28 08:34:30 +00:00
Zhongxing Xu
85b6e201f4
Use std::make_pair instead of std::pair's ctor.
...
llvm-svn: 60205
2008-11-28 03:55:52 +00:00
Zhongxing Xu
3698bdb417
Enable the GRStateManager to do something when we finish a path. For example,
...
the ConstraintManager can print its internal state before its solver instance is
destroyed.
llvm-svn: 60204
2008-11-28 03:07:05 +00:00
Chris Lattner
e9f6c355bf
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
d4b5ba615e
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
1adb6759ef
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
7283d44569
Scrap some boilerplate.
...
llvm-svn: 60200
2008-11-28 00:14:11 +00:00
Mikhail Glushenkov
cc2d0b2c4c
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
3bb3da6f4c
Add 'hidden' and 'really_hidden' option properties.
...
llvm-svn: 60198
2008-11-28 00:13:25 +00:00
Mikhail Glushenkov
4ad34cbdc0
Documentation: clarify what is meant by 'multiple edges'.
...
llvm-svn: 60197
2008-11-28 00:12:09 +00:00
Chris Lattner
8e84c129ce
delete ErasePossiblyDeadInstructionTree, replacing uses of it with
...
RecursivelyDeleteTriviallyDeadInstructions.
llvm-svn: 60196
2008-11-27 23:25:44 +00:00