24 "Stack",
"GOT",
"JumpTable",
"ConstantPool",
"FixedStack",
25 "GlobalValueCallEntry",
"ExternalSymbolCallEntry"};
29 AddressSpace = TM.getAddressSpaceForPseudoSourceKind(Kind);
34void PseudoSourceValue::printCustom(
raw_ostream &O)
const {
38 O <<
"TargetCustom" << Kind;
78 OS <<
"FixedStack" << FI;
117 return &ConstantPoolPSV;
121 return &JumpTablePSV;
128 unsigned Idx = (2 *
unsigned(FI)) ^ (FI >> (
sizeof(FI) * 8 - 1));
129 if (FSValues.size() <=
Idx)
130 FSValues.resize(
Idx + 1);
131 std::unique_ptr<FixedStackPseudoSourceValue> &V = FSValues[
Idx];
133 V = std::make_unique<FixedStackPseudoSourceValue>(FI, TM);
139 std::unique_ptr<const GlobalValuePseudoSourceValue> &E =
140 GlobalCallEntries[GV];
142 E = std::make_unique<GlobalValuePseudoSourceValue>(GV, TM);
148 std::unique_ptr<const ExternalSymbolPseudoSourceValue> &E =
149 ExternalCallEntries[ES];
151 E = std::make_unique<ExternalSymbolPseudoSourceValue>(ES, TM);
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
static const char *const PSVNames[]
CallEntryPseudoSourceValue(unsigned Kind, const TargetMachine &TM)
bool isAliased(const MachineFrameInfo *) const override
Test whether the memory pointed to by this PseudoSourceValue may also be pointed to by an LLVM IR Val...
bool mayAlias(const MachineFrameInfo *) const override
Return true if the memory pointed to by this PseudoSourceValue can ever alias an LLVM IR Value.
bool isConstant(const MachineFrameInfo *) const override
Test whether the memory pointed to by this PseudoSourceValue has a constant value.
ExternalSymbolPseudoSourceValue(const char *ES, const TargetMachine &TM)
void printCustom(raw_ostream &OS) const override
Implement printing for PseudoSourceValue.
bool isAliased(const MachineFrameInfo *MFI) const override
Test whether the memory pointed to by this PseudoSourceValue may also be pointed to by an LLVM IR Val...
bool mayAlias(const MachineFrameInfo *) const override
Return true if the memory pointed to by this PseudoSourceValue can ever alias an LLVM IR Value.
bool isConstant(const MachineFrameInfo *MFI) const override
Test whether the memory pointed to by this PseudoSourceValue has a constant value.
GlobalValuePseudoSourceValue(const GlobalValue *GV, const TargetMachine &TM)
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
bool isImmutableObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to an immutable object.
bool isSpillSlotObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to a spill slot.
bool isAliasedObjectIndex(int ObjectIdx) const
Returns true if the specified index corresponds to an object that might be pointed to by an LLVM IR v...
const PseudoSourceValue * getJumpTable()
Return a pseudo source value referencing a jump table.
const PseudoSourceValue * getExternalSymbolCallEntry(const char *ES)
const PseudoSourceValue * getFixedStack(int FI)
Return a pseudo source value referencing a fixed stack frame entry, e.g., a spill slot.
const PseudoSourceValue * getGOT()
Return a pseudo source value referencing the global offset table (or something the like).
const PseudoSourceValue * getGlobalValueCallEntry(const GlobalValue *GV)
const PseudoSourceValue * getStack()
Return a pseudo source value referencing the area below the stack frame of a function,...
const PseudoSourceValue * getConstantPool()
Return a pseudo source value referencing the constant pool.
PseudoSourceValueManager(const TargetMachine &TM)
Special value supplied for machine level alias analysis.
virtual ~PseudoSourceValue()
virtual bool mayAlias(const MachineFrameInfo *) const
Return true if the memory pointed to by this PseudoSourceValue can ever alias an LLVM IR Value.
virtual bool isAliased(const MachineFrameInfo *) const
Test whether the memory pointed to by this PseudoSourceValue may also be pointed to by an LLVM IR Val...
PseudoSourceValue(unsigned Kind, const TargetMachine &TM)
bool isConstantPool() const
virtual bool isConstant(const MachineFrameInfo *) const
Test whether the memory pointed to by this PseudoSourceValue has a constant value.
Primary interface to the complete machine description for the target machine.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.