From bdbe302c3396ceb4dd89d1214485439598f05368 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2023 21:30:12 +0100 Subject: Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb. PR: 276104 MFC after: 1 month (cherry picked from commit 5f757f3ff9144b609b3c433dfd370cc6bdc191ad) --- contrib/llvm-project/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'contrib/llvm-project/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp') diff --git a/contrib/llvm-project/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp b/contrib/llvm-project/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp index 8c781f59ff5a..2f37f7f972cb 100644 --- a/contrib/llvm-project/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp +++ b/contrib/llvm-project/llvm/lib/Transforms/Utils/UnifyLoopExits.cpp @@ -44,10 +44,8 @@ struct UnifyLoopExitsLegacyPass : public FunctionPass { } void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequiredID(LowerSwitchID); AU.addRequired(); AU.addRequired(); - AU.addPreservedID(LowerSwitchID); AU.addPreserved(); AU.addPreserved(); } @@ -65,7 +63,6 @@ FunctionPass *llvm::createUnifyLoopExitsPass() { INITIALIZE_PASS_BEGIN(UnifyLoopExitsLegacyPass, "unify-loop-exits", "Fixup each natural loop to have a single exit block", false /* Only looks at CFG */, false /* Analysis Pass */) -INITIALIZE_PASS_DEPENDENCY(LowerSwitchLegacyPass) INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass) INITIALIZE_PASS_END(UnifyLoopExitsLegacyPass, "unify-loop-exits", @@ -234,6 +231,8 @@ bool UnifyLoopExitsLegacyPass::runOnFunction(Function &F) { auto &LI = getAnalysis().getLoopInfo(); auto &DT = getAnalysis().getDomTree(); + assert(hasOnlySimpleTerminator(F) && "Unsupported block terminator."); + return runImpl(LI, DT); } -- cgit v1.2.3