[PATCH] D64294: [Driver] Consolidate shouldUseFramePointer() and shouldUseLeafFramePointer()

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 09:22:22 PDT 2019


MaskRay added a comment.

@ychen The GCC behavior ("omit" wins over "no-omit") makes sense because: in the 4 states:

- 00) leaf retained, non-leaf retained
- 01) leaf retained, non-leaf omitted
- 10) leaf omitted, non-leaf retained
- 11) leaf omitted, non-leaf omitted

State 10) doesn't make sense. I think `-momit-leaf-frame-pointer` was designed to omit leaf frame pointer when frame pointer is enabled (`-fno-omit-frame-pointer` is in action). To make the other 3 states representable, letting "omit" wins over "no-omit" (the current GCC behavior) is the only sensible choice.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64294/new/

https://reviews.llvm.org/D64294





More information about the cfe-commits mailing list