Skip to content

Commit

Permalink
[NewPassManager] Pass the -fdebug-pass-manager flag setting into the …
Browse files Browse the repository at this point in the history
…Analysis managers to match what we do in opt

Summary: Currently the -fdebug-pass-manager flag for clang doesn't enable the debug logging in the analysis managers. This is different than what the switch does when passed to opt.

Reviewers: chandlerc

Reviewed By: chandlerc

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D40007

llvm-svn: 318140
  • Loading branch information
topperc committed Nov 14, 2017
1 parent 5fe3b4b commit 926b95c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clang/lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,10 +867,10 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(

PassBuilder PB(TM.get(), PGOOpt);

LoopAnalysisManager LAM;
FunctionAnalysisManager FAM;
CGSCCAnalysisManager CGAM;
ModuleAnalysisManager MAM;
LoopAnalysisManager LAM(CodeGenOpts.DebugPassManager);
FunctionAnalysisManager FAM(CodeGenOpts.DebugPassManager);
CGSCCAnalysisManager CGAM(CodeGenOpts.DebugPassManager);
ModuleAnalysisManager MAM(CodeGenOpts.DebugPassManager);

// Register the AA manager first so that our version is the one used.
FAM.registerPass([&] { return PB.buildDefaultAAPipeline(); });
Expand Down

0 comments on commit 926b95c

Please sign in to comment.