[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-16 Thread Mircea Trofin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7acfda633f13: [llvm] Make new pass manager's OptimizationLevel a class (authored by mtrofin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72547/new/ https

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-15 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM One thing to consider changing/removing in the summary is this comment: "For example, (enum) "Level > 1" captures not only O2 and O3

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-15 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin updated this revision to Diff 238352. mtrofin marked 4 inline comments as done. mtrofin added a comment. Herald added a subscriber: zzheng. Incorporated feedback: - tests - updated patch description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Overall I like this approach. Comment at: llvm/lib/Passes/PassBuilder.cpp:246 -static bool isOptimizingForSize(PassBuilder::OptimizationLevel Level) { - switch (Level) { - case PassBuilder::O0: - case PassBuilder::O1: - case PassBuilder::O2: -

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-14 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin updated this revision to Diff 238107. mtrofin marked 2 inline comments as done. mtrofin added a comment. Alternative: expose speedup/size components to more closely align with legacy PM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72547/new

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-10 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. I just have a few high level comments from looking through it just now. The summary needs a fix since Os/Oz are in fact O2 so OptLevel > 1 was not doing the wrong thing. Comment at: llvm/include/llvm/Pas

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-10 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin updated this revision to Diff 237464. mtrofin added a comment. Speedup level is actually '2' for Os and Oz Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72547/new/ https://reviews.llvm.org/D72547 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-10 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin added a comment. Another example where there is a discrepancy with the old pass manager: in the old pass manager (PassManagerBuilder::addFunctionSimplificationPasses): if (OptLevel > 1) { if (EnableGVNHoist) MPM.add(createGVNHoistPass()); (before this change, new pass ma

[PATCH] D72547: [llvm] Make new pass manager's OptimizationLevel a class

2020-01-10 Thread Mircea Trofin via Phabricator via cfe-commits
mtrofin created this revision. Herald added subscribers: llvm-commits, cfe-commits, dang, dexonsmith, steven_wu, hiraditya, mehdi_amini. Herald added projects: clang, LLVM. mtrofin added reviewers: tejohnson, davidxl. mtrofin added a comment. Another example where there is a discrepancy with the