summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-03-09 22:47:38 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-03-09 22:47:38 +0000
commit17adafc6c179f3bad757f932a13522851ee5171f (patch)
tree41102e58cdacc628332f62f671458e5138ee3867 /include
parent7bff3e7c1bb1ad4ce061c17baa3cd84e81cef8d1 (diff)
downloadllvm-17adafc6c179f3bad757f932a13522851ee5171f.tar.gz
llvm-17adafc6c179f3bad757f932a13522851ee5171f.tar.bz2
llvm-17adafc6c179f3bad757f932a13522851ee5171f.tar.xz
Change the definition of TargetRegisterInfo::getCrossCopyRegClass to be more
flexible. If it returns a register class that's different from the input, then that's the register class used for cross-register class copies. If it returns a register class that's the same as the input, then no cross- register class copies are needed (normal copies would do). If it returns null, then it's not at all possible to copy registers of the specified register class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 1c5d7c7118..4c63568786 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -588,8 +588,10 @@ public:
}
/// getCrossCopyRegClass - Returns a legal register class to copy a register
- /// in the specified class to or from. Returns NULL if it is possible to copy
- /// between a two registers of the specified class.
+ /// in the specified class to or from. If it is possible to copy the register
+ /// directly without using a cross register class copy, return the specified
+ /// RC. Returns NULL if it is not possible to copy between a two registers of
+ /// the specified class.
virtual const TargetRegisterClass *
getCrossCopyRegClass(const TargetRegisterClass *RC) const {
return NULL;