oota-llvm.git
20 years agoMove machine code rewriter and spiller outside the register
Alkis Evlogimenos [Tue, 24 Feb 2004 08:58:30 +0000 (08:58 +0000)]
Move machine code rewriter and spiller outside the register
allocator.

The implementation is completely rewritten and now employs several
optimizations not exercised before. For example for 164.gzip we have
997 loads and 699 stores vs the 1221 loads and 880 stores we have
before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11798 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement SimplifyCFG/switch_switch_fold.ll
Chris Lattner [Tue, 24 Feb 2004 07:23:58 +0000 (07:23 +0000)]
Implement SimplifyCFG/switch_switch_fold.ll
This case occurs many times in various benchmarks, especially when combined
with the previous patch.  This allows it to get stuff like:
  if (X == 4 || X == 3)
    if (X == 5 || X == 8)

and

switch (X) {
case 4: case 5: case 6:
  if (X == 4 || X == 5)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11797 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase. Switch instructions that go to switch instructions should be
Chris Lattner [Tue, 24 Feb 2004 07:21:09 +0000 (07:21 +0000)]
New testcase.  Switch instructions that go to switch instructions should be
merged.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11796 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd predicates for checking if a virtual register has a physical
Alkis Evlogimenos [Tue, 24 Feb 2004 06:30:36 +0000 (06:30 +0000)]
Add predicates for checking if a virtual register has a physical
register mapping or a stack slot mapping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11795 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd some helpful methods for dealing with switch instructions
Chris Lattner [Tue, 24 Feb 2004 06:26:00 +0000 (06:26 +0000)]
Add some helpful methods for dealing with switch instructions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11794 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRearrange code a bit
Chris Lattner [Tue, 24 Feb 2004 05:54:22 +0000 (05:54 +0000)]
Rearrange code a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11793 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement: test/Regression/Transforms/SimplifyCFG/switch_create.ll
Chris Lattner [Tue, 24 Feb 2004 05:38:11 +0000 (05:38 +0000)]
Implement: test/Regression/Transforms/SimplifyCFG/switch_create.ll

This turns code like this:
  if (X == 4 | X == 7)
and
  if (X != 4 & X != 7)
into switch instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11792 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe simplifycfg pass should be able to turn stuff like:
Chris Lattner [Tue, 24 Feb 2004 05:34:44 +0000 (05:34 +0000)]
The simplifycfg pass should be able to turn stuff like:
  if (X == 4 || X == 7)
and
  if (X != 4 && X != 7)

into switch instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11791 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWow, the description of the 'switch' instruction was out of date.
Chris Lattner [Tue, 24 Feb 2004 04:54:45 +0000 (04:54 +0000)]
Wow, the description of the 'switch' instruction was out of date.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11790 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agowe no longer include boost
Chris Lattner [Tue, 24 Feb 2004 04:02:20 +0000 (04:02 +0000)]
we no longer include boost

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11789 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoHrm, my find must have been faulty. It didn't remove these as well.
Chris Lattner [Tue, 24 Feb 2004 03:54:22 +0000 (03:54 +0000)]
Hrm, my find must have been faulty.  It didn't remove these as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11788 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBoost is now unneeded, thanks to the fix for PR253, contributed by Reid Spencer!
Chris Lattner [Tue, 24 Feb 2004 03:53:00 +0000 (03:53 +0000)]
Boost is now unneeded, thanks to the fix for PR253, contributed by Reid Spencer!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11787 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNow that's a new feature!
Chris Lattner [Tue, 24 Feb 2004 03:50:24 +0000 (03:50 +0000)]
Now that's a new feature!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11786 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse the new LLVM is_class template instead of the boost one, allowing us to
Chris Lattner [Tue, 24 Feb 2004 03:50:05 +0000 (03:50 +0000)]
Use the new LLVM is_class template instead of the boost one, allowing us to
remove our dependency on boost!  Thanks to Reid Spencer for making this possible!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11785 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCheck in a new type_traits header which provides the mysterious is_class
Chris Lattner [Tue, 24 Feb 2004 03:49:29 +0000 (03:49 +0000)]
Check in a new type_traits header which provides the mysterious is_class
template.  Thanks go out to Reid Spencer for skillfully extracting this
from boost!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11784 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNoone cares about similarity to boost
Chris Lattner [Tue, 24 Feb 2004 03:47:25 +0000 (03:47 +0000)]
Noone cares about similarity to boost

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11783 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake enum private as it is an implementation detail.
Alkis Evlogimenos [Mon, 23 Feb 2004 23:49:40 +0000 (23:49 +0000)]
Make enum private as it is an implementation detail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11782 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove '4Virt' from member function names as it is obvious.
Alkis Evlogimenos [Mon, 23 Feb 2004 23:47:10 +0000 (23:47 +0000)]
Remove '4Virt' from member function names as it is obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11781 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRefactor VirtRegMap out of RegAllocLinearScan as the first part of bug
Alkis Evlogimenos [Mon, 23 Feb 2004 23:08:11 +0000 (23:08 +0000)]
Refactor VirtRegMap out of RegAllocLinearScan as the first part of bug
251 (providing a generic machine code rewriter/spiller).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11780 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoInclude Config/config.h for SHLIBEXT.
Alkis Evlogimenos [Mon, 23 Feb 2004 22:42:51 +0000 (22:42 +0000)]
Include Config/config.h for SHLIBEXT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11779 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoDataTypes.h is now output from configure, and shortened
Brian Gaeke [Mon, 23 Feb 2004 22:07:26 +0000 (22:07 +0000)]
DataTypes.h is now output from configure, and shortened

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11778 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd SUBSTing checks for sys/types.h and inttypes.h; add DataTypes.h to AC_OUTPUT.
Brian Gaeke [Mon, 23 Feb 2004 22:07:01 +0000 (22:07 +0000)]
Add SUBSTing checks for sys/types.h and inttypes.h; add DataTypes.h to AC_OUTPUT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11777 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated with autoconf-2.57.
Brian Gaeke [Mon, 23 Feb 2004 22:07:00 +0000 (22:07 +0000)]
Regenerated with autoconf-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11776 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGenerate much more efficient code in programs like pifft
Chris Lattner [Mon, 23 Feb 2004 21:46:58 +0000 (21:46 +0000)]
Generate much more efficient code in programs like pifft

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11775 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a small typeo in my checkin last night that broke vortex and other programs :(
Chris Lattner [Mon, 23 Feb 2004 21:46:42 +0000 (21:46 +0000)]
Fix a small typeo in my checkin last night that broke vortex and other programs :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11774 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated with autoheader-2.57.
Brian Gaeke [Mon, 23 Feb 2004 21:30:39 +0000 (21:30 +0000)]
Regenerated with autoheader-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11773 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated with autoconf-2.57.
Brian Gaeke [Mon, 23 Feb 2004 21:30:37 +0000 (21:30 +0000)]
Regenerated with autoconf-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11772 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoChange test for pthreads to use AC_SUBST; add ThreadSupport.h as an AC_OUTPUT.
Brian Gaeke [Mon, 23 Feb 2004 21:30:36 +0000 (21:30 +0000)]
Change test for pthreads to use AC_SUBST; add ThreadSupport.h as an AC_OUTPUT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11771 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThreadSupport.h is now output from configure.
Brian Gaeke [Mon, 23 Feb 2004 21:30:29 +0000 (21:30 +0000)]
ThreadSupport.h is now output from configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11770 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove check for slist
Brian Gaeke [Mon, 23 Feb 2004 21:12:58 +0000 (21:12 +0000)]
Remove check for slist

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11769 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix InstCombine/2004-02-23-ShiftShiftOverflow.ll
Chris Lattner [Mon, 23 Feb 2004 20:30:06 +0000 (20:30 +0000)]
Fix InstCombine/2004-02-23-ShiftShiftOverflow.ll
Also, turn 'shr int %X, 1234' into 'shr int %X, 31'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11768 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTest for the other way also
Chris Lattner [Mon, 23 Feb 2004 20:24:16 +0000 (20:24 +0000)]
Test for the other way also

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11767 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoNew testcase
Chris Lattner [Mon, 23 Feb 2004 20:19:51 +0000 (20:19 +0000)]
New testcase

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11766 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRenamed to hash_set.in; move to using autoconf substitution tags.
Brian Gaeke [Mon, 23 Feb 2004 18:56:36 +0000 (18:56 +0000)]
Renamed to hash_set.in; move to using autoconf substitution tags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11765 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRenamed to hash_map.in; move to using autoconf substitution tags.
Brian Gaeke [Mon, 23 Feb 2004 18:56:35 +0000 (18:56 +0000)]
Renamed to hash_map.in; move to using autoconf substitution tags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11764 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd include/Support/hash_map and include/Support/hash_set as AC_OUTPUT files.
Brian Gaeke [Mon, 23 Feb 2004 18:56:05 +0000 (18:56 +0000)]
Add include/Support/hash_map and include/Support/hash_set as AC_OUTPUT files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11763 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated using autoheader-2.57.
Brian Gaeke [Mon, 23 Feb 2004 18:56:04 +0000 (18:56 +0000)]
Regenerated using autoheader-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11762 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove HASH_* checks to using AC_SUBST instead of AC_DEFINE. Tighten up some whitespace...
Brian Gaeke [Mon, 23 Feb 2004 18:56:03 +0000 (18:56 +0000)]
Move HASH_* checks to using AC_SUBST instead of AC_DEFINE. Tighten up some whitespace and comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11761 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated using autoconf-2.57.
Brian Gaeke [Mon, 23 Feb 2004 18:56:02 +0000 (18:56 +0000)]
Regenerated using autoconf-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11760 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd number of spilled registers statistic.
Alkis Evlogimenos [Mon, 23 Feb 2004 18:45:32 +0000 (18:45 +0000)]
Add number of spilled registers statistic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11759 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bugs in finegrainification
Chris Lattner [Mon, 23 Feb 2004 18:40:08 +0000 (18:40 +0000)]
Fix bugs in finegrainification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11758 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFinegrainify namespacification
Chris Lattner [Mon, 23 Feb 2004 18:38:20 +0000 (18:38 +0000)]
Finegrainify namespacification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11757 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse MachineBasicBlock::getParent().
Alkis Evlogimenos [Mon, 23 Feb 2004 18:36:38 +0000 (18:36 +0000)]
Use MachineBasicBlock::getParent().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11756 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRemove implementation of default constructor as it is useless now.
Alkis Evlogimenos [Mon, 23 Feb 2004 18:28:35 +0000 (18:28 +0000)]
Remove implementation of default constructor as it is useless now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11755 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRenamed from include/Support/iterator. Doxygenify comments; add autoconf substitution...
Brian Gaeke [Mon, 23 Feb 2004 18:16:10 +0000 (18:16 +0000)]
Renamed from include/Support/iterator. Doxygenify comments; add autoconf substitution tags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11754 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoReplaced by include/Support/iterator.in.
Brian Gaeke [Mon, 23 Feb 2004 18:16:10 +0000 (18:16 +0000)]
Replaced by include/Support/iterator.in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11753 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated with autoheader-2.57.
Brian Gaeke [Mon, 23 Feb 2004 18:16:09 +0000 (18:16 +0000)]
Regenerated with autoheader-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11752 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd include/Support/iterator as an AC_OUTPUT file.
Brian Gaeke [Mon, 23 Feb 2004 18:16:08 +0000 (18:16 +0000)]
Add include/Support/iterator as an AC_OUTPUT file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11751 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMake all iterator checks use AC_SUBST instead of AC_DEFINE.
Brian Gaeke [Mon, 23 Feb 2004 18:16:07 +0000 (18:16 +0000)]
Make all iterator checks use AC_SUBST instead of AC_DEFINE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11750 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRegenerated with autoconf-2.57.
Brian Gaeke [Mon, 23 Feb 2004 18:16:06 +0000 (18:16 +0000)]
Regenerated with autoconf-2.57.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11749 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRefactor rewinding code for finding the first terminator of a basic
Alkis Evlogimenos [Mon, 23 Feb 2004 18:14:48 +0000 (18:14 +0000)]
Refactor rewinding code for finding the first terminator of a basic
block into MachineBasicBlock::getFirstTerminator().

This also fixes a bug in the implementation of the above in both
RegAllocLocal and InstrSched, where instructions where added after the
terminator if the basic block's only instruction was a terminator (it
shouldn't matter for RegAllocLocal since this case never occurs in
practice).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11748 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSimplify code a bit, don't go off the end of the block, now that the current
Chris Lattner [Mon, 23 Feb 2004 07:42:19 +0000 (07:42 +0000)]
Simplify code a bit, don't go off the end of the block, now that the current
block we are in might be empty

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11744 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWe were forgetting to add FP_REG_KILL instructions to basic blocks which will
Chris Lattner [Mon, 23 Feb 2004 07:29:45 +0000 (07:29 +0000)]
We were forgetting to add FP_REG_KILL instructions to basic blocks which will
eventually get an assignment due to elimination of PHIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11743 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement cast.ll::test14/15
Chris Lattner [Mon, 23 Feb 2004 07:16:20 +0000 (07:16 +0000)]
Implement cast.ll::test14/15

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11742 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd tests for casts that should be eliminated
Chris Lattner [Mon, 23 Feb 2004 07:16:03 +0000 (07:16 +0000)]
Add tests for casts that should be eliminated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11741 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoRefactor some code. In the mul - setcc folding case, we really care about
Chris Lattner [Mon, 23 Feb 2004 06:38:22 +0000 (06:38 +0000)]
Refactor some code.  In the mul - setcc folding case, we really care about
whether this is the sign bit or not, so check unsigned comparisons as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11740 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoHandle the unsigned form as well
Chris Lattner [Mon, 23 Feb 2004 06:37:33 +0000 (06:37 +0000)]
Handle the unsigned form as well

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11739 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImproved PhysRegTracker interface. RegAlloc lazily allocates the register tracker...
Alkis Evlogimenos [Mon, 23 Feb 2004 06:10:13 +0000 (06:10 +0000)]
Improved PhysRegTracker interface. RegAlloc lazily allocates the register tracker using a std::auto_ptr

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11738 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement mul.ll:test11
Chris Lattner [Mon, 23 Feb 2004 06:00:11 +0000 (06:00 +0000)]
Implement mul.ll:test11

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11737 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a slight variant of test10
Chris Lattner [Mon, 23 Feb 2004 05:59:52 +0000 (05:59 +0000)]
Add a slight variant of test10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11736 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement "strength reduction" of X <= C and X >= C
Chris Lattner [Mon, 23 Feb 2004 05:47:48 +0000 (05:47 +0000)]
Implement "strength reduction" of   X <= C and X >= C

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11735 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement InstCombine/mul.ll:test10, which is a case that occurs when dealing
Chris Lattner [Mon, 23 Feb 2004 05:39:21 +0000 (05:39 +0000)]
Implement InstCombine/mul.ll:test10, which is a case that occurs when dealing
with "predication"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11734 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThis multiply can be eliminated
Chris Lattner [Mon, 23 Feb 2004 05:38:47 +0000 (05:38 +0000)]
This multiply can be eliminated

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11733 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSimplify iterator usage now that we have next(). Also don't pass iterators by referen...
Alkis Evlogimenos [Mon, 23 Feb 2004 04:12:30 +0000 (04:12 +0000)]
Simplify iterator usage now that we have next(). Also don't pass iterators by reference now that MachineInstr* are in an ilist

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11732 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUpdate the 'new features' section
Chris Lattner [Mon, 23 Feb 2004 03:51:34 +0000 (03:51 +0000)]
Update the 'new features' section

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11731 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoBug fixed
Chris Lattner [Mon, 23 Feb 2004 03:36:36 +0000 (03:36 +0000)]
Bug fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11730 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWork around a gas bug. Print '-9223372036854775808' as unsigned.
Chris Lattner [Mon, 23 Feb 2004 03:27:05 +0000 (03:27 +0000)]
Work around a gas bug.  Print '-9223372036854775808' as unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11729 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement cast fp -> bool
Chris Lattner [Mon, 23 Feb 2004 03:21:41 +0000 (03:21 +0000)]
Implement cast fp -> bool

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11728 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd testcase for the casts that are missing in PR249
Chris Lattner [Mon, 23 Feb 2004 03:21:09 +0000 (03:21 +0000)]
Add testcase for the casts that are missing in PR249

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11727 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoStop passing iterators around by reference now that we have ilists!
Chris Lattner [Mon, 23 Feb 2004 03:10:10 +0000 (03:10 +0000)]
Stop passing iterators around by reference now that we have ilists!

Implement cast Type::ULongTy -> double

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11726 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSome code cleanups from Chris
Alkis Evlogimenos [Mon, 23 Feb 2004 01:57:39 +0000 (01:57 +0000)]
Some code cleanups from Chris

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11724 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be consiste...
Alkis Evlogimenos [Mon, 23 Feb 2004 01:25:05 +0000 (01:25 +0000)]
Fix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be consistent with the other two

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11723 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAdd a new cmove instruction
Chris Lattner [Mon, 23 Feb 2004 01:16:05 +0000 (01:16 +0000)]
Add a new cmove instruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11722 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove LiveIntervals.h up to be the first included header
Alkis Evlogimenos [Mon, 23 Feb 2004 01:01:21 +0000 (01:01 +0000)]
Move LiveIntervals.h up to be the first included header

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11721 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPull PhysRegTracker out of RegAllocLinearScan as it can be used by other allocators...
Alkis Evlogimenos [Mon, 23 Feb 2004 00:53:31 +0000 (00:53 +0000)]
Pull PhysRegTracker out of RegAllocLinearScan as it can be used by other allocators as well

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11720 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts...
Alkis Evlogimenos [Mon, 23 Feb 2004 00:50:15 +0000 (00:50 +0000)]
Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11719 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoOnly insert FP_REG_KILL instructions in MachineBasicBlocks that actually
Chris Lattner [Sun, 22 Feb 2004 19:47:26 +0000 (19:47 +0000)]
Only insert FP_REG_KILL instructions in MachineBasicBlocks that actually
use FP instructions.  This reduces the number of instructions inserted in
176.gcc (for example) from 58074 to 101 (it doesn't use much FP, which
is typical).  This reduction speeds up the entire code generator.  In the
case of 176.gcc, llc went from taking 31.38s to 24.78s.  The passes that
sped up the most are the register allocator and the 2 live variable analysis
passes, which sped up 2.3, 1.3, and 1.5s respectively.  The asmprinter
pass also sped up because it doesn't print the instructions in comments :)

Note that this patch is likely to expose latent bugs in machine code passes,
because now basicblock can be empty, where they were never empty before.  I
cleaned out regalloclocal, but who knows about linscan :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11717 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAnother bug fix for empty MBB's
Chris Lattner [Sun, 22 Feb 2004 19:37:31 +0000 (19:37 +0000)]
Another bug fix for empty MBB's

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11716 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoMove MOTy::UseType enum into MachineOperand. This eliminates the
Alkis Evlogimenos [Sun, 22 Feb 2004 19:23:26 +0000 (19:23 +0000)]
Move MOTy::UseType enum into MachineOperand. This eliminates the
switch statements in the constructors and simplifies the
implementation of the getUseType() member function. You will have to
specify defs using MachineOperand::Def instead of MOTy::Def though
(similarly for Use and UseAndDef).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11715 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a bug where we were implicitly assuming that there would be at least
Chris Lattner [Sun, 22 Feb 2004 19:08:15 +0000 (19:08 +0000)]
Fix a bug where we were implicitly assuming that there would be at least
one terminator instruction in each basic block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11714 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoReduce the number of pointless copies inserted due to constant pointer refs.
Chris Lattner [Sun, 22 Feb 2004 17:35:42 +0000 (17:35 +0000)]
Reduce the number of pointless copies inserted due to constant pointer refs.
Also, make an assertion actually fireable!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11713 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix bug in previous checkout: leave the iterator at the first instruction
Chris Lattner [Sun, 22 Feb 2004 17:05:38 +0000 (17:05 +0000)]
Fix bug in previous checkout: leave the iterator at the first instruction
AFTER the GEP that was emitted.  :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11712 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix silly bug in implementation of getUseType(). Thanks Misha.
Alkis Evlogimenos [Sun, 22 Feb 2004 07:24:19 +0000 (07:24 +0000)]
Fix silly bug in implementation of getUseType(). Thanks Misha.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11711 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoCompletely rewrite how getelementptr instructions are expanded. This has two
Chris Lattner [Sun, 22 Feb 2004 07:04:00 +0000 (07:04 +0000)]
Completely rewrite how getelementptr instructions are expanded.  This has two
(minor) benefits right now:

1. An extra dummy MOVrr32 is gone.  This move would often be coallesced by
   both allocators anyway.
2. The code now uses the gep_type_iterator to walk the gep, which should future
   proof it a bit.  It still assumes that array indexes are Longs though.

These don't really justify rewriting the code.  The big benefit will come later
though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11710 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWhen folding memory operands in machine instructions be careful to
Alkis Evlogimenos [Sun, 22 Feb 2004 06:54:26 +0000 (06:54 +0000)]
When folding memory operands in machine instructions be careful to
leave register operands with the same use/def flags as the original
instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11709 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoSignificantly simplify gep_type_iterator, and make its interface more general/powerful
Chris Lattner [Sun, 22 Feb 2004 06:27:03 +0000 (06:27 +0000)]
Significantly simplify gep_type_iterator, and make its interface more general/powerful

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11708 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix a soon-to-be-missing #include
Chris Lattner [Sun, 22 Feb 2004 06:26:17 +0000 (06:26 +0000)]
Fix a soon-to-be-missing #include

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11707 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoGet all instruction definitions
Chris Lattner [Sun, 22 Feb 2004 06:25:38 +0000 (06:25 +0000)]
Get all instruction definitions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11706 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoWow this is out of date. When we have _real_ code generator documentation,
Chris Lattner [Sun, 22 Feb 2004 05:53:54 +0000 (05:53 +0000)]
Wow this is out of date.  When we have _real_ code generator documentation,
this should be folded into it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11705 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoPrint basic block boundaries in machine instruction debug output.
Alkis Evlogimenos [Sun, 22 Feb 2004 05:46:04 +0000 (05:46 +0000)]
Print basic block boundaries in machine instruction debug output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11704 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoLink to most recent "LLVM document"
Chris Lattner [Sun, 22 Feb 2004 05:45:02 +0000 (05:45 +0000)]
Link to most recent "LLVM document"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11703 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoImplement Transforms/InstCombine/cast.ll:test13, a case which occurs in a
Chris Lattner [Sun, 22 Feb 2004 05:25:17 +0000 (05:25 +0000)]
Implement Transforms/InstCombine/cast.ll:test13, a case which occurs in a
hot 164.gzip loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11702 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoTest that the instruction combiner can fold away a cast in a GEP instruction.
Chris Lattner [Sun, 22 Feb 2004 05:24:09 +0000 (05:24 +0000)]
Test that the instruction combiner can fold away a cast in a GEP instruction.
This occurs in 164.gzip, as a result of it declaring arrays extern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11701 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoThe two address pass cannot handle two addr instructions where one incoming
Chris Lattner [Sun, 22 Feb 2004 04:44:58 +0000 (04:44 +0000)]
The two address pass cannot handle two addr instructions where one incoming
value is a physreg and one is a virtreg.  For this reason, disable copy folding
entirely for physregs.  Also, use the new isMoveInstr target hook which gives us
folding of FP moves as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11700 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoAbstract merging of ranges away from number of slots per instruction.
Alkis Evlogimenos [Sun, 22 Feb 2004 04:05:13 +0000 (04:05 +0000)]
Abstract merging of ranges away from number of slots per instruction.

Also make it less aggressive as the current implementation breaks in
some cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11696 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse isNull instead of getNode() to test for existence of a node, this is cheaper.
Chris Lattner [Sun, 22 Feb 2004 00:53:54 +0000 (00:53 +0000)]
Use isNull instead of getNode() to test for existence of a node, this is cheaper.

FIX MAJOR BUG, whereby we didn't merge null edges correctly. Correcting this
fixes poolallocation on 175.vpr, and possibly others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11695 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoFix an iterator invalidation problem which was causing some nodes to not be
Chris Lattner [Sat, 21 Feb 2004 22:28:26 +0000 (22:28 +0000)]
Fix an iterator invalidation problem which was causing some nodes to not be
correctly merged over!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11693 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUse handy method
Chris Lattner [Sat, 21 Feb 2004 22:27:31 +0000 (22:27 +0000)]
Use handy method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11692 91177308-0d34-0410-b5e6-96231b3b80d8

20 years agoUpdate comments and add warning
Chris Lattner [Sat, 21 Feb 2004 22:27:20 +0000 (22:27 +0000)]
Update comments and add warning

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11691 91177308-0d34-0410-b5e6-96231b3b80d8

20 years ago`cat' is usually in /bin, not /usr/bin, at least on our systems.
Misha Brukman [Sat, 21 Feb 2004 21:51:41 +0000 (21:51 +0000)]
`cat' is usually in /bin, not /usr/bin, at least on our systems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11690 91177308-0d34-0410-b5e6-96231b3b80d8