Skip to content

Commit 73113f2

Browse files
committed
[CodeGen] Update DwarfEHPreparePass references in CodeGenPassBuilder.h
1 parent 4a4804b commit 73113f2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

llvm/include/llvm/CodeGen/CodeGenPassBuilder.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "llvm/Analysis/TargetTransformInfo.h"
2424
#include "llvm/Analysis/TypeBasedAliasAnalysis.h"
2525
#include "llvm/CodeGen/CallBrPrepare.h"
26+
#include "llvm/CodeGen/DwarfEHPrepare.h"
2627
#include "llvm/CodeGen/ExpandReductions.h"
2728
#include "llvm/CodeGen/MachinePassManager.h"
2829
#include "llvm/CodeGen/PreISelIntrinsicLowering.h"
@@ -677,14 +678,14 @@ void CodeGenPassBuilder<Derived>::addPassesToHandleExceptions(
677678
case ExceptionHandling::DwarfCFI:
678679
case ExceptionHandling::ARM:
679680
case ExceptionHandling::AIX:
680-
addPass(DwarfEHPass(getOptLevel()));
681+
addPass(DwarfEHPreparePass(&TM));
681682
break;
682683
case ExceptionHandling::WinEH:
683684
// We support using both GCC-style and MSVC-style exceptions on Windows, so
684685
// add both preparation passes. Each pass will only actually run if it
685686
// recognizes the personality function.
686687
addPass(WinEHPreparePass());
687-
addPass(DwarfEHPass(getOptLevel()));
688+
addPass(DwarfEHPreparePass(&TM));
688689
break;
689690
case ExceptionHandling::Wasm:
690691
// Wasm EH uses Windows EH instructions, but it does not need to demote PHIs

llvm/include/llvm/CodeGen/MachinePassRegistry.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ FUNCTION_ANALYSIS("targetir", TargetIRAnalysis,
3838
#endif
3939
FUNCTION_PASS("callbrprepare", CallBrPreparePass, ())
4040
FUNCTION_PASS("consthoist", ConstantHoistingPass, ())
41+
FUNCTION_PASS("dwarfehprepare", DwarfEHPreparePass, (TM))
4142
FUNCTION_PASS("ee-instrument", EntryExitInstrumenterPass, (false))
4243
FUNCTION_PASS("expand-large-div-rem", ExpandLargeDivRemPass, ())
4344
FUNCTION_PASS("expand-large-fp-convert", ExpandLargeFpConvertPass, ())
@@ -122,7 +123,6 @@ DUMMY_FUNCTION_PASS("atomic-expand", AtomicExpandPass, ())
122123
DUMMY_FUNCTION_PASS("cfguard-check", CFGuardCheckPass, ())
123124
DUMMY_FUNCTION_PASS("cfguard-dispatch", CFGuardDispatchPass, ())
124125
DUMMY_FUNCTION_PASS("codegenprepare", CodeGenPreparePass, ())
125-
DUMMY_FUNCTION_PASS("dwarfehprepare", DwarfEHPass, ())
126126
DUMMY_FUNCTION_PASS("expandmemcmp", ExpandMemCmpPass, ())
127127
DUMMY_FUNCTION_PASS("gc-info-printer", GCInfoPrinterPass, ())
128128
DUMMY_FUNCTION_PASS("gc-lowering", GCLoweringPass, ())

0 commit comments

Comments
 (0)