Page MenuHomePhabricator

skatkov (Serguei Katkov)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 25 2017, 1:38 AM (120 w, 6 d)

Recent Activity

Tue, Apr 23

skatkov added a comment to D60911: [PGO/SamplePGO][NFC] Move the function updateProfWeight from Instruction to CallInst.

Can you please say what is the reason to move the function to CallInst only but not for CallBase?

Tue, Apr 23, 4:09 AM · Restricted Project
skatkov added a comment to D60911: [PGO/SamplePGO][NFC] Move the function updateProfWeight from Instruction to CallInst.

Can you please say what is the reason to move the function to CallInst only but not for CallBase?

Tue, Apr 23, 4:05 AM · Restricted Project

Mon, Apr 22

skatkov committed rG40a3b9619642: [NewPM] Add Option handling for SimpleLoopUnswitch (authored by skatkov).
[NewPM] Add Option handling for SimpleLoopUnswitch
Mon, Apr 22, 3:34 AM
skatkov committed rL358880: [NewPM] Add Option handling for SimpleLoopUnswitch.
[NewPM] Add Option handling for SimpleLoopUnswitch
Mon, Apr 22, 3:34 AM
skatkov closed D60676: [NewPM] Add Option handling for SimpleLoopUnswitch.
Mon, Apr 22, 3:34 AM · Restricted Project
skatkov committed rG5614f4a3a55b: [NewPM] Add dummy Test for LoopVectorize option parsing. (authored by skatkov).
[NewPM] Add dummy Test for LoopVectorize option parsing.
Mon, Apr 22, 2:52 AM
skatkov committed rL358878: [NewPM] Add dummy Test for LoopVectorize option parsing..
[NewPM] Add dummy Test for LoopVectorize option parsing.
Mon, Apr 22, 2:51 AM

Sun, Apr 21

skatkov updated the diff for D60676: [NewPM] Add Option handling for SimpleLoopUnswitch.

Handled comment, please review.

Sun, Apr 21, 10:14 PM · Restricted Project

Apr 18 2019

skatkov updated the diff for D60676: [NewPM] Add Option handling for SimpleLoopUnswitch.

comments handled.

Apr 18 2019, 3:29 AM · Restricted Project
skatkov committed rGca6c03a22ff1: [NewPM] Add Option handling for LoopVectorize (authored by skatkov).
[NewPM] Add Option handling for LoopVectorize
Apr 18 2019, 1:47 AM
skatkov committed rL358647: [NewPM] Add Option handling for LoopVectorize.
[NewPM] Add Option handling for LoopVectorize
Apr 18 2019, 1:46 AM
skatkov closed D60681: [NewPM] Add Option handling for LoopVectorize.
Apr 18 2019, 1:46 AM · Restricted Project

Apr 17 2019

skatkov added inline comments to D60676: [NewPM] Add Option handling for SimpleLoopUnswitch.
Apr 17 2019, 10:55 PM · Restricted Project

Apr 15 2019

skatkov created D60681: [NewPM] Add Option handling for LoopVectorize.
Apr 15 2019, 3:08 AM · Restricted Project
skatkov committed rGf54328372b1a: [NewPM] Add Option handling for SimplifyCFG (authored by skatkov).
[NewPM] Add Option handling for SimplifyCFG
Apr 15 2019, 1:59 AM
skatkov committed rL358379: [NewPM] Add Option handling for SimplifyCFG.
[NewPM] Add Option handling for SimplifyCFG
Apr 15 2019, 1:59 AM
skatkov closed D60675: [NewPM] Add Option handling for SimplifyCFG.
Apr 15 2019, 1:59 AM · Restricted Project
skatkov created D60676: [NewPM] Add Option handling for SimpleLoopUnswitch.
Apr 15 2019, 1:18 AM · Restricted Project

Apr 14 2019

skatkov added inline comments to D60675: [NewPM] Add Option handling for SimplifyCFG.
Apr 14 2019, 11:09 PM · Restricted Project
skatkov created D60675: [NewPM] Add Option handling for SimplifyCFG.
Apr 14 2019, 10:48 PM · Restricted Project

Apr 4 2019

skatkov committed rGc39636cc2c6d: [FastISel] Fix crash for gc.relocate lowring (authored by skatkov).
[FastISel] Fix crash for gc.relocate lowring
Apr 4 2019, 10:41 PM
skatkov committed rL357742: [FastISel] Fix crash for gc.relocate lowring.
[FastISel] Fix crash for gc.relocate lowring
Apr 4 2019, 10:41 PM
skatkov closed D60184: [FastISel] Fix crash for gc.relocate lowring.
Apr 4 2019, 10:41 PM · Restricted Project
skatkov updated the diff for D60184: [FastISel] Fix crash for gc.relocate lowring.
Apr 4 2019, 1:40 AM · Restricted Project

Apr 3 2019

skatkov committed rGfb44846e37c1: [FastISel] Fix the crash in gc.result lowering (authored by skatkov).
[FastISel] Fix the crash in gc.result lowering
Apr 3 2019, 9:19 PM
skatkov committed rL357672: [FastISel] Fix the crash in gc.result lowering.
[FastISel] Fix the crash in gc.result lowering
Apr 3 2019, 9:19 PM
skatkov closed D60182: [FastISel] Fix the crash in gc.result lowering.
Apr 3 2019, 9:19 PM · Restricted Project
skatkov created D60184: [FastISel] Fix crash for gc.relocate lowring.
Apr 3 2019, 1:10 AM · Restricted Project

Apr 2 2019

skatkov updated the diff for D60182: [FastISel] Fix the crash in gc.result lowering.
Apr 2 2019, 11:49 PM · Restricted Project
skatkov created D60182: [FastISel] Fix the crash in gc.result lowering.
Apr 2 2019, 11:47 PM · Restricted Project

Mar 28 2019

skatkov added a comment to D59825: SafepointIRVerifier port to new Pass Manager.

Thank you for reverting the patch, I'll take a look into this dependency. I'll ping you if I have a trouble in reproducing the crash.

Mar 28 2019, 7:38 PM · Restricted Project
skatkov committed rG1311e8e4fafe: SafepointIRVerifier port to new Pass Manager (authored by skatkov).
SafepointIRVerifier port to new Pass Manager
Mar 28 2019, 12:02 AM
skatkov committed rL357148: SafepointIRVerifier port to new Pass Manager.
SafepointIRVerifier port to new Pass Manager
Mar 28 2019, 12:02 AM

Mar 27 2019

skatkov committed rG93432be304a4: SafepointIRVerifier port to new Pass Manager (authored by skatkov).
SafepointIRVerifier port to new Pass Manager
Mar 27 2019, 11:00 PM
skatkov committed rL357147: SafepointIRVerifier port to new Pass Manager.
SafepointIRVerifier port to new Pass Manager
Mar 27 2019, 11:00 PM
skatkov closed D59825: SafepointIRVerifier port to new Pass Manager.
Mar 27 2019, 11:00 PM · Restricted Project

Mar 26 2019

skatkov updated the diff for D59825: SafepointIRVerifier port to new Pass Manager.

Fedor's comments handled.

Mar 26 2019, 8:28 PM · Restricted Project
skatkov planned changes to D59825: SafepointIRVerifier port to new Pass Manager.
Mar 26 2019, 7:42 PM · Restricted Project
skatkov updated subscribers of D59825: SafepointIRVerifier port to new Pass Manager.
Mar 26 2019, 9:22 AM · Restricted Project
skatkov created D59825: SafepointIRVerifier port to new Pass Manager.
Mar 26 2019, 9:22 AM · Restricted Project

Mar 10 2019

skatkov accepted D59106: [CodeGen] Add MMOs to statepoint nodes during SelectionDAG.

lgtm.

Mar 10 2019, 11:44 PM · Restricted Project

Jan 24 2019

skatkov abandoned D56534: [Verifier] Add verification of unaligned atomic load/store.

Abandon the review.

Jan 24 2019, 10:20 PM

Jan 15 2019

skatkov committed rL351295: [InstCombine]Avoid introduction of unaligned mem access.
[InstCombine]Avoid introduction of unaligned mem access
Jan 15 2019, 8:40 PM
skatkov closed D56582: [InstCombine]Avoid introduction of unaligned mem access.
Jan 15 2019, 8:40 PM

Jan 13 2019

skatkov accepted D56120: [BasicBlockUtils] Generalize DeleteDeadBlock to deal with multiple dead blocks.
Jan 13 2019, 11:19 PM
skatkov updated the diff for D56582: [InstCombine]Avoid introduction of unaligned mem access.

Philip, I'm not sure that I completely follow your comment about spirit of the tests but I've added a coverage for size/alignment.
I hope it will be enough.

Jan 13 2019, 6:15 PM

Jan 11 2019

skatkov created D56582: [InstCombine]Avoid introduction of unaligned mem access.
Jan 11 2019, 1:03 AM

Jan 10 2019

skatkov created D56534: [Verifier] Add verification of unaligned atomic load/store.
Jan 10 2019, 12:22 AM

Dec 27 2018

skatkov added a comment to D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.

Ping, any progress on this?

Dec 27 2018, 2:52 AM

Dec 18 2018

skatkov added a comment to D55867: [RegisterCoalescer] dst register's live interval needs to be updated when merging a src register in ToBeUpdated set.

I've verified that this patch fixes the original problem.

Dec 18 2018, 7:48 PM

Dec 17 2018

skatkov added a comment to D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.

I was able to create a pure LLVM reproducer for this issue and filed a bug https://bugs.llvm.org/show_bug.cgi?id=40061.
Could you please take a look into it?

Dec 17 2018, 9:15 PM

Dec 11 2018

skatkov added a comment to D49519: [RegisterCoalescer] Delay live interval update work until the rematerialization for all the uses from the same def is done.

Hello @wmi, in our local fuzzing testing we've got the following assert:
src/include/llvm/ADT/IntervalMap.h:630: unsigned int llvm::IntervalMapImpl::LeafNode<KeyT, ValT, N, Traits>::insertFrom(unsigned int&, unsigned int, KeyT, KeyT, ValT) [with KeyT = llvm::SlotIndex; ValT = unsigned int; unsigned int N = 9u; Traits = llvm::IntervalMapInfo<llvm::SlotIndex>]: Assertion `!Traits::stopLess(b, a) && "Invalid interval"' failed.

Dec 11 2018, 8:23 PM

Dec 6 2018

skatkov accepted D55357: [LoopSimplifyCFG] Do not deal with loops with irreducible CFG inside.
Dec 6 2018, 9:04 PM

Nov 29 2018

skatkov abandoned D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

abandon in favor of D54932.

Nov 29 2018, 12:44 AM

Nov 28 2018

skatkov committed rL347839: [CGP] Improve compile time for complex addressing mode.
[CGP] Improve compile time for complex addressing mode
Nov 28 2018, 10:48 PM
skatkov closed D54932: [CGP] Improve compile time for complex addressing mode.
Nov 28 2018, 10:48 PM
skatkov added a comment to D54713: [SCEV] Guard movement of insertion point for loop-invariants.

@skatkov: About the loop unswitching suggestion, that sounds like a fine idea to me. But definitely outside the scope of this fix.

Absolutely agreed. It was just a sid comment.

(As an aside, other than a compiler-crash during vectorization (due to a deref of a null pointer), this is my first experience in the llvm vectorizer.  So I'm not familiar with how to go about adding the improvement you suggested.

I'm not sure whether you use a custom pipeline or not. But my point was that code came to vectorization pass seems strange because trivial loop unswitch optimization (provided by LoopUnswitch pass) could hoist the invariant check. By some reason it did not happen.

It's experience I'd like to gain, so I'll consider it as possible future work. But to make sure I'm not misleading you, I don't have time to work on this in the immediate future.)

Not a problem at all.

Nov 28 2018, 10:21 PM
skatkov added inline comments to D54713: [SCEV] Guard movement of insertion point for loop-invariants.
Nov 28 2018, 9:39 PM
skatkov abandoned D54289: [CGP] Sink invariant load to its use.

This is invalid patch.

Nov 28 2018, 8:51 PM
skatkov updated subscribers of D54932: [CGP] Improve compile time for complex addressing mode.
Nov 28 2018, 8:02 PM
skatkov accepted D54713: [SCEV] Guard movement of insertion point for loop-invariants.

LGTM. If Max or Sanjoy does not object in a, say, one day, feel free to land.

Nov 28 2018, 6:59 PM

Nov 27 2018

skatkov added inline comments to D54713: [SCEV] Guard movement of insertion point for loop-invariants.
Nov 27 2018, 11:38 PM
skatkov added inline comments to D54713: [SCEV] Guard movement of insertion point for loop-invariants.
Nov 27 2018, 11:10 PM
skatkov updated the diff for D54932: [CGP] Improve compile time for complex addressing mode.

Comments updated.

Nov 27 2018, 6:59 PM
skatkov added a comment to D54932: [CGP] Improve compile time for complex addressing mode.

Agreed, I missed comments in hurry. Will update a patch...

Nov 27 2018, 5:51 PM

Nov 26 2018

skatkov added a comment to D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

Hi @john.brawn, could you please take a look at https://reviews.llvm.org/D54932. It makes a compile time improvement and I guess we will not need this patch for a while.

Nov 26 2018, 11:03 PM
skatkov created D54932: [CGP] Improve compile time for complex addressing mode.
Nov 26 2018, 11:00 PM
skatkov added inline comments to D54713: [SCEV] Guard movement of insertion point for loop-invariants.
Nov 26 2018, 6:29 PM
skatkov added a comment to D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

Looks OK as a fix for the reported bug, with one minor nitpick. Taking a look at PR39625 it looks like there's an underlying problem where we insert a load of useless placeholders, e.g. for

declare void @otherfn()

define i32 @fn(i32* %arg1, i32* %arg2) {
entry:
  %gep1 = getelementptr i32, i32* %arg1, i32 4
  %gep2 = getelementptr i32, i32* %arg1, i32 8
  br i1 undef, label %a1, label %b1

a1:
  call void @otherfn()
  br label %middle

b1:
  call void @otherfn()
  br label %middle

middle:
  br i1 undef, label %a2, label %b2

a2:
  call void @otherfn()
  br label %end

b2:
  call void @otherfn()
  br label %end

end:
  %phi = phi i32* [ %gep1, %a2 ], [ %gep2, %b2 ]
  %val = load i32, i32* %phi, align 4
  ret i32 %val
}

we insert a total of 9 placeholders, but actually we need only one and the rest get deleted later. So I think there's something that could be done to improve that, but that's no reason not to do this fix.

Nov 26 2018, 6:25 PM
skatkov added inline comments to D54713: [SCEV] Guard movement of insertion point for loop-invariants.
Nov 26 2018, 6:14 PM
skatkov added a comment to D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

FYI: in parallel there is an idea how to simplify algorithm significantly. I'll try to implement it...

Nov 26 2018, 12:45 AM

Nov 22 2018

skatkov accepted D54841: [LoopSimplifyCFG] Don't delete LCSSA Phis.

Feel free to mention @dmgreen in description who found this bug.

Nov 22 2018, 10:21 PM
skatkov added inline comments to D54713: [SCEV] Guard movement of insertion point for loop-invariants.
Nov 22 2018, 10:11 PM
skatkov added a comment to D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

Thank you, Bjorn.

Nov 22 2018, 4:50 PM

Nov 20 2018

skatkov added a comment to D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

Basically I think the code looks ok. However, I'm not so familiar with this algorithm so it is hard to comment about the actual solution.

My understanding is that you introduce a threshold, and if the size of the TraverseOrder vector grows past the threshold we bail out from findCommon. So what is the impact of this?
I assume it means that we limit the amount of "Complex Addressing mode" optimizations somehow. Is this limit only hit for "large" programs? When compiling a program that hits the threshold, do we lose some optimizations or will the amount of Complex Addressing mode optimizations in such a program be reduced significantly?

How did you choose the current threshold? (that is probably something people want to know when trying to finetune this 4 years from now, so it could be nice to say something about it in the commit msg even if it just is an estimate)

Hi Bjorn, thank you for looking into this patch.

Nov 20 2018, 7:57 PM

Nov 19 2018

skatkov planned changes to D54289: [CGP] Sink invariant load to its use.

Basing on https://bugs.llvm.org/show_bug.cgi?id=23603 I think this patch is incorrect.

Nov 19 2018, 8:42 PM
skatkov added a reviewer for D54289: [CGP] Sink invariant load to its use: sanjoy.
Nov 19 2018, 8:41 PM
skatkov added a comment to D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.

ping.

Nov 19 2018, 8:28 PM

Nov 14 2018

skatkov created D54517: [CGP] Limit Complex Addressing mode by number of BasicBlocks to traverse.
Nov 14 2018, 1:54 AM

Nov 12 2018

skatkov added a comment to D54289: [CGP] Sink invariant load to its use.

There's also a sinking pass, why isn't this done there?

Sink pass is written in the way it sink instructions only to nearest successors while for invariant load I want to move it anywhere in CFG...

Ok, I was wrong Sink pass iterates. If I add a support for invariant.load it can sink it but it definitely cannot sink it through diamond or loop. In parallel I'm going to take a look deeper whether I can handle my case in Sink pass...

Nov 12 2018, 9:59 PM

Nov 11 2018

skatkov accepted D54007: Use a data structure better suited for large sets in SimplificationTracker..

LGTM as well

Nov 11 2018, 7:35 PM

Nov 8 2018

skatkov added a comment to D54289: [CGP] Sink invariant load to its use.

There's also a sinking pass, why isn't this done there?

Sink pass is written in the way it sink instructions only to nearest successors while for invariant load I want to move it anywhere in CFG...

Ok, I was wrong Sink pass iterates. If I add a support for invariant.load it can sink it but it definitely cannot sink it through diamond or loop. In parallel I'm going to take a look deeper whether I can handle my case in Sink pass...

Nov 8 2018, 9:25 PM
skatkov updated the diff for D54289: [CGP] Sink invariant load to its use.

Handled comments. Fow a while I'll double check Sink.cpp...

Nov 8 2018, 8:54 PM
skatkov added a comment to D54289: [CGP] Sink invariant load to its use.

There's also a sinking pass, why isn't this done there?

Nov 8 2018, 8:15 PM
skatkov added a comment to D54289: [CGP] Sink invariant load to its use.

Hi @arsenm, could you please take a look into this patch? If I turn the option on I see some AMDGPU test failures. I'm not an expert in AMDGPU asm/arch but it seems that 4 invariant loads are added in the beginning of pipeline in entry block and I hoist one of them to colder block. As a result as I understand instead of loading of two load at once this "double-load" is split into two loads. I'm not sure that it is a beneficial for this platform. So I wonder whether there is a easy way to prohibit optimization for such cases for this platform?
Even if there is no easy way to do that I'd like to land it with option off by default.

Nov 8 2018, 7:59 PM
skatkov created D54289: [CGP] Sink invariant load to its use.
Nov 8 2018, 7:53 PM

Nov 7 2018

skatkov added a comment to D54223: [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with.

In general I think it is what we can go/start with.
This formula seems to be a bit pessimistic. Specifically not every candidate creates sibling loops. Only if all successors is in loop or there are sub-loops before unswitch candidate. So applying the power multiplier for this candidates seems unreasonable.
Also it is possible that several unswitch candidates can be done at one shot (the same condition), in this case the number of siblings will not grow so fast.
But these improvements can be done as a follow-up if needed.

Nov 7 2018, 7:06 PM
skatkov added a comment to D54007: Use a data structure better suited for large sets in SimplificationTracker..

Just a note, there is a specific usage of this data structure.
Phi nodes are inserted in the initial step without any removals and then only removals are used.

So we should not see something like delete-insert.
So while data structure really suffers from what Bjorn wrote but in this specific application of this data structure I do not expect any problems...

Ok. Just worried that someone might find this set implementation nifty, trying to reuse it in some other part of the code or moving it to ADT, without considering this limitation regarding delete-insert.

Completely agreed!

Nov 7 2018, 1:12 AM
skatkov added a comment to D54007: Use a data structure better suited for large sets in SimplificationTracker..

Just a note, there is a specific usage of this data structure.
Phi nodes are inserted in the initial step without any removals and then only removals are used.

Nov 7 2018, 12:33 AM

Nov 6 2018

skatkov added a comment to D54007: Use a data structure better suited for large sets in SimplificationTracker..

LGTM, please wait a bit and if Bjorn does not object, feel free to land.

Nov 6 2018, 6:26 PM

Nov 5 2018

skatkov added a comment to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.

Also Max, please consider split this patch into two ones. One just NFC patch with analysis and update tests to check the output of dump and then patches which does modifications.

Nov 5 2018, 7:14 PM
skatkov added inline comments to D54021: [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switches.
Nov 5 2018, 6:48 PM

Oct 15 2018

skatkov accepted D53270: [NewPM] implement SCC printing for -print-before-all/-print-after-all.
Oct 15 2018, 12:53 AM
skatkov added inline comments to D53270: [NewPM] implement SCC printing for -print-before-all/-print-after-all.
Oct 15 2018, 12:40 AM
skatkov added inline comments to D53270: [NewPM] implement SCC printing for -print-before-all/-print-after-all.
Oct 15 2018, 12:21 AM

Sep 10 2018

skatkov committed rL341896: [LICM] Avoid duplicate work during building AliasSetTracker.
[LICM] Avoid duplicate work during building AliasSetTracker
Sep 10 2018, 9:09 PM
skatkov closed D51715: [LICM] Avoid duplicate work during building AliasSetTracker.
Sep 10 2018, 9:08 PM
skatkov accepted D51850: [IndVars][NFC] Refactor to make modifications of Changed transparent.
Sep 10 2018, 7:08 PM

Sep 9 2018

skatkov accepted D51779: [IndVars] Set Changed if rewriteFirstIterationLoopExitValues changes IR. PR38863.
Sep 9 2018, 10:18 PM
skatkov accepted D51777: [IndVars] Set Changed if sinkUnusedInvariants changes IR. PR38863.
Sep 9 2018, 10:15 PM