Page MenuHomePhabricator

chandlerc (Chandler Carruth)Administrator
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 7 2012, 2:54 PM (371 w, 5 d)
Roles
Administrator

Recent Activity

Tue, Aug 20

chandlerc added a comment to D65280: Add a pass to lower is.constant and objectsize intrinsics.

Thanks to Joerg for some useful discussion on IRC -- there was a concern I hadn't thought about that is exactly right: we somewhat want this pass to minimally disrupt things but also to be reasonably self contained.

Tue, Aug 20, 5:37 PM · Restricted Project
chandlerc accepted D66376: [LoopPassManager + MemorySSA] Only enable use of MemorySSA for LPMs known to preserve it..

Some nits below. LGTM with those fixed!

Tue, Aug 20, 4:12 PM · Restricted Project

Fri, Aug 16

chandlerc added a reviewer for D65983: Autogenerate the shebang lines for tools/opt-viewer: beanz.

This seems .... somewhat unfortunate. Adding Chris Bieneman to see if this is really the right thing to do or there are any other alternatives.

Fri, Aug 16, 2:03 PM · Restricted Project

Wed, Aug 14

chandlerc added a comment to D58311: [MemorySSA & LoopPassManager] Enable MemorySSA as loop dependency. Update tests..

As we discussed in person, we should refactor this so that when we enable MemorySSA we actually check the the loop passes in question mnanage to preserve it.

Wed, Aug 14, 4:21 PM · Restricted Project
chandlerc accepted D66200: Ignore indirect branches from callbr..

Also LGTM for cherrypick to the release branch.

Wed, Aug 14, 2:56 AM · Restricted Project

Tue, Aug 13

chandlerc added a comment to D65060: [LICM] Make Loop ICM profile aware.

This approach is broken for another reason, which also motivated the LoopSink approach David mentioned.

Tue, Aug 13, 10:36 PM · Restricted Project
chandlerc accepted D66195: Move to C++14.

This too LGTM, and again, thanks for driving this all the way through.

Tue, Aug 13, 10:29 PM · Restricted Project
chandlerc accepted D66188: Remove minimum toolchain soft-error.

We should specifically call this out in release notes as well (before we forget) as a bunch of downstream people will discover it in LLVM 10.

Tue, Aug 13, 5:10 PM · Restricted Project
chandlerc added inline comments to D64939: Add a proposal for a libc project under the LLVM umbrella..
Tue, Aug 13, 12:04 AM · Restricted Project

Mon, Aug 12

chandlerc added inline comments to D64939: Add a proposal for a libc project under the LLVM umbrella..
Mon, Aug 12, 10:27 PM · Restricted Project
chandlerc added inline comments to D64939: Add a proposal for a libc project under the LLVM umbrella..
Mon, Aug 12, 5:50 PM · Restricted Project

Mon, Aug 5

chandlerc added a comment to D65410: [PassManager] First Pass implementation at -O1 pass pipeline.

One high level point that is at least worth clarifying, and maybe others will want to suggest a different approach:

Mon, Aug 5, 6:03 PM · Restricted Project, Restricted Project
chandlerc added a comment to D65280: Add a pass to lower is.constant and objectsize intrinsics.

Looking a bit more into the details. Chandler, you've originally suggested going with the LowerAtomic route and that actually does create code that fails the SDAG lowering if the pass is skipped, e.g. on ARM.

Mon, Aug 5, 5:53 PM · Restricted Project

Sat, Aug 3

chandlerc requested changes to D65280: Add a pass to lower is.constant and objectsize intrinsics.

Generally, I do like the approach. Two high level comments:

Sat, Aug 3, 6:55 PM · Restricted Project

Thu, Aug 1

chandlerc accepted D65621: [NewPassManager] Resolve assertion in CGSCCPassManager when CallCounts change..

LGTM! Thanks for fixing this nasty bug (and sorry I wrote it).

Thu, Aug 1, 6:07 PM · Restricted Project
chandlerc accepted D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.

LGTM with two nits addressed, thanks!

Thu, Aug 1, 2:43 PM · Restricted Project
chandlerc accepted D65418: [MemorySSA] Set LoopSimplify to preserve MemorySSA in the NPM, if analysis exists..

LGTM

Thu, Aug 1, 10:56 AM · Restricted Project

Wed, Jul 31

chandlerc added inline comments to D65418: [MemorySSA] Set LoopSimplify to preserve MemorySSA in the NPM, if analysis exists..
Wed, Jul 31, 4:28 PM · Restricted Project

Jul 11 2019

chandlerc added inline comments to D62627: [NFC] Do not run CGProfilePass when -fno-integrated-as is on.
Jul 11 2019, 5:41 PM · Restricted Project
chandlerc added a comment to D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c.

Just to make sure we're on the same page (and sorry I didn't jump in sooner)...

Jul 11 2019, 5:34 PM
chandlerc requested changes to D64029: [PGO] Add PGO support at -O0 in the experimental new pass manager.

Sorry for the delay here.

Jul 11 2019, 5:26 PM · Restricted Project
chandlerc accepted D62888: [NewPM] Port Sancov.

LGTM, thanks so much for sticking through this, I know it was ... nontrivial!

Jul 11 2019, 2:39 PM · Restricted Project, Restricted Project

Jul 2 2019

chandlerc added a comment to D60740: [InlineCost] cleanup calculations of Cost and Threshold.

Pointing out the (serious) bug in this change below.

Jul 2 2019, 8:14 PM · Restricted Project
chandlerc added inline comments to D60740: [InlineCost] cleanup calculations of Cost and Threshold.
Jul 2 2019, 8:06 PM · Restricted Project

Jul 1 2019

chandlerc added a comment to D62888: [NewPM] Port Sancov.

The used thing still seems like there is an underlynig bug here. See below.

Jul 1 2019, 8:03 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63948: [SLP] Limit compilation time of look-ahead operand reordering heuristic..

Since this review is ongoing, please revert the original patch to unblock people. There is no harm in reverting and landing with the fix once it is ready. =]

Jul 1 2019, 1:48 PM · Restricted Project

Jun 28 2019

chandlerc added a comment to D63155: [clang][NewPM] Fix broken profile test.
In D63155#1563275, @xur wrote:

I just think we also need to understand why *no other test failed*, and why the only test we have for doing PGO at O0 is this one and it could be "fixed" but such a deeply unrelated change....

We have special code to do PGO at O0 in old pass manager. This is not done in the new pass manager.

Jun 28 2019, 5:21 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63155: [clang][NewPM] Fix broken profile test.
In D63155#1563229, @xur wrote:

This patch does not make sense to me.

The reason of failing with -fexperimental-new-pass-manager is because we don't do PGO instrumentation at -O0. This is due to the fact that PGO instrumentation/use passes are under PassBuilder::buildPerModuleDefaultPipeline.

This patch add a pass

MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->ProfileFile));

which only gives you the wrong signal of instrumentation is done.

I wrote pass PGOInstrumentationGenCreateVar only for some trick interactions for thinlto under ldd for CSPGO.
Regular FDO should not use it.

The right fix is to enable PGO instrumentation and use in pass builder for O0.

I would like to request to revert this patch.

As an alternative, could I instead request that we remove the BackendUtil changes and just mark the runs in gcc-flag-compatibility.c with -fno-experimental-new-pass-manager. This way we could clarify that under the new PM, we shouldn't run PGO at -O0? If not, I'll revert this patch as is.

Jun 28 2019, 5:03 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63155: [clang][NewPM] Fix broken profile test.
In D63155#1563229, @xur wrote:

This patch does not make sense to me.

The reason of failing with -fexperimental-new-pass-manager is because we don't do PGO instrumentation at -O0. This is due to the fact that PGO instrumentation/use passes are under PassBuilder::buildPerModuleDefaultPipeline.

This patch add a pass

MPM.addPass(PGOInstrumentationGenCreateVar(PGOOpt->ProfileFile));

which only gives you the wrong signal of instrumentation is done.

I wrote pass PGOInstrumentationGenCreateVar only for some trick interactions for thinlto under ldd for CSPGO.
Regular FDO should not use it.

The right fix is to enable PGO instrumentation and use in pass builder for O0.

I would like to request to revert this patch.

Jun 28 2019, 4:53 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63672: Added Delta IR Reduction Tool.

Ok, now I've made a full pass through this. Mostly I think the first thing to do is tighten up the design around the core run function template and how reducers work with it. Documenting that design in detail will be really helpful I think.

Jun 28 2019, 4:46 PM · Restricted Project
chandlerc added a comment to D63672: Added Delta IR Reduction Tool.

(Also, really sorry, I mashed send button too soon, I'm still going through the code. Feel free to start on anything i posted, but sorry for the very random subset of comments)

Jun 28 2019, 4:37 PM · Restricted Project
chandlerc added a comment to D63672: Added Delta IR Reduction Tool.

I'd suggest enhancing the main description to include an overview of the code structure and organization to help reviewers follow the implementation design here. Think of it like a mini design doc for the *implementation* itself.

Jun 28 2019, 4:37 PM · Restricted Project

Jun 24 2019

chandlerc added a comment to D63672: Added Delta IR Reduction Tool.

Personally, I'd suggest the name llvm-reduce for the tool.

Jun 24 2019, 2:29 PM · Restricted Project

Jun 21 2019

chandlerc accepted D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data.

LGTM

Jun 21 2019, 6:24 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data.

FWIW, I think we can wait for a bug to be filed or report come in with some functional test case before we change any behavior here.

Jun 21 2019, 1:21 PM · Restricted Project, Restricted Project

Jun 20 2019

chandlerc accepted D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM.

Eh, this seems close enough now. I'd like a better approach for the x86 builtins, but no idea what it will end up being.

Jun 20 2019, 7:41 PM · Restricted Project
chandlerc added reviewers for D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data: davidxl, tejohnson.

See inline comment, but I think we should just drop the testing of the function attribute bit here rather than adjusting the pipeline.

Jun 20 2019, 7:39 PM · Restricted Project, Restricted Project
chandlerc accepted D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests.

LGTM

Jun 20 2019, 7:32 PM · Restricted Project, Restricted Project
chandlerc added reviewers for D63637: Do not set an RPATH on statically-linked LLVM executables.: rnk, beanz.

(Will likely need more eyes than just mine -- RPATH is mostly a mystery to me...)

Jun 20 2019, 7:30 PM · Restricted Project

Jun 19 2019

chandlerc added a comment to D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests.

just a minor comment on one of these...

Jun 19 2019, 6:26 PM · Restricted Project, Restricted Project
chandlerc accepted D63580: [clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs.

LGTM, again, really nice. Tiny tweak below.

Jun 19 2019, 5:58 PM · Restricted Project, Restricted Project
chandlerc accepted D63577: [clang][NewPM] Move EntryExitInstrumenterPass to the start of the pipeline.

LGTM, nice!

Jun 19 2019, 5:57 PM · Restricted Project, Restricted Project

Jun 18 2019

chandlerc added inline comments to D62888: [NewPM] Port Sancov.
Jun 18 2019, 7:48 PM · Restricted Project, Restricted Project
chandlerc accepted D62225: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM.

FWIW, this LGTM. We may want to tweak the behavior around flattening, but that can happen as a follow-up, and this seems to get us to a better state.

Jun 18 2019, 7:44 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM.

OMG, I'm so sorry, I had no idea that the tests would explode like that... Yeah, I don't think that's useful....

Jun 18 2019, 7:39 PM · Restricted Project
chandlerc added a comment to D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests.

I did some more digging and found the following differences between PMs for each test, and they seem to all differ and can be fixed for different reasons.

Jun 18 2019, 7:18 PM · Restricted Project, Restricted Project

Jun 12 2019

chandlerc accepted D63170: [clang][NewPM] Fix broken -O0 test from missing assumptions.

LGTM. Bit annoying that we need to do this at O0, but fine...

Jun 12 2019, 8:58 PM · Restricted Project, Restricted Project
chandlerc accepted D63168: [clang][NewPM] Fix split debug test.

Code change LGTM, but again, let's update the test to check both ways.

Jun 12 2019, 8:58 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests.

I understand the change to explicitly say -O2. I also understand the change to add an explicit -fno-experimental-new-pass-manager to a RUN line when we have another RUN line that explicitly uses -fexperiemntal-new-pass-manager.

Jun 12 2019, 8:55 PM · Restricted Project, Restricted Project
chandlerc accepted D63155: [clang][NewPM] Fix broken profile test.

Let's update the test to explicitly run w/ both PMs to make sure this keeps working. LGTM with that change.

Jun 12 2019, 8:52 PM · Restricted Project, Restricted Project
chandlerc accepted D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner.

Code change LGTM. Can you update at least one of the tests to explicitly run both PMs so that we'll notice if this breaks in some weird way? Feel free to submit with that change.

Jun 12 2019, 8:52 PM · Restricted Project, Restricted Project
chandlerc added a comment to D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM.

This really confused me. We shouldn't be seeing this kind of difference in the new PM.

Jun 12 2019, 8:52 PM · Restricted Project
chandlerc requested changes to D62888: [NewPM] Port Sancov.

This was a lot easier for me to understand too, thanks. Somewhat minor code changes below.

Jun 12 2019, 8:19 PM · Restricted Project, Restricted Project

Jun 10 2019

chandlerc requested changes to D63058: [InlineCost] Fix bug 42084: return the first negative result.

I think this is somewhat the wrong approach.

Jun 10 2019, 6:08 PM · Restricted Project
chandlerc requested changes to D62225: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM.

I think this ultimately needs to be split up into smaller patches. A bunch of these things can be landed independently. Here is my first cut at things to split out, each one into its own patch.

Jun 10 2019, 5:47 PM · Restricted Project, Restricted Project
chandlerc requested changes to D62888: [NewPM] Port Sancov.

I would just change this to have the module pass loop over the functions -- that seems like it'll be much cleaner.

Jun 10 2019, 5:37 PM · Restricted Project, Restricted Project

Jun 8 2019

chandlerc accepted D62536: Only passes that preserve MemorySSA must mark it as preserved..

Any chance you can add a test that shows one of the problems where verifying MemorySSA fails because we get a "preserved" copy after a loop pass that doesn't actually preserve it?

Jun 8 2019, 1:51 AM · Restricted Project

Jun 6 2019

chandlerc added a comment to D62025: Expand llvm.is.constant earlier.

Joerg points out in IRC that we need control flow pruning to be symmetric w/ true and false.

In that case, I think we need SelectionDAG and FastISel to *reject* lowering llvm.is.constant and add a dedicated lowering pass like we have for lowering atomics. It is needed for the exact same reason as atomics -- to do control flow cleanup after folding these to false.

That pass should be a dedicated pass IMO that *only* folds these intrinsics, and then *only* remove dead code. I don't think this should happen inside another pass or rely on SimplifyCFG (which does way too much). And it should be a codegen pass over the IR, not part of the pass pipeline.

Jun 6 2019, 6:08 PM · Restricted Project
chandlerc added a comment to D62025: Expand llvm.is.constant earlier.

Joerg points out in IRC that we need control flow pruning to be symmetric w/ true and false.

Jun 6 2019, 6:06 PM · Restricted Project
chandlerc added a comment to D62025: Expand llvm.is.constant earlier.

(For posterity, this also should be in the implementation of SimplifyInstruction itself, not in the pass. The pass only ever calls that.)

Jun 6 2019, 5:57 PM · Restricted Project
chandlerc added a comment to D62025: Expand llvm.is.constant earlier.

I think this isn't quite right (if I've understood what it is doing correctly).

Jun 6 2019, 5:55 PM · Restricted Project

May 22 2019

chandlerc added a comment to D61634: [clang/llvm] Allow efficient implementation of libc's memory functions in C/C++.

Sorry I've been a bit slow to respond here...

May 22 2019, 3:25 AM · Restricted Project, Restricted Project

May 18 2019

chandlerc accepted D58260: [INLINER] allow inlining of blockaddresses if sole uses are callbrs.

LGTM

May 18 2019, 2:06 AM · Restricted Project

May 17 2019

chandlerc accepted D61612: [NewPassManager] Add tuning option: ForgetAllSCEVInLoopUnroll [NFC]..

Ok, I'm fine with this going in temporarily while we try to flip this flag acros sthe board (or figure out a heuristic that lets us get the best of both worlds). So, LGTM, but yeah, let's try to remove this too.

May 17 2019, 3:03 PM · Restricted Project
chandlerc accepted D61618: [NewPassManager] Add tuning option: LoopUnrolling [NFC]..

Eh, I'd like long term to have a way of testing this field in LLVM, but I think this is fine for now to unblock the Clang changes and other changes.

May 17 2019, 2:56 PM · Restricted Project
chandlerc accepted D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change].

LGTM

May 17 2019, 2:54 PM · Restricted Project
chandlerc accepted D61955: [SLPVectorizer] Set flag to previous default..

We should get folks to figure out why this regresses them, but making the two PMs behave the same seems fine for now.

May 17 2019, 2:54 PM · Restricted Project
chandlerc accepted D58260: [INLINER] allow inlining of blockaddresses if sole uses are callbrs.

One edge case left I think, but otherwise this LGTM. Happy for you to submit with the suggested change and a test case.

May 17 2019, 2:31 PM · Restricted Project

May 15 2019

chandlerc added a comment to D58260: [INLINER] allow inlining of blockaddresses if sole uses are callbrs.

I think you mentioned that there is already a test case that checks a global initialized with blockaddress? If I've mis-remembered, we should definitely add one and check that it *doesn't* inline (today). We can update it if/when we add support. If it is possible to add one that directly works w/ callbr, that'd be great.

May 15 2019, 7:14 PM · Restricted Project
chandlerc accepted D59981: [SelectionDAGBuilder] Flush PendingExports before creating INLINEASM_BR node for asm goto..

LGTM as long as Eli is ok with the testing arriving after the fact.

May 15 2019, 6:24 PM · Restricted Project

May 10 2019

chandlerc accepted D61799: Factor out redzone ABI checks [NFCI].

SLH bits LGTM.

May 10 2019, 1:39 PM · Restricted Project

May 7 2019

chandlerc added a comment to D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change].

(Sorry for still more comments)

May 7 2019, 4:46 PM · Restricted Project
chandlerc requested changes to D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change].

The file name of the test seems odd? How about vectorize-loops.c? I'd also make it a C test and put it in test/CodeGen instead of a C++ test.

May 7 2019, 4:21 PM · Restricted Project

May 6 2019

chandlerc added a comment to D60833: [MemorySSA] Teach LoopSimplify to preserve MemorySSA..

(To be explicit, this LGTM, just letting George mark it as accepted when he's happy too.)

May 6 2019, 4:43 PM · Restricted Project
chandlerc added a comment to D61612: [NewPassManager] Add tuning option: ForgetAllSCEVInLoopUnroll [NFC]..

This seems... *really* unlikely to be an important tuning flag for library clients. It seems likely added to allow some limited experimentation. Maybe we can just not add it to the new PM?

May 6 2019, 4:31 PM · Restricted Project
chandlerc added a comment to D61620: [NewPassManager] Add tuning option: LoopUnrolling [clang-change].

Same comment as on other Clang patch -- let's update an IR generation test to reflect this?

May 6 2019, 4:18 PM · Restricted Project, Restricted Project
chandlerc added a comment to D61618: [NewPassManager] Add tuning option: LoopUnrolling [NFC]..

Hmm, how should we test that this works?

May 6 2019, 4:18 PM · Restricted Project
chandlerc accepted D61617: [NewPassManager] Add tuning option: SLPVectorization [clang-change].

Can you update some Clang IR generation test that uses these flags to run w/ the new PM? It should fail without this and pass with this.

May 6 2019, 4:17 PM · Restricted Project
chandlerc accepted D61616: [NewPassManager] Add tuning option: SLPVectorization [NFC]..

Eric was hoping for some API improvements here as we add more tuning options, but I don't think these need to be sequenced.

May 6 2019, 4:07 PM · Restricted Project
chandlerc accepted D58374: [Clang][NewPM] Don't bail out if the target machine is empty.

LGTM!

May 6 2019, 3:48 PM · Restricted Project

May 4 2019

chandlerc added a comment to D58311: [MemorySSA & LoopPassManager] Enable MemorySSA as loop dependency. Update tests..

One question about a test change and a minor nit pick on comments...

May 4 2019, 3:31 PM · Restricted Project
chandlerc added a comment to D60833: [MemorySSA] Teach LoopSimplify to preserve MemorySSA..

I'm trusting George w/ the MemorySSAUpdater review.

May 4 2019, 3:28 PM · Restricted Project

Apr 29 2019

chandlerc accepted D61284: [AliasAnalysis/NewPassManager] Invalidate AAManager less often..

LGTM, very nice! Thanks for all the work tracking down this subtle case!

Apr 29 2019, 5:31 PM · Restricted Project
chandlerc accepted D61142: Set LoopInterleaved in the PassManagerBuilder..

LGTM, maybe add a comment here to archive some of the reasoning? (IE, that when unrolling is disabled we disable both literal unrolling but also interleaving for historical reasons)

Apr 29 2019, 5:31 PM · Restricted Project

Apr 25 2019

chandlerc committed rGdd0a2e4461a1: Fix r359229 which tried to fix r359159... (authored by chandlerc).
Fix r359229 which tried to fix r359159...
Apr 25 2019, 10:03 PM
chandlerc committed rCXX359275: Fix r359229 which tried to fix r359159....
Fix r359229 which tried to fix r359159...
Apr 25 2019, 10:03 PM
chandlerc committed rL359275: Fix r359229 which tried to fix r359159....
Fix r359229 which tried to fix r359159...
Apr 25 2019, 10:03 PM
chandlerc accepted D61043: [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated..

LGTM

Apr 25 2019, 11:06 AM · Restricted Project
chandlerc accepted D61138: [PGO] Enable InstrProf lowering for Clang PGO instrumentation in the new pass manager.

You might also update one of the instr prof tests to have two RUN lines, one for each pass manager. Feel free to do that (or not) and submit.

Apr 25 2019, 10:12 AM · Restricted Project

Apr 24 2019

chandlerc accepted D61091: Enable LoopVectorization by default..

I like the patch, LGTM.

Apr 24 2019, 5:21 PM · Restricted Project
chandlerc added inline comments to D61091: Enable LoopVectorization by default..
Apr 24 2019, 2:54 PM · Restricted Project

Apr 23 2019

chandlerc added a comment to D61030: [PassManagerBuilder] Add option for interleaved loops, for loop vectorize..

How does this impact use of clang -fno-unroll-loops and clang -fno-loop-vectorize? I'm betting today, -fno-unroll-loops controls the DisableUnrollLoops value, and so people who disable both unrolling and vectorization will be surprised when interleaving now happens.

Apr 23 2019, 5:00 PM · Restricted Project
chandlerc accepted D61043: [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated..

LGTM

Apr 23 2019, 4:57 PM · Restricted Project
chandlerc added a comment to D61043: [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated..

Oh, you can add a test for this by using the new PM and an invalidate<aa> pass or invalidate<domtree>.

Apr 23 2019, 4:57 PM · Restricted Project
chandlerc added inline comments to D61022: [ThinLTO] Pass down opt level to LTO backend and handle -O0 LTO in new PM.
Apr 23 2019, 10:18 AM · Restricted Project, Restricted Project

Apr 22 2019

chandlerc committed rGbbddf21f900a: Revert "Use const DebugLoc&" (authored by chandlerc).
Revert "Use const DebugLoc&"
Apr 22 2019, 6:41 PM
chandlerc committed rL358940: Revert "Use const DebugLoc&".
Revert "Use const DebugLoc&"
Apr 22 2019, 6:40 PM
chandlerc accepted D60832: [MemorySSA] LCSSA preserves MemorySSA..

LGTM

Apr 22 2019, 4:43 PM · Restricted Project
chandlerc accepted D60914: [AliasAnalysis] AAResults preserves AAManager..

LGTM

Apr 22 2019, 4:41 PM · Restricted Project
chandlerc added a comment to D60833: [MemorySSA] Teach LoopSimplify to preserve MemorySSA..

It's not as much the ew-ness that bothers me.
It's that, if MemorySSA is to be preserved and widely used in the loop pass, then this infrastructure change is needed anyway.

The simplifyLoop API is called from a bunch of other *loop* passes. Whenever these are updated, we'll need to teach this API to make the update (the new pass manager will care too)
Following this patch, it will be much easier to just get MemorySSA analysis pass and pass it along to the API that already does the right thing. This same approach saved me a lot of time when I updated the other Utils. If you notice in this patch, the calls to formDedicatedExitBlocks or SplitBlockPredecessors are already doing the right thing.

You're quite right that this is not a requirement to enable MemorySSA in the new pass manager. I am hoping it is not as big of a change to block it, and that it opens up more paths.
If it turns out to be a blocker, I'm happy to split the EnableMSSALoopDependency flag in 2 for the 2 pass managers and flip just one. What do you think?

Apr 22 2019, 4:38 PM · Restricted Project