aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/LiveVariables.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Do away with kill / dead maps. Move kill / dead info onto MI's.Evan Cheng2006-11-151-81/+107
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31759 91177308-0d34-0410-b5e6-96231b3b80d8
* Add implicit def / use operands to MachineInstr.Evan Cheng2006-11-101-17/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31633 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-11-021-1/+0
| | | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR929. The PHI nodes were being gone through for each instructionBill Wendling2006-10-031-21/+26
| | | | | | | | | in a successor block for every block...resulting in some O(N^k) algorithm which wasn't very good for performance. Calculating this information up front and keeping it in a map made it much faster. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30697 91177308-0d34-0410-b5e6-96231b3b80d8
* Only call isUse/isDef on register operandsChris Lattner2006-09-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30118 91177308-0d34-0410-b5e6-96231b3b80d8
* Move two methods out of line, make them work when the record for a machineChris Lattner2006-09-031-0/+36
| | | | | | | instruction includes physregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30061 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.Chris Lattner2006-08-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate data relocations by using NULL instead of global empty list.Jim Laskey2006-07-211-6/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29250 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bunch more dead V9 specific stuffChris Lattner2006-05-041-8/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28094 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a LiveVariables::VarInfo::dump methodChris Lattner2006-01-041-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25080 91177308-0d34-0410-b5e6-96231b3b80d8
* Add section switching to common code generator code. Add a couple ofChris Lattner2005-11-211-2/+3
| | | | | | | asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24445 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement LiveVariables.h changeChris Lattner2005-08-241-0/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22994 91177308-0d34-0410-b5e6-96231b3b80d8
* adjust to new live variables interfaceChris Lattner2005-08-231-22/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22992 91177308-0d34-0410-b5e6-96231b3b80d8
* allow a virtual register to be associated with live-in values.Chris Lattner2005-05-131-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21927 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-10/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 91177308-0d34-0410-b5e6-96231b3b80d8
* Consider the livein/out set for a function, allowing targets to not have toChris Lattner2005-04-091-0/+20
| | | | | | | use ugly imp_def/imp_uses for arguments and return values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21180 91177308-0d34-0410-b5e6-96231b3b80d8
* Just in case, handle something that is both a use and a def.Chris Lattner2005-01-191-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19696 91177308-0d34-0410-b5e6-96231b3b80d8
* When an instruction moves, make sure to update the VarInfo::Kills list asChris Lattner2005-01-191-3/+10
| | | | | | | | well as all of teh other stuff in livevar. This fixes the compiler crash on fourinarow last night. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19695 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use variable sized arrays in C++, they are non-portable. PatchChris Lattner2004-10-251-5/+5
| | | | | | | contributed by Morten Ofstad git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17217 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-011-2/+2
| | | | | | | | | 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/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Give a better assertion if we see a use before a def.Alkis Evlogimenos2004-09-011-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16135 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code.Alkis Evlogimenos2004-08-281-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16077 91177308-0d34-0410-b5e6-96231b3b80d8
* Use newly added API in MRegisterInfo and don't expose the allocatableAlkis Evlogimenos2004-08-261-13/+1
| | | | | | | register set anymore. Its users now use the MRegisterInfo API. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16061 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need to store the MBB along with the MI any more, we can nowChris Lattner2004-07-191-9/+9
| | | | | | | ask instructions for their parent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14998 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the interface to LiveVariables::addVirtualRegister(Killed|Dead)Chris Lattner2004-07-191-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14997 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the DefBlock element of VarInfo. DefBlock is always DefInst->getParent()Chris Lattner2004-07-191-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14996 91177308-0d34-0410-b5e6-96231b3b80d8
* Add checks to ensure that there are no unreachable blocks in the functionChris Lattner2004-07-091-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14725 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that MachineFunction/MachineBasicBlock keep a mapping of blocks to ID #'sChris Lattner2004-07-011-20/+0
| | | | | | | use them instead of a local LiveVariables numbering git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14523 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using MBB numbers directly instead of going through the live variablesChris Lattner2004-07-011-2/+2
| | | | | | | map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14518 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of building a private numbering of MBB's use brg's nifty auto-numbering.Chris Lattner2004-07-011-5/+5
| | | | | | | Also convert df_iterator -> df_ext_iterator for subsequent stuff I'm doing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14517 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spaces.Misha Brukman2004-06-241-45/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14373 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust to new TargetMachine interfaceChris Lattner2004-06-021-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13956 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to fix PR337. Make sure to mark all aliased physical registers as usedChris Lattner2004-05-101-3/+8
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13444 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop LiveVariables from using BasicBlocks as part of the mapping, insteadChris Lattner2004-05-011-29/+20
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13301 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly update LiveVariables when an instruction changesAlkis Evlogimenos2004-03-301-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12561 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertChris Lattner2004-02-291-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12010 91177308-0d34-0410-b5e6-96231b3b80d8
* Uncomment assertions that register# != 0 on calls toAlkis Evlogimenos2004-02-261-3/+3
| | | | | | | | MRegisterInfo::is{Physical,Virtual}Register. Apply appropriate fixes to relevant files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11882 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an iterator invalidation problem. :(Chris Lattner2004-02-191-2/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11627 91177308-0d34-0410-b5e6-96231b3b80d8
* Add method to update livevar when an instruction movesChris Lattner2004-02-191-0/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11625 91177308-0d34-0410-b5e6-96231b3b80d8
* Make dense maps keyed on physical registers smallerusingAlkis Evlogimenos2004-02-151-4/+3
| | | | | | | | | | | MRegisterInfo::getNumRegs() instead of MRegisterInfo::FirstVirtualRegister. Also use MRegisterInfo::is{Physical,Virtual}Register where appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11477 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-4/+3
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11340 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #includeChris Lattner2004-02-101-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11285 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use MachineOperand::isVirtualRegister either!Chris Lattner2004-02-101-8/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11283 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate users of MachineOperand::isPhysicalRegisterChris Lattner2004-02-101-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11278 91177308-0d34-0410-b5e6-96231b3b80d8
* Ugh, perform an optimization that GCC should be able to do itself. ThisChris Lattner2004-02-091-6/+7
| | | | | | | speeds up livevar from .48/.32s -> .45/.31s in LLC on perlbmk git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11217 91177308-0d34-0410-b5e6-96231b3b80d8
* Only do stuff for the REAL number of physical registers we have, not 1024.Chris Lattner2004-02-091-10/+8
| | | | | | | | This speeds up live variables a lot, from .60/.39s -> .47/.26s in LLC, for the first/second pass respectively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11216 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacification, use new MRegisterInfo::isVirtualRegisterChris Lattner2004-01-311-1/+1
| | | | | | | method git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11037 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-01-301-4/+17
| | | | | | | Implement LiveVariables::getIndexMachineBasicBlock git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11018 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded check (with the recent change in live variables a useAlkis Evlogimenos2004-01-131-4/+2
| | | | | | | of a physical register is always dominated by a def). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10821 91177308-0d34-0410-b5e6-96231b3b80d8
* Correctly compute live variable information for physical registersAlkis Evlogimenos2004-01-131-19/+12
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10813 91177308-0d34-0410-b5e6-96231b3b80d8