aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetLowering.h
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2013-03-14 22:02:09 +0000
committerReed Kotler <rkotler@mips.com>2013-03-14 22:02:09 +0000
commitf8b0a08b6a2e2f4eacdb05eae9a8dd704b692b55 (patch)
tree25aa7428b49afe5ffeacb34559b95ca0922803f0 /include/llvm/Target/TargetLowering.h
parentc184a5f4cad9415ee93ff6d24da2ed676573b61c (diff)
downloadexternal_llvm-f8b0a08b6a2e2f4eacdb05eae9a8dd704b692b55.zip
external_llvm-f8b0a08b6a2e2f4eacdb05eae9a8dd704b692b55.tar.gz
external_llvm-f8b0a08b6a2e2f4eacdb05eae9a8dd704b692b55.tar.bz2
Add a new method which enables one to change register classes.
See the Mips16ISetLowering.cpp patch to see a use of this. For now now the extra code in Mips16ISetLowering.cpp is a nop but is used for test purposes. Mips32 registers are setup and then removed and then the Mips16 registers are setup. Normally you need to add register classes and then call computeRegisterProperties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r--include/llvm/Target/TargetLowering.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index e3e5737..5d74848 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -958,6 +958,13 @@ protected:
RegClassForVT[VT.SimpleTy] = RC;
}
+ /// clearRegisterClasses - remove all register classes
+ void clearRegisterClasses() {
+ for (unsigned i = 0 ; i<array_lengthof(RegClassForVT); i++)
+ RegClassForVT[i] = 0;
+ AvailableRegClasses.clear();
+ }
+
/// findRepresentativeClass - Return the largest legal super-reg register class
/// of the register class for the specified type and its associated "cost".
virtual std::pair<const TargetRegisterClass*, uint8_t>