[llvm] [X86] Add missing pass initialization function for X86DynAllocaExpander. (PR #106820)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 19:51:55 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-x86
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
This allows it to show up in -print-before/after-all
---
Full diff: https://github.com/llvm/llvm-project/pull/106820.diff
3 Files Affected:
- (modified) llvm/lib/Target/X86/X86.h (+1)
- (modified) llvm/lib/Target/X86/X86DynAllocaExpander.cpp (+5)
- (modified) llvm/lib/Target/X86/X86TargetMachine.cpp (+1)
``````````diff
diff --git a/llvm/lib/Target/X86/X86.h b/llvm/lib/Target/X86/X86.h
index 3d7a322d392f7f..054ff64f7796bc 100644
--- a/llvm/lib/Target/X86/X86.h
+++ b/llvm/lib/Target/X86/X86.h
@@ -184,6 +184,7 @@ void initializeX86CallFrameOptimizationPass(PassRegistry &);
void initializeX86CmovConverterPassPass(PassRegistry &);
void initializeX86DAGToDAGISelLegacyPass(PassRegistry &);
void initializeX86DomainReassignmentPass(PassRegistry &);
+void initializeX86DynAllocaExpanderPass(PassRegistry &);
void initializeX86ExecutionDomainFixPass(PassRegistry &);
void initializeX86ExpandPseudoPass(PassRegistry &);
void initializeX86FastPreTileConfigPass(PassRegistry &);
diff --git a/llvm/lib/Target/X86/X86DynAllocaExpander.cpp b/llvm/lib/Target/X86/X86DynAllocaExpander.cpp
index 5ed94f329c4b4c..fc48055b2fac73 100644
--- a/llvm/lib/Target/X86/X86DynAllocaExpander.cpp
+++ b/llvm/lib/Target/X86/X86DynAllocaExpander.cpp
@@ -65,6 +65,8 @@ class X86DynAllocaExpander : public MachineFunctionPass {
bool NoStackArgProbe = false;
StringRef getPassName() const override { return "X86 DynAlloca Expander"; }
+
+public:
static char ID;
};
@@ -72,6 +74,9 @@ char X86DynAllocaExpander::ID = 0;
} // end anonymous namespace
+INITIALIZE_PASS(X86DynAllocaExpander, "x86-dyn-alloca-expander",
+ "X86 DynAlloca Expander", false, false)
+
FunctionPass *llvm::createX86DynAllocaExpander() {
return new X86DynAllocaExpander();
}
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index d2d59ff3b93cf2..fc2a1e34b711ef 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -106,6 +106,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Target() {
initializeX86ArgumentStackSlotPassPass(PR);
initializeX86FixupInstTuningPassPass(PR);
initializeX86FixupVectorConstantsPassPass(PR);
+ initializeX86DynAllocaExpanderPass(PR);
}
static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/106820
More information about the llvm-commits
mailing list