Commit Graph

62 Commits

Author SHA1 Message Date
Evan Cheng c1e4e3743b Allow copyRegToReg to emit cross register classes copies.
Tested with "make check"!

llvm-svn: 42346
2007-09-26 06:25:56 +00:00
Nick Lewycky e7da2d6ac3 Fix typo in comment.
llvm-svn: 36873
2007-05-06 13:37:16 +00:00
Devang Patel 8c78a0bff0 Drop 'const'
llvm-svn: 36662
2007-05-03 01:11:54 +00:00
Devang Patel e95c6ad802 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.

llvm-svn: 36652
2007-05-02 21:39:20 +00:00
Devang Patel 09f162ca6a Do not use typeinfo to identify pass in pass manager.
llvm-svn: 36632
2007-05-01 21:15:47 +00:00
Evan Cheng 4c53d321aa VarInfo::UsedBlocks is no longer used. Remove.
llvm-svn: 36250
2007-04-18 05:04:38 +00:00
Evan Cheng a5a0c7c909 Increment use count of new virtuals created during PHI elimination.
llvm-svn: 36233
2007-04-18 00:36:11 +00:00
Evan Cheng 5382426577 Keep UsedBlocks info accurate.
llvm-svn: 35140
2007-03-18 09:02:31 +00:00
Chris Lattner 1003dc72b4 rename DenseMap to IndexedMap.
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner aee775a6b7 Eliminate static ctors from Statistics
llvm-svn: 32698
2006-12-19 22:41:21 +00:00
Chris Lattner 700b873130 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.

llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Bill Wendling 5d409822d6 "Once more into the breach, dear friends, once more, or fill the wall up
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.

llvm-svn: 30644
2006-09-28 07:10:24 +00:00
Chris Lattner 764caf6129 re-re-revert this, back to the right revision. It currently breaks bisort/mst
in olden among others.

llvm-svn: 30637
2006-09-28 00:11:54 +00:00
Chris Lattner 9f7d0d1dc5 re-revert this patch, bisort and mst are still broken in Olden.
llvm-svn: 30634
2006-09-28 00:04:21 +00:00
Bill Wendling 1f29e6c5c5 Reapplying this patch. With the newest commits, the error in Olden/bisort
has disappeared.

llvm-svn: 30633
2006-09-27 22:37:35 +00:00
Chris Lattner 5f6c93701b Temporarily revert this. This breaks Olden/bisort on PPC
llvm-svn: 30628
2006-09-27 16:59:16 +00:00
Bill Wendling 0a7f617a6c PR878: Instead of calculating the vreg to PHI use count everytime we get
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...

llvm-svn: 30624
2006-09-27 09:04:15 +00:00
Chris Lattner 3d27be1333 s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|
llvm-svn: 29911
2006-08-27 12:54:02 +00:00
Chris Lattner 167ea3eb5f Fix an obvious bug, noticed by inspection. No current targets trigger this.
llvm-svn: 29648
2006-08-12 05:41:39 +00:00
Andrew Lenharth c496b418b5 Reduce number of exported symbols
llvm-svn: 29220
2006-07-20 17:28:38 +00:00
Chris Lattner 996795b0dd Use hidden visibility to make symbols in an anonymous namespace get
dropped.  This shrinks libllvmgcc.dylib another 67K

llvm-svn: 28975
2006-06-28 23:17:24 +00:00
Chris Lattner 227e936650 Add support for targets (like Alpha) that have terminator instructions which
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.

llvm-svn: 25083
2006-01-04 07:12:21 +00:00
Chris Lattner 0511055276 Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone)

llvm-svn: 25081
2006-01-04 06:47:48 +00:00
Chris Lattner 57b21f9f10 clean up this code a bit, no functionality change
llvm-svn: 23609
2005-10-03 07:22:07 +00:00
Chris Lattner 5f096e2847 Break the body of the loop out into a new method
llvm-svn: 23606
2005-10-03 04:47:08 +00:00
Chris Lattner 469652752c adjust to new live variables interface
llvm-svn: 22992
2005-08-23 23:42:17 +00:00
Misha Brukman 584ed83d4a * Order #includes alphabetically
* Remove commented-out debug printouts

llvm-svn: 21707
2005-05-05 23:45:17 +00:00
Misha Brukman 774511633d Convert tabs to spaces
llvm-svn: 21439
2005-04-22 04:01:18 +00:00
Misha Brukman 835702a094 Remove trailing whitespace
llvm-svn: 21420
2005-04-21 22:36:52 +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
Chris Lattner 2d75978bc6 Update live intervals more accurately for PHI elim. This slightly reduces
the live intervals for some registers.

llvm-svn: 15125
2004-07-23 05:27:43 +00:00
Chris Lattner 84b93bb107 costmetic changes
llvm-svn: 15118
2004-07-22 23:05:12 +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 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 2150542af9 Adjust to new TargetMachine interface
llvm-svn: 13956
2004-06-02 05:57:12 +00:00
Chris Lattner 6307b8d061 Fix a really nasty bug from my changes on Monday to PHIElim. These changes
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!

llvm-svn: 13517
2004-05-12 21:47:57 +00:00
Chris Lattner 24f200ad7b Switch this from using an std::map to using a DenseMap. This speeds up
phi-elimination from 0.6 to 0.54s on kc++.

llvm-svn: 13454
2004-05-10 19:17:36 +00:00
Chris Lattner 39a1e0a33e Use a new VRegPHIUseCount to compute uses of PHI values by other phi values
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).

llvm-svn: 13453
2004-05-10 19:06:37 +00:00
Chris Lattner a2f7b9bddc Now that we use an ilist of machine instructions, iterators are more robust
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.

llvm-svn: 13452
2004-05-10 18:47:18 +00:00
Chris Lattner 8c0bc68910 Operate on the Machine CFG instead of on the LLVM CFG
llvm-svn: 13302
2004-05-01 21:24:39 +00:00
Chris Lattner acccf32aa3 MachineBasicBlock::remove should not modify the iterator passed in
llvm-svn: 12571
2004-03-31 21:59:29 +00:00
Chris Lattner 43df6c268b Finegrainify namespacification
llvm-svn: 11757
2004-02-23 18:38:20 +00:00
Alkis Evlogimenos af2de4848e 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
Alkis Evlogimenos 5a92240270 Use newly added next() and prior() utility functions.
llvm-svn: 11430
2004-02-14 01:18:34 +00:00
Alkis Evlogimenos 8cdd0215bf Remove getAllocatedRegNum(). Use getReg() instead.
llvm-svn: 11393
2004-02-13 21:01:20 +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 5dd5be3ec3 Do not use MachineOperand::isVirtualRegister either!
llvm-svn: 11283
2004-02-10 21:12:22 +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
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