aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-09-10 17:51:34 +0000
committerJim Grosbach <grosbach@apple.com>2010-09-10 17:51:34 +0000
commitcc38399ea9aceb459a8d7e4bbc6deba9125ea869 (patch)
tree881063dca47aa6b82cd464129e1f54ae9bb8364b
parent81781ed9398a91b00655e39b9436e9d8b80e25ae (diff)
add a comment explicitly calling out that allocation orders may include
reserved regs and that register allocators need to explicitly check for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113593 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetRegisterInfo.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/llvm/Target/TargetRegisterInfo.h b/include/llvm/Target/TargetRegisterInfo.h
index 81dec3e5b7..c97f172a1e 100644
--- a/include/llvm/Target/TargetRegisterInfo.h
+++ b/include/llvm/Target/TargetRegisterInfo.h
@@ -227,9 +227,12 @@ public:
/// cheaper to allocate caller saved registers.
///
/// These methods take a MachineFunction argument, which can be used to tune
- /// the allocatable registers based on the characteristics of the function.
- /// One simple example is that the frame pointer register can be used if
- /// frame-pointer-elimination is performed.
+ /// the allocatable registers based on the characteristics of the function,
+ /// subtarget, or other criteria.
+ ///
+ /// Register allocators should account for the fact that an allocation
+ /// order iterator may return a reserved register and always check
+ /// if the register is allocatable (getAllocatableSet()) before using it.
///
/// By default, these methods return all registers in the class.
///