This is an archive of the discontinued LLVM Phabricator instance.

Fixing PR21811 by applying attributes to global init function
ClosedPublic

Authored by ygao on Apr 22 2015, 11:03 AM.

Details

Summary

Hi,
This patch attempts to fix bug#21811 by attaching the no-frame-pointer-elim-non-leaf
attribute to the compiler-created global init function. It would be helpful if
someone can review this,

  • Gao

Diff Detail

Repository
rL LLVM

Event Timeline

ygao updated this revision to Diff 24245.Apr 22 2015, 11:03 AM
ygao retitled this revision from to Fixing PR21811 by applying attributes to global init function.
ygao updated this object.
ygao edited the test plan for this revision. (Show Details)
ygao added subscribers: Unknown Object (MLST), rnk.
rnk added a comment.Apr 22 2015, 11:56 AM

This isn't enough, there are other bugs here. We should be arranging a CGFunctionInfo and calling SetLLVMFunctionAttributes.

This revision was automatically updated to reflect the committed changes.
rnk added a comment.Apr 22 2015, 12:51 PM

I went ahead and landed a slightly different version in r235537. Thanks for the patch!

ygao added a comment.Apr 22 2015, 2:30 PM

Thanks!
What do you think we should do regarding the related no-frame-pointer-elim attribute? Right now it is set by the frontend but not checked by backend. If I follow the same pattern here, we should get rid of the global flag NoFramePointerElim and move to checking the attribute instead. What do you think?