My motivation is that I want to enable fast isel for thiscall and other callee-pop calls, but that currently means codegen stops creating pushls, which means test/CodeGen/X86/win32_sret.ll starts failing (harmlesly) with the fast isel change, and updating it to have to different expectations is harder than just teaching this pass about fast isel code -- and this fixes a TODO too.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
The change itself LGTM.
However, I don't think we should be running this pass at all with CodeGenOpt::None.
It was originally enabled only for -Os, and was later also enabled (by Hans, IIRC) for other opt level - but I think enabling it for -O0 was unintentional.
Comment Actions
That makes sense, I was surprised the pass was running at -O0 to be honest. I'll still land this, since it fixes a TODO. Thanks for the review!
Comment Actions
The optimized frames this change produces are confusing lldb's unwinder. We'll try to make it more resilient as that is a generally useful thing, but either way, I do recommend switching this off for -O0.
Comment Actions
https://reviews.llvm.org/D22362 removes this pass from -O0 (which means this change here won't have an observable effect anymore).