[all-commits] [llvm/llvm-project] 2cadf8: [RISCV] Pass OptLevel to `RISCVDAGToDAGISel` corre...
eop Chen via All-commits
all-commits at lists.llvm.org
Mon May 30 17:23:02 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2cadf84fc817a6c89eca0556a078d7879091e2a5
https://github.com/llvm/llvm-project/commit/2cadf84fc817a6c89eca0556a078d7879091e2a5
Author: eopXD <eop.chen at sifive.com>
Date: 2022-05-30 (Mon, 30 May 2022)
Changed paths:
M llvm/lib/Target/RISCV/RISCV.h
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
M llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
M llvm/test/CodeGen/RISCV/O0-pipeline.ll
M llvm/test/CodeGen/RISCV/isel-optnone.ll
Log Message:
-----------
[RISCV] Pass OptLevel to `RISCVDAGToDAGISel` correctly
Originally, `OptLevel` isn't passed into the `MachineFunctionPass`.
This lets the default parameter of `SelectionDAGISel`, which is
`CodeGenOpt::Default`, be passed in. OptLevelChanger captures the
optimization level with the parameter, and rather not the value
within `TargetMachine`. This lets the optimization be
unintentionally overwriten if other value than `CodeGenOpt::Default`
passed.
This patch fixes this by passing the optimization level rather
than using the default value.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D126641
More information about the All-commits
mailing list