[all-commits] [llvm/llvm-project] b577d2: [RISCV] Add a pass to remove duplicate VSETVLI ins...

Craig Topper via All-commits all-commits at lists.llvm.org
Fri Dec 11 10:37:50 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b577d2df7bd650668a3538429ecb3d08e037fe55
      https://github.com/llvm/llvm-project/commit/b577d2df7bd650668a3538429ecb3d08e037fe55
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2020-12-11 (Fri, 11 Dec 2020)

  Changed paths:
    M llvm/lib/Target/RISCV/CMakeLists.txt
    M llvm/lib/Target/RISCV/RISCV.h
    A llvm/lib/Target/RISCV/RISCVCleanupVSETVLI.cpp
    M llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
    M llvm/test/CodeGen/RISCV/rvv/add-vsetvli-gpr.mir
    A llvm/test/CodeGen/RISCV/rvv/cleanup-vsetvli.mir
    M llvm/test/CodeGen/RISCV/rvv/load-add-store-16.ll
    M llvm/test/CodeGen/RISCV/rvv/load-add-store-32.ll
    M llvm/test/CodeGen/RISCV/rvv/load-add-store-64.ll
    M llvm/test/CodeGen/RISCV/rvv/load-add-store-8.ll

  Log Message:
  -----------
  [RISCV] Add a pass to remove duplicate VSETVLI instructions in a basic block.

Add simple pass for removing redundant vsetvli instructions within a basic block. This handles the case where the AVL register and VTYPE immediate are the same and no other instructions that change VTYPE or VL are between them.

There are going to be more opportunities for improvement in this space as we development more complex tests.

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




More information about the All-commits mailing list