Skip to content

[CodeGen][X86] Remove Expensive option copy and delete copy assignment #85187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 14, 2024

Conversation

mahesh-attarde
Copy link
Contributor

Remove Expensive option copy and delete copy assignment

@llvmbot
Copy link
Member

llvmbot commented Mar 14, 2024

@llvm/pr-subscribers-backend-x86

Author: None (mahesh-attarde)

Changes

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 --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; }

Copy link
Contributor

@phoebewang phoebewang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Collaborator

@RKSimon RKSimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@phoebewang phoebewang merged commit 9e00405 into llvm:main Mar 14, 2024
lelouch-17 added a commit to lelouch-17/llvm-project that referenced this pull request Mar 19, 2024
lelouch-17 added a commit to lelouch-17/llvm-project that referenced this pull request Jun 26, 2024
commit fcbf707
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 08:18:46 2024 +0000

    rewrite constructors

commit 798776d
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 08:12:55 2024 +0000

    FIX const methods

commit fe81aa6
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 07:13:32 2024 +0000

    Clean amdgpu.def

commit 636f138
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 07:04:29 2024 +0000

    Fixed Targetmachine.h

commit 3ac8b58
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 06:57:33 2024 +0000

    fixing .def files

commit 57a8188
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 06:36:56 2024 +0000

    Removed Errors

commit 336842f
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 26 05:45:46 2024 +0000

    Working-2

commit df12ea4
Merge: ca75a4a db03d9d
Author: Nishant Mohan <[email protected]>
Date:   Fri Jun 21 08:24:13 2024 +0000

    Merge branch 'main' into nwork

commit ca75a4a
Author: Nikita Popov <[email protected]>
Date:   Tue Apr 23 12:33:48 2024 +0900

    [SimplifyCFG] Add tests for llvm#89672 (NFC)

commit 2689981
Author: Nishant Mohan <[email protected]>
Date:   Tue Jun 18 05:27:45 2024 +0000

    WORKABLE-1

commit 313dd50
Merge: d54898f 76030dc
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 12 08:55:10 2024 +0000

    Merge branch 'main' into nwork

commit d54898f
Author: Nishant Mohan <[email protected]>
Date:   Wed Jun 12 05:21:37 2024 +0000

    Add to AMDGPURegistry

commit 9dcab82
Author: Nishant Mohan <[email protected]>
Date:   Mon Jun 3 00:03:59 2024 +0000

    temp-changes

commit cfeefab
Author: Nishant Mohan <[email protected]>
Date:   Wed Apr 24 07:53:48 2024 +0000

    Added Passes

commit 86e6763
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 18 09:01:30 2024 +0000

    Missing char

commit 3934c24
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 18 08:56:56 2024 +0000

    Added regAssignement methods

commit 25bfc66
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 18 08:55:47 2024 +0000

    Removed AtomicExpandPass temporarily

commit 3b85c5b
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 18 08:53:54 2024 +0000

    Removed Namespace and PassRegistry callbacks

commit 56c4145
Author: Nishant Mohan <[email protected]>
Date:   Tue Apr 16 09:12:45 2024 +0000

    Refactor AMDGPUCGPB

commit fa92e5e
Merge: edfd8e1 6b80e2f
Author: Nishant Mohan <[email protected]>
Date:   Mon Apr 15 05:38:48 2024 +0000

    Merge branch 'main' into nwork

commit edfd8e1
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 4 10:12:54 2024 +0000

    add addPreLegalizeMachineIR

commit bab134a
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 4 10:03:15 2024 +0000

    add addInstSelector

commit 8c4e366
Author: Nishant Mohan <[email protected]>
Date:   Thu Apr 4 09:07:12 2024 +0000

    Revert 989b86d

commit 4dca429
Author: Nishant Mohan <[email protected]>
Date:   Fri Mar 22 11:26:45 2024 +0000

    Rewriting AMDGPU CGPB - p1

commit c19dc64
Author: Nishant Mohan <[email protected]>
Date:   Tue Mar 19 11:36:13 2024 +0000

    Refactor AMDGPUcodegenPassBuilder.cpp

commit 3094f28
Author: Nishant Mohan <[email protected]>
Date:   Tue Mar 19 09:25:44 2024 +0000

    Based on (llvm#85187)

commit 92a9d40
Merge: 5f264a7 e04dd68
Author: Nishant Mohan <[email protected]>
Date:   Tue Mar 19 11:04:39 2024 +0530

    Merge branch 'llvm:main' into nwork

commit 5f264a7
Author: Nishant Mohan <[email protected]>
Date:   Fri Mar 15 05:55:26 2024 +0000

    Move 2 methods from generic infra to AMDGPU specific

commit a695eaa
Author: Nishant Mohan <[email protected]>
Date:   Wed Mar 13 05:12:22 2024 +0000

    Revert "Updated MachinePassReg and added some passes"

    This reverts commit 5290f20.

commit 1e6bb9a
Merge: 76ef065 297af06
Author: Nishant Mohan <[email protected]>
Date:   Fri Mar 15 11:21:33 2024 +0530

    Merge branch 'llvm:main' into nwork

commit 76ef065
Merge: 0a4b0a0 d8d2dea
Author: Nishant Mohan <[email protected]>
Date:   Mon Mar 11 11:01:09 2024 +0530

    Merge branch 'llvm:main' into nwork

commit 0a4b0a0
Author: Nishant Mohan <[email protected]>
Date:   Thu Mar 7 08:37:17 2024 +0000

    Added AMDGPU npm-pipeline test

commit 011cafc
Author: Nishant Mohan <[email protected]>
Date:   Thu Mar 7 06:39:59 2024 +0000

    Enabled CLI optns

commit 4f3d462
Merge: 989b86d 4067115
Author: Nishant Mohan <[email protected]>
Date:   Thu Mar 7 11:06:30 2024 +0530

    Merge branch 'llvm:main' into nwork

commit 989b86d
Author: Nishant Mohan <[email protected]>
Date:   Mon Mar 4 05:37:00 2024 +0000

    Rm some Passes in the pipeline

commit fd51659
Merge: 11a09f9 e6e53ca
Author: Nishant Mohan <[email protected]>
Date:   Mon Mar 4 11:01:41 2024 +0530

    Merge branch 'llvm:main' into nwork

commit 11a09f9
Author: Nishant Mohan <[email protected]>
Date:   Fri Mar 1 13:57:44 2024 +0000

    Rough Pipeline (error prone)

commit 5290f20
Author: Nishant Mohan <[email protected]>
Date:   Fri Mar 1 12:11:37 2024 +0000

    Updated MachinePassReg and added some passes

commit 9086214
Author: Nishant Mohan <[email protected]>
Date:   Thu Feb 29 13:03:11 2024 +0000

    Changed Static to extern (cli options)

commit 9336625
Merge: f9851a4 38a1b98
Author: Nishant Mohan <[email protected]>
Date:   Thu Feb 29 11:04:06 2024 +0000

    Merge remote-tracking branch 'refs/remotes/origin/nwork' into nwork

commit 38a1b98
Merge: 01a5603 ee297a7
Author: Nishant Mohan <[email protected]>
Date:   Thu Feb 29 16:32:52 2024 +0530

    Merge branch 'llvm:main' into nwork

commit f9851a4
Author: Nishant Mohan <[email protected]>
Date:   Thu Feb 29 10:55:56 2024 +0000

    AMDGPU stub

commit 831220a
Merge: 01a5603 87c0260
Author: Nishant Mohan <[email protected]>
Date:   Wed Feb 28 04:59:25 2024 +0000

    Merge branch 'main' into nwork

commit 01a5603
Author: Nishant Mohan <[email protected]>
Date:   Fri Feb 23 12:22:47 2024 +0000

    Reverted

commit b20aacf
Author: Nishant Mohan <[email protected]>
Date:   Fri Feb 23 12:19:17 2024 +0000

    Added a file
@mahesh-attarde mahesh-attarde deleted the CMPLRLLVM-56859V2 branch November 8, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants