Page MenuHomePhabricator

asbirlea (Alina Sbirlea)
Google

Projects

User does not belong to any projects.

User Details

User Since
Feb 10 2016, 9:51 AM (310 w, 1 d)

Recent Activity

Today

asbirlea added a comment to D115160: [GVN] MemorySSA for GVN: remove MemDep form GVNPass:ValueTable.

A very broad comment for a smooth transition

  • the patches should be split into changes to GVN independent of the switch, e.g. a) factoring out components/methods where the differences between MSSA and MD occur and b) things that need to be added for the transition
  • we should keep the MD implementation and have a flag for switching between the current one and the MSSA one being added
  • once the flag flip sticks, then we'd remove the MD implementation
Thu, Jan 20, 12:34 PM · Restricted Project

Yesterday

asbirlea added a comment to D109958: [LoopFlatten] Enable it by default.

Thank you for resolving all the issues raised! Could you rebase this patch on ToT? (to include the MSSA update and the move to LPM1?)

Wed, Jan 19, 11:19 AM · Restricted Project

Tue, Jan 18

asbirlea accepted D116660: [LoopFlatten] Update MemorySSA state.

Changes LGTM.
Nit: clang-format.
A simpler way to check all verification is now to pass VerificationLevel::Full to verifyMemorySSA(); I'm mentioning this for your local testing, in case your build doesn't have EXPENSIVE_CHECKS on already, not to include in this patch.

Tue, Jan 18, 2:20 PM · Restricted Project

Dec 13 2021

asbirlea committed rG46fb81095507: [NewGVN] Use PredicateInfo info when previously used for the same ssa.copy… (authored by asbirlea).
[NewGVN] Use PredicateInfo info when previously used for the same ssa.copy…
Dec 13 2021, 4:54 PM
asbirlea committed rGac994f831cb7: [MemorySSA] Document details regarding MemorySSA's precision. (authored by asbirlea).
[MemorySSA] Document details regarding MemorySSA's precision.
Dec 13 2021, 4:54 PM
asbirlea closed D110907: [NewGVN] Use PredicateInfo info when previously used for the same ssa.coy intrinsic.
Dec 13 2021, 4:54 PM · Restricted Project

Nov 16 2021

asbirlea accepted D113947: [NewPM] Add option to prevent rerunning function pipeline on functions in CGSCC adaptor.

Thank you for this work!

Nov 16 2021, 2:57 PM · Restricted Project

Nov 11 2021

asbirlea accepted D113712: [DSE] Allow DSE to optimize MemorySSA by default..
Nov 11 2021, 5:19 PM · Restricted Project
asbirlea added inline comments to D112315: [DSE] Use optimized access if available for redundant store elimination..
Nov 11 2021, 5:19 PM · Restricted Project
asbirlea added a comment to D112313: [DSE] Optimize defining access of defs while walking upwards..

Allowing passes to do this is a slippery slope...
We already have the issue that it is sometimes hard to reproduce an issue with a single pass, due to the cached state in MemorySSA. This cached state is already dependent on what other passes do, a mix between queries and transforms, which may leave MemorySSA either "over-optimized" (has stored info beyond what it could deduce if built from scratch) or "under-optimized" (could deduce more). Having DSE optimize more is not that far fetched considering this.
I'm inclined to let DSE do this, only because 1) the traversals and inferences are beyond what MSSA alone does now and 2) they're "free" (i.e. DSE does them anyway).
However, I would not be ok with any pass being able to set optimized accesses.

That policy sounds good to me, thanks for sharing! Should we add something like that to the MemorySSA docs?

Nov 11 2021, 5:18 PM · Restricted Project
asbirlea added inline comments to D112315: [DSE] Use optimized access if available for redundant store elimination..
Nov 11 2021, 10:48 AM · Restricted Project
asbirlea added a comment to D112313: [DSE] Optimize defining access of defs while walking upwards..

Allowing passes to do this is a slippery slope...
We already have the issue that it is sometimes hard to reproduce an issue with a single pass, due to the cached state in MemorySSA. This cached state is already dependent on what other passes do, a mix between queries and transforms, which may leave MemorySSA either "over-optimized" (has stored info beyond what it could deduce if built from scratch) or "under-optimized" (could deduce more). Having DSE optimize more is not that far fetched considering this.
I'm inclined to let DSE do this, only because 1) the traversals and inferences are beyond what MSSA alone does now and 2) they're "free" (i.e. DSE does them anyway).
However, I would not be ok with any pass being able to set optimized accesses.

Nov 11 2021, 10:41 AM · Restricted Project
asbirlea added a comment to D104268: [ptr_provenance] Introduce optional ptr_provenance operand to load/store.

Thank you for all the clarifications. I'm convinced this is the right way to move forward at this point.

Nov 11 2021, 9:58 AM · Restricted Project

Nov 9 2021

asbirlea accepted D113304: [NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses.

LGTM, but please wait to see if @nikic has additional comments.

Nov 9 2021, 2:42 PM · Restricted Project, Restricted Project

Nov 8 2021

asbirlea accepted D112935: [NFC] Rename GVN -> GVNPass and SROA -> SROAPass.
Nov 8 2021, 5:01 PM · Restricted Project, Restricted Project
asbirlea added a comment to D110822: [GVN] Simple GVN hoist - loads and stores.

The request changes is for the use of getID() in MemorySSA(). Other optimizations should never rely on the value of the IDs assigned by MemorySSA.

The getID() was already a public method in derived classes and the ID is used according to its description "Guaranteed unique among MemoryAccesses".

How about value numbering the BasicBlock that corresponds to a MemoryPhi ? It's a little bit of overhead and not strictly necessary if we have an ID readily available, but, fair enough, I don't mind doing it this way.

Nov 8 2021, 4:36 PM · Restricted Project
asbirlea added a comment to D113304: [NewPM] Only invalidate modified functions' analyses in CGSCC passes + turn on eagerly invalidate analyses.

Thank you for the additional clarifications in the comments and descriptions!

Nov 8 2021, 2:54 PM · Restricted Project, Restricted Project
asbirlea requested changes to D110822: [GVN] Simple GVN hoist - loads and stores.

The request changes is for the use of getID() in MemorySSA(). Other optimizations should never rely on the value of the IDs assigned by MemorySSA.

Nov 8 2021, 2:07 PM · Restricted Project
asbirlea accepted D113303: [NFC][FuncAttrs] Keep track of modified functions.
Nov 8 2021, 11:26 AM · Restricted Project

Nov 4 2021

asbirlea accepted D113210: [NewPM] Use the default AA pipeline by default.
Nov 4 2021, 12:22 PM · Restricted Project, Restricted Project
asbirlea added a comment to D113210: [NewPM] Use the default AA pipeline by default.

Can you also update lib/LTO/LTOBackend.cpp to something like:

// Parse a custom AA pipeline if asked to, otherwise the default will be used.
if (!Conf.AAPipeline.empty()) {
  AAManager AA;
  if (auto Err = PB.parseAAPipeline(AA, Conf.AAPipeline)) {
    report_fatal_error(Twine("unable to parse AA pipeline description '") +
                       Conf.AAPipeline + "': " + toString(std::move(Err)));
  }
  // Register the AA manager first so that our version is the one used.
  FAM.registerPass([&] { return std::move(AA); });
}
Nov 4 2021, 12:08 PM · Restricted Project, Restricted Project
asbirlea added a comment to D113196: [NewPM] Make eager analysis invalidation per-adaptor.

This change's numbers look better overall. The compile-time regressions are smaller across the board and the memory gains are still there, in some cases reduced and in some cases improved. I don't think the level of noise is that high.
Overall, this change is the right approach both conceptually (only invalidate in these adaptors) and given the practical results.

Nov 4 2021, 10:57 AM · Restricted Project

Nov 3 2021

asbirlea accepted D111161: [UnknownProvenance] Add bitcode support..
Nov 3 2021, 4:52 PM · Restricted Project
asbirlea accepted D111163: [UnknownProvenance] add support in ValueMapper.
Nov 3 2021, 4:51 PM · Restricted Project
asbirlea added a comment to D104268: [ptr_provenance] Introduce optional ptr_provenance operand to load/store.

Adding a few items/questions discussed in the open meeting:

Nov 3 2021, 4:51 PM · Restricted Project
asbirlea accepted D113032: [ArgPromo] Preserve FunctionAnalysisManagerCGSCCProxy.
Nov 3 2021, 2:54 PM · Restricted Project

Nov 1 2021

asbirlea added a comment to D109762: [NewPM][SimpleLoopUnswitch] Add DivergenceInfo.

I talked to some people and we've decided that the best thing to do would be to refactor out the nontrivial unswitching part into a function pass. Nontrivial unswitching is fairly special in the kinds of transforms it does.

Will that always work as expected? The real dependency is that the divergence analysis is not incrementally updated. So even if this is a function pass, we may want to rerun it on the whole function every time it manages to unswitch a loop.

With this patch, we have to rerun DivergenceAnalysis every time we run the pass on every loop. If we change nontrivial unswitching into a function pass, we can upgrade that to only having to be rerun every time we actually unswitch something.
To be more specific, with the function pass, we'd have to invalidate most analyses anyway after every successful unswitch.

for every loop
  DA = FAM.getAnalysis<DivergenceAnalysis>(); // this will not rerun the analysis if we haven't invalidated below because we didn't successfully unswitch
  if successful unswitch
    auto PA = PreservedAnalyases::none();
    PA.preserve<SCEV>();
    // and all the other existing analyses we preserved
    FAM.invalidate(PA);
Nov 1 2021, 4:11 PM · Restricted Project

Oct 25 2021

asbirlea committed rG3850cba7cc97: [bazel build] (manually) port da47ec3ca076 (authored by asbirlea).
[bazel build] (manually) port da47ec3ca076
Oct 25 2021, 3:12 PM
asbirlea added a comment to rGda47ec3ca076: Basic: Stop using expectedToOptional() in FileManagerTest, NFC.

This broke upstream bazel: https://buildkite.com/llvm-project/upstream-bazel-rbe/builds/10376#98340937-c4c7-4bd7-997e-dd56691da9d8
Was the header file missed?

Oct 25 2021, 2:34 PM
asbirlea accepted D112473: [AlwaysInliner] Invalidate analyses when we delete functions.
Oct 25 2021, 12:50 PM · Restricted Project
asbirlea accepted D112477: [docs][NewPM] Add example C++ code on how to actually use the new PM.

Thank you, this is very helpful!

Oct 25 2021, 12:31 PM · Restricted Project

Oct 18 2021

asbirlea accepted D111471: [NVPTX] Add a late SROA pass which allows optimizing away more allocas..
Oct 18 2021, 4:43 PM · Restricted Project, Restricted Project
asbirlea accepted D112036: [opt] Directly translate -O# to -passes='default<O#>'.

lgtm, thank you for addressing this.

Oct 18 2021, 4:39 PM · Restricted Project
asbirlea accepted D111471: [NVPTX] Add a late SROA pass which allows optimizing away more allocas..

Thanks!

Oct 18 2021, 2:43 PM · Restricted Project, Restricted Project
asbirlea added a comment to D111668: [LoopPredication] Calculate profitability without BPI.

Looks reasonable, assuming you're seeing similar results to using BPI. I'm not very familiar with BPI itself, so if others reviewers are, I'll let them chime in.

Oct 18 2021, 1:07 PM · Restricted Project
asbirlea accepted D111448: [BPI] Handle incomplete state in BPI.

The question I was trying to get answer was: can there be the case where the probability is queried such that you can get different values based on when (what order) the blocks are removed or added? I think the answer is no, and I *think* I know why you're sometimes *not* triggering the assert: it's when IndexInSuccessors == 0. I suspect the successor order at the callsite in LoopPredication.cpp:947 is non-deterministic, so sometimes it's comparing against index 1, which does not have prob, and sometimes against itself, for which it does.

Oct 18 2021, 11:38 AM · Restricted Project
asbirlea accepted D111575: [NewPM] Add PipelineTuningOption to eagerly invalidate analyses.

Can you also include the direct link to the memory comparison in the description?
(https://llvm-compile-time-tracker.com/compare.php?from=1fb24fe85a19ae71b00875ff6c96ef1831dcf7e3&to=f1604149f211f2fa2f5609ccdebb96491e961b7f&stat=max-rss)

Oct 18 2021, 10:30 AM · Restricted Project

Oct 11 2021

asbirlea committed rGf7ca54289c14: [LoopSimplifyCFG] Do not require MSSA. Continue to preserve if available. (authored by asbirlea).
[LoopSimplifyCFG] Do not require MSSA. Continue to preserve if available.
Oct 11 2021, 2:28 PM
asbirlea closed D111578: [LoopSimplifyCFG] Do not require MSSA. Continue to preserve if available..
Oct 11 2021, 2:28 PM · Restricted Project
asbirlea added inline comments to D109958: [LoopFlatten] Enable it by default.
Oct 11 2021, 1:58 PM · Restricted Project
asbirlea requested review of D111578: [LoopSimplifyCFG] Do not require MSSA. Continue to preserve if available..
Oct 11 2021, 1:56 PM · Restricted Project
asbirlea accepted D111275: [LCG] Don't skip invalidation of LazyCallGraph if CFG analyses are preserved.

LGTM.

Oct 11 2021, 1:20 PM · Restricted Project
asbirlea accepted D111277: [SCCP] Properly report changes when changing a pointer argument.

LGTM.

Oct 11 2021, 1:04 PM · Restricted Project

Oct 8 2021

asbirlea added a comment to D111448: [BPI] Handle incomplete state in BPI.

I'm confused how the intermittent assert occurs. Is the compilation non-deterministic?

Oct 8 2021, 11:11 AM · Restricted Project

Oct 4 2021

asbirlea added inline comments to D111032: Testing instcombine/licm pass order....
Oct 4 2021, 4:29 PM · Restricted Project

Sep 30 2021

asbirlea requested review of D110907: [NewGVN] Use PredicateInfo info when previously used for the same ssa.coy intrinsic.
Sep 30 2021, 11:37 PM · Restricted Project

Sep 28 2021

asbirlea added inline comments to D110438: [BPI] Keep BPI available in loop passes through LoopStandardAnalysisResults.
Sep 28 2021, 3:47 PM · Restricted Project

Sep 27 2021

asbirlea added a comment to D110547: [MemCpyOpt] Use EarliestEscapeInfo instead of callCapturesBefore..

+1 on Nikita's comment that BatchAA cannot be used with a single instance for MemCpyOpt.

Sep 27 2021, 1:35 PM · Restricted Project
asbirlea accepted D110438: [BPI] Keep BPI available in loop passes through LoopStandardAnalysisResults.

Changes LGTM. Please add the testcase mentioned in the description before pushing.

Sep 27 2021, 9:07 AM · Restricted Project

Sep 21 2021

asbirlea added a comment to D110057: [LoopFlatten] Move it to a LoopPassManager.

FWIW, there are other loop passes that drastically change the loop structure (e.g. SimpleLoopUnswitch), and preserve all analyses, including LoopInfo.

Sep 21 2021, 9:48 AM · Restricted Project, Restricted Project

Sep 20 2021

asbirlea requested changes to D110057: [LoopFlatten] Move it to a LoopPassManager.

In D109958 I missed the fact that LoopFlatten does not preserve any analyses. This is, I assume, the reason it was not added alongside other Loop passes before and probably also why I'm seeing a crash when adding it as part of LPM2.
The pass should not misbehave on its own in a LoopPassManager because it's not using the Updater to readd loops for reprocessing, otherwise it would be incorrect alone too.
So either LoopFlatten needs to be remain in it's own LPM or taught to preserve analyses (LoopInfo, DominatorTree, etc)

Sep 20 2021, 4:49 PM · Restricted Project, Restricted Project

Sep 17 2021

asbirlea accepted D110008: [NFC] Remove FIXMEs about calling LLVMContext::yield().
Sep 17 2021, 2:51 PM · Restricted Project
asbirlea accepted D109978: [CaptureTracking] Allow passing LI to PointerMayBeCapturedBefore (NFC)..
Sep 17 2021, 2:50 PM · Restricted Project
asbirlea accepted D109907: [DSE] Use cached escape info for calls..
Sep 17 2021, 2:50 PM · Restricted Project
asbirlea added inline comments to D109844: [DSE] Track earliest escape, use for loads in isReadClobber..
Sep 17 2021, 2:49 PM · Restricted Project
asbirlea added a comment to D109958: [LoopFlatten] Enable it by default.

fwiw, I'm seeing a crash during bootstrap build, so this needs more testing for sure.

Sep 17 2021, 2:35 PM · Restricted Project
asbirlea added a comment to D109958: [LoopFlatten] Enable it by default.

It would be good to have some performance testing for this too.

Sep 17 2021, 12:41 PM · Restricted Project

Sep 16 2021

asbirlea added a comment to D109907: [DSE] Use cached escape info for calls..

Please document in detail that callCapturesBefore should only be called if the object does not escape before the call. Even if the public API is not available with this patch, it can be added in the future due to oversight if a comment does not explain this choice.

Sep 16 2021, 3:18 PM · Restricted Project
asbirlea added a comment to D109844: [DSE] Track earliest escape, use for loads in isReadClobber..

Thanks for this, changes look reasonable to me.

Sep 16 2021, 3:07 PM · Restricted Project

Sep 15 2021

asbirlea resigned from D67777: Improve comments terseness in PassBuilder.h.

Assume obsolete, please readd if active.

Sep 15 2021, 1:16 PM · Restricted Project
asbirlea resigned from D48307: [Inliner] Try to inline if some blocks in the callee have address taken, but not used in a meaningful..
Sep 15 2021, 12:29 PM · Restricted Project
asbirlea resigned from D56720: [MemorySSA] Add caching results of reaching LiveOnEntry MemoryDef to ClobberWalker.
Sep 15 2021, 12:28 PM · Restricted Project
asbirlea resigned from D46928: implantation example for new AliasAnalysis functions (getAddressesDistance + ModRefSameBuffer).
Sep 15 2021, 12:28 PM
asbirlea resigned from D46864: add 2 functions to the ALiasAnalysis interface (getAddressesDistance + ModRefSameBuffer).

Considered obsolete. Readd if active.

Sep 15 2021, 12:28 PM
asbirlea resigned from D37616: [X86] PR34149 Suboptimal codegen for fast minnum and maxnum..
Sep 15 2021, 12:26 PM
asbirlea resigned from D23908: LSV: Always try to adjust the alloca alignment.
Sep 15 2021, 12:26 PM
asbirlea abandoned D20926: [cpu-detection] Run clang-format over the Host CPU detection code..
Sep 15 2021, 12:25 PM
asbirlea resigned from D75405: [LSR] OptimizeShadowIV: Constant can be negative.
Sep 15 2021, 12:24 PM · Restricted Project
asbirlea resigned from D66132: [CodeGen] Add `shouldDoPartialRedundancyElimination()` to `TargetInstrInfo` (PRR42405).
Sep 15 2021, 12:24 PM · Restricted Project
asbirlea resigned from D63934: [MIR] Improve PRE condition of MachineCSE optimization.
Sep 15 2021, 12:23 PM · Restricted Project
asbirlea resigned from D60356: Accelerate isPotentiallyReachable when a DominatorTree is available..

Cleaning review queue; if not obsolete, reopen.

Sep 15 2021, 12:22 PM · Restricted Project
asbirlea accepted D109798: [NFC] Split up PassBuilder.cpp.
Sep 15 2021, 11:44 AM · Restricted Project
asbirlea accepted D109663: [docs] Document the --print-passes flag in opt..
Sep 15 2021, 11:36 AM · Restricted Project
asbirlea added a comment to D109068: Fix a missing memoryssa update in breakLoopBackedge.

Sent in https://reviews.llvm.org/rGb759381b7515 based on your suggestion. Much appreciated!

Sep 15 2021, 11:24 AM · Restricted Project
asbirlea committed rGb759381b7515: [MemorySSA] Add verification levels to MemorySSA. [NFC] (authored by asbirlea).
[MemorySSA] Add verification levels to MemorySSA. [NFC]
Sep 15 2021, 11:11 AM

Sep 14 2021

asbirlea accepted D109762: [NewPM][SimpleLoopUnswitch] Add DivergenceInfo.

lgtm.

Sep 14 2021, 9:51 AM · Restricted Project

Sep 13 2021

asbirlea accepted D109664: [opt] Remove some legacy PM flags.

LG

Sep 13 2021, 2:01 PM · Restricted Project

Sep 8 2021

asbirlea accepted D109284: Port the cost model printer to New PM.
Sep 8 2021, 1:23 PM · Restricted Project
asbirlea accepted D109134: [MemorySSA] Support invariant.group metadata.

Yes.

Sep 8 2021, 9:38 AM · Restricted Project

Sep 7 2021

asbirlea added a comment to D104806: [ScalarEvolution] Make getMinusSCEV() fail for unrelated pointers..

We're seeing a crash after this patch. Sent out reproducer in https://bugs.llvm.org/show_bug.cgi?id=51787.

Sep 7 2021, 4:45 PM · Restricted Project
asbirlea added a comment to D106947: [DSE][NFC] Rename Later->Killing, Earlier->Dead.

[This may be beyond something to address in this patch] I'm wondering if there should be some consistency between isPartialOverwrite and isCompleteOverwrite. Both could use "Def" and "Use" naming, or "[Maybe]Dead" and "Killing" naming.

Sep 7 2021, 11:32 AM · Restricted Project
asbirlea added a reviewer for D109329: [MemCpyOpt] Fix a variety of scalable-type crashes: fhahn.
Sep 7 2021, 11:10 AM · Restricted Project

Sep 3 2021

asbirlea added inline comments to D109134: [MemorySSA] Support invariant.group metadata.
Sep 3 2021, 11:39 AM · Restricted Project

Sep 2 2021

asbirlea accepted D109197: [LoopPredication] Fix MemorySSA crash in predicateLoopExits.

This is the right API to call for this instruction move.

Sep 2 2021, 5:05 PM · Restricted Project
asbirlea added a comment to D109134: [MemorySSA] Support invariant.group metadata.

I haven't yet looked in depth into the code taken from MemDepAnalysis.

Sep 2 2021, 2:23 PM · Restricted Project
asbirlea added a comment to D109068: Fix a missing memoryssa update in breakLoopBackedge.

The reason the verification didn't trigger right after LoopDeletion is that it's under EXPENSIVE_CHECKS (in verifyOrderingDominationAndDefUses). MSSA is incorrect (without this change) after LoopDeletion.

FYI, this is not the sole issue. I manually added a call to MSSA->verifyMemorySSA() unconditionally to the end of the pass, and it did not catch this.

I'm sorry, I didn't fully parse this.
Adding MSSA->verifyMemorySSA() unconditionally to the end of the pass will not catch this. You need to enable EXPENSIVE_CHECKS (or uncomment the ifdefs inside verifyOrderingDominationAndDefUses for this case, there's more in another verify method). Part of the verification is disabled, even in debug build.
Or "by not sole issue" did you mean there's an additional issue not fixed by this patch?

I'd meant that a missing call to verify memory SSA was not the sole issue. Your explanation explains why an expensive checks build found this, but local testing (on an asserts build) did not.

However, please change this. Calling verifyMemorySSA should not change behavior based on EXPENSIVE_CHECKS!! EXPENSIVE_CHECKS can decide whether to call verify, or even change a "how hard" flag to the verify routine, but a manual call to verify, should verify. It's an idiomatic pattern for all of our analyzes to be able to scatter verify calls under debug options, and have that locally catch problems in assert builds.

I agree with Philip, so currently, unconditionally calling MSSA verification does some verification, but isn't clear "how much" and we don't have a way to call the more comprehensive one without enabling EXPENSIVE_CHECKS.
@asbirlea, I had a slightly different problem :) I assumed that if we build llvm without EXPENSIVE_CHECKS and commented out the macro where we set VerifyMemorySSA, we should get the *entire* verification for MemorySSA (https://github.com/llvm/llvm-project/blob/main/llvm/lib/Analysis/MemorySSA.cpp#L88). If there are additional verifications inside MSSA verifier functionality which is *separately* guarded under EXPENSIVE_CHECKS, that isn't intuitive.

Could we pls separate out into two different verification levels such as how we do for DT (Fast versus Full) and the developer places this the Full version under EXPENSIVE_CHECKS when we call the verification routines in passes. This also lets us know exactly what verification we're getting and we can just comment out EXPENSIVE_CHECKS for debugging bugs in specific passes. Example: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp#L609

Sep 2 2021, 12:46 PM · Restricted Project
asbirlea accepted D109177: [MemorySSA] Properly handle liveOnEntry in the walker printer.
Sep 2 2021, 12:06 PM · Restricted Project

Sep 1 2021

asbirlea added a comment to D109068: Fix a missing memoryssa update in breakLoopBackedge.

The reason the verification didn't trigger right after LoopDeletion is that it's under EXPENSIVE_CHECKS (in verifyOrderingDominationAndDefUses). MSSA is incorrect (without this change) after LoopDeletion.

FYI, this is not the sole issue. I manually added a call to MSSA->verifyMemorySSA() unconditionally to the end of the pass, and it did not catch this.

Sep 1 2021, 5:08 PM · Restricted Project
asbirlea accepted D109068: Fix a missing memoryssa update in breakLoopBackedge.

(a10409fe23c35a7eed0f39d12624af229d3877e1 resolves the way deleted edges are handled when there are no inserts)

Sep 1 2021, 4:03 PM · Restricted Project
asbirlea accepted D109028: [MemorySSA] Add pass to print results of MemorySSA walker.

Still LG. Thanks for the update :-)

Sep 1 2021, 3:51 PM · Restricted Project
asbirlea committed rGa10409fe23c3: [MemorySSAUpdater] Simplify updates when only deleting edges. (authored by asbirlea).
[MemorySSAUpdater] Simplify updates when only deleting edges.
Sep 1 2021, 3:49 PM
asbirlea accepted D109028: [MemorySSA] Add pass to print results of MemorySSA walker.

The only nit as far as printing is that MA is printed before being optimized, and printing it afterwards (as part of the "clobbered by" section), will make it look different.
For example, in the added test, before: "3 = MemoryDef(2) " and after: "[...] clobbered by 3 = MemoryDef(2)->liveOnEntry".
Not a big deal since this is for informational/debugging purposes only, but if you want to bikeshed... =]

Sep 1 2021, 3:14 PM · Restricted Project
asbirlea added a comment to D109068: Fix a missing memoryssa update in breakLoopBackedge.

The reason the verification didn't trigger right after LoopDeletion is that it's under EXPENSIVE_CHECKS (in verifyOrderingDominationAndDefUses). MSSA is incorrect (without this change) after LoopDeletion.

Sep 1 2021, 2:20 PM · Restricted Project

Aug 31 2021

asbirlea added inline comments to D109028: [MemorySSA] Add pass to print results of MemorySSA walker.
Aug 31 2021, 4:23 PM · Restricted Project

Aug 25 2021

asbirlea added inline comments to D108724: [LoopPredication] Preserve MemorySSA.
Aug 25 2021, 2:01 PM · Restricted Project

Aug 24 2021

asbirlea accepted D108674: [GlobalOpt] Fix the assert for null check of global value.

Thanks you for the fix!
The unreduced reproducer no longer asserts with it.

Aug 24 2021, 4:41 PM · Restricted Project
asbirlea added a comment to D106589: [GlobalOpt] support ConstantExpr use of global address for OptimizeGlobalAddressOfMalloc.

It looks like this patch introduced an assertion in GlobalOpt.
I filed a bug with reproducer here: https://bugs.llvm.org/show_bug.cgi?id=51608
Could you please take a look?

Aug 24 2021, 2:51 PM · Restricted Project

Aug 23 2021

asbirlea committed rGe8723abf43c3: [DSE] Check post-dominance for malloc+memset->calloc transform. (authored by asbirlea).
[DSE] Check post-dominance for malloc+memset->calloc transform.
Aug 23 2021, 12:40 PM
asbirlea closed D108485: [DSE] Check post-dominance for malloc+memset->calloc transform..
Aug 23 2021, 12:40 PM · Restricted Project

Aug 20 2021

asbirlea added inline comments to D108485: [DSE] Check post-dominance for malloc+memset->calloc transform..
Aug 20 2021, 2:50 PM · Restricted Project