mkazantsev (Max Kazantsev)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 23 2017, 8:11 PM (86 w, 6 d)

Recent Activity

Mon, Sep 17

mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.
Mon, Sep 17, 11:47 PM
mkazantsev updated the diff for D51581: [IndVars] Strengthen restricton in rewriteLoopExitValues.

Rebased.

Mon, Sep 17, 10:34 PM
mkazantsev committed rL342444: [IndVars] Remove unreasonable checks in rewriteLoopExitValues.
[IndVars] Remove unreasonable checks in rewriteLoopExitValues
Mon, Sep 17, 10:00 PM
mkazantsev closed D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues.
Mon, Sep 17, 10:00 PM
mkazantsev added inline comments to D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues.
Mon, Sep 17, 8:10 PM
mkazantsev accepted D52176: Remove LoopID metadata from the branch instruction that follows the peeled iterations..

LGTM, but please add CHECK-NOT into test to make sure that the metadata is actually dropped.

Mon, Sep 17, 8:03 PM
mkazantsev added a comment to D52176: Remove LoopID metadata from the branch instruction that follows the peeled iterations..
Mon, Sep 17, 8:01 PM
mkazantsev added a reviewer for D51584: [IndVars] Smart hard uses detection: etherzhhb.
Mon, Sep 17, 7:38 PM
mkazantsev added inline comments to D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues.
Mon, Sep 17, 7:20 PM
mkazantsev updated the diff for D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues.

Rebased.

Mon, Sep 17, 12:46 AM

Sun, Sep 16

mkazantsev committed rL342360: [NFC] Turn unsigned counters into boolean flags.
[NFC] Turn unsigned counters into boolean flags
Sun, Sep 16, 11:35 PM
mkazantsev added a comment to D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues.

Ping?

Sun, Sep 16, 10:49 PM
mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.
Sun, Sep 16, 10:30 PM
mkazantsev requested review of D51207: Introduce llvm.experimental.widenable_condition intrinsic.

I would ask one more round of review for changes made to LangRef. I tried to make it more generic and less reliant on deopt's specifics than it used to be.

Sun, Sep 16, 10:24 PM
mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.

Made changes to LangRef to make the widening part independent on deoptimize intrinsic. After giving it some thought, I see no solid reason why we should impose any limitations on deopt block.

Sun, Sep 16, 10:23 PM
mkazantsev added a comment to D51664: [IR] Lazily number instructions for local dominance queries.

I don't see any fundamental flaws in the algorithm, it looks pretty robust. I have some nit comments, otherwise it LGTM. (Note that I'm maybe not the most qualified person to approve changes in such fundamental components as BasicBlock and Instruction, but this change seems profitable).

Sun, Sep 16, 8:32 PM

Fri, Sep 14

mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.

I tried to reformulate the semantics to make it independent on deoptimize intrinsic.

Fri, Sep 14, 12:52 AM

Thu, Sep 13

mkazantsev updated the diff for D52017: [NFC] Introduce surgical invalidation of IPT.

Fixed formatting.

Thu, Sep 13, 10:34 PM
mkazantsev added a dependent revision for D52017: [NFC] Introduce surgical invalidation of IPT: D52073: [GVN][NFC] Use more surgical updates to save some compile time.
Thu, Sep 13, 10:22 PM
mkazantsev added a dependency for D52073: [GVN][NFC] Use more surgical updates to save some compile time: D52017: [NFC] Introduce surgical invalidation of IPT.
Thu, Sep 13, 10:22 PM
mkazantsev created D52073: [GVN][NFC] Use more surgical updates to save some compile time.
Thu, Sep 13, 10:22 PM
mkazantsev committed rL342202: [NFC] Remove meaningless code from GVN.
[NFC] Remove meaningless code from GVN
Thu, Sep 13, 9:52 PM
mkazantsev added a reviewer for D52017: [NFC] Introduce surgical invalidation of IPT: reames.
Thu, Sep 13, 9:00 PM
mkazantsev added a dependency for D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws: D52017: [NFC] Introduce surgical invalidation of IPT.
Thu, Sep 13, 8:59 PM
mkazantsev added a dependent revision for D52017: [NFC] Introduce surgical invalidation of IPT: D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws.
Thu, Sep 13, 8:59 PM
mkazantsev updated the diff for D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws.

Rebased on top of D51664. This patch is really helpful here because it makes the invalidation of OrderedInstructions automatic. With that, we *only* need to invalidate whenever we may actually change the first ICF instruction or when we erase a basic block. With that, I've discarded most of invalidation we've added on the previous steps because it is actually not needed. We don't need to invalidate when we insert Phis or do stuff like that.

Thu, Sep 13, 8:59 PM
mkazantsev added a dependency for D52017: [NFC] Introduce surgical invalidation of IPT: D51664: [IR] Lazily number instructions for local dominance queries.
Thu, Sep 13, 12:59 AM
mkazantsev added a dependent revision for D51664: [IR] Lazily number instructions for local dominance queries: D52017: [NFC] Introduce surgical invalidation of IPT.
Thu, Sep 13, 12:59 AM
mkazantsev created D52017: [NFC] Introduce surgical invalidation of IPT.
Thu, Sep 13, 12:59 AM
mkazantsev added a comment to D51664: [IR] Lazily number instructions for local dominance queries.

I've run a big corpus of fuzz tests on this patch and it passed OK. So the patch seems good to me in terms of stability. Unfortunately I don't have time to give a proper code review on that. :(

Thu, Sep 13, 12:41 AM

Wed, Sep 12

mkazantsev committed rL342108: [NFC] Add Requires: asserts where needed.
[NFC] Add Requires: asserts where needed
Wed, Sep 12, 9:46 PM
mkazantsev abandoned D51923: [NFC] Add validation to Ordered Instructions.

Abandoning in favor of https://reviews.llvm.org/D51664

Wed, Sep 12, 9:29 PM
mkazantsev committed rL342107: [NFC] Use expensive asserts in relevant LICM tests.
[NFC] Use expensive asserts in relevant LICM tests
Wed, Sep 12, 9:02 PM

Tue, Sep 11

mkazantsev removed a dependency for D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws: D51923: [NFC] Add validation to Ordered Instructions.
Tue, Sep 11, 10:32 PM
mkazantsev removed a dependent revision for D51923: [NFC] Add validation to Ordered Instructions: D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws.
Tue, Sep 11, 10:32 PM
mkazantsev added a comment to D51923: [NFC] Add validation to Ordered Instructions.

Thanks @fhahn , I haven't seen it before. Actually after studying the code I came to the same conclusions as they did (that we only need to invalidate when we insert instructions or remove blocks). The mental problem I have is the comment for this class stating that: "A OrderedBasicBlock instance should be discarded whenever the source BasicBlock changes". This, in particular, means that I can check that we don't have dangling pointers whenever we make a request to this class...

Tue, Sep 11, 10:32 PM
mkazantsev added a comment to D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws.

https://reviews.llvm.org/D51664 This patch claims to make the OrderedInstructions auto-invalidable. If we build on top of that (and if it works :)), we may give up all invalidation stuff we currently have and only invalidate when we remove ICF instructions from blocks.

Tue, Sep 11, 10:21 PM
mkazantsev added a dependent revision for D51923: [NFC] Add validation to Ordered Instructions: D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws.
Tue, Sep 11, 4:02 AM
mkazantsev added a dependency for D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws: D51923: [NFC] Add validation to Ordered Instructions.
Tue, Sep 11, 4:02 AM
mkazantsev created D51923: [NFC] Add validation to Ordered Instructions.
Tue, Sep 11, 3:55 AM
mkazantsev committed rL341917: [NFC] Sanitizing asserts for OrderedBasicBlock.
[NFC] Sanitizing asserts for OrderedBasicBlock
Tue, Sep 11, 1:51 AM

Mon, Sep 10

mkazantsev committed rL341904: [NFC] Specify test's option to reduce reliance on defaults.
[NFC] Specify test's option to reduce reliance on defaults
Mon, Sep 10, 11:35 PM
mkazantsev committed rL341901: [NFC] Rename variable.
[NFC] Rename variable
Mon, Sep 10, 10:11 PM
mkazantsev planned changes to D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws.

After digging deeper into the code, I grow more and more convinced that there was no bug to start with, and dangling pointers to instructions that are not tracked by ICF's map (even if they are tracked by OrderedInstructions) cause no problems.

Mon, Sep 10, 10:04 PM
mkazantsev committed rL341893: [IndVars][NFC] Refactor to make modifications of Changed transparent.
[IndVars][NFC] Refactor to make modifications of Changed transparent
Mon, Sep 10, 8:59 PM
mkazantsev closed D51850: [IndVars][NFC] Refactor to make modifications of Changed transparent.
Mon, Sep 10, 8:59 PM
mkazantsev created D51850: [IndVars][NFC] Refactor to make modifications of Changed transparent.
Mon, Sep 10, 1:02 AM

Sun, Sep 9

mkazantsev committed rL341779: [IndVars] Set Changed if rewriteFirstIterationLoopExitValues changes IR. PR38863.
[IndVars] Set Changed if rewriteFirstIterationLoopExitValues changes IR. PR38863
Sun, Sep 9, 11:51 PM
mkazantsev closed D51779: [IndVars] Set Changed if rewriteFirstIterationLoopExitValues changes IR. PR38863.
Sun, Sep 9, 11:51 PM
mkazantsev committed rL341777: [IndVars] Set Changed if sinkUnusedInvariants changes IR. PR38863.
[IndVars] Set Changed if sinkUnusedInvariants changes IR. PR38863
Sun, Sep 9, 11:33 PM
mkazantsev closed D51777: [IndVars] Set Changed if sinkUnusedInvariants changes IR. PR38863.
Sun, Sep 9, 11:33 PM
mkazantsev added a comment to D51777: [IndVars] Set Changed if sinkUnusedInvariants changes IR. PR38863.

I see that IndVarsSimplify uses class field Changed. You propose to use Changed as return value. I just want to see the same approach through the whole IndVars...

Do you plan to modify other pieces to return Changed or may be it makes sense to re-use the class field approach here as well?
What do you think?

Sun, Sep 9, 10:07 PM

Fri, Sep 7

mkazantsev created D51779: [IndVars] Set Changed if rewriteFirstIterationLoopExitValues changes IR. PR38863.
Fri, Sep 7, 4:32 AM
mkazantsev created D51777: [IndVars] Set Changed if sinkUnusedInvariants changes IR. PR38863.
Fri, Sep 7, 4:26 AM
mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.

Fixed LangRef, renamed pass to "MakeGuardsExplicit".

Fri, Sep 7, 3:26 AM
mkazantsev added inline comments to D51207: Introduce llvm.experimental.widenable_condition intrinsic.
Fri, Sep 7, 12:50 AM
mkazantsev committed rL341633: [IndVars] Set Changed when we delete dead instructions. PR38855.
[IndVars] Set Changed when we delete dead instructions. PR38855
Fri, Sep 7, 12:25 AM
mkazantsev closed D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Fri, Sep 7, 12:25 AM
mkazantsev added inline comments to D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Fri, Sep 7, 12:19 AM
mkazantsev updated the diff for D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Fri, Sep 7, 12:13 AM
mkazantsev added inline comments to D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Fri, Sep 7, 12:13 AM

Thu, Sep 6

mkazantsev updated the summary of D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Thu, Sep 6, 10:58 PM
mkazantsev updated the summary of D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Thu, Sep 6, 10:58 PM
mkazantsev created D51770: [IndVars] Set Changed when we delete dead instructions. PR38855.
Thu, Sep 6, 10:55 PM
mkazantsev added inline comments to D51207: Introduce llvm.experimental.widenable_condition intrinsic.
Thu, Sep 6, 8:02 PM
mkazantsev added inline comments to D51523: Return "[NFC] Add severe validation of InstructionPrecedenceTracking".
Thu, Sep 6, 2:41 AM
mkazantsev committed rL341531: [NFC] Simplify inner structure of InstructionPrecedenceTracking.
[NFC] Simplify inner structure of InstructionPrecedenceTracking
Thu, Sep 6, 2:31 AM
mkazantsev committed rL341526: Return "[NFC] Add severe validation of InstructionPrecedenceTracking".
Return "[NFC] Add severe validation of InstructionPrecedenceTracking"
Thu, Sep 6, 1:34 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Thu, Sep 6, 1:34 AM

Wed, Sep 5

mkazantsev planned changes to D51582: [IndVars] Turn isValidRewrite into an assertion.
Wed, Sep 5, 10:56 PM
mkazantsev reopened D51582: [IndVars] Turn isValidRewrite into an assertion.

This patch has been reverted, the situation it protects against seems still possible. It means that the initial theory was true and we need a unit test on that.

Wed, Sep 5, 10:56 PM
mkazantsev added a comment to D51582: [IndVars] Turn isValidRewrite into an assertion.

It seems we were wrong: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/11583/steps/build%20stage%202/logs/stdio

Wed, Sep 5, 10:54 PM
mkazantsev committed rL341517: Revert "[IndVars] Turn isValidRewrite into an assertion" because it seems wrong.
Revert "[IndVars] Turn isValidRewrite into an assertion" because it seems wrong
Wed, Sep 5, 10:54 PM
mkazantsev committed rL341516: [IndVars] Turn isValidRewrite into an assertion.
[IndVars] Turn isValidRewrite into an assertion
Wed, Sep 5, 10:24 PM
mkazantsev closed D51582: [IndVars] Turn isValidRewrite into an assertion.
Wed, Sep 5, 10:24 PM
mkazantsev updated subscribers of D51707: [llvm-dwp] Use buffer_stream if output file is not seekable (e.g. "-").

This commit has caused massive buildbot failures on compilation, see for example http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/5953/steps/build%20stage%201/logs/stdio

Wed, Sep 5, 9:59 PM
mkazantsev committed rL341515: Revert rL341509 to fix massive failures on buildbots.
Revert rL341509 to fix massive failures on buildbots
Wed, Sep 5, 9:42 PM
mkazantsev added a reverting commit for rL341509: [llvm-dwp] Use buffer_stream if output file is not seekable (e.g. "-"): rL341515: Revert rL341509 to fix massive failures on buildbots.
Wed, Sep 5, 9:42 PM
mkazantsev added inline comments to D51523: Return "[NFC] Add severe validation of InstructionPrecedenceTracking".
Wed, Sep 5, 8:42 PM
mkazantsev added inline comments to D51616: [ExplicitGuards][NFC] API for explicit guards recognition.
Wed, Sep 5, 3:18 AM
mkazantsev abandoned D47767: [SCEV] Drop cached info after late nsw/nuw flags setting.

I've just checked that this test now works fine. Apparently it was fixed somehow else, and I cannot construct another test where it matters. So let's just abandon it, not clear if it's needed anymore or not.

Wed, Sep 5, 3:13 AM
mkazantsev committed rL341456: [NFC] Add test on full IV widening.
[NFC] Add test on full IV widening
Wed, Sep 5, 3:12 AM

Tue, Sep 4

mkazantsev updated the diff for D51523: Return "[NFC] Add severe validation of InstructionPrecedenceTracking".

After offline discussion with Philip, we agreed on the following version: by default, we have one-block verification to keep compile time in reasonable bounds. For troubleshooting purposes, there is an option (false by default and with no intention to turn it on) to diagnose it. Assertion on destructor does not happen because we don't have a commitment to keep the information valid after the last point where the last query was made.

Tue, Sep 4, 9:21 PM
mkazantsev updated the diff for D51582: [IndVars] Turn isValidRewrite into an assertion.

Added clarification comment, updated commit message to describe what is going on.

Tue, Sep 4, 7:16 PM
mkazantsev updated the diff for D51616: [ExplicitGuards][NFC] API for explicit guards recognition.

Now this is an NFC. We will visit every place where explicit guards need enabling independently.

Tue, Sep 4, 3:22 AM
mkazantsev retitled D51616: [ExplicitGuards][NFC] API for explicit guards recognition from [ExplicitGuards][NFC] API for explicit guards recognition to [ExplicitGuards] API for explicit guards recognition.
Tue, Sep 4, 2:58 AM
mkazantsev planned changes to D51616: [ExplicitGuards][NFC] API for explicit guards recognition.

Need to add tests on passes that use isGuard to see how they feel about it. Needs rework.

Tue, Sep 4, 2:58 AM
mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.

Fixed analysis preservation.

Tue, Sep 4, 2:48 AM
mkazantsev added inline comments to D51207: Introduce llvm.experimental.widenable_condition intrinsic.
Tue, Sep 4, 2:45 AM
mkazantsev added a dependency for D51616: [ExplicitGuards][NFC] API for explicit guards recognition: D51207: Introduce llvm.experimental.widenable_condition intrinsic.
Tue, Sep 4, 2:45 AM
mkazantsev added a dependent revision for D51207: Introduce llvm.experimental.widenable_condition intrinsic: D51616: [ExplicitGuards][NFC] API for explicit guards recognition.
Tue, Sep 4, 2:45 AM
mkazantsev created D51616: [ExplicitGuards][NFC] API for explicit guards recognition.
Tue, Sep 4, 2:45 AM
mkazantsev updated the diff for D51207: Introduce llvm.experimental.widenable_condition intrinsic.

Fixed comments, added bundles to tests.

Tue, Sep 4, 1:01 AM

Mon, Sep 3

mkazantsev committed rL341347: [NFC] Add assert to detect LCSSA breaches early.
[NFC] Add assert to detect LCSSA breaches early
Mon, Sep 3, 11:35 PM
mkazantsev added a reviewer for D51404: [IndVars] Remove unreasonable checks in rewriteLoopExitValues: etherzhhb.
Mon, Sep 3, 10:04 PM
mkazantsev committed rL341345: [IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674.
[IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674
Mon, Sep 3, 10:02 PM
This revision was not accepted when it landed; it landed in state Needs Review.
Mon, Sep 3, 10:02 PM
mkazantsev updated the summary of D51286: [IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674.
Mon, Sep 3, 8:43 PM
mkazantsev updated the summary of D51286: [IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674.
Mon, Sep 3, 8:37 PM
mkazantsev added a comment to D51286: [IndVars] Fix usage of SCEVExpander to not mess with SCEVConstant. PR38674.

Is it possible to fix the problem by directly codegening the constant from SCEVConstant in expandSCEVIfNeeded?

What's the point of that? I generally don't see any profit in going manually into rewriting internals and trying to find something in its map. Expand methods are designed to handle such cases.

Mon, Sep 3, 8:30 PM