kinu created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. kinu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
It looks like keeping this false could end up with extra iterations on a lot of loops that aren't real ones (e.g. they could be a do-while-false for macros). This patch changes the default for CFG::BuildOptions.PruneTriviallyFalseEdges to true to avoid it. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D149640 Files: clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp Index: clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp +++ clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp @@ -70,7 +70,7 @@ llvm::Expected<ControlFlowContext> ControlFlowContext::build(const Decl *D, Stmt &S, ASTContext &C) { CFG::BuildOptions Options; - Options.PruneTriviallyFalseEdges = false; + Options.PruneTriviallyFalseEdges = true; Options.AddImplicitDtors = true; Options.AddTemporaryDtors = true; Options.AddInitializers = true;
Index: clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp +++ clang/lib/Analysis/FlowSensitive/ControlFlowContext.cpp @@ -70,7 +70,7 @@ llvm::Expected<ControlFlowContext> ControlFlowContext::build(const Decl *D, Stmt &S, ASTContext &C) { CFG::BuildOptions Options; - Options.PruneTriviallyFalseEdges = false; + Options.PruneTriviallyFalseEdges = true; Options.AddImplicitDtors = true; Options.AddTemporaryDtors = true; Options.AddInitializers = true;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits