[CodeGen] Set FrameSetup/FrameDestroy on BUNDLE instructions
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Sat, 25 Aug 2018 11:26:17 +0000 (11:26 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Sat, 25 Aug 2018 11:26:17 +0000 (11:26 +0000)
commit7ded6a909bb8baddeee706f5591ecec601270758
tree9dfedec7c0cd87cceb97e93ac8264d9ad1e0c72e
parent8483004723f862684dadc97d0f26885487425a34
[CodeGen] Set FrameSetup/FrameDestroy on BUNDLE instructions

Summary:
If any of the bundled instructions are marked as FrameSetup
or FrameDestroy, then that property is set on the BUNDLE
instruction as well.

As long as the scheduler/packetizer aren't mixing
prologue/epilogue instructions (i.e. all the bundled
instructions have the same property) then this simply gives
the bundle the correct property (so when using a bundle
iterator in late passes a bundle will be correctly identified
as FrameSetup/FrameDestroy).

When for example bundling a mix of FrameSetup instructions
with non-FrameSetup instructions it could be discussed if
the bundle should have the property or not. The choice here
has been to set these properties on the BUNDLE instruction if
any of the bundled instructions have the property set.

Reviewers: #debug-info, kparzysz

Reviewed By: kparzysz

Subscribers: vsk, thegameg, llvm-commits

Differential Revision: https://reviews.llvm.org/D50637

llvm-svn: 340680
llvm/lib/CodeGen/MachineInstrBundle.cpp
llvm/test/CodeGen/Hexagon/packetize-frame-setup-destroy.mir [new file with mode: 0644]