-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[CodeGen] Avoid MachineModuleInfo in MachineModuleSlotTracker #140530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This sounds broken. MachineModuleInfo is supposed to merely be the map from Function to MachineFunction. The NewPM (and other PM-less uses) should still use it |
We moved from having a MF analysis (in legacy) to MMI to support Module passes in codegen pipeline.
is mostly contradicting #88610 (review): "Moving things out of MMI is good" |
At this point MachineModuleInfo is just about reduced to the minimal map of IR Function to MachineFunction, the extra state has been removed. MachineModuleAnalysis still just holds a reference to the owning MachineModuleInfo? |
OS, | ||
[&](const Function &F) { | ||
return &FAM->getResult<MachineFunctionAnalysis>( | ||
const_cast<Function &>(F)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't need const_cast
In NPM, MMI is not used to store machine functions so we need to use the analysis manager here.