Skip to content

Commit e7636b1

Browse files
authored
[NewPM] Update CodeGenPreparePass reference in CodeGenPassBuilder.h (#77446)
Reland #77054.
1 parent 62b30e7 commit e7636b1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

llvm/include/llvm/CodeGen/CodeGenPassBuilder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "llvm/Analysis/TargetTransformInfo.h"
2525
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
2626
#include "llvm/CodeGen/CallBrPrepare.h"
27+
#include "llvm/CodeGen/CodeGenPrepare.h"
2728
#include "llvm/CodeGen/DwarfEHPrepare.h"
2829
#include "llvm/CodeGen/ExpandMemCmp.h"
2930
#include "llvm/CodeGen/ExpandReductions.h"
@@ -735,7 +736,7 @@ void CodeGenPassBuilder<Derived>::addPassesToHandleExceptions(
735736
template <typename Derived>
736737
void CodeGenPassBuilder<Derived>::addCodeGenPrepare(AddIRPass &addPass) const {
737738
if (getOptLevel() != CodeGenOptLevel::None && !Opt.DisableCGP)
738-
addPass(CodeGenPreparePass());
739+
addPass(CodeGenPreparePass(&TM));
739740
// TODO: Default ctor'd RewriteSymbolPass is no-op.
740741
// addPass(RewriteSymbolPass());
741742
}

llvm/include/llvm/CodeGen/MachinePassRegistry.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ FUNCTION_ANALYSIS("targetir", TargetIRAnalysis,
4444
#endif
4545
FUNCTION_PASS("callbrprepare", CallBrPreparePass, ())
4646
FUNCTION_PASS("cfguard", CFGuardPass, ())
47+
FUNCTION_PASS("codegenprepare", CodeGenPreparePass, (TM))
4748
FUNCTION_PASS("consthoist", ConstantHoistingPass, ())
4849
FUNCTION_PASS("dwarf-eh-prepare", DwarfEHPreparePass, (TM))
4950
FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass, (false))
@@ -135,7 +136,6 @@ MACHINE_FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis,
135136
#define DUMMY_FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
136137
#endif
137138
DUMMY_FUNCTION_PASS("atomic-expand", AtomicExpandPass, ())
138-
DUMMY_FUNCTION_PASS("codegenprepare", CodeGenPreparePass, ())
139139
#undef DUMMY_FUNCTION_PASS
140140

141141
#ifndef DUMMY_MACHINE_MODULE_PASS

0 commit comments

Comments
 (0)