[llvm-branch-commits] [llvm] [AMDGPU][NewPM] Fill out addILPOpts. (PR #108514)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Sep 13 01:25:20 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Christudasan Devadasan (cdevadas)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/108514.diff
2 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (+7)
- (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h (+1)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index 8c45e6b5e589c2..6cc9ff6a981fee 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -1898,6 +1898,13 @@ void AMDGPUCodeGenPassBuilder::addPreISel(AddIRPass &addPass) const {
addPass(RequireAnalysisPass<UniformityInfoAnalysis, Function>());
}
+void AMDGPUCodeGenPassBuilder::addILPOpts(AddMachinePass &addPass) const {
+ if (EnableEarlyIfConversion)
+ addPass(EarlyIfConverterPass());
+
+ Base::addILPOpts(addPass);
+}
+
void AMDGPUCodeGenPassBuilder::addAsmPrinter(AddMachinePass &addPass,
CreateMCStreamer) const {
// TODO: Add AsmPrinter.
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
index 5b7257ddb36f1e..96b414f294ee70 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h
@@ -172,6 +172,7 @@ class AMDGPUCodeGenPassBuilder
void addIRPasses(AddIRPass &) const;
void addCodeGenPrepare(AddIRPass &) const;
void addPreISel(AddIRPass &addPass) const;
+ void addILPOpts(AddMachinePass &) const;
void addAsmPrinter(AddMachinePass &, CreateMCStreamer) const;
Error addInstSelector(AddMachinePass &) const;
``````````
</details>
https://github.com/llvm/llvm-project/pull/108514
More information about the llvm-branch-commits
mailing list