mkazantsev (Max Kazantsev)
User

Projects

User does not belong to any projects.

User Details

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

Recent Activity

Yesterday

mkazantsev accepted D54223: [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with.

LGTM

Tue, Nov 13, 11:54 PM

Mon, Nov 12

mkazantsev accepted D53184: [LangRef] Clarify semantics of volatile operations..

LGTM

Mon, Nov 12, 8:43 PM
mkazantsev created D54462: [IPT] Drop cache less eagerly in GVN and LoopSafetyInfo.
Mon, Nov 12, 7:51 PM
mkazantsev added inline comments to D54223: [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with.
Mon, Nov 12, 3:12 AM
mkazantsev committed rL346643: [LICM] Hoist guards from non-header blocks.
[LICM] Hoist guards from non-header blocks
Mon, Nov 12, 1:32 AM
mkazantsev closed D50891: [LICM] Hoist guards from non-header blocks.
Mon, Nov 12, 1:32 AM

Sun, Nov 11

mkazantsev added a comment to D52827: [LICM] Make LICM able to hoist phis.

The patch fails the following test:

Sun, Nov 11, 9:41 PM

Fri, Nov 9

mkazantsev requested changes to D52827: [LICM] Make LICM able to hoist phis.

One of my fuzz tests has failed with the following assertion:

Fri, Nov 9, 3:30 AM

Thu, Nov 8

mkazantsev added inline comments to D52827: [LICM] Make LICM able to hoist phis.
Thu, Nov 8, 10:07 PM
mkazantsev added a comment to D52827: [LICM] Make LICM able to hoist phis.

I have some minor comment, only the one that is related to SafetyInfo worries me (yet it just needs using utility function instead of just moveBefore). All other things are non-functional nits.
I'll take some time running fuzz tests with this patch because it's big. :) Please wait few hours, I will either give you approval (under condition that my comments will be addressed) or give you a failing test example.

Thu, Nov 8, 9:51 PM
mkazantsev committed rL346472: [NFC] Add utility function for SafetyInfo updates for moveBefore.
[NFC] Add utility function for SafetyInfo updates for moveBefore
Thu, Nov 8, 9:41 PM
mkazantsev committed rL346397: Return "[IndVars] Smart hard uses detection".
Return "[IndVars] Smart hard uses detection"
Thu, Nov 8, 3:57 AM
mkazantsev added inline comments to D52827: [LICM] Make LICM able to hoist phis.
Thu, Nov 8, 2:17 AM
mkazantsev added inline comments to D52827: [LICM] Make LICM able to hoist phis.
Thu, Nov 8, 2:14 AM

Wed, Nov 7

mkazantsev added inline comments to D54223: [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with.
Wed, Nov 7, 10:37 PM
mkazantsev accepted D54239: [JumpThreading] Fix exponential time algorithm computing known values..

It seems that the initial design of this algorithm wasn't intended to make 2 recursive calls from 1 place. The interesting bit is that we only can have an exponential explosion here:

Wed, Nov 7, 10:30 PM
mkazantsev updated the diff for D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.

Added lambda for printing;
Reworked to make it clear that we are doing it for non-dead loops;
Simplified logic in constantFoldTerminators

Wed, Nov 7, 10:02 PM
mkazantsev added inline comments to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Wed, Nov 7, 9:41 PM
mkazantsev added inline comments to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Wed, Nov 7, 9:24 PM
mkazantsev added inline comments to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Wed, Nov 7, 9:20 PM
mkazantsev committed rL346389: [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond.
[SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond
Wed, Nov 7, 9:11 PM
mkazantsev closed D52930: [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond.
Wed, Nov 7, 9:11 PM
mkazantsev updated the diff for D50891: [LICM] Hoist guards from non-header blocks.

Rebased. I will wait a bit if we will find any bugs in underlying LICM changes and if it's OK, I will merge it by the end of week.

Wed, Nov 7, 3:44 AM
mkazantsev abandoned D51582: [IndVars] Turn isValidRewrite into an assertion.

I don't think I'll ever have time for this.

Wed, Nov 7, 2:38 AM

Tue, Nov 6

mkazantsev updated the diff for D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.

Fixed typo bug, added LI and DT verification, changed FoldingCandidates to vector to keep deterministic order of updates, updated tests with decline messages to make sure that we exercise all possible scenarios in our test file.

Tue, Nov 6, 10:35 PM
mkazantsev added inline comments to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Tue, Nov 6, 10:34 PM
mkazantsev committed rL346295: [NFC] Add missing test case, some test renaming.
[NFC] Add missing test case, some test renaming
Tue, Nov 6, 10:00 PM
mkazantsev planned changes to D54025: [LoopSimplifyCFG] Delete dead exiting edges.

Needs rebase.

Tue, Nov 6, 9:30 PM
mkazantsev planned changes to D54023: [LoopSimplifyCFG] Delete dead in-loop blocks.

Needs rebase.

Tue, Nov 6, 9:30 PM
mkazantsev added a comment to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.

Making a separate NFC which checks analyzes behavior doesn't sound because I am using sets to store blocks status, and printing out the contents of sets is non-deterministic.

Tue, Nov 6, 8:38 PM
mkazantsev abandoned D48930: [InstCombine] Apply foldICmpUsingKnownBits to early bailout case.
Tue, Nov 6, 8:36 PM
mkazantsev added a comment to D52930: [SCEV][NFC] Verify IR in isLoop[Entry,Backedge]GuardedByCond.

Ping?

Tue, Nov 6, 8:35 PM
mkazantsev requested changes to D52827: [LICM] Make LICM able to hoist phis.

Missing Changed update and LI sanitizing should be added.

Tue, Nov 6, 8:27 PM
mkazantsev added inline comments to D52827: [LICM] Make LICM able to hoist phis.
Tue, Nov 6, 7:56 PM
mkazantsev committed rL346217: [NFC] Turn collectTransitivePredecessors into a static function.
[NFC] Turn collectTransitivePredecessors into a static function
Tue, Nov 6, 1:09 AM

Mon, Nov 5

mkazantsev added a comment to D53786: [AliasSetTracker] Actually delete instructions from the AliasSetTracker..

Unfortunately I am not familiar enough with AliasSetTracker to answer that question. We should maybe wait for @reames to clarify it.

Mon, Nov 5, 8:24 PM
mkazantsev accepted D53876: Preserve loop metadata when splitting exit blocks.

LGTM

Mon, Nov 5, 8:23 PM
mkazantsev committed rL346204: [LICM] Remove too conservative IsMustExecute variable.
[LICM] Remove too conservative IsMustExecute variable
Mon, Nov 5, 8:20 PM
mkazantsev closed D50888: [NFC][LICM] Remove too conservative IsMustExecute variable.
Mon, Nov 5, 8:20 PM
mkazantsev planned changes to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Mon, Nov 5, 6:58 PM
mkazantsev committed rL346201: [LICM] Use ICFLoopSafetyInfo in LICM.
[LICM] Use ICFLoopSafetyInfo in LICM
Mon, Nov 5, 6:48 PM
This revision was not accepted when it landed; it landed in state Needs Review.
Mon, Nov 5, 6:48 PM
mkazantsev committed rL346199: [NFC] Add motivating test case for revert in rL346198.
[NFC] Add motivating test case for revert in rL346198
Mon, Nov 5, 6:16 PM
mkazantsev committed rL346198: Revert "[IndVars] Smart hard uses detection".
Revert "[IndVars] Smart hard uses detection"
Mon, Nov 5, 6:04 PM
mkazantsev added inline comments to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Mon, Nov 5, 5:00 PM
mkazantsev added a comment to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.

As for the test: I have commited all related tests I am planning to support in this pass in the file test/Transforms/LoopSimplifyCFG/constant-fold-branch.ll. It has all situations with dead blocks, live blocks, dead loops etc, please take a look and tell me if some important case is missing. My plan is to support folding in all these cases incrementally.

Mon, Nov 5, 4:47 PM

Fri, Nov 2

mkazantsev added inline comments to D50377: [LICM] Use ICFLoopSafetyInfo in LICM.
Fri, Nov 2, 9:01 PM
mkazantsev updated the diff for D54025: [LoopSimplifyCFG] Delete dead exiting edges.
Fri, Nov 2, 12:01 AM
mkazantsev added a dependency for D54025: [LoopSimplifyCFG] Delete dead exiting edges: D54023: [LoopSimplifyCFG] Delete dead in-loop blocks.
Fri, Nov 2, 12:00 AM
mkazantsev added a dependent revision for D54023: [LoopSimplifyCFG] Delete dead in-loop blocks: D54025: [LoopSimplifyCFG] Delete dead exiting edges.
Fri, Nov 2, 12:00 AM

Thu, Nov 1

mkazantsev created D54025: [LoopSimplifyCFG] Delete dead exiting edges.
Thu, Nov 1, 11:59 PM
mkazantsev added a dependency for D54023: [LoopSimplifyCFG] Delete dead in-loop blocks: D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Thu, Nov 1, 9:46 PM
mkazantsev added a dependent revision for D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches: D54023: [LoopSimplifyCFG] Delete dead in-loop blocks.
Thu, Nov 1, 9:46 PM
mkazantsev created D54023: [LoopSimplifyCFG] Delete dead in-loop blocks.
Thu, Nov 1, 9:46 PM
mkazantsev updated the diff for D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.

Fix typo in dump()

Thu, Nov 1, 9:10 PM
mkazantsev updated the diff for D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Thu, Nov 1, 8:29 PM
mkazantsev updated the diff for D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Thu, Nov 1, 8:27 PM
mkazantsev created D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Thu, Nov 1, 8:15 PM
mkazantsev added inline comments to rL345560: AMDGPU: Remove custom BUILD_VECTOR combine.
Thu, Nov 1, 6:13 PM
mkazantsev added inline comments to rL345560: AMDGPU: Remove custom BUILD_VECTOR combine.
Thu, Nov 1, 6:11 PM
mkazantsev added a comment to D50377: [LICM] Use ICFLoopSafetyInfo in LICM.

BTW this test is invalid, it has a load from nullptr and therefore contains UB.

Thu, Nov 1, 6:10 PM
mkazantsev updated the diff for D50377: [LICM] Use ICFLoopSafetyInfo in LICM.

Updated test/CodeGen/AMDGPU/build-vector-insert-elt-infloop.ll

Thu, Nov 1, 6:04 PM
mkazantsev updated the diff for D50377: [LICM] Use ICFLoopSafetyInfo in LICM.

Rebased

Thu, Nov 1, 5:31 PM
mkazantsev committed rL345914: [NFC][LICM] Factor out instruction erasing logic.
[NFC][LICM] Factor out instruction erasing logic
Thu, Nov 1, 5:25 PM
mkazantsev closed D54011: [NFC][LICM] Factor out instruction erasing logic.
Thu, Nov 1, 5:25 PM
mkazantsev created D54011: [NFC][LICM] Factor out instruction erasing logic.
Thu, Nov 1, 4:53 PM
mkazantsev updated the diff for D50377: [LICM] Use ICFLoopSafetyInfo in LICM.

Addressed comments.

Thu, Nov 1, 4:00 AM
mkazantsev committed rL345822: [NFC] Specialize public API of ICFLoopSafetyInfo for insertions and removals.
[NFC] Specialize public API of ICFLoopSafetyInfo for insertions and removals
Thu, Nov 1, 3:18 AM
mkazantsev added inline comments to D50377: [LICM] Use ICFLoopSafetyInfo in LICM.
Thu, Nov 1, 2:47 AM
mkazantsev committed rL345820: [NFC] Reorganize code to prepare it for more transforms.
[NFC] Reorganize code to prepare it for more transforms
Thu, Nov 1, 2:46 AM
mkazantsev added inline comments to D53876: Preserve loop metadata when splitting exit blocks.
Thu, Nov 1, 12:08 AM

Wed, Oct 31

mkazantsev closed D51584: [IndVars] Smart hard uses detection.

https://reviews.llvm.org/rL345814

Wed, Oct 31, 11:52 PM
mkazantsev committed rL345814: [IndVars] Smart hard uses detection.
[IndVars] Smart hard uses detection
Wed, Oct 31, 11:49 PM
mkazantsev committed rL345813: [SCEV] Avoid redundant computations when doing AddRec merge.
[SCEV] Avoid redundant computations when doing AddRec merge
Wed, Oct 31, 11:21 PM
mkazantsev closed D53189: [SCEV] Avoid redundant computations when doing AddRec merge.
Wed, Oct 31, 11:21 PM
mkazantsev added a comment to D52827: [LICM] Make LICM able to hoist phis.

I generally like what this patch is doing, but the size of code and its complexity overwhelms me. Is it possible to separate the patch into smaller pieces so that it would be easier to review them in isolation? If yes, I'd appreciate that a lot.

Wed, Oct 31, 11:08 PM
mkazantsev requested changes to D52827: [LICM] Make LICM able to hoist phis.
Wed, Oct 31, 11:01 PM
mkazantsev added a comment to D53189: [SCEV] Avoid redundant computations when doing AddRec merge.

I expect compile time impact to be zero for majority of cases. It should only affect corner cases at which we reach limit depth during simplifications. For them, depending on simplifications complexity, we save O(N) time simplifying. I don't think it will really be observable on anything other than corner-cases.

Wed, Oct 31, 9:49 PM
mkazantsev retitled D53189: [SCEV] Avoid redundant computations when doing AddRec merge from [SCEV][NFC] Avoid redundant computations when doing AddRec merge to [SCEV] Avoid redundant computations when doing AddRec merge.
Wed, Oct 31, 9:48 PM
mkazantsev committed rL345713: [NFC] Add tests for loop-simplifycfg for further development.
[NFC] Add tests for loop-simplifycfg for further development
Wed, Oct 31, 4:31 AM
mkazantsev added inline comments to D51584: [IndVars] Smart hard uses detection.
Wed, Oct 31, 3:34 AM
mkazantsev committed rL345708: [IndVars] Strengthen restricton in rewriteLoopExitValues.
[IndVars] Strengthen restricton in rewriteLoopExitValues
Wed, Oct 31, 3:33 AM
mkazantsev closed D51581: [IndVars] Strengthen restricton in rewriteLoopExitValues.
Wed, Oct 31, 3:33 AM

Mon, Oct 29

mkazantsev requested changes to D52827: [LICM] Make LICM able to hoist phis.
Mon, Oct 29, 11:14 PM
mkazantsev added a comment to D53786: [AliasSetTracker] Actually delete instructions from the AliasSetTracker..

Is it possible to write a test on that?

Mon, Oct 29, 10:36 PM

Sun, Oct 28

mkazantsev added a reviewer for D50377: [LICM] Use ICFLoopSafetyInfo in LICM: apilipenko.
Sun, Oct 28, 8:43 PM

Fri, Oct 26

mkazantsev committed rL345387: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.
[SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics
Fri, Oct 26, 7:23 AM
mkazantsev closed D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.
Fri, Oct 26, 7:23 AM
mkazantsev added inline comments to D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.
Fri, Oct 26, 3:04 AM
mkazantsev updated the diff for D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.

Added the new exit block to the vector. Though it was pretty straightforward, I will re-run my fuzz testing to make sure everything is fine now.

Fri, Oct 26, 3:04 AM
mkazantsev committed rL345375: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch.
[SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch
Fri, Oct 26, 2:55 AM
mkazantsev closed D53747: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch.
Fri, Oct 26, 2:55 AM
mkazantsev added inline comments to D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.
Fri, Oct 26, 2:42 AM
mkazantsev retitled D53747: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch from [NFC][SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch to [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch.
Fri, Oct 26, 2:24 AM
mkazantsev updated the diff for D53747: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch.
Fri, Oct 26, 2:21 AM
mkazantsev added a dependency for D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics: D53747: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch.
Fri, Oct 26, 2:02 AM
mkazantsev added a dependent revision for D53747: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch: D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.
Fri, Oct 26, 2:02 AM
mkazantsev updated the diff for D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.

Rebased on top of https://reviews.llvm.org/D53747. Now we know for sure that we have a point after which the unswitching will succeed, and we don't need to worry about turning guard into a branch and then failing to unswitch.

Fri, Oct 26, 2:02 AM
mkazantsev created D53747: [SimpleLoopUnswitch] Make all checks before actual non-trivial unswitch.
Fri, Oct 26, 1:47 AM
mkazantsev planned changes to D53744: [SimpleLoopUnswitch] Unswitch by experimental.guard intrinsics.
Fri, Oct 26, 1:31 AM