Chris Lattner
d655075e9d
Remove unneeded code now that splitBasicBlock does the "right thing"
...
llvm-svn: 11111
2004-02-04 03:21:51 +00:00
Chris Lattner
840109cd9c
When splitting a basic block, insert the new half immediately after the first
...
half.
llvm-svn: 11110
2004-02-04 03:21:31 +00:00
Chris Lattner
8f0a362cd4
More refactoring. Move alloca instructions and handle invoke instructions
...
before we delete the original call site, allowing slight simplifications of
code, but nothing exciting.
llvm-svn: 11109
2004-02-04 02:51:48 +00:00
Chris Lattner
ab01a0e982
Move the cloning of the function body much earlier in the inlinefunction
...
process. The only optimization we did so far is to avoid creating a
PHI node, then immediately destroying it in the common case where the
callee has one return statement. Instead, we just don't create the return
value. This has no noticable performance impact, but paves the way for
future improvements.
llvm-svn: 11108
2004-02-04 01:41:09 +00:00
Chris Lattner
aa44b4de3e
Give CloneBasicBlock an optional function argument to specify which function
...
to add the cloned block to. This allows the block to be added to the function
immediately, and all of the instructions to be immediately added to the function
symbol table, which speeds up the inliner from 3.7 -> 3.38s on the PR209.
llvm-svn: 11107
2004-02-04 01:19:43 +00:00
Chris Lattner
7f1e6f16c5
If changing a parent, don't add then remove the object from the leak detector
...
llvm-svn: 11106
2004-02-04 01:06:38 +00:00
Chris Lattner
1404b61b62
In BasicBlock::splitBasicBlock, just use islist::splice to move the instructions,
...
instead of a loop that is really inefficient with large basic blocks.
This speeds up the inliner pass on the testcase in PR209 from 13.8s to 2.24s
which still isn't exactly speedy, but is a lot better. :)
llvm-svn: 11105
2004-02-03 23:11:21 +00:00
Chris Lattner
328ad5236f
Revised version of a patch for PR222 that works with my version of gmake.
...
llvm-svn: 11104
2004-02-03 23:05:24 +00:00
Chris Lattner
5aec717bde
Bug fixed
...
llvm-svn: 11103
2004-02-03 22:59:56 +00:00
Chris Lattner
f22133bba2
Apply Michael Kahl's patch to fix the 'make tools-only' target when OBJDIR != SRCDIR.
...
See PR222.
llvm-svn: 11102
2004-02-03 22:56:40 +00:00
Chris Lattner
2998d508b0
Bunch up all locally used allocas by the block they are allocated in, and
...
process them all as a group. This speeds up SRoA/mem2reg from 28.46s to
0.62s on the testcase from PR209.
llvm-svn: 11100
2004-02-03 22:34:12 +00:00
Chris Lattner
eee884cc98
Handle extremely trivial cases extremely efficiently. This speeds up
...
SRoA/mem2reg from 41.2s to 27.5s on the testcase in PR209.
llvm-svn: 11099
2004-02-03 22:00:33 +00:00
Chris Lattner
92211eb77d
Generate ftst instructions for comparison against zero
...
llvm-svn: 11098
2004-02-03 18:54:04 +00:00
Chris Lattner
30e66b09ec
bug fixed
...
llvm-svn: 11097
2004-02-03 08:03:41 +00:00
Chris Lattner
7b6e8f1f70
Add the ftst instruction
...
llvm-svn: 11095
2004-02-03 07:27:50 +00:00
Chris Lattner
8b623358ff
Add support for one argument OneArgFP instructions
...
llvm-svn: 11094
2004-02-03 07:27:34 +00:00
Alkis Evlogimenos
5e78d4bd75
When an instruction like: A += B had both A and B virtual registers
...
spilled, A was loaded from its stack location twice. This fixes the bug.
llvm-svn: 11093
2004-02-03 01:13:07 +00:00
Alkis Evlogimenos
e128cb3295
Revert changes. Will implement this using a different set of primitives
...
llvm-svn: 11091
2004-02-02 23:08:58 +00:00
Alkis Evlogimenos
a4fab12df8
Fix debugging output.
...
llvm-svn: 11088
2004-02-02 22:00:32 +00:00
Alkis Evlogimenos
3f268a9996
Correctly update def/use information for modified machine operands.
...
llvm-svn: 11087
2004-02-02 21:56:40 +00:00
Alkis Evlogimenos
e20cdc6437
Add MachineOperand::setDef() and MachineOperand::setUse() so that the
...
TwoAddressInstructionPass can correctly update use/def information.
llvm-svn: 11086
2004-02-02 21:55:18 +00:00
Alkis Evlogimenos
dfef24298e
Should be more careful. The previously applied change made all counts
...
outside of loops = 0.
llvm-svn: 11085
2004-02-02 20:29:57 +00:00
Chris Lattner
0e438dc219
Floating point negates are -0.0 - X, not 0.0 - X
...
llvm-svn: 11084
2004-02-02 20:21:29 +00:00
Chris Lattner
f2a481f7f8
Disable (x - (y - z)) => (x + (z - y)) optimization for floating point.
...
llvm-svn: 11083
2004-02-02 20:09:56 +00:00
Chris Lattner
343ab20a2d
Update comment
...
llvm-svn: 11082
2004-02-02 20:09:22 +00:00
Chris Lattner
06f08a26ac
No need to declare implicit uses/defs of ST0
...
llvm-svn: 11081
2004-02-02 19:57:45 +00:00
Chris Lattner
745f32348f
Bug fixed
...
llvm-svn: 11080
2004-02-02 19:40:06 +00:00
Brian Gaeke
1aa59f5107
Make deadarghaX0r warning louder.
...
(I just love typing haX0r. haX0r haX0r haX0r.)
llvm-svn: 11079
2004-02-02 19:32:27 +00:00
Chris Lattner
71c12c8e0d
Generate the fchs instruction to negate a floating point number
...
llvm-svn: 11078
2004-02-02 19:31:38 +00:00
Chris Lattner
36367e8c90
Add support for OneArgFPRW instructions, fix a couple of typeos
...
llvm-svn: 11077
2004-02-02 19:23:15 +00:00
Brian Gaeke
355bc299b7
Include PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
...
and addPassesToJITCompile() slightly.
llvm-svn: 11076
2004-02-02 19:06:36 +00:00
Brian Gaeke
e3e4d098e1
Add a -march=powerpc option. Automatically select it if this looks like a
...
big-endian, 32-bit module, or if __ppc__, __POWERPC__, or __APPLE__ are
defined.
llvm-svn: 11075
2004-02-02 19:06:12 +00:00
Brian Gaeke
cc540cca84
Link in the PowerPC back-end.
...
llvm-svn: 11074
2004-02-02 19:05:52 +00:00
Brian Gaeke
24f70fa16d
Add comments describing how you would add prototypes for factory methods for
...
PowerPC-specific passes here.
llvm-svn: 11073
2004-02-02 19:05:28 +00:00
Brian Gaeke
a393704706
Add prototype for llvm::allocatePowerPCTargetMachine().
...
llvm-svn: 11072
2004-02-02 19:05:08 +00:00
Chris Lattner
963082346c
Codegen -0.0 correctly. Do not use fldz! This is another -0.0 == +0.0 problem, arg.
...
llvm-svn: 11070
2004-02-02 18:56:30 +00:00
Chris Lattner
f5812885e3
Correct the method I just added to actually return false sometimes
...
llvm-svn: 11069
2004-02-02 18:53:04 +00:00
Chris Lattner
990f40f069
Add a new method to ConstantFP
...
llvm-svn: 11068
2004-02-02 18:40:29 +00:00
Chris Lattner
f714f0201a
Bug fixed
...
llvm-svn: 11067
2004-02-02 17:48:56 +00:00
Alkis Evlogimenos
1825f30a3a
Create an object for tracking physical register usage. This will look
...
much better when I get rid of the reserved registers.
llvm-svn: 11066
2004-02-02 07:30:36 +00:00
Chris Lattner
8c0af46123
Bug fixed
...
llvm-svn: 11065
2004-02-01 22:52:12 +00:00
Chris Lattner
a61cda01c2
Second half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx.
...
Basically we store floating point values as their integral components, instead of relying
on the semantics of floating point < to differentiate between values. This is likely to
make the map search be faster anyway.
llvm-svn: 11064
2004-02-01 22:49:04 +00:00
Chris Lattner
7e93bb1d9e
The first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx
...
llvm-svn: 11063
2004-02-01 22:48:09 +00:00
Chris Lattner
046abdb8ea
Add another test
...
llvm-svn: 11062
2004-02-01 22:47:16 +00:00
Alkis Evlogimenos
586dc51262
Change weight array into a vector and make it as big as the number of
...
registers (not as the max number of registers).
Change toSpill from a std::set into a std::vector<bool>.
Use the reverse iterator adapter to do a reverse scan of allocatable
registers.
llvm-svn: 11061
2004-02-01 20:13:26 +00:00
Alkis Evlogimenos
b2ea4389ca
Use std::map::count() instead of std::map::find() != std::map::end()
...
where appropriate.
llvm-svn: 11060
2004-02-01 18:39:53 +00:00
Chris Lattner
49e82c352a
New testcase for PR218
...
llvm-svn: 11059
2004-02-01 18:16:06 +00:00
Alkis Evlogimenos
0ec32d4118
Add MRegisterInfo::getNumRegs().
...
llvm-svn: 11058
2004-02-01 17:14:20 +00:00
Alkis Evlogimenos
eabb1b1bfa
Change string for joined intervals.
...
llvm-svn: 11057
2004-02-01 16:13:05 +00:00
Alkis Evlogimenos
3c94357980
FpMOV is also a move instruction.
...
llvm-svn: 11055
2004-02-01 08:22:16 +00:00