Brian Gaeke
560c89141f
Replaced by include/Support/iterator.in.
...
llvm-svn: 11753
2004-02-23 18:16:10 +00:00
Brian Gaeke
c84da72de7
Regenerated with autoheader-2.57.
...
llvm-svn: 11752
2004-02-23 18:16:09 +00:00
Brian Gaeke
3d8b2af8a7
Add include/Support/iterator as an AC_OUTPUT file.
...
llvm-svn: 11751
2004-02-23 18:16:08 +00:00
Brian Gaeke
6385dd7b00
Make all iterator checks use AC_SUBST instead of AC_DEFINE.
...
llvm-svn: 11750
2004-02-23 18:16:07 +00:00
Brian Gaeke
7bee706526
Regenerated with autoconf-2.57.
...
llvm-svn: 11749
2004-02-23 18:16:06 +00:00
Alkis Evlogimenos
9b103024ef
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).
llvm-svn: 11748
2004-02-23 18:14:48 +00:00
Chris Lattner
40e15a6000
Simplify code a bit, don't go off the end of the block, now that the current
...
block we are in might be empty
llvm-svn: 11744
2004-02-23 07:42:19 +00:00
Chris Lattner
28e4e925eb
We were forgetting to add FP_REG_KILL instructions to basic blocks which will
...
eventually get an assignment due to elimination of PHIs.
llvm-svn: 11743
2004-02-23 07:29:45 +00:00
Chris Lattner
74418a30aa
Implement cast.ll::test14/15
...
llvm-svn: 11742
2004-02-23 07:16:20 +00:00
Chris Lattner
fe1e1787c8
Add tests for casts that should be eliminated
...
llvm-svn: 11741
2004-02-23 07:16:03 +00:00
Chris Lattner
a65e5e3df1
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.
llvm-svn: 11740
2004-02-23 06:38:22 +00:00
Chris Lattner
4a306afab5
Handle the unsigned form as well
...
llvm-svn: 11739
2004-02-23 06:37:33 +00:00
Alkis Evlogimenos
50598d1135
Improved PhysRegTracker interface. RegAlloc lazily allocates the register tracker using a std::auto_ptr
...
llvm-svn: 11738
2004-02-23 06:10:13 +00:00
Chris Lattner
9ecc3fc3c1
Implement mul.ll:test11
...
llvm-svn: 11737
2004-02-23 06:00:11 +00:00
Chris Lattner
c4076cb09d
Add a slight variant of test10
...
llvm-svn: 11736
2004-02-23 05:59:52 +00:00
Chris Lattner
51b37305d9
Implement "strength reduction" of X <= C and X >= C
...
llvm-svn: 11735
2004-02-23 05:47:48 +00:00
Chris Lattner
c31a2e26ab
Implement InstCombine/mul.ll:test10, which is a case that occurs when dealing
...
with "predication"
llvm-svn: 11734
2004-02-23 05:39:21 +00:00
Chris Lattner
ca8a8b6c3a
This multiply can be eliminated
...
llvm-svn: 11733
2004-02-23 05:38:47 +00:00
Alkis Evlogimenos
99af6ca36b
Simplify iterator usage now that we have next(). Also don't pass iterators by reference now that MachineInstr* are in an ilist
...
llvm-svn: 11732
2004-02-23 04:12:30 +00:00
Chris Lattner
d1828a306f
Update the 'new features' section
...
llvm-svn: 11731
2004-02-23 03:51:34 +00:00
Chris Lattner
d1425828a3
Bug fixed
...
llvm-svn: 11730
2004-02-23 03:36:36 +00:00
Chris Lattner
b200638dc4
Work around a gas bug. Print '-9223372036854775808' as unsigned.
...
llvm-svn: 11729
2004-02-23 03:27:05 +00:00
Chris Lattner
85f13fae06
Implement cast fp -> bool
...
llvm-svn: 11728
2004-02-23 03:21:41 +00:00
Chris Lattner
2ec31046bc
Add testcase for the casts that are missing in PR249
...
llvm-svn: 11727
2004-02-23 03:21:09 +00:00
Chris Lattner
795ca35cde
Stop passing iterators around by reference now that we have ilists!
...
Implement cast Type::ULongTy -> double
llvm-svn: 11726
2004-02-23 03:10:10 +00:00
Alkis Evlogimenos
976f485826
Some code cleanups from Chris
...
llvm-svn: 11724
2004-02-23 01:57:39 +00:00
Alkis Evlogimenos
1525e120a6
Fix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be consistent with the other two
...
llvm-svn: 11723
2004-02-23 01:25:05 +00:00
Chris Lattner
f9acb33dfd
Add a new cmove instruction
...
llvm-svn: 11722
2004-02-23 01:16:05 +00:00
Alkis Evlogimenos
ee3ef42726
Move LiveIntervals.h up to be the first included header
...
llvm-svn: 11721
2004-02-23 01:01:21 +00:00
Alkis Evlogimenos
ba2b9aec71
Pull PhysRegTracker out of RegAllocLinearScan as it can be used by other allocators as well
...
llvm-svn: 11720
2004-02-23 00:53:31 +00:00
Alkis Evlogimenos
850bd0819f
Move LiveIntervals.h to lib/CodeGen since it shouldn't be exposed to other parts of the compiler
...
llvm-svn: 11719
2004-02-23 00:50:15 +00:00
Chris Lattner
cf8db3e8aa
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 :)
llvm-svn: 11717
2004-02-22 19:47:26 +00:00
Chris Lattner
5485375e5d
Another bug fix for empty MBB's
...
llvm-svn: 11716
2004-02-22 19:37:31 +00:00
Alkis Evlogimenos
7f7d70a53c
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).
llvm-svn: 11715
2004-02-22 19:23:26 +00:00
Chris Lattner
56a7886c8a
Fix a bug where we were implicitly assuming that there would be at least
...
one terminator instruction in each basic block.
llvm-svn: 11714
2004-02-22 19:08:15 +00:00
Chris Lattner
cc9a188e0a
Reduce the number of pointless copies inserted due to constant pointer refs.
...
Also, make an assertion actually fireable!
llvm-svn: 11713
2004-02-22 17:35:42 +00:00
Chris Lattner
ed03319931
Fix bug in previous checkout: leave the iterator at the first instruction
...
AFTER the GEP that was emitted. :(
llvm-svn: 11712
2004-02-22 17:05:38 +00:00
Alkis Evlogimenos
abc8efe386
Fix silly bug in implementation of getUseType(). Thanks Misha.
...
llvm-svn: 11711
2004-02-22 07:24:19 +00:00
Chris Lattner
ade64c9839
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.
llvm-svn: 11710
2004-02-22 07:04:00 +00:00
Alkis Evlogimenos
6998610eda
When folding memory operands in machine instructions be careful to
...
leave register operands with the same use/def flags as the original
instruction.
llvm-svn: 11709
2004-02-22 06:54:26 +00:00
Chris Lattner
a3f44e7098
Significantly simplify gep_type_iterator, and make its interface more general/powerful
...
llvm-svn: 11708
2004-02-22 06:27:03 +00:00
Chris Lattner
63b79422f3
Fix a soon-to-be-missing #include
...
llvm-svn: 11707
2004-02-22 06:26:17 +00:00
Chris Lattner
727748b382
Get all instruction definitions
...
llvm-svn: 11706
2004-02-22 06:25:38 +00:00
Chris Lattner
3392d316e9
Wow this is out of date. When we have _real_ code generator documentation,
...
this should be folded into it.
llvm-svn: 11705
2004-02-22 05:53:54 +00:00
Alkis Evlogimenos
ba33a0ab9b
Print basic block boundaries in machine instruction debug output.
...
llvm-svn: 11704
2004-02-22 05:46:04 +00:00
Chris Lattner
f3e342dc45
Link to most recent "LLVM document"
...
llvm-svn: 11703
2004-02-22 05:45:02 +00:00
Chris Lattner
69bb1545d1
Implement Transforms/InstCombine/cast.ll:test13, a case which occurs in a
...
hot 164.gzip loop.
llvm-svn: 11702
2004-02-22 05:25:17 +00:00
Chris Lattner
6636526f53
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.
llvm-svn: 11701
2004-02-22 05:24:09 +00:00
Chris Lattner
cf8afa52b8
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.
llvm-svn: 11700
2004-02-22 04:44:58 +00:00
Alkis Evlogimenos
32d12d31ae
Abstract merging of ranges away from number of slots per instruction.
...
Also make it less aggressive as the current implementation breaks in
some cases.
llvm-svn: 11696
2004-02-22 04:05:13 +00:00