Skip to content
Snippets Groups Projects
Commit b082903f authored by Jim Grosbach's avatar Jim Grosbach
Browse files

add a comment explicitly calling out that allocation orders may include

reserved regs and that register allocators need to explicitly check for
them.

llvm-svn: 113593
parent f9cca3b7
No related branches found
No related tags found
No related merge requests found
...@@ -227,9 +227,12 @@ public: ...@@ -227,9 +227,12 @@ public:
/// cheaper to allocate caller saved registers. /// cheaper to allocate caller saved registers.
/// ///
/// These methods take a MachineFunction argument, which can be used to tune /// These methods take a MachineFunction argument, which can be used to tune
/// the allocatable registers based on the characteristics of the function. /// the allocatable registers based on the characteristics of the function,
/// One simple example is that the frame pointer register can be used if /// subtarget, or other criteria.
/// frame-pointer-elimination is performed. ///
/// 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. /// By default, these methods return all registers in the class.
/// ///
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment