[PATCH] D91218: [SystemZ] Prevent fentry reordering

Ilya Leoshkevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 11 04:30:27 PST 2020


iii added a comment.

In D91218#2388311 <https://reviews.llvm.org/D91218#2388311>, @jonpa wrote:

>> An alternative fix would be to modify isSchedulingBoundary() to accept FENTRY_CALL, but this would have questionable semantics.
>
> Did you try to add the isCall flag to the instruction in Target.td? That should make it a scheduling boundary...

I think it would work, but there is the following comment regarding `isCall`:

  /// MachineScheduler does not currently support scheduling across calls. To
  /// handle calls, the DAG builder needs to be modified to create register
  /// anti/output dependencies on the registers clobbered by the call's regmask
  /// operand. In PreRA scheduling, the stack pointer adjustment already prevents
  /// scheduling across calls. In PostRA scheduling, we need the isCall to enforce
  /// the boundary, but there would be no benefit to postRA scheduling across
  /// calls this late anyway.

If I read this correctly, that `isCall` is a scheduling boundary is an implementation detail that can (even if not likely) change.
Still, adding `isCall` must be a right thing to do regardless? `FENTRY_CALL` cannot be anything else.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91218



More information about the llvm-commits mailing list