[all-commits] [llvm/llvm-project] d199bf: [RISCV][InsertVSETVLI] Handle partially transparen...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Jan 27 11:52:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d199bf98229229d5ebd3c0999cc68d0d72558d83
      https://github.com/llvm/llvm-project/commit/d199bf98229229d5ebd3c0999cc68d0d72558d83
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
    M llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll

  Log Message:
  -----------
  [RISCV][InsertVSETVLI] Handle partially transparent instructions in PRE

The PRE implementation was being overly strict when checking to see if a vsetvli was removed in the current block. For instructions which don't use all the fields of VTYPE or VL, we can propagate a changed state past the first instruction with an SEW operand and remove a vsetvli later in the block. We do need to be careful now to ensure that the state convergences before the end of the block or we'd invalidate the cached data flow results.

Taking a step back, we're modeling the effect of the emitVSETVLIs pass which runs just after PRE. This is unfortunate, and makes me think we should probably reevaluate doing the PRE as a post-pass instead of as surgery in the data flow phases. Doing that requires us to get more aggressive about mutating user written vsetvlis which we've tried not to do up to now, but well, maybe it's time? Anyways, that's a thought for the future, not something I'm proposing doing now.

Differential Revision: https://reviews.llvm.org/D142409


  Commit: 36244914b42e9ec6b9f01d95efe17c693ae950bc
      https://github.com/llvm/llvm-project/commit/36244914b42e9ec6b9f01d95efe17c693ae950bc
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M llvm/lib/CodeGen/BranchRelaxation.cpp

  Log Message:
  -----------
  Revert "[BranchRelaxation] Move faulting_op check into callee [nfc]"

This reverts commit c549da959b81902789a17918c5b95d4449e6fdfa.  Per buildbots, this was not NFC.


Compare: https://github.com/llvm/llvm-project/compare/73dba2f649a8...36244914b42e


More information about the All-commits mailing list