aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PHIElimination.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow copyRegToReg to emit cross register classes copies.Evan Cheng2007-09-261-2/+2
| | | | | | | Tested with "make check"! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42346 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* VarInfo::UsedBlocks is no longer used. Remove.Evan Cheng2007-04-181-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36250 91177308-0d34-0410-b5e6-96231b3b80d8
* Increment use count of new virtuals created during PHI elimination.Evan Cheng2007-04-181-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36233 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep UsedBlocks info accurate.Evan Cheng2007-03-181-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35140 91177308-0d34-0410-b5e6-96231b3b80d8
* rename DenseMap to IndexedMap.Chris Lattner2007-02-011-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33749 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate static ctors from StatisticsChris Lattner2006-12-191-3/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32698 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-2/+2
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* "Once more into the breach, dear friends, once more, or fill the wall upBill Wendling2006-09-281-26/+42
| | | | | | | | | | | with our English dead." No! Really! Serious this time...It was how the vreg uses were being adjusted that was causing hte Olden tests to fail. I corrected this and the Olden and Regression tests all passed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30644 91177308-0d34-0410-b5e6-96231b3b80d8
* re-re-revert this, back to the right revision. It currently breaks bisort/mstChris Lattner2006-09-281-44/+24
| | | | | | | in olden among others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30637 91177308-0d34-0410-b5e6-96231b3b80d8
* re-revert this patch, bisort and mst are still broken in Olden.Chris Lattner2006-09-281-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30634 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapplying this patch. With the newest commits, the error in Olden/bisortBill Wendling2006-09-271-24/+44
| | | | | | | has disappeared. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30633 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert this. This breaks Olden/bisort on PPCChris Lattner2006-09-271-44/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30628 91177308-0d34-0410-b5e6-96231b3b80d8
* PR878: Instead of calculating the vreg to PHI use count everytime we getBill Wendling2006-09-271-24/+44
| | | | | | | | | a function, do it up front in linear time (going through all of the instructions once). We create a map out of them. Then it's no problem to use the information in it during elimination... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30624 91177308-0d34-0410-b5e6-96231b3b80d8
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an obvious bug, noticed by inspection. No current targets trigger this.Chris Lattner2006-08-121-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29648 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce number of exported symbolsAndrew Lenharth2006-07-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29220 91177308-0d34-0410-b5e6-96231b3b80d8
* Use hidden visibility to make symbols in an anonymous namespace getChris Lattner2006-06-281-1/+2
| | | | | | | dropped. This shrinks libllvmgcc.dylib another 67K git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28975 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for targets (like Alpha) that have terminator instructions whichChris Lattner2006-01-041-5/+41
| | | | | | | | | | use virtual registers. We now allow the first instruction in a block of terminators to use virtual registers, and update phi elimination to correctly update livevar when eliminating phi's. This fixes a problem on a testcase Andrew sent me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25083 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion, update DefInst even though no one uses it (dangling pointersChris Lattner2006-01-041-0/+4
| | | | | | | don't help anyone) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up this code a bit, no functionality changeChris Lattner2005-10-031-101/+116
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23609 91177308-0d34-0410-b5e6-96231b3b80d8
* Break the body of the loop out into a new methodChris Lattner2005-10-031-144/+155
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23606 91177308-0d34-0410-b5e6-96231b3b80d8
* adjust to new live variables interfaceChris Lattner2005-08-231-11/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22992 91177308-0d34-0410-b5e6-96231b3b80d8
* * Order #includes alphabeticallyMisha Brukman2005-05-051-4/+1
| | | | | | | * Remove commented-out debug printouts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21707 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tabs to spacesMisha Brukman2005-04-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21439 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-211-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21420 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
* Update live intervals more accurately for PHI elim. This slightly reducesChris Lattner2004-07-231-10/+6
| | | | | | | the live intervals for some registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15125 91177308-0d34-0410-b5e6-96231b3b80d8
* costmetic changesChris Lattner2004-07-221-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15118 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-1/+1
| | | | | | | 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-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14997 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using MBB numbers directly instead of going through the live variablesChris Lattner2004-07-011-1/+1
| | | | | | | map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14518 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
* Fix a really nasty bug from my changes on Monday to PHIElim. These changesChris Lattner2004-05-121-11/+19
| | | | | | | | | broke obsequi and a lot of other things. It all boiled down to MBB being overloaded in an inner scope and me confusing it with the one in the outer scope. Ugh! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13517 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch this from using an std::map to using a DenseMap. This speeds upChris Lattner2004-05-101-6/+5
| | | | | | | phi-elimination from 0.6 to 0.54s on kc++. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13454 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a new VRegPHIUseCount to compute uses of PHI values by other phi valuesChris Lattner2004-05-101-14/+21
| | | | | | | | in the basic block being processed. This fixes PhiElimination on kimwitu++ from taking 105s to taking a much more reasonable 0.6s (in a debug build). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13453 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that we use an ilist of machine instructions, iterators are more robustChris Lattner2004-05-101-5/+8
| | | | | | | | | | than before. Because this is the case, we can compute the first non-phi instruction once when de-phi'ing a block. This shaves ~4s off of phielimination of _Z7yyparsev in kimwitu++ from 109s -> 105s. There are still much more important gains to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13452 91177308-0d34-0410-b5e6-96231b3b80d8
* Operate on the Machine CFG instead of on the LLVM CFGChris Lattner2004-05-011-8/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13302 91177308-0d34-0410-b5e6-96231b3b80d8
* MachineBasicBlock::remove should not modify the iterator passed inChris Lattner2004-03-311-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12571 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-02-231-5/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11757 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor rewinding code for finding the first terminator of a basicAlkis Evlogimenos2004-02-231-16/+1
| | | | | | | | | | | | | 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
* Use newly added next() and prior() utility functions.Alkis Evlogimenos2004-02-141-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11430 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove getAllocatedRegNum(). Use getReg() instead.Alkis Evlogimenos2004-02-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11393 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MachineBasicBlock's vector of MachineInstr pointers into anAlkis Evlogimenos2004-02-121-16/+19
| | | | | | | | | | 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
* Do not use MachineOperand::isVirtualRegister either!Chris Lattner2004-02-101-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11283 91177308-0d34-0410-b5e6-96231b3b80d8
* Change interface of MachineOperand as follows:Alkis Evlogimenos2003-12-141-1/+1
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10461 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8