summaryrefslogtreecommitdiff
path: root/lib/Target/PIC16
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-07-21 06:09:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-07-21 06:09:07 +0000
commit4f6b4674be5473319ac5e70c76fd5cb964da2128 (patch)
tree2a4769ab9aebbba6d3ce186fab75dca6ff3bd593 /lib/Target/PIC16
parent80a16b05691832708636ea52c4e1ae8524a7d0d3 (diff)
downloadllvm-4f6b4674be5473319ac5e70c76fd5cb964da2128.tar.gz
llvm-4f6b4674be5473319ac5e70c76fd5cb964da2128.tar.bz2
llvm-4f6b4674be5473319ac5e70c76fd5cb964da2128.tar.xz
Teach bottom up pre-ra scheduler to track register pressure. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108991 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16')
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.cpp10
-rw-r--r--lib/Target/PIC16/PIC16ISelLowering.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/Target/PIC16/PIC16ISelLowering.cpp b/lib/Target/PIC16/PIC16ISelLowering.cpp
index 54a6a28992..527b31d0cc 100644
--- a/lib/Target/PIC16/PIC16ISelLowering.cpp
+++ b/lib/Target/PIC16/PIC16ISelLowering.cpp
@@ -312,6 +312,16 @@ PIC16TargetLowering::PIC16TargetLowering(PIC16TargetMachine &TM)
computeRegisterProperties();
}
+std::pair<const TargetRegisterClass*, uint8_t>
+PIC16TargetLowering::findRepresentativeClass(EVT VT) const {
+ switch (VT.getSimpleVT().SimpleTy) {
+ default:
+ return TargetLowering::findRepresentativeClass(VT);
+ case MVT::i16:
+ return std::make_pair(PIC16::FSR16RegisterClass, 1);
+ }
+}
+
// getOutFlag - Extract the flag result if the Op has it.
static SDValue getOutFlag(SDValue &Op) {
// Flag is the last value of the node.
diff --git a/lib/Target/PIC16/PIC16ISelLowering.h b/lib/Target/PIC16/PIC16ISelLowering.h
index 0a7506cb49..d7bb5c1ce5 100644
--- a/lib/Target/PIC16/PIC16ISelLowering.h
+++ b/lib/Target/PIC16/PIC16ISelLowering.h
@@ -181,6 +181,9 @@ namespace llvm {
// FIXME: The function never seems to be aligned.
return 1;
}
+ protected:
+ std::pair<const TargetRegisterClass*, uint8_t>
+ findRepresentativeClass(EVT VT) const;
private:
// If the Node is a BUILD_PAIR representing a direct Address,
// then this function will return true.