[PATCH] D92695: [X86ISelLowering] don't emit frame pointers for eflags intrinsics.

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 05:13:10 PST 2021


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:25975-25976
-      // sequence.
-      MachineFrameInfo &MFI = DAG.getMachineFunction().getFrameInfo();
-      MFI.setHasCopyImplyingStackAdjustment(true);
       // Don't do anything here, we will expand these intrinsics out later
----------------
craig.topper wrote:
> pengfei wrote:
> > How about address Craig and Reid's concerns by adding the check conditions like above?
> emitPrologue calls setUsesRedZone. That would occur after this code runs. This is too early to call getUsesRedZone.
Maybe we can check for `-mno-red-zone` only given Linux kernel is built with it:
```
MachineFunction &MF = DAG.getMachineFunction();
if (!MF.getFunction().hasFnAttribute(Attribute::NoRedZone))
  MF.getFrameInfo().setHasCopyImplyingStackAdjustment(true);
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92695



More information about the llvm-commits mailing list