diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-17 06:22:26 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-17 06:22:26 +0000 |
commit | 0818d87ed15e2c798baef81630accafe81a14519 (patch) | |
tree | 01cf7c95c7a8d53a9902c0b83eb3bb2523f17c15 /llvm/lib/CodeGen/PseudoSourceValue.cpp | |
parent | 05729c2835daf28a30f1649f58196031bf6ae9d8 (diff) | |
download | bcm5719-llvm-0818d87ed15e2c798baef81630accafe81a14519.tar.gz bcm5719-llvm-0818d87ed15e2c798baef81630accafe81a14519.zip |
Rename getFixedStack to getStackObject. The stack objects represented are not
necessarily fixed. Only those will negative frame indices are "fixed."
llvm-svn: 84315
Diffstat (limited to 'llvm/lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PseudoSourceValue.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/PseudoSourceValue.cpp b/llvm/lib/CodeGen/PseudoSourceValue.cpp index 00c5d46d21a..e74479e7a18 100644 --- a/llvm/lib/CodeGen/PseudoSourceValue.cpp +++ b/llvm/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); } |