[llvm] [CodeGen][X86] Remove Expensive option copy and delete copy assignment (PR #85187)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 23:43:08 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: None (mahesh-attarde)
<details>
<summary>Changes</summary>
Remove Expensive option copy and delete copy assignment
---
Full diff: https://github.com/llvm/llvm-project/pull/85187.diff
4 Files Affected:
- (modified) llvm/include/llvm/CodeGen/MachinePassManager.h (+2)
- (modified) llvm/include/llvm/Target/TargetMachine.h (+1-1)
- (modified) llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp (+1-1)
- (modified) llvm/lib/Target/X86/X86TargetMachine.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/CodeGen/MachinePassManager.h b/llvm/include/llvm/CodeGen/MachinePassManager.h
index 7713c55661ccc1..9f842a3a8f1ef7 100644
--- a/llvm/include/llvm/CodeGen/MachinePassManager.h
+++ b/llvm/include/llvm/CodeGen/MachinePassManager.h
@@ -72,6 +72,8 @@ template <typename PassT> struct MachinePassModel : MachinePassConcept {
return *this;
}
+ MachinePassModel &operator=(const MachinePassModel &) = delete;
+
PreservedAnalyses run(MachineFunction &IR,
MachineFunctionAnalysisManager &AM) override {
return Pass.run(IR, AM);
diff --git a/llvm/include/llvm/Target/TargetMachine.h b/llvm/include/llvm/Target/TargetMachine.h
index 37df9589e30d66..ceb371bdc73480 100644
--- a/llvm/include/llvm/Target/TargetMachine.h
+++ b/llvm/include/llvm/Target/TargetMachine.h
@@ -455,7 +455,7 @@ class LLVMTargetMachine : public TargetMachine {
virtual Error buildCodeGenPipeline(ModulePassManager &, raw_pwrite_stream &,
raw_pwrite_stream *, CodeGenFileType,
- CGPassBuilderOption,
+ const CGPassBuilderOption &,
PassInstrumentationCallbacks *) {
return make_error<StringError>("buildCodeGenPipeline is not overridden",
inconvertibleErrorCode());
diff --git a/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp b/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
index 6ef28b373cc931..453754381034e3 100644
--- a/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
+++ b/llvm/lib/Target/X86/X86CodeGenPassBuilder.cpp
@@ -48,7 +48,7 @@ Error X86CodeGenPassBuilder::addInstSelector(AddMachinePass &) const {
Error X86TargetMachine::buildCodeGenPipeline(
ModulePassManager &MPM, raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
- CodeGenFileType FileType, CGPassBuilderOption Opt,
+ CodeGenFileType FileType, const CGPassBuilderOption &Opt,
PassInstrumentationCallbacks *PIC) {
auto CGPB = X86CodeGenPassBuilder(*this, Opt, PIC);
return CGPB.buildPipeline(MPM, Out, DwoOut, FileType);
diff --git a/llvm/lib/Target/X86/X86TargetMachine.h b/llvm/lib/Target/X86/X86TargetMachine.h
index 0fd3e47aaefe7e..4e7ded16729d07 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.h
+++ b/llvm/lib/Target/X86/X86TargetMachine.h
@@ -60,7 +60,7 @@ class X86TargetMachine final : public LLVMTargetMachine {
Error buildCodeGenPipeline(ModulePassManager &, raw_pwrite_stream &,
raw_pwrite_stream *, CodeGenFileType,
- CGPassBuilderOption,
+ const CGPassBuilderOption &,
PassInstrumentationCallbacks *) override;
bool isJIT() const { return IsJIT; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/85187
More information about the llvm-commits
mailing list