Chris Lattner
2cb238320d
Only call isUse/isDef on register operands
...
llvm-svn: 30118
2006-09-05 20:19:27 +00:00
Chris Lattner
f8f724a2b1
Move two methods out of line, make them work when the record for a machine
...
instruction includes physregs.
llvm-svn: 30061
2006-09-03 00:05:09 +00:00
Chris Lattner
3c9b2420df
Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
...
llvm-svn: 29921
2006-08-27 22:30:17 +00:00
Jim Laskey
4b49c23571
Eliminate data relocations by using NULL instead of global empty list.
...
llvm-svn: 29250
2006-07-21 21:15:20 +00:00
Chris Lattner
ee64b6b40f
Remove a bunch more dead V9 specific stuff
...
llvm-svn: 28094
2006-05-04 01:26:39 +00:00
Chris Lattner
be45b5e948
Add a LiveVariables::VarInfo::dump method
...
llvm-svn: 25080
2006-01-04 05:40:30 +00:00
Chris Lattner
2ea5c99eca
Add section switching to common code generator code. Add a couple of
...
asserts.
llvm-svn: 24445
2005-11-21 07:06:27 +00:00
Chris Lattner
eeacce5a60
Implement LiveVariables.h change
...
llvm-svn: 22994
2005-08-24 00:09:33 +00:00
Chris Lattner
469652752c
adjust to new live variables interface
...
llvm-svn: 22992
2005-08-23 23:42:17 +00:00
Chris Lattner
91caf1d039
allow a virtual register to be associated with live-in values.
...
llvm-svn: 21927
2005-05-13 07:08:07 +00:00
Misha Brukman
835702a094
Remove trailing whitespace
...
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Chris Lattner
4c6ab01a20
Consider the livein/out set for a function, allowing targets to not have to
...
use ugly imp_def/imp_uses for arguments and return values.
llvm-svn: 21180
2005-04-09 15:23:25 +00:00
Chris Lattner
1cffa73f2a
Just in case, handle something that is both a use and a def.
...
llvm-svn: 19696
2005-01-19 17:11:51 +00:00
Chris Lattner
00c436824f
When an instruction moves, make sure to update the VarInfo::Kills list as
...
well as all of teh other stuff in livevar. This fixes the compiler crash
on fourinarow last night.
llvm-svn: 19695
2005-01-19 17:09:15 +00:00
Chris Lattner
6180881673
Do not use variable sized arrays in C++, they are non-portable. Patch
...
contributed by Morten Ofstad
llvm-svn: 17217
2004-10-25 18:44:14 +00:00
Reid Spencer
7c16caa336
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Alkis Evlogimenos
6a099d439e
Give a better assertion if we see a use before a def.
...
llvm-svn: 16135
2004-09-01 22:34:52 +00:00
Alkis Evlogimenos
c227d73e5f
Remove dead code.
...
llvm-svn: 16077
2004-08-28 22:43:31 +00:00
Alkis Evlogimenos
2c69803b61
Use newly added API in MRegisterInfo and don't expose the allocatable
...
register set anymore. Its users now use the MRegisterInfo API.
llvm-svn: 16061
2004-08-26 22:23:32 +00:00
Chris Lattner
aef6c2a350
There is no need to store the MBB along with the MI any more, we can now
...
ask instructions for their parent.
llvm-svn: 14998
2004-07-19 07:04:55 +00:00
Chris Lattner
a74cf5a7d9
Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)
...
llvm-svn: 14997
2004-07-19 06:55:21 +00:00
Chris Lattner
5027de35ed
Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()
...
llvm-svn: 14996
2004-07-19 06:26:50 +00:00
Chris Lattner
d47909e00a
Add checks to ensure that there are no unreachable blocks in the function
...
llvm-svn: 14725
2004-07-09 16:44:37 +00:00
Chris Lattner
c85535c8be
Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'s
...
use them instead of a local LiveVariables numbering
llvm-svn: 14523
2004-07-01 06:15:32 +00:00
Chris Lattner
6c375e4926
Start using MBB numbers directly instead of going through the live variables
...
map.
llvm-svn: 14518
2004-07-01 04:29:47 +00:00
Chris Lattner
7c77fd50e7
Instead of building a private numbering of MBB's use brg's nifty auto-numbering.
...
Also convert df_iterator -> df_ext_iterator for subsequent stuff I'm doing.
llvm-svn: 14517
2004-07-01 04:24:29 +00:00
Misha Brukman
7d11fbf971
Convert tabs to spaces.
...
llvm-svn: 14373
2004-06-24 21:31:16 +00:00
Chris Lattner
2150542af9
Adjust to new TargetMachine interface
...
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Chris Lattner
5eb8094c2d
Patch to fix PR337. Make sure to mark all aliased physical registers as used
...
when we see a read of a register. This is important in cases like:
AL = ...
AH = ...
= AX
The read of AX must make both the AL and AH defs live until the use.
llvm-svn: 13444
2004-05-10 05:12:43 +00:00
Chris Lattner
c49a9a5d76
Stop LiveVariables from using BasicBlocks as part of the mapping, instead
...
use MachineBasicBlocks. To do this, we traverse the Machine CFG instead of
the LLVM CFG, which is also *MUCH* more efficient by having fewer levels of
indirections and mappings.
llvm-svn: 13301
2004-05-01 21:24:24 +00:00
Alkis Evlogimenos
a333b1382f
Correctly update LiveVariables when an instruction changes
...
llvm-svn: 12561
2004-03-30 22:44:39 +00:00
Chris Lattner
604cc83933
Add an assert
...
llvm-svn: 12010
2004-02-29 22:01:51 +00:00
Alkis Evlogimenos
61719d48d2
Uncomment assertions that register# != 0 on calls to
...
MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes
to relevant files.
llvm-svn: 11882
2004-02-26 22:00:20 +00:00
Chris Lattner
4c988391e1
Fix an iterator invalidation problem. :(
...
llvm-svn: 11627
2004-02-19 18:32:29 +00:00
Chris Lattner
afa9d7eb85
Add method to update livevar when an instruction moves
...
llvm-svn: 11625
2004-02-19 18:28:02 +00:00
Alkis Evlogimenos
bbf53937a4
Make dense maps keyed on physical registers smallerusing
...
MRegisterInfo::getNumRegs() instead of
MRegisterInfo::FirstVirtualRegister.
Also use MRegisterInfo::is{Physical,Virtual}Register where
appropriate.
llvm-svn: 11477
2004-02-15 21:37:17 +00:00
Alkis Evlogimenos
80da865f77
Change MachineBasicBlock's vector of MachineInstr pointers into an
...
ilist of MachineInstr objects. This allows constant time removal and
insertion of MachineInstr instances from anywhere in each
MachineBasicBlock. It also allows for constant time splicing of
MachineInstrs into or out of MachineBasicBlocks.
llvm-svn: 11340
2004-02-12 02:27:10 +00:00
Chris Lattner
b21ec54e61
Add #include
...
llvm-svn: 11285
2004-02-10 21:18:55 +00:00
Chris Lattner
5dd5be3ec3
Do not use MachineOperand::isVirtualRegister either!
...
llvm-svn: 11283
2004-02-10 21:12:22 +00:00
Chris Lattner
373fba5c1d
Eliminate users of MachineOperand::isPhysicalRegister
...
llvm-svn: 11278
2004-02-10 20:41:10 +00:00
Chris Lattner
bbd9a43d20
Ugh, perform an optimization that GCC should be able to do itself. This
...
speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk
llvm-svn: 11217
2004-02-09 01:43:23 +00:00
Chris Lattner
26407384ec
Only do stuff for the REAL number of physical registers we have, not 1024.
...
This speeds up live variables a lot, from .60/.39s -> .47/.26s in LLC, for
the first/second pass respectively.
llvm-svn: 11216
2004-02-09 01:35:21 +00:00
Chris Lattner
c330b98c1c
Finegrainify namespacification, use new MRegisterInfo::isVirtualRegister
...
method
llvm-svn: 11037
2004-01-31 21:27:19 +00:00
Chris Lattner
0770862334
Finegrainify namespacification
...
Implement LiveVariables::getIndexMachineBasicBlock
llvm-svn: 11018
2004-01-30 22:08:53 +00:00
Alkis Evlogimenos
9d0c3d21c8
Remove unneeded check (with the recent change in live variables a use
...
of a physical register is always dominated by a def).
llvm-svn: 10821
2004-01-13 21:16:25 +00:00
Alkis Evlogimenos
ebbd66c042
Correctly compute live variable information for physical registers
...
when an implicitely defined register is later used by an alias. For example:
call foo
%reg1024 = mov %AL
The call implicitely defines EAX but only AL is used. Before this fix
no information was available on AL. Now EAX and all its aliases except
AL get defined and die at the call instruction whereas AL lives to be
killed by the assignment.
llvm-svn: 10813
2004-01-13 06:24:30 +00:00
Alkis Evlogimenos
aaba4639f8
Change interface of MachineOperand as follows:
...
a) remove opIsUse(), opIsDefOnly(), opIsDefAndUse()
b) add isUse(), isDef()
c) rename opHiBits32() to isHiBits32(),
opLoBits32() to isLoBits32(),
opHiBits64() to isHiBits64(),
opLoBits64() to isLoBits64().
This results to much more readable code, for example compare
"op.opIsDef() || op.opIsDefAndUse()" to "op.isDef()" a pattern used
very often in the code.
llvm-svn: 10461
2003-12-14 13:24:17 +00:00
Alkis Evlogimenos
9bced9455a
Remove unecessary if statements when looping on ImplicitDefs.
...
llvm-svn: 10444
2003-12-13 01:20:58 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
482202a601
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Alkis Evlogimenos
5f1f337d95
Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs
...
and TargetInstrDescriptor::ImplicitUses to always point to a null
terminated array and never be null. So there is no need to check for
pointer validity when iterating over those sets. Code that looked
like:
if (const unsigned* AS = TID.ImplicitDefs) {
for (int i = 0; AS[i]; ++i) {
// use AS[i]
}
}
was changed to:
for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
// use *AS
}
llvm-svn: 8960
2003-10-08 05:20:08 +00:00
Vikram S. Adve
7366fa1aa6
(1) Added special register class containing (for now) %fsr.
...
Fixed spilling of %fcc[0-3] which are part of %fsr.
(2) Moved some machine-independent reg-class code to class TargetRegInfo
from SparcReg{Class,}Info.
(3) Renamed MachienOperand::opIsDef to MachineOperand::opIsDefOnly()
and related functions and flags. Fixed several bugs where only
"isDef" was being checked, not "isDefAndUse".
llvm-svn: 6341
2003-05-27 00:05:23 +00:00
Chris Lattner
584bae4733
* Keep the BBMap around as long as the pass is live
...
* Change getVarInfo to take real virtual register numbers and offset them
itself. This has caused me so much grief, it's not even funny.
llvm-svn: 6115
2003-05-12 14:24:00 +00:00
Chris Lattner
5ab42e5739
Add a vector to keep track of which registers are allocatable. Remove FIXMEs
...
llvm-svn: 6015
2003-05-07 20:08:36 +00:00
Chris Lattner
9eb2172176
Re-add gross hack, it's still necessary. :(
...
llvm-svn: 6012
2003-05-06 21:44:54 +00:00
Chris Lattner
824698b891
Remove hideously nasty hack
...
llvm-svn: 6011
2003-05-06 21:32:39 +00:00
Chris Lattner
f641fd08bc
Minor cleanup
...
llvm-svn: 5976
2003-05-01 21:18:47 +00:00
Chris Lattner
b4d58d7f9e
Rename MachineInstrInfo -> TargetInstrInfo
...
llvm-svn: 5272
2003-01-14 22:00:31 +00:00
Chris Lattner
cab0b442f2
New files
...
llvm-svn: 5262
2003-01-13 20:01:16 +00:00