[llvm] 49aa255 - [X86] Add missing pass initialization function for X86DynAllocaExpander. (#106820)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 31 00:59:25 PDT 2024
Author: Craig Topper
Date: 2024-08-31T00:59:21-07:00
New Revision: 49aa255009f6096b055dab4b4dd31ffa5403b750
URL: https://github.com/llvm/llvm-project/commit/49aa255009f6096b055dab4b4dd31ffa5403b750
DIFF: https://github.com/llvm/llvm-project/commit/49aa255009f6096b055dab4b4dd31ffa5403b750.diff
LOG: [X86] Add missing pass initialization function for X86DynAllocaExpander. (#106820)
This allows it to show up in -print-before/after-all
Added:
Modified:
llvm/lib/Target/X86/X86.h
llvm/lib/Target/X86/X86DynAllocaExpander.cpp
llvm/lib/Target/X86/X86TargetMachine.cpp
Removed:
################################################################################
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) {
More information about the llvm-commits
mailing list