This is an archive of the discontinued LLVM Phabricator instance.

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
of the module.

This is a necessary step to have machine module passes work properly.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB updated this revision to Diff 79494.Nov 28 2016, 6:23 PM
MatzeB retitled this revision from to Move FrameInstructions from MachineModuleInfo to MachineFunction.
MatzeB updated this object.
MatzeB added reviewers: echristo, aprantl.
MatzeB set the repository for this revision to rL LLVM.
MatzeB added a subscriber: llvm-commits.
echristo accepted this revision.Nov 30 2016, 3:20 PM
echristo edited edge metadata.

May 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
This revision was automatically updated to reflect the committed changes.

May also slightly increase memory usage, but is still the right thing.

LGTM.

-eric

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)