Commit Graph

19789 Commits

Author SHA1 Message Date
Devang Patel
9021c7001e Clear split info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 21:18:27 +00:00
Devang Patel
71554b8e3c Handle multiple split conditions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40941 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 21:02:17 +00:00
Reid Spencer
2372ccc111 Make getSTDIN return null if the standard input is empty, as the header file
documentation implies and as its uses depend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40939 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 20:01:58 +00:00
Reid Spencer
53424ad141 Allow the filename "-" to be a place holder for stdin. This allows directing
stdin through llvm-ld and llvm-link.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 19:52:29 +00:00
Owen Anderson
838014ee5b Global values also don't undead-ify pointers in our dead alloca's set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40936 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 19:12:31 +00:00
Owen Anderson
362bb52108 Make handleEndBlock significantly faster with one trivial improvement,
and one hack to avoid hitting a bad case when the alias analysis is imprecise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40935 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 18:38:28 +00:00
Owen Anderson
df359c264e Small improvement: if a function doesn't access memory, we don't need to scan
it for potentially undeading pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40933 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 17:58:56 +00:00
Owen Anderson
bb3abf41a8 Add some comments, remove a dead argument, and simplify some control flow.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40932 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 17:50:09 +00:00
Chris Lattner
79e038a16d eliminate redundant conditions from the signless types conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 16:19:57 +00:00
Chris Lattner
a099b6c7bb Handle functions with no name better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40926 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 16:07:23 +00:00
Evan Cheng
24c2e5cf7e Adding kill info to val#.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40925 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 07:03:29 +00:00
Chris Lattner
c5f6a1f9d6 significantly speed up constant folding of calls (and thus all clients that use
ConstantFoldInstruction on calls) by avoiding Value::getName().  getName() constructs
and returns an std::string, which does heap allocation stuff.  This slightly speeds up
instcombine.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40924 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 06:55:43 +00:00
Chris Lattner
de0e42d3c0 Speed up updateDFSNumbers with two observations:
1. domtree is a tree, not a graph.  There is no need to avoid revisiting nodes with a set.
2. the worklist can contain the child iterator pointers so we don't get N^2 rescanning of children.

This speeds up updateDFSNumbers significantly, making it basically free.  On the testcase in PR1432,
this speeds up loopsimplify by another 3x, dropping it from the 12th most expensive pass to the to
the 30th. :)  It used to be #1.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40923 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 06:24:20 +00:00
Owen Anderson
c182f17aed A few more small cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 06:06:02 +00:00
Evan Cheng
a141cfe5b2 Clean up and bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40921 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 05:56:18 +00:00
Chris Lattner
3e089ae0b8 reimplement dfs number computation to be significantly faster. This speeds up
natural loop canonicalization (which does many cfg xforms) by 4.3x, for 
example.  This also fixes a bug in postdom dfnumber computation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40920 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 05:51:24 +00:00
Owen Anderson
6ca4cb3755 First round of cleanups from Chris' feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40919 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 04:52:29 +00:00
Evan Cheng
8df786012d - Each val# can have multiple kills.
- Fix some minor bugs related to special markers on val# def. ~0U means
  undefined, ~1U means dead val#.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40916 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 03:00:28 +00:00
Devang Patel
6a2bfdaab6 Embrace patch review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40915 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 01:51:27 +00:00
Evan Cheng
51cbf3c980 Remove a dead assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40914 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-08 01:00:21 +00:00
Evan Cheng
a8d94f1315 - LiveInterval value#'s now have 3 components: def instruction #,
kill instruction #, and source register number (iff the value# is defined by a
copy).
- Now def instruction # is set for every value#, not just for copy defined ones.
- Update some outdated code related inactive live ranges.
- Kill info not yet set. That's next patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40913 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 23:49:57 +00:00
Devang Patel
002fe25dd7 Fix new compare instruction's signness. Caught by Chris during review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40912 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 23:17:52 +00:00
Owen Anderson
a37226af81 Don't insert nearly as many redundant phi nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40909 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 23:12:31 +00:00
Dale Johannesen
84109cd015 Fix spelling of mtvscr and mfvscr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 23:08:00 +00:00
Dale Johannesen
cdbe4d3ebe Long double patch 8 of N: make it partially work in
SSE mode (all but conversions <-> other FP types, I think):
>>Do not mark all-80-bit operations as "Requires[FPStack]"
(which really means "not SSE").
>>Refactor load-and-extend to facilitate this.
>>Update comments.
>>Handle long double in SSE when computing FP_REG_KILL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 20:29:26 +00:00
Devang Patel
8431a1cbcc Use eraseFromParent().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40903 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 17:45:35 +00:00
David Greene
32fe3de0fe Fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 16:52:03 +00:00
David Greene
8ff18e9c99 Fix GLIBCXX_DEBUG error triggered by incrementing erased iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 16:44:38 +00:00
David Greene
7e23146ab9 Add a missing forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 16:34:05 +00:00
Evan Cheng
0ff94f7fcc Initial JIT support for ARM by Raul Fernandes Herbster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40887 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 01:37:15 +00:00
Dale Johannesen
a996d52e37 Long double patch 7 of N, unless I lost count:).
Last x87 bits for full functionality (not
thoroughly tested, and long doubles do not work
in SSE modes at all - use -mcpu=i486 for now)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40886 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 01:17:37 +00:00
Owen Anderson
dbbe816757 Clean up a bunch of caching stuff in memdep. This reduces the time to run GVN
on 403.gcc from ~15s to ~10s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40884 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 00:33:45 +00:00
Devang Patel
fee76bd9ba Begin loop index split pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40883 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-07 00:25:56 +00:00
Owen Anderson
8f35315798 Improve the accuracy of memdep for determining the dependencies of loads.
This brings GVN to parity with GCSE+LoadVN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40882 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 23:26:03 +00:00
Dale Johannesen
9989a65693 Replace 4-line function with 10-line version per review comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40881 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 22:10:35 +00:00
Dale Johannesen
27f92be8b7 Move lengthy conditional down 1 level per review comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 21:48:35 +00:00
Dale Johannesen
6a30811d5c Get X86 long double calling convention to work
(on Darwin, anyway).  Fix some table omissions for
LD arithmetic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 21:31:06 +00:00
Chris Lattner
0275cffa97 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 21:00:46 +00:00
Chris Lattner
6df20efcc3 Fix PR1577, a crash on invalid bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40874 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 21:00:37 +00:00
Chandler Carruth
a583990ec8 This resolves a regression of BasicAA which failed to find any memory information for overloaded intrinsics (PR1600). This resolves that issue, and improves the matching scheme to use a BitVector rather than a binary search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 20:57:16 +00:00
Nick Lewycky
f947b3edb5 It's safe to fold not of fcmp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40870 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 20:04:16 +00:00
Dale Johannesen
88835735f4 Make 80-bit store maintain simulated FP stack correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40868 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 19:50:32 +00:00
Nick Lewycky
d6dac0eebc Let scalar-evolution analyze loops with an unsigned comparison for the exit
condition. Fixes 1597.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40867 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 19:21:00 +00:00
Nick Lewycky
06323bfe03 Don't assume it's safe to transform a loop just because it's dominated by any
comparison. Fixes bug 1598.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 18:33:46 +00:00
Chris Lattner
914ce4508d Fix a regression compiling 2005-05-11-Popcount-ffs-fls with the CBE,
introduced by chandler's patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40864 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 16:36:18 +00:00
Christopher Lamb
98363225a3 Implement review feedback. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40863 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 16:33:56 +00:00
David Greene
242be6e0ff Make this code more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40861 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 15:09:17 +00:00
Chris Lattner
3589df8013 remove some dead lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 06:21:06 +00:00
Chris Lattner
7ed54a0ece 1. Random tidiness cleanups
2. Make domtree printing print dfin/dfout #'s
3. Fix the Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll failure from last night (in DominanceFrontier::splitBlock).

w.r.t. #3, my patches last night happened to expose the bug, but this 
has been broken since Owen's r35839 patch to LoopSimplify.  The code
was subsequently moved over from LoopSimplify into Dominators, carrying
the latent bug.  Fun stuff.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-06 06:19:47 +00:00
Reid Spencer
181b6c9cb5 Fix minor doxygen nits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40854 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-05 20:06:04 +00:00