aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCMachineFunctionInfo.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-08 06:39:11 +0000
committerChris Lattner <sabre@nondot.org>2007-12-08 06:39:11 +0000
commit73944fb22270697e75408cba52cca276be371a1f (patch)
treee6ebc214c149c6da74c62763df7166a3761f65a0 /lib/Target/PowerPC/PPCMachineFunctionInfo.h
parentedfd10de873a424a8516a6dbf5feb8168efc462d (diff)
refactor some code to avoid overloading the name 'usesLR' in
different places to mean different things. Document what the one in PPCFunctionInfo means and when it is valid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCMachineFunctionInfo.h')
-rw-r--r--lib/Target/PowerPC/PPCMachineFunctionInfo.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCMachineFunctionInfo.h b/lib/Target/PowerPC/PPCMachineFunctionInfo.h
index e227456e63..bf1fea211b 100644
--- a/lib/Target/PowerPC/PPCMachineFunctionInfo.h
+++ b/lib/Target/PowerPC/PPCMachineFunctionInfo.h
@@ -39,8 +39,12 @@ public:
int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
+ /// UsesLR - This is set when the prolog/epilog inserter does its initial scan
+ /// of the function, it is true if the LR/LR8 register is ever explicitly
+ /// accessed/clobbered in the machine function (e.g. by calls and movpctolr,
+ /// which is used in PIC generation).
void setUsesLR(bool U) { UsesLR = U; }
- bool usesLR() { return UsesLR; }
+ bool usesLR() const { return UsesLR; }
};