David Greene
b348240e9c
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92068
2009-12-23 22:28:01 +00:00
David Greene
62d4863b56
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92067
2009-12-23 22:18:14 +00:00
David Greene
f2377def25
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92066
2009-12-23 22:10:20 +00:00
David Greene
fc8ae247eb
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92063
2009-12-23 21:58:29 +00:00
David Greene
4caa552456
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92060
2009-12-23 21:48:18 +00:00
David Greene
c8b577197f
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92050
2009-12-23 21:27:29 +00:00
David Greene
fd7042fa79
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92048
2009-12-23 21:16:54 +00:00
David Greene
28b8bcd98d
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92046
2009-12-23 21:06:14 +00:00
David Greene
33f717c804
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92042
2009-12-23 20:52:41 +00:00
David Greene
016e0af68d
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92040
2009-12-23 20:43:58 +00:00
David Greene
1c88ae8f15
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92039
2009-12-23 20:34:27 +00:00
David Greene
e34eb9cc32
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92037
2009-12-23 20:20:46 +00:00
David Greene
a2539e0ff7
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92035
2009-12-23 20:10:59 +00:00
David Greene
2a072c7ac5
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92034
2009-12-23 20:03:58 +00:00
David Greene
218c909299
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92033
2009-12-23 19:51:44 +00:00
David Greene
bcfb683e76
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92032
2009-12-23 19:45:49 +00:00
David Greene
b7dde86ae2
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92029
2009-12-23 19:27:59 +00:00
David Greene
f0082114af
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92026
2009-12-23 19:21:19 +00:00
David Greene
4d8f4303bd
Convert debug messages to use dbgs(). Generally this means
...
s/errs/dbgs/g except for certain special cases.
llvm-svn: 92024
2009-12-23 19:15:13 +00:00
Chris Lattner
cd79ebb23c
The phi translated pointer can be computed when returning a partially cached result
...
instead of stored. This reduces memdep memory usage, and also eliminates a bunch of
weakvh's. This speeds up gvn on gcc.c-torture/20001226-1.c from 23.9s to 8.45s (2.8x)
on a different machine than earlier.
llvm-svn: 91885
2009-12-22 04:25:02 +00:00
Chris Lattner
15c2988820
avoid calling extractMallocCall when it's obvious we don't have
...
a call. This speeds up memdep ~1.5%
llvm-svn: 91869
2009-12-22 01:00:32 +00:00
Chris Lattner
07f0e8ec8a
fix an overly conservative caching issue that caused memdep to
...
cache a pointer as being unavailable due to phi trans in the
wrong place. This would cause later queries to fail even when
they didn't involve phi trans.
llvm-svn: 91787
2009-12-19 21:29:22 +00:00
Dan Gohman
a9cdf5b0d8
Fix a spello in a comment that Nick spotted.
...
llvm-svn: 91742
2009-12-19 01:46:34 +00:00
Dan Gohman
4e04fb5ca8
Eliminate unnecessary LLVMContexts.
...
llvm-svn: 91729
2009-12-18 23:42:08 +00:00
Dan Gohman
f4af7d049c
Make this comment more precise.
...
llvm-svn: 91722
2009-12-18 23:18:03 +00:00
Dan Gohman
34f714b928
Revert this use of NUW/NSW also. Overflow-undefined multiplication isn't
...
associative either.
llvm-svn: 91701
2009-12-18 18:45:31 +00:00
Dan Gohman
2e46566444
Revert this use of NSW; this one isn't actually safe. NSW addition
...
is not reassociative.
llvm-svn: 91667
2009-12-18 03:57:04 +00:00
Dan Gohman
ec766ea441
Delete an unused variable.
...
llvm-svn: 91659
2009-12-18 02:14:37 +00:00
Dan Gohman
91b1161840
Preserve NSW information in more places.
...
llvm-svn: 91656
2009-12-18 02:09:29 +00:00
Dan Gohman
0f8f7f179d
Add Loop contains utility methods for testing whether a loop
...
contains another loop, or an instruction. The loop form is
substantially more efficient on large loops than the typical
code it replaces.
llvm-svn: 91654
2009-12-18 01:24:09 +00:00
Dan Gohman
7c0f6a6c1b
Whitespace cleanups.
...
llvm-svn: 91651
2009-12-18 01:14:11 +00:00
Dan Gohman
c483bed5e8
Reapply LoopStrengthReduce and IVUsers cleanups, excluding the part
...
of 91296 that caused trouble -- the Processed list needs to be
preserved for the livetime of the pass, as AddUsersIfInteresting
is called from other passes.
llvm-svn: 91641
2009-12-18 00:06:20 +00:00
Evan Cheng
18e334195d
Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently introduced a non-deterministic behavior in the optimizer somewhere.
...
llvm-svn: 91598
2009-12-17 09:39:49 +00:00
Chris Lattner
ea6ba0d59b
Fix GetConstantStringInfo to not look into MDString (it works on
...
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.
llvm-svn: 91444
2009-12-15 19:34:20 +00:00
Devang Patel
ffb33d1df8
Add support to emit debug info for C++ namespaces.
...
llvm-svn: 91440
2009-12-15 19:16:48 +00:00
Chris Lattner
587962c667
Remove isPod() from DenseMapInfo, splitting it out to its own
...
isPodLike type trait. This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.
llvm-svn: 91421
2009-12-15 07:26:43 +00:00
John McCall
6bf01a2caf
You can't use typedefs to declare template member specializations, and
...
clang enforces it.
llvm-svn: 91397
2009-12-15 02:35:24 +00:00
Dan Gohman
106fce040d
Clear the Processed set when it is no longer used, and clear the
...
IVUses list in releaseMemory().
llvm-svn: 91296
2009-12-14 17:35:17 +00:00
Dan Gohman
abb2ea84d9
Fix a thinko; isNotAlreadyContainedIn had a built-in negative, so the
...
condition was inverted when the code was converted to contains().
llvm-svn: 91295
2009-12-14 17:31:01 +00:00
Dan Gohman
c6a7652b5e
Drop Loop::isNotAlreadyContainedIn in favor of Loop::contains. The
...
former was just exposing a LoopInfoBase implementation detail.
llvm-svn: 91286
2009-12-14 17:06:50 +00:00
Dan Gohman
c22d542754
Make getUniqueExitBlocks's precondition assert more precise, to
...
avoid spurious failures. This fixes PR5758.
llvm-svn: 91147
2009-12-11 20:05:23 +00:00
Dan Gohman
663165c16f
Reuse the Threshold value to size these containers because it's
...
currently somewhat convenient for them to have the same value.
llvm-svn: 90980
2009-12-09 18:48:53 +00:00
Chris Lattner
2f9b661ab8
Add a minor optimization: if we haven't changed the operands of an
...
add, there is no need to scan the world to find the same add again.
This invalidates the previous testcase, which wasn't wonderful anyway,
because it needed a run of instcombine to permute the use-lists in
just the right way to before GVN was run (so it was really fragile).
Not a big loss.
llvm-svn: 90973
2009-12-09 17:27:45 +00:00
Chris Lattner
e05f9a128c
fix PR5733, a case where we'd replace an add with a lexically identical
...
binary operator that wasn't an add. In this case, a xor. Whoops.
llvm-svn: 90971
2009-12-09 17:18:49 +00:00
Chris Lattner
366b8ac755
enhance NonLocalDepEntry to keep the per-block phi translated address
...
of the query.
llvm-svn: 90958
2009-12-09 07:31:04 +00:00
Chris Lattner
e0207b46d2
change NonLocalDepEntry from being a typedef for an std::pair to be its
...
own small class. No functionality change.
llvm-svn: 90956
2009-12-09 07:08:01 +00:00
Chris Lattner
dda5ca59e2
Switch GVN and memdep to use PHITransAddr, which correctly handles
...
phi translation of complex expressions like &A[i+1]. This has the
following benefits:
1. The phi translation logic is all contained in its own class with
a strong interface and verification that it is self consistent.
2. The logic is more correct than before. Previously, if intermediate
expressions got PHI translated, we'd miss the update and scan for
the wrong pointers in predecessor blocks. @phi_trans2 is a testcase
for this.
3. We have a lot less code in memdep.
We can handle phi translation across blocks of things like @phi_trans3,
which is pretty insane :).
This patch should fix the miscompiles of 255.vortex, and I tested it
with a bootstrap of llvm-gcc, llvm-test and dejagnu of course.
llvm-svn: 90926
2009-12-09 01:59:31 +00:00
Chris Lattner
9c2474e272
fix a nasty variable that was shadowing the real CurBB but with the wrong value.
...
llvm-svn: 90920
2009-12-09 01:19:16 +00:00
Chris Lattner
3211af28ba
fix many input tracking bugs.
...
llvm-svn: 90915
2009-12-09 00:56:14 +00:00
Dan Gohman
ed3d370a10
Fix a typo in a comment, and adjust SmallSet and SmallVector sizes,
...
that Chris noticed.
llvm-svn: 90910
2009-12-09 00:28:42 +00:00