summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PseudoSourceValue.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-10-17 06:22:26 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-10-17 06:22:26 +0000
commitbf125583f8bd8196a34921276add7f304b7c1433 (patch)
tree605c387185bdb4b19cd367de8a1fa4b6ce39c9fd /lib/CodeGen/PseudoSourceValue.cpp
parentcac25a9452c75b24e33fffe3390de8b2b8983e92 (diff)
downloadllvm-bf125583f8bd8196a34921276add7f304b7c1433.tar.gz
llvm-bf125583f8bd8196a34921276add7f304b7c1433.tar.bz2
llvm-bf125583f8bd8196a34921276add7f304b7c1433.tar.xz
Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed." git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84315 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r--lib/CodeGen/PseudoSourceValue.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp
index 00c5d46d21..e74479e7a1 100644
--- a/lib/CodeGen/PseudoSourceValue.cpp
+++ b/lib/CodeGen/PseudoSourceValue.cpp
@@ -52,29 +52,31 @@ void PseudoSourceValue::printCustom(raw_ostream &O) const {
}
namespace {
- /// FixedStackPseudoSourceValue - A specialized PseudoSourceValue
- /// for holding FixedStack values, which must include a frame
+ /// StackObjectPseudoSourceValue - A specialized PseudoSourceValue
+ /// for holding StackObject values, which must include a frame
/// index.
- class VISIBILITY_HIDDEN FixedStackPseudoSourceValue
+ class VISIBILITY_HIDDEN StackObjectPseudoSourceValue
: public PseudoSourceValue {
const int FI;
public:
- explicit FixedStackPseudoSourceValue(int fi) : FI(fi) {}
+ explicit StackObjectPseudoSourceValue(int fi) : FI(fi) {}
virtual bool isConstant(const MachineFrameInfo *MFI) const;
virtual void printCustom(raw_ostream &OS) const {
- OS << "FixedStack" << FI;
+ if (FI < 0)
+ OS << "Fixed";
+ OS << "StackObject" << FI;
}
};
}
static ManagedStatic<std::map<int, const PseudoSourceValue *> > FSValues;
-const PseudoSourceValue *PseudoSourceValue::getFixedStack(int FI) {
+const PseudoSourceValue *PseudoSourceValue::getStackObject(int FI) {
const PseudoSourceValue *&V = (*FSValues)[FI];
if (!V)
- V = new FixedStackPseudoSourceValue(FI);
+ V = new StackObjectPseudoSourceValue(FI);
return V;
}
@@ -89,6 +91,7 @@ bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const {
return false;
}
-bool FixedStackPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const{
+bool
+StackObjectPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const {
return MFI && MFI->isImmutableObjectIndex(FI);
}