1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

35 Commits

Author SHA1 Message Date
Anton Korobeynikov
cf5967630b Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
llvm-svn: 123170
2011-01-10 12:39:04 +00:00
Jakob Stoklund Olesen
957748e7ac Teach TargetRegisterInfo how to cram stack slot indexes in with the virtual and
physical register numbers.

This makes the hack used in LiveInterval official, and lets LiveInterval be
oblivious of stack slots.

The isPhysicalRegister() and isVirtualRegister() predicates don't know about
this, so when a variable may contain a stack slot, isStackSlot() should always
be tested first.

llvm-svn: 123128
2011-01-09 21:17:37 +00:00
Jakob Stoklund Olesen
ed53ab1635 Replace TargetRegisterInfo::printReg with a PrintReg class that also works without a TRI instance.
Print virtual registers numbered from 0 instead of the arbitrary
FirstVirtualRegister. The first virtual register is printed as %vreg0.
TRI::NoRegister is printed as %noreg.

llvm-svn: 123107
2011-01-09 03:05:53 +00:00
Jakob Stoklund Olesen
d0b2397aaa Add TargetRegisterInfo::printReg() to pretty-print registers.
llvm-svn: 121780
2010-12-14 18:53:39 +00:00
Anton Korobeynikov
ff8c52bd51 Move some more hooks to TargetFrameInfo
llvm-svn: 119904
2010-11-20 15:59:32 +00:00
Anton Korobeynikov
ce676f96e1 Move getInitialFrameState() to TargetFrameInfo
llvm-svn: 119754
2010-11-18 23:25:52 +00:00
Benjamin Kramer
fbfb8cf5f8 Reduce malloc thrashing.
llvm-svn: 117572
2010-10-28 18:41:23 +00:00
Jim Grosbach
4d64fc98b6 remove trailing whitespace
llvm-svn: 112847
2010-09-02 18:44:51 +00:00
Jim Grosbach
ed278df6ec handle case where a register class is specified
llvm-svn: 112842
2010-09-02 18:18:52 +00:00
Jim Grosbach
4965868724 Mask out reserved registers when constructing the set of allocatable regs.
llvm-svn: 112828
2010-09-02 16:31:21 +00:00
Rafael Espindola
4c16632cdf Convert the last use of getPhysicalRegisterRegClass and remove it.
AggressiveAntiDepBreaker should not be using getPhysicalRegisterRegClass. An
instruction might be using a register that can only be replaced with one from
a subclass of getPhysicalRegisterRegClass.

With this patch we use getMinimalPhysRegClass. This is correct, but
conservative. We should check the uses of the register and select the
largest register class that can be used in all of them.

llvm-svn: 108122
2010-07-12 02:55:34 +00:00
Dan Gohman
c88c36181f Make getMinimalPhysRegClass' comment mention what makes it different
from getPhysicalRegisterRegClass.

llvm-svn: 107660
2010-07-06 15:31:55 +00:00
Rafael Espindola
832e4ddde7 Add a VT argument to getMinimalPhysRegClass and replace the copy related uses
of getPhysicalRegisterRegClass with it.

If we want to make a copy (or estimate its cost), it is better to use the
smallest class as more efficient operations might be possible.

llvm-svn: 107140
2010-06-29 14:02:34 +00:00
Rafael Espindola
7b9d713f40 Remove uses of getCalleeSavedRegClasses from outside the
backends and removes the virtual declaration. With that out of the way
I should be able to cleanup one backend at a time.

llvm-svn: 105321
2010-06-02 12:39:06 +00:00
Jakob Stoklund Olesen
41388819f1 Drop the SuperregHashTable. It is essentially the same as SubregHashTable.
llvm-svn: 104650
2010-05-25 23:43:18 +00:00
Jakob Stoklund Olesen
9210d3b189 Print symbolic SubRegIndex names on machine operands.
llvm-svn: 104628
2010-05-25 19:49:38 +00:00
Chris Lattner
278075333e constify a method argument.
llvm-svn: 94612
2010-01-26 23:15:09 +00:00
Dan Gohman
14aaff93fc Add a const qualifier.
llvm-svn: 83677
2009-10-09 22:09:05 +00:00
Bob Wilson
e1bb126cbd Remove BlackfinRegisterInfo::getFrameIndexOffset since it is the same as the
default implementation.  Update comment on the default version, which made it
sound like most targets override it.  Currently only X86 and SystemZ override
this method.

llvm-svn: 82651
2009-09-23 20:57:02 +00:00
Owen Anderson
48f2f0ae72 Split EVT into MVT and EVT, the former representing _just_ a primitive type, while
the latter is capable of representing either a primitive or an extended type.

llvm-svn: 78713
2009-08-11 20:47:22 +00:00
Owen Anderson
b4bce99769 Rename MVT to EVT, in preparation for splitting SimpleValueType out into its own struct type.
llvm-svn: 78610
2009-08-10 22:56:29 +00:00
Bill Wendling
8235a05c1a Untabification.
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Jakob Stoklund Olesen
bcb5d651a3 getCommonSubClass() - Calculate the largest common sub-class of two register
classes.

This is implemented as a function rather than a method on TargetRegisterClass
because it is symmetric in its arguments.

llvm-svn: 70512
2009-04-30 21:23:32 +00:00
Owen Anderson
bd340ca405 Give register alias checking the hash table treatment too.
llvm-svn: 68730
2009-04-09 22:19:30 +00:00
Owen Anderson
d4ce32ccae Convert TargetRegisterInfo's super-register checking to use a pre-computed hash table just like subregister checking does.
llvm-svn: 68669
2009-04-09 03:50:16 +00:00
Dan Gohman
c8477ceabe Instead of building a list and sorting it just to find a maximum element,
compute the maximum element directly.

llvm-svn: 56411
2008-09-21 21:01:49 +00:00
Bill Wendling
d7ccfdb867 Remove warning about initialization order.
llvm-svn: 52980
2008-07-01 21:00:31 +00:00
Owen Anderson
fe73cb09c8 Make the subregister hashtable output more readable by wrapping the lines,
and mark it const along with the associated changes to TargetRegisterInfo.

llvm-svn: 52966
2008-07-01 17:34:38 +00:00
Owen Anderson
059d64938b Replace the dynamically computed std::set lookup method for subregisters with a hashtable-based
version that is computed by tblgen at the time LLVM is compiled.

llvm-svn: 52945
2008-07-01 00:18:52 +00:00
Owen Anderson
59ed35b2c2 Cache subregister relationships in a set in TargetRegisterInfo to allow faster lookups.
This speeds up LiveVariables from 0.6279s to 0.6165s on kimwitu++.

llvm-svn: 52818
2008-06-27 06:56:04 +00:00
Duncan Sands
d634afe3aa Wrap MVT::ValueType in a struct to get type safety
and better control the abstraction.  Rename the type
to MVT.  To update out-of-tree patches, the main
thing to do is to rename MVT::ValueType to MVT, and
rewrite expressions like MVT::getSizeInBits(VT) in
the form VT.getSizeInBits().  Use VT.getSimpleVT()
to extract a MVT::SimpleValueType for use in switch
statements (you will get an assert failure if VT is
an extended value type - these shouldn't exist after
type legalization).
This results in a small speedup of codegen and no
new testsuite failures (x86-64 linux).

llvm-svn: 52044
2008-06-06 12:08:01 +00:00
Evan Cheng
bbbe14502f 80 col violation.
llvm-svn: 50266
2008-04-25 17:21:40 +00:00
Evan Cheng
318a01e5fb If there are multiple register classes that a register belongs to, return the super-class (e.g. on x86, returns GR32, not GR32_).
llvm-svn: 48220
2008-03-11 07:54:14 +00:00
Evan Cheng
af1c76846d When the register allocator runs out of registers, spill a physical register around the def's and use's of the interval being allocated to make it possible for the interval to target a register and spill it right away and restore a register for uses. This likely generates terrible code but is before than aborting.
llvm-svn: 48218
2008-03-11 07:19:34 +00:00
Dan Gohman
cabaec582f Rename MRegisterInfo to TargetRegisterInfo.
llvm-svn: 46930
2008-02-10 18:45:23 +00:00