Open Quuxplusone opened 9 years ago
Attached global-init-frame-ptr-settings.cpp
(1431 bytes, text/plain): Reproducible - see description for how to compile and detect the issue
I don't think -fno-frame-pointer-elim is a valid Clang flag? Did you mean -fno-omit-frame-pointer?
I think "no-frame-pointer-elim" is the name of the function attribute. I usually
get this attribute if I pass "-Xclang -mdisable-fp-elim" on the command line,
and
I believe it is equivalent to "-fno-omit-frame-pointer".
Commit r187092+r187093 replaced the codegen option NoFramePointerElimNonLeaf
with
a function attribute "no-frame-pointer-elim-non-leaf", but the function
attribute
is not attached to all the functions. For example, what is created from
CodeGenModule::CreateGlobalInitOrDestructFunction() does not have this
attribute.
Oddly, the related codegen option NoFramePointerElim is still being used, and
the
corresponding function attribute "no-frame-pointer-elim" is attached but not
checked in the backend; maybe one of these should be removed.
Fixing the bug probably involves either making clang more diligent at attaching
this attributes, or to revert r187093. The latter is actually quite appealing
since I do not have to worry about forgetting to attach this attribute somewhere
in the front end.
We should fix the frontend to apply the attribute. Relying on global options doesn't work when you move to LTO.
Was this fixed in r235537?
global-init-frame-ptr-settings.cpp
(1431 bytes, text/plain)