Skip to content

Commit 20aa681

Browse files
committed
Remove MachineFrameSizeInfo ownership from MachineFrameInfo
Also remove an unintended newline.
1 parent 9cad0b2 commit 20aa681

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

llvm/include/llvm/CodeGen/MachineFrameInfo.h

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ class MachineFunction;
2626
class MachineBasicBlock;
2727
class BitVector;
2828
class AllocaInst;
29-
class MachineFrameSizeInfo;
3029
class TargetInstrInfo;
3130

3231
/// The CalleeSavedInfo class tracks the information need to locate where a
@@ -284,10 +283,6 @@ class MachineFrameInfo {
284283
/// It is only valid during and after prolog/epilog code insertion.
285284
uint64_t MaxCallFrameSize = ~UINT64_C(0);
286285

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-
291286
/// The number of bytes of callee saved registers that the target wants to
292287
/// report for the current function in the CodeView S_FRAMEPROC record.
293288
unsigned CVBytesOfCalleeSavedRegisters = 0;
@@ -681,13 +676,6 @@ class MachineFrameInfo {
681676
}
682677
void setMaxCallFrameSize(uint64_t S) { MaxCallFrameSize = S; }
683678

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-
691679
/// Returns how many bytes of callee-saved registers the target pushed in the
692680
/// prologue. Only used for debug info.
693681
unsigned getCVBytesOfCalleeSavedRegisters() const {
@@ -863,24 +851,15 @@ class MachineFrameInfo {
863851
/// MachineBasicBlocks of a MachineFunction based on call frame setup and
864852
/// destroy pseudo instructions. Usually, no call frame is open at block
865853
/// 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.
871855
///
872856
/// This class assumes that call frame instructions are placed properly, i.e.,
873857
/// every program path hits a frame destroy of equal size after hitting a frame
874858
/// setup, and a frame setup of equal size before a frame destroy. Nested call
875859
/// frame sequences are not allowed.
876860
class MachineFrameSizeInfo {
877861
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) {}
884863

885864
/// Get the call frame size just before MI. Contains no value if MI is not in
886865
/// a call sequence. Zero-sized call frames are possible.

llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,6 @@ bool AMDGPURegisterBankInfo::executeInWaterfallLoop(
816816
MachineBasicBlock *BodyBB = MF->CreateMachineBasicBlock();
817817
MachineBasicBlock *RemainderBB = MF->CreateMachineBasicBlock();
818818
MachineBasicBlock *RestoreExecBB = MF->CreateMachineBasicBlock();
819-
820819
MachineFunction::iterator MBBI(MBB);
821820
++MBBI;
822821
MF->insert(MBBI, LoopBB);

0 commit comments

Comments
 (0)