This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Fix logic to check if frame pointer should be used
ClosedPublic

Authored by mgrang on Apr 3 2018, 4:05 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

mgrang created this revision.Apr 3 2018, 4:05 PM
mgrang added a comment.Apr 3 2018, 4:15 PM

@asb Should we keep frame pointer enabled for debug builds? Internally, for ARM/Thumb we leave frame pointer ON if debug is enabled.

asb added a comment.Apr 4 2018, 7:53 AM

Could you please add a test, perhaps to test/Driver/frame-pointer.c?

My understanding is that in general there is a desire for codegen to remain the same or as close as possible whether it's a -g build or not, so I think disabling fp elimination for debug builds wouldn't be the right route. Or did I misunderstand you?

asb requested changes to this revision.Apr 5 2018, 1:29 AM
This revision now requires changes to proceed.Apr 5 2018, 1:29 AM
mgrang updated this revision to Diff 141584.Apr 8 2018, 9:35 PM
mgrang retitled this revision from [RISCV] Fix logic check if frame pointer should be used to [RISCV] Fix logic to check if frame pointer should be used.

Added unit tests.

asb accepted this revision.Apr 12 2018, 5:34 AM

Thanks, looks good to me.

This revision is now accepted and ready to land.Apr 12 2018, 5:34 AM
This revision was automatically updated to reflect the committed changes.