forked from OSchip/llvm-project
MIR: Fix missing serialization for HasTailCall
This commit is contained in:
parent
a0f5aad6d7
commit
20a24af01d
|
@ -564,6 +564,7 @@ struct MachineFrameInfo {
|
|||
bool HasOpaqueSPAdjustment = false;
|
||||
bool HasVAStart = false;
|
||||
bool HasMustTailInVarArgFunc = false;
|
||||
bool HasTailCall = false;
|
||||
unsigned LocalFrameSize = 0;
|
||||
StringValue SavePoint;
|
||||
StringValue RestorePoint;
|
||||
|
@ -584,6 +585,7 @@ struct MachineFrameInfo {
|
|||
HasOpaqueSPAdjustment == Other.HasOpaqueSPAdjustment &&
|
||||
HasVAStart == Other.HasVAStart &&
|
||||
HasMustTailInVarArgFunc == Other.HasMustTailInVarArgFunc &&
|
||||
HasTailCall == Other.HasTailCall &&
|
||||
LocalFrameSize == Other.LocalFrameSize &&
|
||||
SavePoint == Other.SavePoint && RestorePoint == Other.RestorePoint;
|
||||
}
|
||||
|
@ -610,6 +612,7 @@ template <> struct MappingTraits<MachineFrameInfo> {
|
|||
YamlIO.mapOptional("hasVAStart", MFI.HasVAStart, false);
|
||||
YamlIO.mapOptional("hasMustTailInVarArgFunc", MFI.HasMustTailInVarArgFunc,
|
||||
false);
|
||||
YamlIO.mapOptional("hasTailCall", MFI.HasTailCall, false);
|
||||
YamlIO.mapOptional("localFrameSize", MFI.LocalFrameSize, (unsigned)0);
|
||||
YamlIO.mapOptional("savePoint", MFI.SavePoint,
|
||||
StringValue()); // Don't print it out when it's empty.
|
||||
|
|
|
@ -625,7 +625,7 @@ public:
|
|||
|
||||
/// Returns true if the function contains a tail call.
|
||||
bool hasTailCall() const { return HasTailCall; }
|
||||
void setHasTailCall() { HasTailCall = true; }
|
||||
void setHasTailCall(bool V = true) { HasTailCall = V; }
|
||||
|
||||
/// Computes the maximum size of a callframe and the AdjustsStack property.
|
||||
/// This only works for targets defining
|
||||
|
|
|
@ -700,6 +700,7 @@ bool MIRParserImpl::initializeFrameInfo(PerFunctionMIParsingState &PFS,
|
|||
MFI.setHasOpaqueSPAdjustment(YamlMFI.HasOpaqueSPAdjustment);
|
||||
MFI.setHasVAStart(YamlMFI.HasVAStart);
|
||||
MFI.setHasMustTailInVarArgFunc(YamlMFI.HasMustTailInVarArgFunc);
|
||||
MFI.setHasTailCall(YamlMFI.HasTailCall);
|
||||
MFI.setLocalFrameSize(YamlMFI.LocalFrameSize);
|
||||
if (!YamlMFI.SavePoint.Value.empty()) {
|
||||
MachineBasicBlock *MBB = nullptr;
|
||||
|
|
|
@ -351,6 +351,7 @@ void MIRPrinter::convert(ModuleSlotTracker &MST,
|
|||
YamlMFI.HasOpaqueSPAdjustment = MFI.hasOpaqueSPAdjustment();
|
||||
YamlMFI.HasVAStart = MFI.hasVAStart();
|
||||
YamlMFI.HasMustTailInVarArgFunc = MFI.hasMustTailInVarArgFunc();
|
||||
YamlMFI.HasTailCall = MFI.hasTailCall();
|
||||
YamlMFI.LocalFrameSize = MFI.getLocalFrameSize();
|
||||
if (MFI.getSavePoint()) {
|
||||
raw_string_ostream StrOS(YamlMFI.SavePoint.Value);
|
||||
|
|
|
@ -42,6 +42,7 @@ tracksRegLiveness: true
|
|||
# CHECK-NEXT: hasOpaqueSPAdjustment: false
|
||||
# CHECK-NEXT: hasVAStart: false
|
||||
# CHECK-NEXT: hasMustTailInVarArgFunc: false
|
||||
# CHECK-NEXT: hasTailCall: false
|
||||
# CHECK-NEXT: localFrameSize: 0
|
||||
# CHECK-NEXT: savePoint: ''
|
||||
# CHECK-NEXT: restorePoint: ''
|
||||
|
@ -73,6 +74,7 @@ tracksRegLiveness: true
|
|||
# CHECK-NEXT: hasOpaqueSPAdjustment: true
|
||||
# CHECK-NEXT: hasVAStart: true
|
||||
# CHECK-NEXT: hasMustTailInVarArgFunc: true
|
||||
# CHECK-NEXT: hasTailCall: true
|
||||
# CHECK: body
|
||||
frameInfo:
|
||||
isFrameAddressTaken: true
|
||||
|
@ -88,6 +90,7 @@ frameInfo:
|
|||
cvBytesOfCalleeSavedRegisters: 8
|
||||
hasOpaqueSPAdjustment: true
|
||||
hasVAStart: true
|
||||
hasTailCall: true
|
||||
hasMustTailInVarArgFunc: true
|
||||
localFrameSize: 256
|
||||
body: |
|
||||
|
|
Loading…
Reference in New Issue