Page MenuHomePhabricator

mkazantsev (Max Kazantsev)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 23 2017, 8:11 PM (185 w, 1 d)

Recent Activity

Fri, Aug 7

mkazantsev committed rGda9e7b1ab03b: [Test] Added test showing missing range check elimination opportunity in IndVars (authored by mkazantsev).
[Test] Added test showing missing range check elimination opportunity in IndVars
Fri, Aug 7, 2:54 AM
mkazantsev committed rG9b49a4d30120: [Test] Add one more test on IndVars that was failing on one of older builds (authored by mkazantsev).
[Test] Add one more test on IndVars that was failing on one of older builds
Fri, Aug 7, 12:24 AM

Mon, Aug 3

mkazantsev committed rG7647c2716e38: [SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in… (authored by mkazantsev).
[SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in…
Mon, Aug 3, 8:18 PM
mkazantsev closed D85001: [SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in non-trivial unswitching and save compile time.
Mon, Aug 3, 8:18 PM · Restricted Project
mkazantsev abandoned D57448: [DO NOT MERGE] DTU bug demonstration.
Mon, Aug 3, 3:55 AM

Sun, Aug 2

mkazantsev added inline comments to D51922: [NewGVN] Apply SimplifySelectInst if any of the options is undef..
Sun, Aug 2, 10:20 PM
mkazantsev accepted D51922: [NewGVN] Apply SimplifySelectInst if any of the options is undef..

Looks good. Is it still not merged? :)

Sun, Aug 2, 10:19 PM
mkazantsev accepted D85046: [SCEV] If Start >= RHS, simplify (Start smin RHS) to RHS for trip counts (PR46924, PR46939).

LGTM. Good catch! Need to think about API to make this more generic.

Sun, Aug 2, 10:09 PM · Restricted Project
mkazantsev added a comment to D85046: [SCEV] If Start >= RHS, simplify (Start smin RHS) to RHS for trip counts (PR46924, PR46939).

Seems that SCEV simplification is unable to exploit this fact when computing minimum. I think the right place to fix this is inside getMinExpr.

Sun, Aug 2, 10:01 PM · Restricted Project

Fri, Jul 31

mkazantsev accepted D77560: [SCEV] don't try to query getSCEV() for incomplete PHIs.

LGTM. Please wait for Roman if he has any objections.

Fri, Jul 31, 3:01 AM · Restricted Project

Thu, Jul 30

mkazantsev requested review of D85001: [SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in non-trivial unswitching and save compile time.
Thu, Jul 30, 10:13 PM · Restricted Project
mkazantsev committed rG8aaeee5fb6d7: [SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal (authored by mkazantsev).
[SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal
Thu, Jul 30, 9:50 PM
mkazantsev closed D84925: [SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal.
Thu, Jul 30, 9:49 PM · Restricted Project
mkazantsev added inline comments to D84925: [SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal.
Thu, Jul 30, 9:36 PM · Restricted Project
mkazantsev committed rGd889e17eca8e: [SimpleLoopUnswitch] Drop make.implicit metadata in case of non-trivial… (authored by mkazantsev).
[SimpleLoopUnswitch] Drop make.implicit metadata in case of non-trivial…
Thu, Jul 30, 9:33 PM
mkazantsev closed D84916: [SimpleLoopUnswitch] Drop make.implicit metadata in case of non-trivial unswitching.
Thu, Jul 30, 9:33 PM · Restricted Project
mkazantsev requested review of D84925: [SimpleLoopUnswitch] Preserve make.implicit in non-trivial unswitch if legal.
Thu, Jul 30, 2:38 AM · Restricted Project
mkazantsev requested review of D84916: [SimpleLoopUnswitch] Drop make.implicit metadata in case of non-trivial unswitching.
Thu, Jul 30, 1:36 AM · Restricted Project
mkazantsev added inline comments to D77560: [SCEV] don't try to query getSCEV() for incomplete PHIs.
Thu, Jul 30, 1:20 AM · Restricted Project

Wed, Jul 29

mkazantsev committed rG3678ad88a6a1: [NFC] Remove unused variable (authored by mkazantsev).
[NFC] Remove unused variable
Wed, Jul 29, 11:34 PM

Tue, Jul 28

mkazantsev resigned from D46193: [LSR] Skip LSR if the cost of input is cheaper than LSR's solution.
Tue, Jul 28, 7:38 AM
mkazantsev resigned from D42290: [SCEV] Clear poison flags during expansion of SCEV.
Tue, Jul 28, 7:38 AM
mkazantsev accepted D71539: [SCEV] Look through trivial PHIs..

Looks good (with nits).

Tue, Jul 28, 7:09 AM · Restricted Project
mkazantsev accepted D71538: [SCEVExpander] Preserve LCSSA directly..

Let's give it a try. :) LGTM with some nits inline.

Tue, Jul 28, 5:24 AM · Restricted Project
mkazantsev requested changes to D77560: [SCEV] don't try to query getSCEV() for incomplete PHIs.
Tue, Jul 28, 5:15 AM · Restricted Project
mkazantsev accepted D82438: [SimplifyCFG] Cost required selects.

Looks good

Tue, Jul 28, 5:15 AM · Restricted Project
mkazantsev accepted D84108: [SimplifyCFG][LoopRotate] SimplifyCFG: disable common instruction hoisting by default, enable late in pipeline.

Fine by me, but not sure if @nikic has any questions.

Tue, Jul 28, 5:13 AM · Restricted Project
mkazantsev accepted D84320: [LoopSimplifyCFG] Delete landing pads in dead exit blocks.

LGTM. Please add a TODO that the whole block can be collapsed.

Tue, Jul 28, 5:09 AM · Restricted Project

Thu, Jul 23

mkazantsev added inline comments to D84399: [SCEVExpander] Avoid re-using existing casts if it means updating users..
Thu, Jul 23, 9:44 PM · Restricted Project

Wed, Jul 22

mkazantsev added a comment to D84181: [GVN] Rewrite IsValueFullyAvailableInBlock().

Though I don't see obvious problems in the new algorithm, I cannot wrap my mind around the old one and can't say if they are doing the same thing. I'd suggest the following reliable way to make sure it is NFC:

  • Instead of changing logic of IsValueFullyAvailableInBlock, introduce a new version of it and use it.
  • In debug mode, also call the old one and assert that the results are the same.
  • Then, after it has been in for a long enough while and we are certain those algorithms do the same thing, remove the old one.
Wed, Jul 22, 11:27 PM · Restricted Project
mkazantsev added inline comments to D84320: [LoopSimplifyCFG] Delete landing pads in dead exit blocks.
Wed, Jul 22, 10:01 PM · Restricted Project
mkazantsev committed rGc1d8e3923657: [Test] Add more simple tests for PR46786 (authored by mkazantsev).
[Test] Add more simple tests for PR46786
Wed, Jul 22, 3:12 AM
mkazantsev committed rGb96114c1e1fc: [SCEV] Remove premature assert. PR46786 (authored by mkazantsev).
[SCEV] Remove premature assert. PR46786
Wed, Jul 22, 1:44 AM
mkazantsev closed D84294: [SCEV] Remove premature assert. PR46786.
Wed, Jul 22, 1:43 AM · Restricted Project
mkazantsev added a comment to D84294: [SCEV] Remove premature assert. PR46786.

I've updated commit message basing on our discussion. We want to be at a point when "is pointer" notion doesn't get lost. We are clearly not at this point now. We need to assess the amount of work we should do to get there, and construct more tests exercising different scenarios of this.

Wed, Jul 22, 1:36 AM · Restricted Project
mkazantsev updated the summary of D84294: [SCEV] Remove premature assert. PR46786.
Wed, Jul 22, 1:34 AM · Restricted Project
mkazantsev added a comment to D84294: [SCEV] Remove premature assert. PR46786.

I think we have some cases (related to mul) where "is pointer" notion can be lost. Maybe we can fix it. Let me try to construct some more examples of those.

Wed, Jul 22, 1:29 AM · Restricted Project
Herald added a project to D84294: [SCEV] Remove premature assert. PR46786: Restricted Project.
Wed, Jul 22, 12:43 AM · Restricted Project

Tue, Jul 21

mkazantsev committed rG360ab707127d: [SimplifyCFG] Do not create unneeded PR Phi in block with convergent calls (authored by mkazantsev).
[SimplifyCFG] Do not create unneeded PR Phi in block with convergent calls
Tue, Jul 21, 11:54 PM
mkazantsev closed D83936: [SimplifyCFG] Do not create unneeded PR Phi in block with convergent calls.
Tue, Jul 21, 11:54 PM · Restricted Project, Restricted Project

Sun, Jul 19

mkazantsev added a comment to D83936: [SimplifyCFG] Do not create unneeded PR Phi in block with convergent calls.

Ping.

Sun, Jul 19, 11:09 PM · Restricted Project, Restricted Project
mkazantsev added a comment to D84108: [SimplifyCFG][LoopRotate] SimplifyCFG: disable common instruction hoisting by default, enable late in pipeline.

I'd suggest splitting this in two parts:

  • NFC patch with new options & test updates, but preserving current behavior;
  • One-liner patch to switch default values.

This is needed to make revert easier in case if it exposes some problems.

Sun, Jul 19, 10:27 PM · Restricted Project

Fri, Jul 17

mkazantsev accepted D83686: [NFCI] LoopSink pass requires PGO, so rename it as PGOLoopSink.

Not sure why it is necessary to rename it in the first place, but looks fine.

Fri, Jul 17, 4:48 AM · Restricted Project
mkazantsev added inline comments to D82438: [SimplifyCFG] Cost required selects.
Fri, Jul 17, 4:44 AM · Restricted Project
mkazantsev committed rGdf6e185e8f89: [InstCombine][Test] Test for fix of replacing select with Phis when branch has… (authored by mkazantsev).
[InstCombine][Test] Test for fix of replacing select with Phis when branch has…
Fri, Jul 17, 3:17 AM
mkazantsev closed D84006: [InstCombine][Test] Test for fix of replacing select with Phis when branch has the same labels.
Fri, Jul 17, 3:16 AM · Restricted Project
mkazantsev accepted D84006: [InstCombine][Test] Test for fix of replacing select with Phis when branch has the same labels.

LGTM

Fri, Jul 17, 1:44 AM · Restricted Project
mkazantsev added a comment to D84003: [InstCombine] Fix replace select with Phis when branch has the same labels.

@kpolushin please follow-up with the test when you know how to create it.

Fri, Jul 17, 12:06 AM · Restricted Project
mkazantsev committed rGc98988107868: [InstCombine] Fix replace select with Phis when branch has the same labels (authored by mkazantsev).
[InstCombine] Fix replace select with Phis when branch has the same labels
Fri, Jul 17, 12:05 AM
mkazantsev closed D84003: [InstCombine] Fix replace select with Phis when branch has the same labels.
Fri, Jul 17, 12:05 AM · Restricted Project

Thu, Jul 16

mkazantsev accepted D84003: [InstCombine] Fix replace select with Phis when branch has the same labels.

Exactly. Approved per comment above, I will merge it now since Kirill has no committer access.

Thu, Jul 16, 11:37 PM · Restricted Project
mkazantsev added a comment to D84003: [InstCombine] Fix replace select with Phis when branch has the same labels.

Please add unit test.

Until then, can we please revert to green?

Thu, Jul 16, 11:29 PM · Restricted Project
mkazantsev added a comment to D84003: [InstCombine] Fix replace select with Phis when branch has the same labels.

Can we check in this fix and merge the test later? The bug here is pretty obvious. WDYT?

Thu, Jul 16, 11:23 PM · Restricted Project
mkazantsev requested changes to D84003: [InstCombine] Fix replace select with Phis when branch has the same labels.

Please add unit test.

Thu, Jul 16, 11:03 PM · Restricted Project
mkazantsev added a comment to D71538: [SCEVExpander] Preserve LCSSA directly..

Could you please add some .ll tests showing how this change impacts the code being generated (if it is possible)?

Thu, Jul 16, 3:10 AM · Restricted Project
mkazantsev added a comment to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

Follow-up fix for one of clang tests: https://reviews.llvm.org/D83936

Thu, Jul 16, 3:01 AM · Restricted Project
Herald added a project to D83936: [SimplifyCFG] Do not create unneeded PR Phi in block with convergent calls: Restricted Project.
Thu, Jul 16, 3:00 AM · Restricted Project, Restricted Project
mkazantsev committed rG989ee11df681: [Test] Add test that shows how SimplifyCFG may insert redunant Phi (authored by mkazantsev).
[Test] Add test that shows how SimplifyCFG may insert redunant Phi
Thu, Jul 16, 2:23 AM
mkazantsev committed rG90798e09e290: Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG" (authored by mkazantsev).
Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG"
Thu, Jul 16, 2:09 AM
mkazantsev added a reverting change for rGb893822e32ff: Revert "[InstCombine] Simplify boolean Phis with const inputs using CFG": rG90798e09e290: Re-enable "[InstCombine] Simplify boolean Phis with const inputs using CFG".
Thu, Jul 16, 2:09 AM
mkazantsev added a comment to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

SimplifyCFG's attempts to perform PR are outrageously stupid. It re-inserts (worse version of) removed Phi in order to perform threading, but does not actually thread. I'll fix it separately, it's not blocking this one (it inserts phi anyway, just now it's worse).

Thu, Jul 16, 1:27 AM · Restricted Project
mkazantsev added a comment to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

One of clang tests shown that we are still missing some case...

Thu, Jul 16, 12:57 AM · Restricted Project

Wed, Jul 15

mkazantsev committed rGb893822e32ff: Revert "[InstCombine] Simplify boolean Phis with const inputs using CFG" (authored by mkazantsev).
Revert "[InstCombine] Simplify boolean Phis with const inputs using CFG"
Wed, Jul 15, 10:59 PM
mkazantsev added a reverting change for rG00472067c34c: [InstCombine] Simplify boolean Phis with const inputs using CFG: rGb893822e32ff: Revert "[InstCombine] Simplify boolean Phis with const inputs using CFG".
Wed, Jul 15, 10:59 PM
mkazantsev added a comment to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

Looks like some clang tests need update too...

Wed, Jul 15, 10:24 PM · Restricted Project
mkazantsev committed rG00472067c34c: [InstCombine] Simplify boolean Phis with const inputs using CFG (authored by mkazantsev).
[InstCombine] Simplify boolean Phis with const inputs using CFG
Wed, Jul 15, 10:12 PM
mkazantsev closed D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.
Wed, Jul 15, 10:12 PM · Restricted Project

Jul 12 2020

mkazantsev updated the diff for D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

At last!

Jul 12 2020, 10:39 PM · Restricted Project
mkazantsev committed rGe808cab82448: [InstCombine] Improve select -> phi canonicalization: consider more blocks (authored by mkazantsev).
[InstCombine] Improve select -> phi canonicalization: consider more blocks
Jul 12 2020, 9:41 PM
mkazantsev closed D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.
Jul 12 2020, 9:41 PM · Restricted Project

Jul 10 2020

mkazantsev added inline comments to D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.
Jul 10 2020, 5:07 AM · Restricted Project
mkazantsev updated the diff for D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.

Fixed var naming in test that went astray after rebase.

Jul 10 2020, 5:03 AM · Restricted Project
mkazantsev added inline comments to D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.
Jul 10 2020, 4:57 AM · Restricted Project
mkazantsev updated the diff for D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.

Implemented deduplication (used SetVector to ensure that we have deterministic fold order).

Jul 10 2020, 12:24 AM · Restricted Project

Jul 9 2020

mkazantsev added inline comments to D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.
Jul 9 2020, 11:35 PM · Restricted Project

Jul 7 2020

mkazantsev added a comment to D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks.

Ideally we could consider all dominator chain, but this is too expensive. This is attempt to reduce the impact.

Jul 7 2020, 1:48 AM · Restricted Project
Herald added a project to D83284: [InstCombine] Improve select -> phi canonicalization: consider more blocks: Restricted Project.
Jul 7 2020, 1:45 AM · Restricted Project

Jul 6 2020

mkazantsev added a comment to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

At least 2 another transforms for selects are missing that we need to avoid regressions. I'm depreoritizing this as these efforts don't pay off.

Jul 6 2020, 11:20 PM · Restricted Project
mkazantsev committed rG094e99d264c9: [Test] Add one more missing optimization opportunity test (authored by mkazantsev).
[Test] Add one more missing optimization opportunity test
Jul 6 2020, 11:04 PM
mkazantsev added a comment to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

Still missing cases found for selects... It's getting not worth it.

Jul 6 2020, 10:42 PM · Restricted Project

Jul 3 2020

mkazantsev planned changes to D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

Err, you're right @nikic. Will do.

Jul 3 2020, 10:42 PM · Restricted Project

Jul 1 2020

mkazantsev updated the diff for D81375: [InstCombine] Simplify boolean Phis with const inputs using CFG.

Rebased on top of underlying fixes.

Jul 1 2020, 11:15 PM · Restricted Project

Jun 29 2020

mkazantsev committed rGf01d9e6fc3e2: [SimplifyCFG] Fix inconsistency in block size assessment for threading (authored by mkazantsev).
[SimplifyCFG] Fix inconsistency in block size assessment for threading
Jun 29 2020, 11:04 PM
mkazantsev closed D81835: [SimplifyCFG] Fix inconsistency in block size assessment for threading.
commit f01d9e6fc3e291a2faed8c9b7dcbabf760f32bd6
Author: Max Kazantsev <mkazantsev@azul.com>
Date:   Tue Jun 30 12:38:15 2020 +0700
Jun 29 2020, 11:04 PM · Restricted Project
mkazantsev added a comment to D81835: [SimplifyCFG] Fix inconsistency in block size assessment for threading.

Thanks!

Jun 29 2020, 10:00 PM · Restricted Project
mkazantsev added a comment to D81835: [SimplifyCFG] Fix inconsistency in block size assessment for threading.

Ping.

Jun 29 2020, 2:06 AM · Restricted Project

Jun 24 2020

mkazantsev committed rG4c6548222b3c: [Test] Add more tests for selects & phis (authored by mkazantsev).
[Test] Add more tests for selects & phis
Jun 24 2020, 9:10 PM
mkazantsev committed rG1eeb7147878e: [InstCombine] Combine select & Phi by same condition (authored by mkazantsev).
[InstCombine] Combine select & Phi by same condition
Jun 24 2020, 9:10 PM
mkazantsev updated the summary of D81835: [SimplifyCFG] Fix inconsistency in block size assessment for threading.
Jun 24 2020, 9:10 PM · Restricted Project
mkazantsev updated the summary of D81835: [SimplifyCFG] Fix inconsistency in block size assessment for threading.
Jun 24 2020, 9:10 PM · Restricted Project
mkazantsev added a reviewer for D81835: [SimplifyCFG] Fix inconsistency in block size assessment for threading: nikic.
Jun 24 2020, 9:10 PM · Restricted Project
mkazantsev added inline comments to D82072: [InstCombine] Combine select & Phi by same condition.
Jun 24 2020, 9:10 PM · Restricted Project
mkazantsev closed D82072: [InstCombine] Combine select & Phi by same condition.
commit 1eeb7147878edb7c0c0fbf54bc3dffd43db271b8
Author: Max Kazantsev <mkazantsev@azul.com>
Date:   Thu Jun 25 10:42:16 2020 +0700
Jun 24 2020, 9:10 PM · Restricted Project
mkazantsev added inline comments to D82072: [InstCombine] Combine select & Phi by same condition.
Jun 24 2020, 8:37 PM · Restricted Project
mkazantsev added inline comments to D82072: [InstCombine] Combine select & Phi by same condition.
Jun 24 2020, 8:05 PM · Restricted Project
mkazantsev added inline comments to D82072: [InstCombine] Combine select & Phi by same condition.
Jun 24 2020, 8:05 PM · Restricted Project

Jun 22 2020

mkazantsev accepted D82108: [IndVarSimplify] Don't replace IV user with unsafe loop-invariant (PR45360).

LGTM, thanks!

Jun 22 2020, 11:25 PM · Restricted Project
mkazantsev updated the diff for D82072: [InstCombine] Combine select & Phi by same condition.

Reworked using DoPHITranslation.

Jun 22 2020, 11:04 PM · Restricted Project
mkazantsev updated the diff for D82072: [InstCombine] Combine select & Phi by same condition.
Jun 22 2020, 11:04 PM · Restricted Project
mkazantsev added a comment to D82072: [InstCombine] Combine select & Phi by same condition.

I'm probably missing something here, but wouldn't it be possible to phi-translate IfTrue and IfFalse (Inputs[Pred] = IfTrue->DoPHITranslation(BB, Pred) etc) and the existing code would already work? Why perform the conversion to a different select first, rather than going directly to the phi? (That should also be more powerful, because it removes the limitation that you need a single value.)

Jun 22 2020, 11:04 PM · Restricted Project