diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-17 07:53:04 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-17 07:53:04 +0000 |
commit | 8759585aba78a2109db10511fdd0913af7d6e844 (patch) | |
tree | 30a198744a1d4917d1f491142a93bf2a10b45c59 /llvm/lib/CodeGen/PseudoSourceValue.cpp | |
parent | 1baf407fbcaaccc33a6c30de9b2b39d258b919c5 (diff) | |
download | bcm5719-llvm-8759585aba78a2109db10511fdd0913af7d6e844.tar.gz bcm5719-llvm-8759585aba78a2109db10511fdd0913af7d6e844.zip |
Revert 84315 for now. Re-thinking the patch.
llvm-svn: 84321
Diffstat (limited to 'llvm/lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PseudoSourceValue.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/PseudoSourceValue.cpp b/llvm/lib/CodeGen/PseudoSourceValue.cpp index e74479e7a18..00c5d46d21a 100644 --- a/llvm/lib/CodeGen/PseudoSourceValue.cpp +++ b/llvm/lib/CodeGen/PseudoSourceValue.cpp @@ -52,31 +52,29 @@ void PseudoSourceValue::printCustom(raw_ostream &O) const { } namespace { - /// StackObjectPseudoSourceValue - A specialized PseudoSourceValue - /// for holding StackObject values, which must include a frame + /// FixedStackPseudoSourceValue - A specialized PseudoSourceValue + /// for holding FixedStack values, which must include a frame /// index. - class VISIBILITY_HIDDEN StackObjectPseudoSourceValue + class VISIBILITY_HIDDEN FixedStackPseudoSourceValue : public PseudoSourceValue { const int FI; public: - explicit StackObjectPseudoSourceValue(int fi) : FI(fi) {} + explicit FixedStackPseudoSourceValue(int fi) : FI(fi) {} virtual bool isConstant(const MachineFrameInfo *MFI) const; virtual void printCustom(raw_ostream &OS) const { - if (FI < 0) - OS << "Fixed"; - OS << "StackObject" << FI; + OS << "FixedStack" << FI; } }; } static ManagedStatic<std::map<int, const PseudoSourceValue *> > FSValues; -const PseudoSourceValue *PseudoSourceValue::getStackObject(int FI) { +const PseudoSourceValue *PseudoSourceValue::getFixedStack(int FI) { const PseudoSourceValue *&V = (*FSValues)[FI]; if (!V) - V = new StackObjectPseudoSourceValue(FI); + V = new FixedStackPseudoSourceValue(FI); return V; } @@ -91,7 +89,6 @@ bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const { return false; } -bool -StackObjectPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const { +bool FixedStackPseudoSourceValue::isConstant(const MachineFrameInfo *MFI) const{ return MFI && MFI->isImmutableObjectIndex(FI); } |