Wesley Peck
b6eccbe55a
Commit 122778 broke DWARF debug output when using the MBlaze backend. Fixed by overriding TargetFrameInfo::getFrameIndexOffset to take into account the new frame index information.
...
llvm-svn: 122889
2011-01-05 17:34:20 +00:00
Cameron Zwarich
eca6d2c70a
Add some stats to CodeGenPrepare to make it easier to speed it up without
...
regressing code quality.
llvm-svn: 122887
2011-01-05 17:27:27 +00:00
Wesley Peck
832c9e07a1
Fix small bug in setDebugInfoAvailability.
...
llvm-svn: 122886
2011-01-05 17:01:57 +00:00
Michael J. Spencer
965b6c0d1e
UnitTests/Path: Fix typo, add error number, and enable the directory cleanup code.
...
llvm-svn: 122885
2011-01-05 16:39:46 +00:00
Michael J. Spencer
76c9f102b3
Support/PathV2: Implement remove_all.
...
llvm-svn: 122884
2011-01-05 16:39:38 +00:00
Michael J. Spencer
674358d496
Support/Windows/PathV2: Make directory iteration ignore . and ..
...
llvm-svn: 122883
2011-01-05 16:39:30 +00:00
Michael J. Spencer
bacdde1270
Support/Windows/PathV2: Fix remove to handle both files and directories.
...
llvm-svn: 122882
2011-01-05 16:39:22 +00:00
Michael J. Spencer
6bae59fb06
Support/PathV2: Implement directory_entry::status.
...
llvm-svn: 122881
2011-01-05 16:39:13 +00:00
Michael J. Spencer
0506a5377e
UnitTests/PathV2: Setup a test fixture to make tracking created file system
...
entities easier.
llvm-svn: 122880
2011-01-05 16:39:05 +00:00
Michael J. Spencer
e369cc8053
Support/PathV2: Implement directory iteration on POSIX.
...
llvm-svn: 122879
2011-01-05 16:38:57 +00:00
Cameron Zwarich
a7b9603f24
Use pop_back_val instead of back followed by pop_back.
...
llvm-svn: 122876
2011-01-05 16:08:47 +00:00
Frits van Bommel
4c9ed7d055
Fix lit for people whose LLVM path contains 'opt', which is a common directory name on Unix-like systems.
...
llvm-svn: 122873
2011-01-05 15:10:24 +00:00
Cameron Zwarich
1dc3325c51
Use a worklist for later iterations just like ordinary instsimplify. The next
...
step is to only process instructions in subloops if they have been modified by
an earlier simplification.
llvm-svn: 122869
2011-01-05 05:47:47 +00:00
Cameron Zwarich
498b19fe4f
Change LoopInstSimplify back to a LoopPass. It revisits subloops rather than
...
skipping them, but it should probably use a worklist and only revisit those
instructions in subloops that have actually changed. It should probably also
use a worklist after the first iteration like instsimplify now does. Regardless,
it's only 0.3% of opt -O2 time on 403.gcc if it replaces the instcombine placed
in the middle of the loop passes.
llvm-svn: 122868
2011-01-05 05:15:53 +00:00
Chris Lattner
de8f64f331
Fix PR8906: -fno-builtin should disable loop-idiom recognition.
...
It forms memset and memcpy's, and will someday form popcount and
other stuff. All of this is bad when compiling the implementation
of memset, memcpy, popcount, etc.
llvm-svn: 122854
2011-01-05 01:03:32 +00:00
Eric Christopher
be2382f9a6
Remove TODO, these appear to be implemented.
...
llvm-svn: 122849
2011-01-04 22:31:50 +00:00
Owen Anderson
cc0a091a5b
Don't bother value numbering instructions with void types in GVN. In theory this should allow us to insert
...
fewer things into the value numbering maps, but any speedup is beneath the noise threshold on my machine
on 403.gcc.
llvm-svn: 122844
2011-01-04 22:15:21 +00:00
Jakob Stoklund Olesen
76e782c385
Use the EdgeBundles analysis in X86FloatingPoint instead of recomputing CFG
...
bundles in the pass.
llvm-svn: 122833
2011-01-04 21:10:11 +00:00
Jakob Stoklund Olesen
abf8941a60
Turn the EdgeBundles class into a stand-alone machine CFG analysis pass.
...
The analysis will be needed by both the greedy register allocator and the
X86FloatingPoint pass. It only needs to be computed once when the CFG doesn't
change.
This pass is very fast, usually showing up as 0.0% wall time.
llvm-svn: 122832
2011-01-04 21:10:05 +00:00
Dale Johannesen
c7168aa6fe
Eliminate a warning compiling with llvm-gcc. (IMO the
...
warning is overzealous but gcc is what it is.)
llvm-svn: 122829
2011-01-04 19:31:24 +00:00
Owen Anderson
21c2cbcdbc
Complete the NumberTable --> LeaderTable rename.
...
llvm-svn: 122828
2011-01-04 19:29:46 +00:00
Owen Anderson
52b41efbe8
Fix typo in a comment.
...
llvm-svn: 122827
2011-01-04 19:25:18 +00:00
Owen Anderson
eab44ddb0d
Prune #include's.
...
llvm-svn: 122826
2011-01-04 19:24:57 +00:00
Owen Anderson
e8b5675dfa
Clarify terminology, settling on referring to what was the "number table" as the "leader table", and
...
rename methods to make it much more clear what they're doing.
llvm-svn: 122823
2011-01-04 19:13:25 +00:00
Owen Anderson
192bc8fe10
When removing a value from GVN's leaders list, don't drop the Next pointer in a corner case.
...
llvm-svn: 122822
2011-01-04 19:10:54 +00:00
Dale Johannesen
de70d69dff
Improve the accuracy of the inlining heuristic looking for the
...
case where a static caller is itself inlined everywhere else, and
thus may go away if it doesn't get too big due to inlining other
things into it. If there are references to the caller other than
calls, it will not be removed; account for this.
This results in same-day completion of the case in PR8853.
llvm-svn: 122821
2011-01-04 19:01:54 +00:00
Owen Anderson
0ebc81b8d6
Branch instructions don't produce values, so there's no need to generate a value number for them. This
...
avoids adding them to the various value numbering tables, resulting in a minor (~3%) speedup for GVN
on 40.gcc.
llvm-svn: 122819
2011-01-04 18:54:18 +00:00
Owen Anderson
035828ecc6
Remove commented out code.
...
llvm-svn: 122817
2011-01-04 18:22:08 +00:00
Owen Anderson
8bc93c6fdf
Give MachineFunctionAnalysis a getPassName() implementation to make timing reports prettier.
...
llvm-svn: 122816
2011-01-04 18:21:18 +00:00
Cameron Zwarich
8df51d24bd
Switch to the new style of asterisk placement.
...
llvm-svn: 122815
2011-01-04 18:19:19 +00:00
Chris Lattner
dbb1b09731
fix an off-by-one bug that caused a crash analyzing
...
ashr's with huge shift amounts, PR8896
llvm-svn: 122814
2011-01-04 18:19:15 +00:00
Michael J. Spencer
b5b192853b
UnitTests/Path: Produce useful diagnostics on error.
...
llvm-svn: 122812
2011-01-04 17:00:18 +00:00
Cameron Zwarich
fce4db4cbe
Switch to path halving from path compression for a small speedup. This also
...
makes getLeader() nonrecursive.
llvm-svn: 122811
2011-01-04 16:24:51 +00:00
Tobias Grosser
e8df8a7c39
Include llvm-gcc dir before llvm_tools_dir
...
This ensures that always the recently compiled tools are picked for testing.
llvm-svn: 122810
2011-01-04 16:01:17 +00:00
Duncan Sands
d252c6dae7
These methods should be "const"; make them so.
...
llvm-svn: 122809
2011-01-04 12:52:29 +00:00
Francois Pichet
7b62eeaf56
Disable r122754 on Windows: was causing all lit tests to fail.
...
llvm-svn: 122808
2011-01-04 10:23:42 +00:00
Chris Lattner
1f58120bfe
Teach loop-idiom to turn a loop containing a memset into a larger memset
...
when safe.
The testcase is basically this nested loop:
void foo(char *X) {
for (int i = 0; i != 100; ++i)
for (int j = 0; j != 100; ++j)
X[j+i*100] = 0;
}
which gets turned into a single memset now. clang -O3 doesn't optimize
this yet though due to a phase ordering issue I haven't analyzed yet.
llvm-svn: 122806
2011-01-04 07:46:33 +00:00
Chris Lattner
0c29b20b46
restructure this a bit. Initialize the WeakVH with "I", the
...
instruction *after* the store. The store will always be deleted
if the transformation kicks in, so we'd do an N^2 scan of every
loop block. Whoops.
llvm-svn: 122805
2011-01-04 07:27:30 +00:00
Cameron Zwarich
2975ee7cc6
Eliminate repeated allocation of a per-BB DenseMap for a 4.6% reduction of time
...
spent in StrongPHIElimination on 403.gcc.
llvm-svn: 122803
2011-01-04 06:42:27 +00:00
Cameron Zwarich
150ef32f67
Avoid finding loop back edges when we are not splitting critical edges in
...
CodeGenPrepare (which is the default behavior).
llvm-svn: 122801
2011-01-04 04:43:31 +00:00
David Greene
3926d82c53
Don't pattern match "/clang" so we don't mangle directory names. Some
...
tests use absolute paths to clang.
llvm-svn: 122796
2011-01-04 01:05:30 +00:00
Owen Anderson
9eeb0d483e
Clean up a funky pass registration that got passed over when I got rid of static constructors.
...
llvm-svn: 122795
2011-01-04 00:55:21 +00:00
Andrew Trick
3637733170
Fix the ARM IIC_iCMPsi itinerary and add an important assert.
...
llvm-svn: 122794
2011-01-04 00:32:57 +00:00
Cameron Zwarich
61a903b51b
Address most of Duncan's review comments. Also, make LoopInstSimplify a simple
...
FunctionPass. It probably doesn't have a reason to be a LoopPass, as it will
probably drop the simple fixed point and either use RPO iteration or Duncan's
approach in instsimplify of only revisiting instructions that have changed.
The next step is to preserve LoopSimplify. This looks like it won't be too hard,
although the pass manager doesn't actually seem to respect when non-loop passes
claim to preserve LCSSA or LoopSimplify. This will have to be fixed.
llvm-svn: 122791
2011-01-04 00:12:46 +00:00
Chris Lattner
0caf5cbbe7
use the very-handy getTruncateOrZeroExtend helper function, and
...
stop setting NSW: signed overflow is possible. Thanks to Dan
for pointing these out.
llvm-svn: 122790
2011-01-04 00:06:55 +00:00
Bill Wendling
b402d3881e
Formatting changes. No functionality change.
...
llvm-svn: 122789
2011-01-03 23:59:05 +00:00
Owen Anderson
c724c5969d
Fix comment.
...
llvm-svn: 122788
2011-01-03 23:51:56 +00:00
Owen Anderson
ce48a5e838
Use the new addEscapingValue callback to update GlobalsModRef when GVN adds PHIs of GEPs. For the moment,
...
have GlobalsModRef handle this conservatively by simply removing the value from its maps.
llvm-svn: 122787
2011-01-03 23:51:43 +00:00
Evan Cheng
5f20fa7fed
Convert MC tests to .s so codegen changes won't break them.
...
llvm-svn: 122786
2011-01-03 23:47:14 +00:00
Chris Lattner
cd13979300
Duncan deftly points out that readnone functions aren't
...
invalidated by stores, so they can be handled as 'simple'
operations.
llvm-svn: 122785
2011-01-03 23:38:13 +00:00