[llvm-commits] [llvm] r113593 - /llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
Jim Grosbach
grosbach at apple.com
Fri Sep 10 10:51:35 PDT 2010
Author: grosbach
Date: Fri Sep 10 12:51:34 2010
New Revision: 113593
URL: http://llvm.org/viewvc/llvm-project?rev=113593&view=rev
Log:
add a comment explicitly calling out that allocation orders may include
reserved regs and that register allocators need to explicitly check for
them.
Modified:
llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
Modified: llvm/trunk/include/llvm/Target/TargetRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetRegisterInfo.h?rev=113593&r1=113592&r2=113593&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetRegisterInfo.h Fri Sep 10 12:51:34 2010
@@ -227,9 +227,12 @@
/// 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.
///
More information about the llvm-commits
mailing list