@@ -26,7 +26,6 @@ class MachineFunction;
26
26
class MachineBasicBlock ;
27
27
class BitVector ;
28
28
class AllocaInst ;
29
- class MachineFrameSizeInfo ;
30
29
class TargetInstrInfo ;
31
30
32
31
// / The CalleeSavedInfo class tracks the information need to locate where a
@@ -284,10 +283,6 @@ class MachineFrameInfo {
284
283
// / It is only valid during and after prolog/epilog code insertion.
285
284
uint64_t MaxCallFrameSize = ~UINT64_C (0 );
286
285
287
- // / Call frame sizes for the MachineFunction's MachineBasicBlocks. This is set
288
- // / by the MachineFrameSizeInfo constructor and cleared by its destructor.
289
- MachineFrameSizeInfo *SizeInfo = nullptr ;
290
-
291
286
// / The number of bytes of callee saved registers that the target wants to
292
287
// / report for the current function in the CodeView S_FRAMEPROC record.
293
288
unsigned CVBytesOfCalleeSavedRegisters = 0 ;
@@ -681,13 +676,6 @@ class MachineFrameInfo {
681
676
}
682
677
void setMaxCallFrameSize (uint64_t S) { MaxCallFrameSize = S; }
683
678
684
- // / Return an object that can be queried for call frame sizes at specific
685
- // / locations in the MachineFunction. Constructing a MachineFrameSizeInfo
686
- // / object for the MachineFunction automatically makes it available via this
687
- // / field during the object's lifetime.
688
- MachineFrameSizeInfo *getSizeInfo () const { return SizeInfo; }
689
- void setSizeInfo (MachineFrameSizeInfo *SI) { SizeInfo = SI; }
690
-
691
679
// / Returns how many bytes of callee-saved registers the target pushed in the
692
680
// / prologue. Only used for debug info.
693
681
unsigned getCVBytesOfCalleeSavedRegisters () const {
@@ -863,24 +851,15 @@ class MachineFrameInfo {
863
851
// / MachineBasicBlocks of a MachineFunction based on call frame setup and
864
852
// / destroy pseudo instructions. Usually, no call frame is open at block
865
853
// / boundaries, except if a call sequence has been split into multiple blocks.
866
- // /
867
- // / Computing this information is deferred until it is queried. Upon
868
- // / construction, a MachineFrameSizeInfo object registers itself in the
869
- // / MachineFunction's MachineFrameInfo (and it unregisters when destructed).
870
- // / While registered, it can be retrieved via MachineFrameInfo::getSizeInfo().
854
+ // / Computing this information is deferred until it is queried.
871
855
// /
872
856
// / This class assumes that call frame instructions are placed properly, i.e.,
873
857
// / every program path hits a frame destroy of equal size after hitting a frame
874
858
// / setup, and a frame setup of equal size before a frame destroy. Nested call
875
859
// / frame sequences are not allowed.
876
860
class MachineFrameSizeInfo {
877
861
public:
878
- MachineFrameSizeInfo (MachineFunction &MF) : MF(MF) {
879
- assert (MF.getFrameInfo ().getSizeInfo () == nullptr );
880
- MF.getFrameInfo ().setSizeInfo (this );
881
- }
882
-
883
- ~MachineFrameSizeInfo () { MF.getFrameInfo ().setSizeInfo (nullptr ); }
862
+ MachineFrameSizeInfo (MachineFunction &MF) : MF(MF) {}
884
863
885
864
// / Get the call frame size just before MI. Contains no value if MI is not in
886
865
// / a call sequence. Zero-sized call frames are possible.
0 commit comments