Commit Graph

26234 Commits

Author SHA1 Message Date
Chris Lattner 7907ad8472 new method
llvm-svn: 30048
2006-09-02 05:26:01 +00:00
Evan Cheng 1f15185cbc Another "cyclic DAG" test case.
llvm-svn: 30043
2006-09-01 23:50:17 +00:00
Evan Cheng 2c4e0f120f 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.

llvm-svn: 30040
2006-09-01 22:52:28 +00:00
Chris Lattner bad9d2ee49 Use a couple of multiclass patterns to factor some integer ops.
llvm-svn: 30039
2006-09-01 22:28:02 +00:00
Chris Lattner 38e6d1d5af remove a bunch of comments
llvm-svn: 30038
2006-09-01 22:16:22 +00:00
Chris Lattner 70fd01a1b8 Make sure to clear CurDefmPrefix = 0, otherwise stuff after a defm won't
parse right.  This fixes TableGen/MultiClass.td

llvm-svn: 30037
2006-09-01 22:07:27 +00:00
Chris Lattner 315f02a6e5 Make this harder
llvm-svn: 30036
2006-09-01 22:07:00 +00:00
Chris Lattner 28368120a5 Fix a typo Jim pointed out, thanks!
llvm-svn: 30035
2006-09-01 22:01:36 +00:00
Chris Lattner c05fac8b83 fix an assertion with multidefs. Def inside of multiclasses don't need to
be complete.

llvm-svn: 30034
2006-09-01 21:59:03 +00:00
Bill Wendling d81797beca Fixed formatting problem.
llvm-svn: 30033
2006-09-01 21:47:10 +00:00
Chris Lattner b5b0c1ae65 document !strconcat
llvm-svn: 30032
2006-09-01 21:46:01 +00:00
Bill Wendling 00c5aecb74 Added documentation Fernando Magno Quintao Pereira wrote for the register
allocator. (First draft)

llvm-svn: 30031
2006-09-01 21:46:00 +00:00
Chris Lattner f01a85bdf2 Document multiclasses and defm's
llvm-svn: 30030
2006-09-01 21:44:18 +00:00
Chris Lattner aec1af2239 regenerate
llvm-svn: 30029
2006-09-01 21:14:42 +00:00
Chris Lattner 4b975e8eea simple multiclass example
llvm-svn: 30028
2006-09-01 21:14:37 +00:00
Chris Lattner 66b7235877 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.

llvm-svn: 30027
2006-09-01 21:13:49 +00:00
Anton Korobeynikov 6c6a70f999 - Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader

llvm-svn: 30026
2006-09-01 20:35:17 +00:00
Evan Cheng 88c268b621 Remove extra spaces.
llvm-svn: 30025
2006-09-01 18:45:22 +00:00
Evan Cheng 31c99969a9 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.

llvm-svn: 30024
2006-09-01 18:42:59 +00:00
Evan Cheng d176cdf76d *** empty log message ***
llvm-svn: 30023
2006-09-01 18:40:46 +00:00
Evan Cheng e93762d36e Allow legalizer to expand ISD::MUL using only MULHS in the rare case that is
possible and the target only supports MULHS.

llvm-svn: 30022
2006-09-01 18:17:58 +00:00
Jim Laskey 5352d0cc4d Corrections.
llvm-svn: 30021
2006-09-01 12:55:05 +00:00
Evan Cheng 4b8b6ae924 Better comments.
llvm-svn: 30017
2006-09-01 07:09:56 +00:00
Evan Cheng c5fddc566c Yikes. This requires checking apple gcc version.
llvm-svn: 30016
2006-09-01 07:00:46 +00:00
Chris Lattner 93c067dc2d Pull some code out of a hot recursive function because the common case doesn't
need recursion.

llvm-svn: 30015
2006-09-01 07:00:23 +00:00
Chris Lattner 53ca302eb3 remove some particularly expensive assertions
llvm-svn: 30014
2006-09-01 06:57:35 +00:00
Chris Lattner 3eac2c87aa Reserve space in the ValueNumberInfo vector. This speeds up live interval
analysis 16% on crafty.

Wrap long lines.

llvm-svn: 30012
2006-09-01 06:10:18 +00:00
Chris Lattner 6bfccbb08b add a simple reserve method.
llvm-svn: 30011
2006-09-01 06:08:16 +00:00
Chris Lattner f765351978 Iterative coallescing doesn't buy us anything (we get identical results on
crafty with and without it).  Removing it speeds up live intervals 6%.

llvm-svn: 30010
2006-09-01 04:02:42 +00:00
Nick Lewycky f6f529d008 Don't confuse canonicalize and lookup. Fixes predsimplify.reg4.ll. Also
corrects missing optimization opportunity removing cases from a switch.

llvm-svn: 30009
2006-09-01 03:26:35 +00:00
Evan Cheng 31305c45da 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.

llvm-svn: 29997
2006-08-31 07:41:12 +00:00
Chris Lattner a700a19d04 Add a special case that speeds up coallescing a bit, but not enough.
llvm-svn: 29996
2006-08-31 06:48:26 +00:00
Chris Lattner 78cca7243c Delete copies as they are coallesced instead of waiting until the end.
llvm-svn: 29995
2006-08-31 05:58:59 +00:00
Chris Lattner aa36808fd3 avoid calling the virtual isMoveInstr method endlessly by caching its results.
llvm-svn: 29994
2006-08-31 05:54:43 +00:00
Chris Lattner b096190f29 Add a note about C++ -> C with libstdc++
llvm-svn: 29993
2006-08-31 04:26:31 +00:00
Nick Lewycky a24fdaea0b This program crashes the PredicateSimplifier. Not marked XFAIL because
the PredicateSimplifier is skipped in make check anyways.

llvm-svn: 29992
2006-08-31 03:13:05 +00:00
Nick Lewycky 08674ab707 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.

llvm-svn: 29991
2006-08-31 00:39:16 +00:00
Chris Lattner f5da261701 Bugfix for recent coallescer crash
llvm-svn: 29990
2006-08-30 23:03:35 +00:00
Chris Lattner cb74860cce Fix a compiler crash bootstrapping llvm-gcc.
llvm-svn: 29989
2006-08-30 23:02:29 +00:00
Chris Lattner aea29af0bc Restore source-level compatibility with clients of these functions.
llvm-svn: 29978
2006-08-30 20:47:48 +00:00
Chris Lattner 9543866c27 Guess what happens when asserts are disabled. :(
Also, the assert could never fire due to || instead of &&.

llvm-svn: 29977
2006-08-30 20:37:06 +00:00
Chris Lattner 69c32d5564 fix 80 column issue
llvm-svn: 29972
2006-08-30 05:56:52 +00:00
Chris Lattner f5bed76353 Instantiate Statistic<> in one place, not in every .o file that uses it.
llvm-svn: 29971
2006-08-30 04:17:00 +00:00
Nick Lewycky 5f8f9af65c 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.

llvm-svn: 29970
2006-08-30 02:46:48 +00:00
Chris Lattner dcc8bcc04d Code cleanups, no functionality change.
llvm-svn: 29969
2006-08-29 23:38:20 +00:00
Chris Lattner 34434e97c9 Teach the coallescer to coallesce live intervals joined by an arbitrary
number of copies, potentially defining live ranges that appear to have
differing value numbers that become identical when coallsced.  Among other
things, this fixes CodeGen/X86/shift-coalesce.ll and PR687.

llvm-svn: 29968
2006-08-29 23:18:15 +00:00
Chris Lattner faa6355510 new testcase for pr687
llvm-svn: 29967
2006-08-29 23:09:59 +00:00
Devang Patel f489d0f85c Do not rely on std::sort and std::erase to get list of unique
exit blocks. The output is dependent on addresses of basic block.

Add and use Loop::getUniqueExitBlocks.

llvm-svn: 29966
2006-08-29 22:29:16 +00:00
Evan Cheng 6d464146d0 Minor asm fix.
llvm-svn: 29965
2006-08-29 22:14:48 +00:00
Evan Cheng 8dd79a4c14 This is also a 32-bit only test. x86-64 would pass fp parameters through XMM registers.
llvm-svn: 29964
2006-08-29 22:01:39 +00:00