Nick Lewycky
a3a68bde21
Improve handling of SelectInst.
...
Reorder operations to remove duplicated work.
Fix to leave floating-point types out of the optimization.
Add tests to predsimplify.ll for SwitchInst and SelectInst handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 19:40:38 +00:00
Chris Lattner
94425996c5
improve compat with certain versions of GCC (on cygwin?)
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30054 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 17:37:30 +00:00
Chris Lattner
2efe109452
add a prototype
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30051 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:37:53 +00:00
Chris Lattner
1acb17cb83
Iteration is required for some cases, even if they don't occur in crafty.
...
Restore it, which re-fixes X86/2006-08-21-ExtraMovInst.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:32:53 +00:00
Chris Lattner
f21f0205b5
When joining two intervals where the RHS is really simple, use a light-weight
...
method for joining the live ranges instead of the fully-general one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30049 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:26:59 +00:00
Chris Lattner
6bda49fd9f
new method
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30048 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-02 05:26:01 +00:00
Evan Cheng
467782c160
Another "cyclic DAG" test case.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30043 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 23:50:17 +00:00
Evan Cheng
1453de5aa9
Oops. Bad typo. Without the check of N1.hasOneUse() bad things can happen.
...
Suppose the TokenFactor can reach the Op:
[Load chain]
^
|
[Load]
^ ^
| |
/ \-
/ |
/ [Op]
/ ^ ^
| .. |
| / |
[TokenFactor] |
^ |
| |
\ /
\ /
[Store]
If we move the Load below the TokenFactor, we would have created a cycle in
the DAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30040 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:52:28 +00:00
Chris Lattner
aca36b9329
Use a couple of multiclass patterns to factor some integer ops.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30039 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:28:02 +00:00
Chris Lattner
1662239a5e
remove a bunch of comments
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30038 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:16:22 +00:00
Chris Lattner
cce56af911
Make sure to clear CurDefmPrefix = 0, otherwise stuff after a defm won't
...
parse right. This fixes TableGen/MultiClass.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:07:27 +00:00
Chris Lattner
9595159451
Make this harder
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:07:00 +00:00
Chris Lattner
e7173e10ec
Fix a typo Jim pointed out, thanks!
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30035 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 22:01:36 +00:00
Chris Lattner
7717d0930a
fix an assertion with multidefs. Def inside of multiclasses don't need to
...
be complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:59:03 +00:00
Bill Wendling
bf77441605
Fixed formatting problem.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30033 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:47:10 +00:00
Chris Lattner
40de6cadc6
document !strconcat
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30032 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:46:01 +00:00
Bill Wendling
a396ee8e17
Added documentation Fernando Magno Quintao Pereira wrote for the register
...
allocator. (First draft)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:46:00 +00:00
Chris Lattner
84b3598bd0
Document multiclasses and defm's
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:44:18 +00:00
Chris Lattner
2762738d96
regenerate
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30029 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:14:42 +00:00
Chris Lattner
ef4e0c2827
simple multiclass example
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30028 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:14:37 +00:00
Chris Lattner
12069866c8
Add often-requested support for defining "multiclasses" which can be instantiated.
...
This allows you to define multiple definitions with one line, encouraging
more .td file factoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30027 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 21:13:49 +00:00
Anton Korobeynikov
7d51544903
- Fixed broken Win32 build
...
- Removed warning about clobbered parameter in Bytecode/Reader
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 20:35:17 +00:00
Evan Cheng
b5aaee0027
Remove extra spaces.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30025 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 18:45:22 +00:00
Evan Cheng
78050d6cbe
Last check-in was a mistake...
...
I've been told apple gcc version number is not guaranteed to increase
monotonically. Change the preprocess condition to make it less risky.
The configuration change is done during the middle 10.4 life cycle so we have
to check __APPLE_CC. For future OS X release, we should be able to assume
-fenable-cxa-atexit is the default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30024 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 18:42:59 +00:00
Evan Cheng
4f260b4efa
*** empty log message ***
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30023 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 18:40:46 +00:00
Evan Cheng
3f4fd0fd64
Allow legalizer to expand ISD::MUL using only MULHS in the rare case that is
...
possible and the target only supports MULHS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30022 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 18:17:58 +00:00
Jim Laskey
3ebe71db6b
Corrections.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30021 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 12:55:05 +00:00
Evan Cheng
fb9c0d7e31
Better comments.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 07:09:56 +00:00
Evan Cheng
5f271aff5c
Yikes. This requires checking apple gcc version.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30016 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 07:00:46 +00:00
Chris Lattner
8a67f6e848
Pull some code out of a hot recursive function because the common case doesn't
...
need recursion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30015 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 07:00:23 +00:00
Chris Lattner
5d9b6f2823
remove some particularly expensive assertions
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30014 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 06:57:35 +00:00
Chris Lattner
238416c99b
Reserve space in the ValueNumberInfo vector. This speeds up live interval
...
analysis 16% on crafty.
Wrap long lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30012 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 06:10:18 +00:00
Chris Lattner
0750bec272
add a simple reserve method.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30011 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 06:08:16 +00:00
Chris Lattner
a2a8f0919d
Iterative coallescing doesn't buy us anything (we get identical results on
...
crafty with and without it). Removing it speeds up live intervals 6%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 04:02:42 +00:00
Nick Lewycky
7218c28822
Don't confuse canonicalize and lookup. Fixes predsimplify.reg4.ll. Also
...
corrects missing optimization opportunity removing cases from a switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30009 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 03:26:35 +00:00
Evan Cheng
dfcfacb0cb
DAG combiner fix for rotates. Previously the outer-most condition checks
...
for ROTL availability. This prevents it from forming ROTR for targets that
has ROTR only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29997 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 07:41:12 +00:00
Chris Lattner
2ebfa0c618
Add a special case that speeds up coallescing a bit, but not enough.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29996 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 06:48:26 +00:00
Chris Lattner
bfe180af9e
Delete copies as they are coallesced instead of waiting until the end.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29995 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 05:58:59 +00:00
Chris Lattner
91725b7585
avoid calling the virtual isMoveInstr method endlessly by caching its results.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29994 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 05:54:43 +00:00
Chris Lattner
b495fb0e8c
Add a note about C++ -> C with libstdc++
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29993 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 04:26:31 +00:00
Nick Lewycky
838f36f0bb
This program crashes the PredicateSimplifier. Not marked XFAIL because
...
the PredicateSimplifier is skipped in make check anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29992 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 03:13:05 +00:00
Nick Lewycky
6e39c7ed1e
Properties where both Values weren't in the union (as being equal to
...
another Value) weren't being found by findProperties.
This fixes predsimplify.ll test6, a missed optimization opportunity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29991 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-31 00:39:16 +00:00
Chris Lattner
d3233eeff2
Bugfix for recent coallescer crash
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 23:03:35 +00:00
Chris Lattner
ba256037ce
Fix a compiler crash bootstrapping llvm-gcc.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29989 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 23:02:29 +00:00
Chris Lattner
4382c736df
Restore source-level compatibility with clients of these functions.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29978 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 20:47:48 +00:00
Chris Lattner
9b0d6f4ca6
Guess what happens when asserts are disabled. :(
...
Also, the assert could never fire due to || instead of &&.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 20:37:06 +00:00
Chris Lattner
1b1a49714e
fix 80 column issue
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29972 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 05:56:52 +00:00
Chris Lattner
52c917190a
Instantiate Statistic<> in one place, not in every .o file that uses it.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 04:17:00 +00:00
Nick Lewycky
3947a76e21
Move to using the EquivalenceClass ADT. Removes SynSets.
...
If a branch's condition has become a ConstantBool, simplify it immediately.
Removing the edge saves work and exposes up more optimization opportunities
in the pass.
Add support for SelectInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29970 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-30 02:46:48 +00:00
Chris Lattner
1bb6f0643d
Code cleanups, no functionality change.
...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29969 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 23:38:20 +00:00