Skip to content

Commit 35bc4ac

Browse files
committed
Closes #27
1 parent af4c0cb commit 35bc4ac

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

llvm/lib/Transforms/Scalar/GVN.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,6 +2692,9 @@ bool GVNPass::runImpl(Function &F, AssumptionCache &RunAC, DominatorTree &RunDT,
26922692
const TargetLibraryInfo &RunTLI, AAResults &RunAA,
26932693
MemoryDependenceResults *RunMD, LoopInfo *LI,
26942694
OptimizationRemarkEmitter *RunORE, MemorySSA *MSSA) {
2695+
if (F.hasSEH() || F.hasCXXSEH())
2696+
return false;
2697+
26952698
AC = &RunAC;
26962699
DT = &RunDT;
26972700
VN.setDomTree(DT);

llvm/lib/Transforms/Scalar/SROA.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5070,6 +5070,9 @@ bool SROAPass::promoteAllocas(Function &F) {
50705070

50715071
PreservedAnalyses SROAPass::runImpl(Function &F, DomTreeUpdater &RunDTU,
50725072
AssumptionCache &RunAC) {
5073+
if (F.hasSEH() || F.hasCXXSEH())
5074+
return PreservedAnalyses::all();
5075+
50735076
LLVM_DEBUG(dbgs() << "SROA function: " << F.getName() << "\n");
50745077
C = &F.getContext();
50755078
DTU = &RunDTU;

llvm/lib/Transforms/Utils/Mem2Reg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ STATISTIC(NumPromoted, "Number of alloca's promoted");
3434

3535
static bool promoteMemoryToRegister(Function &F, DominatorTree &DT,
3636
AssumptionCache &AC) {
37+
if (F.hasSEH() || F.hasCXXSEH())
38+
return false;
39+
3740
std::vector<AllocaInst *> Allocas;
3841
BasicBlock &BB = F.getEntryBlock(); // Get the entry node for the function
3942
bool Changed = false;

0 commit comments

Comments
 (0)