[PATCH] D92679: [RISCV] Add a pass to remove duplicate VSETVLI instructions in a basic block.

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 4 12:32:17 PST 2020


rogfer01 added a comment.

As a first step to remove the most redundant `vsetvli` cases, this LGTM.



================
Comment at: llvm/lib/Target/RISCV/RISCVCleanupVSETVLI.cpp:72
+
+    // If we don't have a previous VSETVLI or the GVL output isn't dead, we
+    // can't remove this VSETVLI.
----------------
I don't think we want to use GVL as term here. It is not a standard term of the V-spec.

The spec says //new value of `vl`// (https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#61-vsetvlivsetvl-instructions) which is a bit verbose, so perhaps just saying `the VL output` will do.


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

https://reviews.llvm.org/D92679



More information about the llvm-commits mailing list