Newer
Older
LLVM_DUMP_METHOD
void dump_mloc_transfer(const MLocTransferMap &mloc_transfer) const;
bool isCalleeSaved(LocIdx L) const;
bool hasFoldedStackStore(const MachineInstr &MI) {
// Instruction must have a memory operand that's a stack slot, and isn't
// aliased, meaning it's a spill from regalloc instead of a variable.
// If it's aliased, we can't guarantee its value.
if (!MI.hasOneMemOperand())
return false;
auto *MemOperand = *MI.memoperands_begin();
return MemOperand->isStore() &&
MemOperand->getPseudoValue() &&
MemOperand->getPseudoValue()->kind() == PseudoSourceValue::FixedStack
&& !MemOperand->getPseudoValue()->isAliased(MFI);
}
Optional<LocIdx> findLocationForMemOperand(const MachineInstr &MI);
};
} // namespace LiveDebugValues
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
namespace llvm {
using namespace LiveDebugValues;
template <> struct DenseMapInfo<LocIdx> {
static inline LocIdx getEmptyKey() { return LocIdx::MakeIllegalLoc(); }
static inline LocIdx getTombstoneKey() { return LocIdx::MakeTombstoneLoc(); }
static unsigned getHashValue(const LocIdx &Loc) { return Loc.asU64(); }
static bool isEqual(const LocIdx &A, const LocIdx &B) { return A == B; }
};
template <> struct DenseMapInfo<ValueIDNum> {
static inline ValueIDNum getEmptyKey() { return ValueIDNum::EmptyValue; }
static inline ValueIDNum getTombstoneKey() {
return ValueIDNum::TombstoneValue;
}
static unsigned getHashValue(const ValueIDNum &Val) { return Val.asU64(); }
static bool isEqual(const ValueIDNum &A, const ValueIDNum &B) {
return A == B;
}
};
} // end namespace llvm
#endif /* LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_INSTRREFBASEDLDV_H */