Page MenuHomePhabricator

mkazantsev (Max Kazantsev)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 23 2017, 8:11 PM (260 w, 2 d)

Recent Activity

Today

mkazantsev added inline comments to D116150: [SCEV] Use lshr in implications.
Thu, Jan 20, 4:02 AM · Restricted Project

Tue, Jan 18

mkazantsev updated the diff for D116150: [SCEV] Use lshr in implications.
Tue, Jan 18, 4:13 AM · Restricted Project

Sun, Jan 9

mkazantsev added a comment to D116150: [SCEV] Use lshr in implications.

Ping

Sun, Jan 9, 9:26 PM · Restricted Project

Wed, Dec 22

mkazantsev requested review of D116150: [SCEV] Use lshr in implications.
Wed, Dec 22, 2:44 AM · Restricted Project
mkazantsev committed rG958e7a284d11: [Test] Add test showing missing opportunity in IndVar's handling of lshr (authored by mkazantsev).
[Test] Add test showing missing opportunity in IndVar's handling of lshr
Wed, Dec 22, 12:10 AM

Dec 19 2021

mkazantsev requested changes to D115781: [SimplifyCFG] Try to do somethink with misscompile bug in widenable condition..

Please rewrite commit message here to make it clear what's going on.

Dec 19 2021, 8:53 PM · Restricted Project
mkazantsev abandoned D112693: [SimplifyCFG] Fix miscompile in tryWidenCondBranchToCondBranch. PR52290.
Dec 19 2021, 8:52 PM · Restricted Project

Dec 3 2021

mkazantsev updated the diff for D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis.

Because incomplete SCCs draw a lot of questions and suspicions, despite I think everything should still work correctly for them, these cases are unimportant for any practical purpose.

Dec 3 2021, 6:08 AM · Restricted Project

Dec 2 2021

mkazantsev added inline comments to D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis.
Dec 2 2021, 11:14 PM · Restricted Project
mkazantsev added a comment to D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis.

Actually the definition of "almost addrec" doesn't even cover the motivation for this patch, where we have 2 phis from same block that just swap values. I don't think we can have any good framing here.

Dec 2 2021, 10:50 PM · Restricted Project
mkazantsev added a comment to D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis.

Thanks for the suggesting, I need to wright a prototype to see how it works and if it covers all I need.

Dec 2 2021, 10:36 PM · Restricted Project

Nov 28 2021

mkazantsev accepted D113416: [GVN] Simple GVNHoist - scalars test (NFC).

Do you need any approval for that? :)

Nov 28 2021, 9:20 PM · Restricted Project
mkazantsev accepted D112734: [SCEVExpander] Drop poison generating flags when reusing instructions.

Ok, thanks for clarification.

Nov 28 2021, 9:19 PM · Restricted Project
mkazantsev added inline comments to D114555: [ScalarEvolution] Add bailout to avoid zext of pointer..
Nov 28 2021, 8:52 PM · Restricted Project
mkazantsev added a comment to D114647: [TrivialDeadness] Introduce API separating two different usages.

One more point is that the name wouldInstructionBeTriviallyDeadOnPathsWithoutUse is not entirely clear. Does true here mean that at least one path without uses exists, or it is something that we need to check separately?

Nov 28 2021, 8:46 PM · Restricted Project
mkazantsev added a comment to D114647: [TrivialDeadness] Introduce API separating two different usages.

I think most of this logic really belongs to isGuaranteedToTransferExecutionToSuccessor. I also think that wouldInstructionBeTriviallyDeadOnPathsWithoutUse should simply be isGuaranteedToTransferExecutionToSuccessor && !mayHaveSideEffects (maybe with filtering out terminators, ehpads and stuff like this), unless you have a counter-test.

Nov 28 2021, 8:42 PM · Restricted Project

Nov 23 2021

mkazantsev accepted D113516: [IndVarSimplify] Prefer unsigned indvars in visitIVCast..
Nov 23 2021, 10:25 PM · Restricted Project

Nov 21 2021

mkazantsev added inline comments to D114039: [runtime-unroll] Prune early exits when unrolling multiple exit loops.
Nov 21 2021, 8:24 PM · Restricted Project
mkazantsev added a comment to D114260: [SCEV] Remove validity check on lookup (NFC).

Can we replace it with assert for the first time, and then delete it when we make sure it never fails?

Nov 21 2021, 8:19 PM · Restricted Project
mkazantsev accepted D114263: [SCEV] Simplify forgetSymbolicName() (NFCI).
Nov 21 2021, 8:16 PM · Restricted Project
mkazantsev accepted D113349: [SCEV] Fix and validate ValueExprMap/ExprValueMap consistency.

lg!

Nov 21 2021, 8:16 PM · Restricted Project

Nov 10 2021

mkazantsev added a comment to D113578: [SCEV] Apply loop guards when computing max BTC for arbitrary steps..

I'd rather move the assert inside of applyLoopGuards. If it breaks, it's a subject for improving our reasoning. I can imagine it could be breaking because of issues with caching (e.g. if addrecs are involved), though. So, unless the failures are mass and disruptive, I'd prefer it to stay and catch us opportunities.

Nov 10 2021, 10:00 PM · Restricted Project
mkazantsev added inline comments to D113578: [SCEV] Apply loop guards when computing max BTC for arbitrary steps..
Nov 10 2021, 9:58 PM · Restricted Project

Nov 9 2021

mkazantsev abandoned D112699: [SimplifyCFG] Simplify conditions of branches.

Ok, I don't care enough.

Nov 9 2021, 11:02 PM · Restricted Project
mkazantsev added a comment to D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis.

Ping

Nov 9 2021, 3:32 AM · Restricted Project
mkazantsev added a comment to D110385: [SCEV] Verify contents of cached Block Dispositions.

Ping

Nov 9 2021, 3:32 AM · Restricted Project
mkazantsev committed rGcb728cb8a9b3: [NFC] Get rid of hardcoded magical constant and use Optionals instead (authored by mkazantsev).
[NFC] Get rid of hardcoded magical constant and use Optionals instead
Nov 9 2021, 3:14 AM

Nov 8 2021

mkazantsev added a comment to D112573: [IndVarSimplify] Reduce nondeterministic behaviour in visitIVCast..

This is strange. From what I'm seeing, your IV starts from 1 and is just trivially positive, so there should not be any troubles with using zext. Could you please post a separate review with the unsigned version & its generated checks for this test?

Nov 8 2021, 8:32 PM · Restricted Project
mkazantsev added a comment to D112699: [SimplifyCFG] Simplify conditions of branches.

Look like some of the tests no longer test what they were supposed to test. Some of these could be rewritten in MIR, I suppose.
And/or would it make sense to add test runs with Options.SimplifyCondBranch set to false (somehow), so old tests are not affected?

Nov 8 2021, 8:18 PM · Restricted Project

Nov 7 2021

mkazantsev added a comment to D112693: [SimplifyCFG] Fix miscompile in tryWidenCondBranchToCondBranch. PR52290.

Ping

Nov 7 2021, 10:09 PM · Restricted Project
mkazantsev added inline comments to D112734: [SCEVExpander] Drop poison generating flags when reusing instructions.
Nov 7 2021, 9:35 PM · Restricted Project
mkazantsev added a comment to D113293: [SimplifyCFG] Add early bailout if Use is not in same BB..

I don't understand the old code. Why does it look at one user? I thought the order of uses is undefined, and whatever checks are done for just one user and not done for the others may be a source of non-determinism.

Nov 7 2021, 9:30 PM · Restricted Project
mkazantsev added a comment to D113349: [SCEV] Fix and validate ValueExprMap/ExprValueMap consistency.

Can we split out refactoring + verifier changes (that expose some failues) and fixes for those failures? I'd like to see the tests and situations where they fail to make sure these functional fixes really address the problems. If those failures aren't too numerous or disrupting, please do.

Nov 7 2021, 9:18 PM · Restricted Project

Nov 2 2021

mkazantsev accepted D113024: [IndVars] Pass TTI to replaceCongruentIVs.

Wow, that's impressive number of noop updates. :) Change in pr27133.ll is OK and widen-loop-comp.ll has improvements so LGTM. Passing there TTI totally makes sense.

Nov 2 2021, 8:48 AM · Restricted Project
mkazantsev added inline comments to D112734: [SCEVExpander] Drop poison generating flags when reusing instructions.
Nov 2 2021, 1:28 AM · Restricted Project

Nov 1 2021

mkazantsev added a comment to D110620: [SCEV] Infer ranges for SCC consisting of cycled Phis.

Ping

Nov 1 2021, 1:17 AM · Restricted Project
mkazantsev accepted D112875: [SCEV] Only add direct loop users (NFC).

Should be fine!

Nov 1 2021, 1:13 AM · Restricted Project
mkazantsev added a comment to D112573: [IndVarSimplify] Reduce nondeterministic behaviour in visitIVCast..

If I understand your proposal correctly, you propose to replace scheme "take signedness from 1st user which is non-deterministically selected" with scheme "if at least one user of widest type is signed cast, widen as signed; otherwize widen as unsigned"?

Nov 1 2021, 12:41 AM · Restricted Project
mkazantsev accepted D112851: [PassManager] `buildModuleOptimizationPipeline()`: schedule `LoopDeletion` pass run before vectorization passes.

Deletion of loops before they are vectorized absolutely makes sense to me. Please give it couple more days just in case if someone has concerns regarding the regressions, but making vectorizer run on empty doesn't sound. Please give it 2-3 days to hear others' concerns.

Nov 1 2021, 12:19 AM · Restricted Project
mkazantsev added a comment to D110822: [GVN] Simple GVN hoist - loads and stores.

(Please don't mind -1 for me as it was just for sorting out review list purposes)

Nov 1 2021, 12:06 AM · Restricted Project
mkazantsev accepted D110922: [LoopPeel] Peel loops with exits followed by an unreachable or deopt block.

LGTM

Nov 1 2021, 12:03 AM · Restricted Project

Oct 31 2021

mkazantsev added a comment to D110385: [SCEV] Verify contents of cached Block Dispositions.

This one is now ready for review. Please feel free to take a look.

Oct 31 2021, 10:17 PM · Restricted Project
mkazantsev committed rGe512c5b1664d: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV (authored by mkazantsev).
[SCEV][NFC] Factor out common API for getting unique operands of a SCEV
Oct 31 2021, 10:00 PM
mkazantsev closed D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV.
Oct 31 2021, 10:00 PM · Restricted Project
mkazantsev accepted D112262: [indvars] Rotate zext though icmp to reduce loop varying computation.

LGTM, thanks!

Oct 31 2021, 9:49 PM · Restricted Project
mkazantsev added a comment to D112693: [SimplifyCFG] Fix miscompile in tryWidenCondBranchToCondBranch. PR52290.

Some more detailed description: imagine each block had a unique call signaling that we entered it. In the initial test, path bb->bb1->bb5 did exist and was legal. But if after bb we've decided to go to bb2, then there is no possible way we can ever get to bb5. But with this transform, we sure can (bb->bb2->bb1->bb5), for no explainable reason. Guard widening doesn't explain it. It's a bug.

Oct 31 2021, 9:44 PM · Restricted Project
mkazantsev added a comment to D112693: [SimplifyCFG] Fix miscompile in tryWidenCondBranchToCondBranch. PR52290.

Philip, the bug was indeed revealed on attempt to change the frontend, but there was no bug in initial IR. You are right that widenable condition does not require anything specific be down the false path. But guard widening does. All deopts are mutually replacable, but you can't replace a deopt with a random branch just because there is a widenable condition elsewhere. This makes SimplifyCFG somewhat mad.

Oct 31 2021, 9:41 PM · Restricted Project

Oct 29 2021

mkazantsev updated the diff for D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV.

Addressed Nikita's non-determinism concern.

Oct 29 2021, 10:34 PM · Restricted Project
mkazantsev added a reviewer for D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV: nikic.
Oct 29 2021, 9:58 PM · Restricted Project
mkazantsev planned changes to D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV.
Oct 29 2021, 9:58 PM · Restricted Project
mkazantsev added a comment to D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV.

Well, uniqueness is to reduce overhead for the users. If that concerns you, I'll rewrite it into returning vector of unique elements in deterministic order.

Oct 29 2021, 9:57 PM · Restricted Project

Oct 28 2021

mkazantsev requested review of D112699: [SimplifyCFG] Simplify conditions of branches.
Oct 28 2021, 2:46 AM · Restricted Project
mkazantsev committed rG8daf76935d30: [Test] Regenerate some of llc test checks using auto updater (authored by mkazantsev).
[Test] Regenerate some of llc test checks using auto updater
Oct 28 2021, 2:19 AM
mkazantsev committed rG21adcdb712c6: [Test] Regenerate checks using auto-update script (authored by mkazantsev).
[Test] Regenerate checks using auto-update script
Oct 28 2021, 1:14 AM

Oct 27 2021

mkazantsev requested review of D112693: [SimplifyCFG] Fix miscompile in tryWidenCondBranchToCondBranch. PR52290.
Oct 27 2021, 11:53 PM · Restricted Project
mkazantsev committed rG4024ca892227: [Test] Add test showing missing simplifycfg opportunity for Phi with undef… (authored by mkazantsev).
[Test] Add test showing missing simplifycfg opportunity for Phi with undef…
Oct 27 2021, 9:24 PM
mkazantsev updated the diff for D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV.
Oct 27 2021, 8:05 PM · Restricted Project
mkazantsev committed rG513914e1f314: [SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption (authored by mkazantsev).
[SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption
Oct 27 2021, 7:39 PM
mkazantsev closed D111533: [SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption.
Oct 27 2021, 7:39 PM · Restricted Project
mkazantsev added inline comments to D111533: [SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption.
Oct 27 2021, 7:02 PM · Restricted Project

Oct 26 2021

mkazantsev accepted D111533: [SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption.

Upon that, I'm going to merge it tomorrow if there will be no objections.

Oct 26 2021, 7:59 PM · Restricted Project
mkazantsev committed rG5961f0308f5b: [SCEV][NFC] Verify intergity of SCEVUsers (authored by mkazantsev).
[SCEV][NFC] Verify intergity of SCEVUsers
Oct 26 2021, 7:55 PM
mkazantsev closed D112402: [SCEV][NFC] Verify intergity of SCEVUsers.
Oct 26 2021, 7:55 PM · Restricted Project

Oct 25 2021

mkazantsev committed rG9bbfe0f72c37: [NFC] Remove obsolete simplifyOnceImpl function (authored by mkazantsev).
[NFC] Remove obsolete simplifyOnceImpl function
Oct 25 2021, 11:52 PM
mkazantsev closed D112517: [NFC] Minor code improvement. Replacing simplifyOnce with simplifyOnceImpl..
Oct 25 2021, 11:52 PM · Restricted Project
mkazantsev accepted D112517: [NFC] Minor code improvement. Replacing simplifyOnce with simplifyOnceImpl..
Oct 25 2021, 11:38 PM · Restricted Project
mkazantsev committed rGd4c74cd4e8f3: [NFC] [LoopPeel] Update IDoms of non-loop blocks dominated by the loop (authored by mkazantsev).
[NFC] [LoopPeel] Update IDoms of non-loop blocks dominated by the loop
Oct 25 2021, 11:31 PM
mkazantsev closed D111611: [NFC] [LoopPeel] Update IDoms of non-loop blocks dominated by the loop.
Oct 25 2021, 11:31 PM · Restricted Project
mkazantsev requested changes to D112517: [NFC] Minor code improvement. Replacing simplifyOnce with simplifyOnceImpl..
Oct 25 2021, 11:23 PM · Restricted Project
mkazantsev accepted D111611: [NFC] [LoopPeel] Update IDoms of non-loop blocks dominated by the loop.
Oct 25 2021, 11:05 PM · Restricted Project
mkazantsev added inline comments to D112262: [indvars] Rotate zext though icmp to reduce loop varying computation.
Oct 25 2021, 10:53 PM · Restricted Project
mkazantsev added inline comments to D112402: [SCEV][NFC] Verify intergity of SCEVUsers.
Oct 25 2021, 10:40 PM · Restricted Project
mkazantsev requested review of D112516: [SCEV][NFC] Factor out common API for getting unique operands of a SCEV.
Oct 25 2021, 10:39 PM · Restricted Project
mkazantsev updated the diff for D112402: [SCEV][NFC] Verify intergity of SCEVUsers.

Reduced nest.

Oct 25 2021, 10:07 PM · Restricted Project
mkazantsev added inline comments to D112402: [SCEV][NFC] Verify intergity of SCEVUsers.
Oct 25 2021, 9:56 PM · Restricted Project
mkazantsev added a comment to D112402: [SCEV][NFC] Verify intergity of SCEVUsers.

I have no idea what you mean by this. Expand?

Oct 25 2021, 9:35 PM · Restricted Project
mkazantsev added a comment to D111611: [NFC] [LoopPeel] Update IDoms of non-loop blocks dominated by the loop.

Looks fine for me, but let's give other reviewers time to raise their concerns. And please run some extensive fuzzer testing for it.

Oct 25 2021, 7:59 AM · Restricted Project
mkazantsev committed rG31822e0530be: [Test] Add test for PR52290 (authored by mkazantsev).
[Test] Add test for PR52290
Oct 25 2021, 4:27 AM
mkazantsev committed rGa9b0776a81e8: [SimplifyCFG] Sanity assert in iterativelySimplifyCFG (authored by mkazantsev).
[SimplifyCFG] Sanity assert in iterativelySimplifyCFG
Oct 25 2021, 3:10 AM
mkazantsev committed rGf8623b078305: [SCEV][NFC] Win some compile time from mass forgetMemoizedResults (authored by mkazantsev).
[SCEV][NFC] Win some compile time from mass forgetMemoizedResults
Oct 25 2021, 12:20 AM
mkazantsev closed D112294: [SCEV][NFC] Win some compile time from mass forgetMemoizedResults.
Oct 25 2021, 12:20 AM · Restricted Project
mkazantsev committed rGdbab339ea44e: [SCEV][NFC] Apply mass forgetMemoizedResults queries where possible (authored by mkazantsev).
[SCEV][NFC] Apply mass forgetMemoizedResults queries where possible
Oct 25 2021, 12:05 AM
mkazantsev closed D111602: [SCEV][NFC] Apply mass forgetMemoizedResults queries where possible.
Oct 25 2021, 12:05 AM · Restricted Project

Oct 24 2021

mkazantsev committed rGa6096b7f9ed3: [SCEV][NFC] Introduce API for mass forgetMemoizedResults query (authored by mkazantsev).
[SCEV][NFC] Introduce API for mass forgetMemoizedResults query
Oct 24 2021, 11:50 PM
mkazantsev closed D112293: [SCEV][NFC] Introduce API for mass forgetMemoizedResults query.
Oct 24 2021, 11:49 PM · Restricted Project
mkazantsev added a comment to D112402: [SCEV][NFC] Verify intergity of SCEVUsers.

Not 100% sure it should be UniqueSCEVs to iterate on; besides, we don't verify obsolete dangling users so far (at least not before we start dropping them). Ideas for further improvement welcome.

Oct 24 2021, 11:32 PM · Restricted Project
mkazantsev requested review of D112402: [SCEV][NFC] Verify intergity of SCEVUsers.
Oct 24 2021, 11:29 PM · Restricted Project
mkazantsev committed rG1c18ebb2cc7c: [NFC][SCEV] Do not track users of SCEVConstants (authored by mkazantsev).
[NFC][SCEV] Do not track users of SCEVConstants
Oct 24 2021, 10:33 PM
mkazantsev committed rGfea4a48c0baa: [SCEV][NFC] API for tracking of SCEV users (authored by mkazantsev).
[SCEV][NFC] API for tracking of SCEV users
Oct 24 2021, 10:15 PM
mkazantsev closed D112295: [SCEV][NFC] API for tracking of SCEV users.
Oct 24 2021, 10:15 PM · Restricted Project
mkazantsev added inline comments to D112295: [SCEV][NFC] API for tracking of SCEV users.
Oct 24 2021, 9:34 PM · Restricted Project

Oct 22 2021

mkazantsev updated the diff for D110385: [SCEV] Verify contents of cached Block Dispositions.

Rebased

Oct 22 2021, 1:59 AM · Restricted Project
mkazantsev updated the diff for D111533: [SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption.

All splittable parts are split out.

Oct 22 2021, 1:43 AM · Restricted Project
mkazantsev requested review of D112295: [SCEV][NFC] API for tracking of SCEV users.
Oct 22 2021, 1:06 AM · Restricted Project
mkazantsev planned changes to D110385: [SCEV] Verify contents of cached Block Dispositions.

Needs rebase. Withdrawing from review for now.

Oct 22 2021, 12:43 AM · Restricted Project
mkazantsev added inline comments to D111533: [SCEV] Invalidate user SCEVs along with operand SCEVs to avoid cache corruption.
Oct 22 2021, 12:39 AM · Restricted Project
mkazantsev accepted D111836: [indvars] Use fact loop must exit to canonicalize to unsigned conditions.

LGTM, but I still think that "folded" is not a proper term here.

Oct 22 2021, 12:27 AM · Restricted Project
mkazantsev requested review of D112294: [SCEV][NFC] Win some compile time from mass forgetMemoizedResults.
Oct 22 2021, 12:20 AM · Restricted Project

Oct 21 2021

mkazantsev retitled D111602: [SCEV][NFC] Apply mass forgetMemoizedResults queries where possible from [SCEV][NFC] Apply pass forgetMemoizedResults queries where possible to [SCEV][NFC] Apply mass forgetMemoizedResults queries where possible.
Oct 21 2021, 11:29 PM · Restricted Project
mkazantsev added inline comments to D111602: [SCEV][NFC] Apply mass forgetMemoizedResults queries where possible.
Oct 21 2021, 11:29 PM · Restricted Project