llvm.org GIT mirror llvm / 40ab164
Print PseudoSourceValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55291 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 11 years ago
3 changed file(s) with 21 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1717
1818 namespace llvm {
1919 class MachineFrameInfo;
20 class raw_ostream;
2021
2122 /// PseudoSourceValue - Special value supplied for machine level alias
2223 /// analysis. It indicates that the a memory access references the functions
2728 PseudoSourceValue();
2829
2930 virtual void print(std::ostream &OS) const;
31 virtual void print(raw_ostream &OS) const;
3032
3133 /// isConstant - Test whether this PseudoSourceValue has a constant value.
3234 ///
5860 /// A SV referencing the jump table
5961 static const PseudoSourceValue *getJumpTable();
6062 };
63
64 inline std::ostream &operator<<(std::ostream &OS,const PseudoSourceValue &PSV) {
65 PSV.print(OS);
66 return OS;
67 }
68 inline raw_ostream &operator<<(raw_ostream &OS, const PseudoSourceValue &PSV) {
69 PSV.print(OS);
70 return OS;
71 }
72
6173 } // End llvm namespace
6274
6375 #endif
755755 OS << "";
756756 else if (!V->getName().empty())
757757 OS << V->getName();
758 else if (isa(V))
759 OS << *V;
758 else if (const PseudoSourceValue *PSV = dyn_cast(V))
759 OS << *PSV;
760760 else
761761 OS << V;
762762
1515 #include "llvm/DerivedTypes.h"
1616 #include "llvm/Support/Compiler.h"
1717 #include "llvm/Support/ManagedStatic.h"
18 #include "llvm/Support/raw_ostream.h"
1819 #include
1920
2021 namespace llvm {
4243 void PseudoSourceValue::print(std::ostream &OS) const {
4344 OS << PSVNames[this - *PSVs];
4445 }
46 void PseudoSourceValue::print(raw_ostream &OS) const {
47 OS << PSVNames[this - *PSVs];
48 }
4549
4650 /// FixedStackPseudoSourceValue - A specialized PseudoSourceValue
4751 /// for holding FixedStack values, which must include a frame
5559 virtual bool isConstant(const MachineFrameInfo *MFI) const;
5660
5761 virtual void print(std::ostream &OS) const {
62 OS << "FixedStack" << FI;
63 }
64 virtual void print(raw_ostream &OS) const {
5865 OS << "FixedStack" << FI;
5966 }
6067 };