[PATCH] D71350: [MachineScheduler] Reorder cfi to avoid PostRA scheduling differences

David Tellenbach via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 15:06:39 PST 2019


tellenbach added a comment.

+1 to all comments above.

I'd also prefer a solution that postpones the insertion of CFI instructions rather than changing scheduling. It should be okay to remember the overall frame-setup and insert the instructions at later stages (probably right before AsmPrinting). I've implemented a solution doing that for frame-lowering and it worked quite well. However, there are other passes that insert CFI instructions and I haven't finish it (yet).

In D71350#1779760 <https://reviews.llvm.org/D71350#1779760>, @Orlando wrote:

> Unless I misunderstand, the "correct position" for a CFI_INSTRUCTION
>  is immediately after the instruction which it describes.


This really depends on the particular CFI instruction but I guess `.cfi_def_cfa_offset` and `.cfi_offset` can be inserted after the last instruction marked with the `frame-setup` flag.


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

https://reviews.llvm.org/D71350





More information about the llvm-commits mailing list