[PATCH] D90870: [NFC][NewPM] Reuse PassBuilder callbacks with -O0

2020-11-05 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 303207. aeubanks added a comment. small cleanups Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90870/new/ https://reviews.llvm.org/D90870 Files: clang/lib/CodeGen/BackendUtil.cpp Index: clang/lib/CodeGen/B

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-07 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. Sorry about that, https://reviews.llvm.org/D91019 should fix it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 ___ cfe-commits mailing

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-08 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks reopened this revision. aeubanks added a comment. This revision is now accepted and ready to land. need to fix new-pass-manager.ll when polly is enabled Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D891

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-08 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 303737. aeubanks added a comment. Herald added a subscriber: dexonsmith. check if pass manager is empty before adding Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 F

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-09 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. Are there passes that should be running at -O0 that aren't target specific? Otherwise the callbacks should only add passes if the optimization level isn't -O0. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ htt

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-09 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D89158#2384337 , @Meinersbur wrote: > In D89158#2384156 , @aeubanks wrote: > >> Are there passes that should be running at -O0 that aren't target specific? >> Otherwise the callbacks sh

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-09 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. With this change in its current state, it's ok to add callbacks, as long as they don't add passes at -O0. Polly adds some callbacks. When I first submitted this, polly would add some callbacks to VectorizerStartEPCallbacks. Those callbacks didn't actually add any passe

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-11 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 304617. aeubanks added a comment. fix tests when Bye plugin is present Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 Files: clang/lib/CodeGen/BackendUtil.cpp cla

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-11 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D89158#2388991 , @Meinersbur wrote: > Could you try configuring LLVM with `-DLLVM_BYE_LINK_INTO_TOOLS=ON`? I assume > the test will break because it unconditionally adds a FunctionPass. Thanks, I wasn't aware of this. Looks l

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-11 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 304657. aeubanks added a comment. forgot to amend commit with test updates Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-11-11 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb6ccff3d5f3b: [NewPM] Provide method to run all pipeline callbacks, used for -O0 (authored by aeubanks). Repository: rG LLVM Github Monorepo CHAN

[PATCH] D90870: [NFC][NewPM] Reuse PassBuilder callbacks with -O0

2020-11-12 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3a7b57b7cad3: [NFC][NewPM] Reuse PassBuilder callbacks with -O0 (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D91385: [DFSan][NewPM] Handle dfsan under NPM

2020-11-12 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: ychen, leonardchan, asbirlea. Herald added a project: clang. Herald added a subscriber: cfe-commits. aeubanks requested review of this revision. 14/16 check-dfsan tests failed with NPM enabled, now all pass. Repository: rG LLVM Github M

[PATCH] D91389: [MemProf][NewPM] Make memprof passes required

2020-11-12 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: leonardchan, ychen, asbirlea. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. aeubanks requested review of this revision. Just like other sanitizers. Fixes check-memprof under NPM. Repository: rG

[PATCH] D91385: [DFSan][NewPM] Handle dfsan under NPM

2020-11-12 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 304967. aeubanks added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. make it required, update tests to also use opt-bisect Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91385

[PATCH] D91385: [DFSan][NewPM] Handle dfsan under NPM

2020-11-13 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6e098189db7d: [DFSan][NewPM] Handle dfsan under NPM (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D91389: [MemProf][NewPM] Make memprof passes required

2020-11-13 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG52f05fb2c2c3: [MemProf][NewPM] Make memprof passes required (authored by aeubanks). Changed prior to commit: https://reviews.llvm.org/D91389?vs=30

[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch

2020-11-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/test/Transforms/Inline/inline_nossp.ll:3 +; RUN: opt -passes='cgscc(inline)' %s -S | FileCheck %s +; RUN: opt -always-inline -o - -S %s | FileCheck %s + This test fails with the NPM, `opt -passes=always-inline ...`

[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch

2020-11-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/test/Transforms/Inline/inline_nossp.ll:3 +; RUN: opt -passes='cgscc(inline)' %s -S | FileCheck %s +; RUN: opt -always-inline -o - -S %s | FileCheck %s + nickdesaulniers wrote: > aeubanks wrote: > > This test fails

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: ychen, asbirlea, tejohnson. Herald added subscribers: llvm-commits, cfe-commits, wenlei, lxfind, steven_wu, modocache, JDevlieghere, hiraditya. Herald added projects: clang, LLVM. aeubanks requested review of this revision. This moves hand

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. What about removing the existing AlwaysInlinerPass and replacing it with this one? Or is that something you were planning to do in a follow-up change? > open the opportunity to help the full inliner by performing additional > function passes after the mandatory inlinin

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:2365 + // Don't do anything for (thin)lto backend compiles at O0. + if (Matches[1] != "thinlto" && Matches[1] != "lto") +MPM.addPass(buildO0DefaultPipeline(L, Matches[1] != "default"));

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks planned changes to this revision. aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:2365 + // Don't do anything for (thin)lto backend compiles at O0. + if (Matches[1] != "thinlto" && Matches[1] != "lto") +MPM.addPass(buildO0Def

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 305900. aeubanks added a comment. make build(Thin)LTODefaultPipeline handle O0 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91585/new/ https://reviews.llvm.org/D91585 Files: clang/lib/CodeGen/BackendUtil.c

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D91567#2400699 , @mtrofin wrote: > In D91567#2400207 , @aeubanks wrote: > >> What about removing the existing AlwaysInlinerPass and replacing it with >> this one? Or is that something y

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. >> I'll run this through llvm-compile-time-tracker to see what the compile time >> implications are. > > You mean for the variant where we ran some of the function passes, or you'd > try running all of them? Probably the latter would be quite interesting as a > 'worst

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. One thing that would be nice would be to have both inliners in the same CGSCC pass manager to avoid doing SCC construction twice, but that would require some shuffling of module/cgscc passes in ModuleInlinerWrapperPass. Maybe as a future cleanup. Repository: rG LLV

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D91567#2403252 , @mtrofin wrote: > In D91567#2403236 , @aeubanks wrote: > >> One thing that would be nice would be to have both inliners in the same >> CGSCC pass manager to avoid doing

[PATCH] D91743: [NPM] Remove -enable-npm-optnone flag

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: asbirlea, ychen. Herald added subscribers: llvm-commits, cfe-commits, jfb, hiraditya. Herald added projects: clang, LLVM. aeubanks requested review of this revision. It has been on by default for a couple months without complaint. Reposit

[PATCH] D91743: [NPM] Remove -enable-npm-optnone flag

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG67f16e9e91f2: [NPM] Remove -enable-npm-optnone flag (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 306307. aeubanks added a comment. rebase now we don't add a new parameter to callbacks, instead let individual instrumentations ask PassInstrumentationCallbacks for pass names Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-11-18 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D87216#2356770 , @jamieschmeiser wrote: > The changes are specific to -print-before and -print-after (which is the > intended target and this work originated before -print-changed) but could the > change be made universal?

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-19 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 306448. aeubanks added a comment. check 'thinlto-pre-link'/'lto-pre-link' explicitly add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91585/new/ https://reviews.llvm.org/D91585 Files: clang/lib/CodeGe

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-19 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks marked an inline comment as done. aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:2365 + // Don't do anything for (thin)lto backend compiles at O0. + if (Matches[1] != "thinlto" && Matches[1] != "lto") +MPM.addPass(buildO0Def

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-19 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 306473. aeubanks added a comment. change strings to check for Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91585/new/ https://reviews.llvm.org/D91585 Files: clang/lib/CodeGen/BackendUtil.cpp llvm/include

[PATCH] D91585: [NPM] Move more O0 pass building into PassBuilder

2020-11-19 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG72badbcdccd1: [NPM] Move more O0 pass building into PassBuilder (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D88138: [NPM] Add target specific hook to add passes for New Pass Manager

2020-09-30 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGce5379f0f067: [NPM] Add target specific hook to add passes for New Pass Manager (authored by aeubanks). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github

[PATCH] D88138: [NPM] Add target specific hook to add passes for New Pass Manager

2020-09-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D88138#2304243 , @quic_aankit wrote: > @aeubanks Thanks for the review. Can you also commit the patch on my behalf? Committed in ce5379f0f0675592fd10a522009fd5b1561ca72b

[PATCH] D88936: [HWAsan][NewPM] Handle hwasan like other sanitizers

2020-10-06 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. aeubanks requested review of this revision. Move it as an EP callback (-O[123]) or in addSanitizersAtO0. This makes it not run in ThinLTO pre-link (like the other sanitizers), so don'

[PATCH] D88936: [HWAsan][NewPM] Handle hwasan like other sanitizers

2020-10-08 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. diff for hwasan + -O1: 14a15 > @__hwasan_shadow = external global [0 x i8] 72a74,109 > declare void @__hwasan_loadN(i64, i64) > > declare void @__hwasan_load1(i64) > > declare void @__hwasan_load2(i64) > > declare void @__hwasan_load4(i64) > > declare void @__hwasan_l

[PATCH] D88936: [HWAsan][NewPM] Handle hwasan like other sanitizers

2020-10-08 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGafff74e5c26f: [HWAsan][NewPM] Handle hwasan like other sanitizers (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88936/new/ https://r

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-09 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. aeubanks requested review of this revision. Some targets may add required passes via TargetMachine::registerPassBuilderCallbacks(). We need to run those even under -O

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. I've also been seeing some failures on phab reviews, e.g. https://reviews.llvm.org/D89188. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88666/new/ https://reviews.llvm.org/D88666

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-11-24 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: llvm-commits, cfe-commits, mgorny. Herald added projects: clang, LLVM. aeubanks requested review of this revision. This allows us to use its value everywhere, rather than just llvm. Some other places, like opt and lld, will use its value so

[PATCH] D91567: [llvm][inliner] Reuse the inliner pass to implement 'always inliner'

2020-11-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks accepted this revision. aeubanks added a comment. This revision is now accepted and ready to land. aside from some nits, lgtm thanks for doing this! Comment at: clang/test/Frontend/optimization-remark-line-directive.c:5 -// RUN: %clang_cc1 %s -Rpass=inline -debug-inf

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-11-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D92072#2425025 , @hans wrote: > Seems like a good idea to me. > > From the change description: > >> This allows us to use its value everywhere, rather than just llvm. > > Do you mean rather than just clang? Whoops, yup. ===

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 308713. aeubanks added a comment. Herald added a subscriber: dang. rename to LLVM_ENABLE_NEW_PASS_MANAGER Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92072/new/ https://reviews.llvm.org/D92072 Files: clan

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa36bd4c90dcc: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/ (authored by aeubanks). Repository: rG LLVM Github Monorepo CHA

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D92072#2426511 , @nikic wrote: > It looks like this change has also enabled the new pass manager by default. Whoops, I'll revert and see what went wrong. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 308761. aeubanks added a comment. set LLVM_ENABLE_NEW_PASS_MANAGER to the value of ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER, not the string itself Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92072/new/ https://

[PATCH] D92072: [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGaafb3662103f: Reland [CMake][NewPM] Move ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER into llvm/ (authored by aeubanks). Repository: rG LLVM Github Monore

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 308797. aeubanks added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216 Files: llvm/include/llvm/IR/PassInstrumentation.h llvm/in

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:449 + // We currently only use these for --print-before/after. + if (PIC && (!printBeforePasses().empty() || !printAfterPasses().empty())) { +#define MODULE_PASS(NAME, CREATE_PASS)

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 308995. aeubanks added a comment. fix capitalization remove extra declaration and fixup includes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216 Files: llvm/include/

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 309000. aeubanks added a comment. clean up some more unnecessary llvm:: add comments to function declarations in PrintPasses.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D87216#2428359 , @jamieschmeiser wrote: > I see you have made the requested changes (nit: clang-tidy complained about > the capitalization of the function) but why are there so many other, > unrelated changes shown? Is ther

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-02 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 309052. aeubanks added a comment. add comments to new methods Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216 Files: llvm/include/llvm/IR/IRPrintingPasses.h llvm/i

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-03 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D87216#2431508 , @ychen wrote: > It is very unfortunate that we have to manage and translate between two sets > of names (one pass name and one type name). This makes me wonder if we just > keep the pass name as the return va

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-03 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 309338. aeubanks added a comment. forward declare class Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216 Files: llvm/include/llvm/IR/IRPrintingPasses.h llvm/include

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-12-03 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2f0de582949d: [NewPM] Support --print-before/after in NPM (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D92436: [Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation

2020-12-07 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks accepted this revision. aeubanks added a comment. lgtm with comments Comment at: clang/test/Misc/time-passes.c:2 +// Check that legacy pass manager could only use -ftime-report +// RUN: %clang_cc1 -emit-obj -O1 -ftime-report %s -o /dev/null 2>&1 | FileCheck %s --check

[PATCH] D87216: [NewPM] Support --print-before/after in NPM

2020-10-25 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 300555. aeubanks added a comment. move map into PassInstrumentationCallbacks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87216/new/ https://reviews.llvm.org/D87216 Files: llvm/include/llvm/IR/PassInstrume

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-25 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 300575. aeubanks added a comment. rebase add assert for O0 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/Code

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-26 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1439 if (CodeGenOpts.OptimizationLevel == 0) { + PB.runRegisteredEPCallbacks(MPM, Level, CodeGenOpts.DebugPassManager); + nikic wrote: > It should be possible to simplify this

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 301132. aeubanks added a comment. only run passes in PipelineStartEPCallbacks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 Files: clang/lib/CodeGen/BackendUtil.cp

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D89158#2357850 , @ychen wrote: > IIUC, this is the NPM version of EP_EarlyAsPossible in legacy PM for O0, > right? Between the choice of (1) [this patch and ] reusing all existing EP > callbacks and letting optnone filtering

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 301145. aeubanks added a comment. run -> invoke Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89158/new/ https://reviews.llvm.org/D89158 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/bpf-O0.

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks marked an inline comment as done. aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:1659 + bool DebugLogging) { + for (auto &C : PipelineStartEPCallbacks) +C(MPM); ychen wrote: >

[PATCH] D89158: [NewPM] Run all EP callbacks under -O0

2020-10-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:1659 + bool DebugLogging) { + for (auto &C : PipelineStartEPCallbacks) +C(MPM); ychen wrote: > asbirlea wrote: > > aeubanks wrote: > > > y

[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. This was reverted due to crashes caused by adding branch weights overflowing uint64_t. Now in BranchProbabilityInfo.cpp, if the sum of weights overflows, scale down all weights by UINT32_MAX (See `ScaleWeights()`). Is that ok? Repository: rG LLVM Github Monorepo CH

[PATCH] D89158: [NewPM] Run callbacks added via registerPipelineStartEPCallback under -O0

2020-10-29 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. Looking at BackendUtil.cpp in Clang as well as the Rust code, I'm back to thinking that we should provide a way to to all callbacks. Then in the case of passes added via TargetMachine, we should extend `TargetMachine::registerPassBuilderCallbacks` to also take a `Pass

[PATCH] D90437: [NFC] Clean up PassBuilder

2020-10-29 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: ychen, asbirlea. Herald added subscribers: llvm-commits, cfe-commits, steven_wu, hiraditya. Herald added projects: clang, LLVM. aeubanks requested review of this revision. Make DebugLogging a member variable so that users of PassBuilder don

[PATCH] D89158: [NewPM] Run callbacks added via registerPipelineStartEPCallback under -O0

2020-10-29 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. I'm more convinced now that my initial direction was the cleanest way. It would simplify users of `PassBuilder` quite a bit. I don't want to include PassManager.h into TargetMachine.h just to get `PassBuilder::OptimizationLevel`, so either we could factor out `Optimiz

[PATCH] D89158: [NewPM] Run callbacks added via registerPipelineStartEPCallback under -O0

2020-10-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 301937. aeubanks retitled this revision from "[NewPM] Run callbacks added via registerPipelineStartEPCallback under -O0 " to "[NewPM] Run callbacks added via registerPipelineStartEPCallback under -O0". aeubanks added a comment. revert back to running all c

[PATCH] D90437: [NFC] Clean up PassBuilder

2020-10-30 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2e31727a884a: [NFC] Clean up PassBuilder (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D90486: [NewPM] Add OptimizationLevel param to TargetMachine::registerPassBuilderCallbacks()

2020-10-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: llvm-commits, cfe-commits, steven_wu, hiraditya, tpr, mgorny. Herald added a reviewer: bollu. Herald added projects: clang, LLVM. aeubanks requested review of this revision. To prevent targets from adding optional passes for -O0, TargetMac

[PATCH] D89158: [NewPM] Provide method to run all pipeline callbacks, used for -O0

2020-10-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. https://reviews.llvm.org/D90486 for adding OptimizationLevel to registerPassBuilderCallbacks(), although this one should land first since that one needs to update PassBuilder::runRegisteredEPCallbacks() to call TargetMachine::registerPassBuilderCallbacks() Repository

[PATCH] D88609: Use uint64_t for branch weights instead of uint32_t

2020-10-31 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. The stack trace helped me come up with my own repro, reverting. It's more uint64_t overflow issues. This might be the reason branch_weights were initially i32 with casts in a bunch of places around LLVM. Not sure if I should try and fix all usages or just keep branch_we

[PATCH] D102638: [NFC] Pass GV value type instead of pointer type to GetOrCreateLLVMGlobal

2021-05-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For opaque pointers, to avoid PointerType::getElementType(). Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D102638 Files: clang/

[PATCH] D101561: [Prototype] Introduce attribute for ignoring C++ ABI

2021-05-17 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks abandoned this revision. aeubanks added a comment. turns out this didn't have a good enough impact to pursue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101561/new/ https://reviews.llvm.org/D101561 __

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-05-17 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG14dfb3831c42: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable (authored by mbenfield, committed by aeuban

[PATCH] D102638: [NFC] Pass GV value type instead of pointer type to GetOrCreateLLVMGlobal

2021-05-17 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9f7d552cff8d: [NFC] Pass GV value type instead of pointer type to GetOrCreateLLVMGlobal (authored by aeubanks). Repository: rG LLVM Github Monorep

[PATCH] D102196: [NewPM] Add options to PrintPassInstrumentation

2021-05-18 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0c509dbc7e29: [NewPM] Add options to PrintPassInstrumentation (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D103465: [OpaquePtr] Track pointee types in Clang

2021-06-01 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: dblaikie, rsmith. aeubanks published this revision for review. aeubanks added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is definitely WIP, but I'd like to make sure that this is the right direct

[PATCH] D76802: [InstrProfiling] Use !associated metadata for counters, data and values

2021-02-03 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: compiler-rt/test/profile/instrprof-gc-sections.c:30 +// RUN: llvm-nm -jgU %t | grep -vE "main|_start|_IO_stdin_used|__libc_.*" > %t.code.syms +// RUN: diff %t.nocode.syms %t.code.syms + phosek wrote: > MaskRay wrote: >

[PATCH] D110201: [clang] Make -Rpass imply -Rpass=.*

2021-09-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: dblaikie. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously with -Rpass (and friends) we'd have remarks "enabled", but without an actual regex. As seen in the tes

[PATCH] D110201: [clang] Make -Rpass imply -Rpass=.*

2021-09-21 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe1ed02181ffc: [clang] Make -Rpass imply -Rpass=.* (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D110204: Make DiagnosticInfoResourceLimit's limit param required

2021-09-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: dblaikie. Herald added subscribers: foad, dexonsmith, kerbowa, hiraditya, tpr, nhaehnle, jvesely, arsenm. aeubanks requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits.

[PATCH] D110204: Make DiagnosticInfoResourceLimit's limit param required

2021-09-21 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe42234383e2c: Make DiagnosticInfoResourceLimit's limit param required (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D106030: [Clang] add support for error+warning fn attrs

2021-09-23 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. Would it be ok to split this into two attributes, dontcall-warn and dontcall-error? So we rely less on the Clang AST when determining if a dontcall call should be emitted as a warning or an error. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D110599: [test] Don't run optimization-remark.c against the legacy PM

2021-09-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We may not emit some inlining remarks under -O0 (which seems reasonable), so use -O1 in these tests. This happens to make it pass when the legacy PM i

[PATCH] D110599: [test] Don't run optimization-remark.c against the legacy PM

2021-09-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 375445. aeubanks added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110599/new/ https://reviews.llvm.org/D110599 Files: clang/test/Frontend/optimization-remark.c Index: clang/test/Front

[PATCH] D110607: [Inliner] Attempt to inline calls to alwaysinline functions first

2021-09-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: mtrofin. Herald added subscribers: ormris, hiraditya, eraman. aeubanks requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For PR46945 we added an extra alwaysinline i

[PATCH] D110607: [Inliner] Attempt to inline calls to alwaysinline functions first

2021-09-27 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. I'll update the tests if this lg Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110607/new/ https://reviews.llvm.org/D110607 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D110364: [clang] Rework dontcall attributes

2021-09-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: ormris, dexonsmith, jdoerfert, pengfei, steven_wu, hiraditya. aeubanks updated this revision to Diff 374663. aeubanks added a comment. aeubanks added reviewers: dblaikie, nickdesaulniers. aeubanks published this revision for review. Herald

[PATCH] D110364: [clang] Rework dontcall attributes

2021-09-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 375698. aeubanks added a comment. DRY Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110364/new/ https://reviews.llvm.org/D110364 Files: clang/lib/CodeGen/CodeGenAction.cpp clang/lib/CodeGen/CodeGenModule.

[PATCH] D110364: [clang] Rework dontcall attributes

2021-09-28 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG2943071e2ee0: [clang] Rework dontcall attributes (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D110665: [clang] Don't use the AST to display backend diagnostics

2021-09-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: dblaikie, rnk. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We keep a map from function name to source location so we don't have to do it via looking up a source location

[PATCH] D110364: [clang] Rework dontcall attributes

2021-09-28 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. In D110364#3028995 , @thakis wrote: > Looks like this breaks tests on windows: > http://45.33.8.238/win/46089/step_7.txt > > Please take a look, and revert for now if it takes a while to fix. Should be fixed with 2d56fbf6cd16bb

<    1   2   3   4   5   6   7   8   >