File tree Expand file tree Collapse file tree 4 files changed +3
-132
lines changed Expand file tree Collapse file tree 4 files changed +3
-132
lines changed Original file line number Diff line number Diff line change @@ -451,13 +451,10 @@ int X86InstrInfo::getSPAdjust(const MachineInstr &MI) const {
451
451
return -(I->getOperand (1 ).getImm ());
452
452
}
453
453
454
- // Handle other opcodes we reasonably expect to see in call
455
- // sequences. Note this may include spill/restore of FP/BP.
454
+ // Currently handle only PUSHes we can reasonably expect to see
455
+ // in call sequences
456
456
switch (MI.getOpcode ()) {
457
457
default :
458
- assert (!(MI.modifiesRegister (X86::RSP, &RI) ||
459
- MI.getDesc ().hasImplicitDefOfPhysReg (X86::RSP)) &&
460
- " Unhandled opcode in getSPAdjust" );
461
458
return 0 ;
462
459
case X86::PUSH32r:
463
460
case X86::PUSH32rmm:
@@ -469,30 +466,6 @@ int X86InstrInfo::getSPAdjust(const MachineInstr &MI) const {
469
466
case X86::PUSH64rmr:
470
467
case X86::PUSH64i32:
471
468
return 8 ;
472
- case X86::POP32r:
473
- case X86::POP32rmm:
474
- case X86::POP32rmr:
475
- return -4 ;
476
- case X86::POP64r:
477
- case X86::POP64rmm:
478
- case X86::POP64rmr:
479
- return -8 ;
480
- // FIXME: (implement and) use isAddImmediate in the
481
- // default case instead of the following ADD/SUB cases.
482
- case X86::ADD32ri:
483
- case X86::ADD32ri8:
484
- case X86::ADD64ri32:
485
- if (MI.getOperand (0 ).getReg () == X86::RSP &&
486
- MI.getOperand (1 ).getReg () == X86::RSP)
487
- return -MI.getOperand (2 ).getImm ();
488
- return 0 ;
489
- case X86::SUB32ri:
490
- case X86::SUB32ri8:
491
- case X86::SUB64ri32:
492
- if (MI.getOperand (0 ).getReg () == X86::RSP &&
493
- MI.getOperand (1 ).getReg () == X86::RSP)
494
- return MI.getOperand (2 ).getImm ();
495
- return 0 ;
496
469
}
497
470
}
498
471
Original file line number Diff line number Diff line change @@ -15,9 +15,7 @@ using namespace llvm;
15
15
16
16
yaml::X86MachineFunctionInfo::X86MachineFunctionInfo (
17
17
const llvm::X86MachineFunctionInfo &MFI)
18
- : AMXProgModel(MFI.getAMXProgModel()),
19
- FPClobberedByCall(MFI.getFPClobberedByCall()),
20
- HasPushSequences(MFI.getHasPushSequences()) {}
18
+ : AMXProgModel(MFI.getAMXProgModel()) {}
21
19
22
20
void yaml::X86MachineFunctionInfo::mappingImpl (yaml::IO &YamlIO) {
23
21
MappingTraits<X86MachineFunctionInfo>::mapping (YamlIO, *this );
@@ -33,8 +31,6 @@ MachineFunctionInfo *X86MachineFunctionInfo::clone(
33
31
void X86MachineFunctionInfo::initializeBaseYamlFields (
34
32
const yaml::X86MachineFunctionInfo &YamlMFI) {
35
33
AMXProgModel = YamlMFI.AMXProgModel ;
36
- FPClobberedByCall = YamlMFI.FPClobberedByCall ;
37
- HasPushSequences = YamlMFI.HasPushSequences ;
38
34
}
39
35
40
36
void X86MachineFunctionInfo::anchor () { }
Original file line number Diff line number Diff line change @@ -38,8 +38,6 @@ template <> struct ScalarEnumerationTraits<AMXProgModelEnum> {
38
38
39
39
struct X86MachineFunctionInfo final : public yaml::MachineFunctionInfo {
40
40
AMXProgModelEnum AMXProgModel;
41
- bool FPClobberedByCall;
42
- bool HasPushSequences;
43
41
44
42
X86MachineFunctionInfo () = default ;
45
43
X86MachineFunctionInfo (const llvm::X86MachineFunctionInfo &MFI);
@@ -51,8 +49,6 @@ struct X86MachineFunctionInfo final : public yaml::MachineFunctionInfo {
51
49
template <> struct MappingTraits <X86MachineFunctionInfo> {
52
50
static void mapping (IO &YamlIO, X86MachineFunctionInfo &MFI) {
53
51
YamlIO.mapOptional (" amxProgModel" , MFI.AMXProgModel );
54
- YamlIO.mapOptional (" FPClobberedByCall" , MFI.FPClobberedByCall , false );
55
- YamlIO.mapOptional (" hasPushSequences" , MFI.HasPushSequences , false );
56
52
}
57
53
};
58
54
} // end namespace yaml
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments