This is per function data so it is better kept at the function instead
of the module.
This is a necessary step to have machine module passes work properly.
Paths
| Differential D27185
Move FrameInstructions from MachineModuleInfo to MachineFunction ClosedPublic Authored by MatzeB on Nov 28 2016, 6:23 PM.
Details Summary This is per function data so it is better kept at the function instead This is a necessary step to have machine module passes work properly.
Diff Detail
Event TimelineHerald added subscribers: amehsan, nemanjai, mehdi_amini and 2 others. · View Herald TranscriptNov 28 2016, 6:23 PM echristo edited edge metadata. Comment ActionsMay also slightly increase memory usage, but is still the right thing. LGTM. -eric This revision is now accepted and ready to land.Nov 30 2016, 3:20 PM Closed by commit rL288291: Move FrameInstructions from MachineModuleInfo to MachineFunction (authored by matze). · Explain WhyNov 30 2016, 3:58 PM This revision was automatically updated to reflect the committed changes. Comment Actions
Thanks for the review! For the record: Currently we only ever have 1 MachineFunction alive at the same time. So whether the data lives in MMI or that 1 MF instance should give us the same memory usage. We just may see some extra malloc/free traffic because we now recreate the container for every function instead of reusing the same one in MMI, but I don't expect that to have any measurable effect. (Of course memory usage with a MachineModulePass in place increases necessarily and is unavoidable but that is a different discussion)
Revision Contents
Diff 79494 include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineModuleInfo.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/MIRParser/MIParser.cpp
lib/CodeGen/MIRPrinter.cpp
lib/CodeGen/MachineModuleInfo.cpp
lib/Target/AArch64/AArch64FrameLowering.cpp
lib/Target/ARM/ARMFrameLowering.cpp
lib/Target/ARM/Thumb1FrameLowering.cpp
lib/Target/Hexagon/HexagonFrameLowering.cpp
lib/Target/Mips/Mips16FrameLowering.cpp
lib/Target/Mips/MipsSEFrameLowering.cpp
lib/Target/PowerPC/PPCFrameLowering.cpp
lib/Target/Sparc/SparcFrameLowering.cpp
lib/Target/SystemZ/SystemZFrameLowering.cpp
lib/Target/X86/X86FrameLowering.cpp
lib/Target/XCore/XCoreFrameLowering.cpp
|