Diff Detail
Event Timeline
Do you know whether we could compute their values instead? If the data can be derived by analyzing the function then we can add it to MIRParserImpl::computeFunctionProperties to compute them instead of explicitly serializing them.
CallsUnwindInit tracks a call to an IR intrinsic which is immediately discarded, so no.
For HasEHScopes, HasEHFunclets, and HasOpaqueSPAdjustment, I don't think so. It's set directly from the IR (and I think it's better to avoid as many backlinks there as possible).
For HasEHCatchret, it would require some kind of target knowledge to know what they selected ISD::CATCHRET to.
At a first glance:
- HasEHFunclets and HasEHScopes both seem to be true iff there's an EHPad basic block which should be testable with MBB.isEHPad? Admittedly I don't understand why those two variables, it seems we only ever set them both in FunctionLoweringInfo::set...
- I guess CallsUnwind, CallsEHReturn, HasEHCatchret has no easy/obvious way to compute since patterns vary by target once things are lowered.
So yeah I think computing Funclets/Scopes is worth a try unless I am missing something.
Either way this change LGTM
But it's set conditionally based on isa<LandingPadInst>(BB.getFirstNonPHI()), so EHPad doesn't necessarily imply them (but I have no understanding of how this exception stuff is supposed to work)
I don't really have experience with EH either. So let's go ahead with the patch as-is then.
lgtm
It might be possible to recompute these, but I don't think it would be reliable.