Page MenuHomePhabricator

kuhar (Jakub Kuderski)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 15 2015, 7:49 AM (245 w, 6 d)

Recent Activity

Yesterday

kuhar committed rG77ce2e21a877: [AMDGPU] Add Relocation Constant Support (authored by kuhar).
[AMDGPU] Add Relocation Constant Support
Mon, Mar 30, 10:51 AM
kuhar closed D76440: [AMDGPU] Add Relocation Constant Support.
Mon, Mar 30, 10:51 AM · Restricted Project

Wed, Mar 25

kuhar accepted D76813: Remove overly verbose debug from GenericDomTreeConstruction.
Wed, Mar 25, 5:53 PM · Restricted Project

Wed, Mar 18

kuhar committed rG1e4ee0bfc529: [Dominators] Fixup comments in GenericDominatorTreeConstruction. NFC. (authored by kuhar).
[Dominators] Fixup comments in GenericDominatorTreeConstruction. NFC.
Wed, Mar 18, 11:25 AM
kuhar closed D76340: [Dominators] Fixup comments in GenericDominatorTreeConstruction. NFC..
Wed, Mar 18, 11:25 AM · Restricted Project
kuhar added inline comments to D76340: [Dominators] Fixup comments in GenericDominatorTreeConstruction. NFC..
Wed, Mar 18, 11:24 AM · Restricted Project

Tue, Mar 17

kuhar created D76340: [Dominators] Fixup comments in GenericDominatorTreeConstruction. NFC..
Tue, Mar 17, 7:59 PM · Restricted Project

Feb 29 2020

kuhar added inline comments to D74931: [Dominators] Use Instruction::comesBefore for block-local queries, NFC.
Feb 29 2020, 2:47 PM · Restricted Project

Feb 20 2020

kuhar added inline comments to D74931: [Dominators] Use Instruction::comesBefore for block-local queries, NFC.
Feb 20 2020, 7:46 PM · Restricted Project
kuhar added inline comments to D74931: [Dominators] Use Instruction::comesBefore for block-local queries, NFC.
Feb 20 2020, 3:25 PM · Restricted Project
kuhar added inline comments to D74931: [Dominators] Use Instruction::comesBefore for block-local queries, NFC.
Feb 20 2020, 2:39 PM · Restricted Project
kuhar accepted D74931: [Dominators] Use Instruction::comesBefore for block-local queries, NFC.

LGTM

Feb 20 2020, 2:30 PM · Restricted Project

Dec 20 2019

kuhar committed rGc431c407ebcb: [InstCombine] Improve infinite loop detection (authored by kuhar).
[InstCombine] Improve infinite loop detection
Dec 20 2019, 1:27 PM
kuhar closed D71673: [InstCombine] Improve infinite loop detection.
Dec 20 2019, 1:26 PM · Restricted Project

Dec 18 2019

kuhar created D71673: [InstCombine] Improve infinite loop detection.
Dec 18 2019, 1:03 PM · Restricted Project
kuhar committed rG3d29c41ad59e: [InstCombine] Insert instructions before adding them to worklist (authored by kuhar).
[InstCombine] Insert instructions before adding them to worklist
Dec 18 2019, 12:05 PM
kuhar closed D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 18 2019, 12:05 PM · Restricted Project
kuhar committed rG406b6019cd2b: [InstCombine] Allow to limit the max number of iterations (authored by kuhar).
[InstCombine] Allow to limit the max number of iterations
Dec 18 2019, 10:56 AM
kuhar closed D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 18 2019, 10:56 AM · Restricted Project
kuhar updated the diff for D71145: [InstCombine] Allow to limit the max number of iterations.

Replace UINT_MAX with InstCombineDefaultMaxIterations

Dec 18 2019, 10:45 AM · Restricted Project
kuhar updated the diff for D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 18 2019, 10:45 AM · Restricted Project
kuhar updated the diff for D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 18 2019, 10:45 AM · Restricted Project
kuhar updated the diff for D71093: [InstCombine] Insert instructions before adding them to worklist.

Fix instruction insertion in InstCombineCasts for zext-or-icmp.

Dec 18 2019, 10:35 AM · Restricted Project
kuhar added inline comments to D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 18 2019, 10:35 AM · Restricted Project

Dec 17 2019

kuhar added a comment to D71145: [InstCombine] Allow to limit the max number of iterations.

I think it may be worthwhile to separate the limits for "stop after N iterations" and "assert after N iterations". In particular what I have in mind is that we can use -instcombine-max-iterations=2 in tests to ensure that correct worklist management allows everything to be folded in a single iteration (with the second establishing the fixed point). However, for this purpose -instcombine-max-iterations would actually need to assert. Possibly there's room for two separate options?

Dec 17 2019, 11:40 AM · Restricted Project
kuhar added inline comments to D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 17 2019, 10:35 AM · Restricted Project
kuhar added a comment to D71145: [InstCombine] Allow to limit the max number of iterations.

@lebedev.ri @spatel @craig.topper
Do you have any other feedback or questions/concerns about the patch?

Dec 17 2019, 8:08 AM · Restricted Project
kuhar added inline comments to D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 17 2019, 7:58 AM · Restricted Project

Dec 13 2019

kuhar added inline comments to D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 13 2019, 10:42 AM · Restricted Project
kuhar added a comment to D71093: [InstCombine] Insert instructions before adding them to worklist.

I'm sorry, i'm not following the patch's logic anymore.
First it was about relying on Add() printing ADD: line, and now
all the printing stuff seems to be gone and the patch is adding some
invariants on when the instruction should be inserted into worklist?

Since the beginning, the patch was about ensuring that the instructions added to the worklist are properly inserted. One manifestation of instructions not being correctly inserted that was easy to observe was debug ADD lines with <badrefs> being printed.
One confusing thing that happened was that I followed a suggestion of reducing the amount of debug output printed and removing the line containing NEW that directly preceded ADD. But this change is no more and the amount of the debug output is the same.

Dec 13 2019, 10:33 AM · Restricted Project
kuhar added a comment to D71093: [InstCombine] Insert instructions before adding them to worklist.

Do you have a small IR example with before/after output that we can put here in the review? That way there's at least a record of what the improvement looks like.

Dec 13 2019, 9:38 AM · Restricted Project
kuhar updated the summary of D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 13 2019, 9:29 AM · Restricted Project
kuhar added a comment to D71093: [InstCombine] Insert instructions before adding them to worklist.

Do you have any other feedback? @spatel @lebedev.ri

Dec 13 2019, 8:15 AM · Restricted Project

Dec 11 2019

kuhar added a comment to D71145: [InstCombine] Allow to limit the max number of iterations.

In my experience extra iterations are often caused by bad worklist management when updating nodes sometimes. For example https://reviews.llvm.org/D50990 was supposed to fix one case of that, but I never got around to finding the original test where I observed the issue. If that patch still applies does it have any effect on any of the extra iterations in the table?

Dec 11 2019, 1:23 PM · Restricted Project

Dec 10 2019

kuhar added inline comments to D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 10 2019, 2:03 PM · Restricted Project
kuhar added inline comments to D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 10 2019, 9:41 AM · Restricted Project
kuhar added inline comments to D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 10 2019, 8:01 AM · Restricted Project
kuhar updated the diff for D71145: [InstCombine] Allow to limit the max number of iterations.

Change the default iteration limit to UINT_MAX - 1.

Dec 10 2019, 7:56 AM · Restricted Project
kuhar added a comment to D71145: [InstCombine] Allow to limit the max number of iterations.

I ran some experiments to see how many iterations of InstCombine are necessary on real-world C++ applications. I paste the results below.
The numbers were collected by running InstCombine in a Full-LTO-like scenario: first I compiled all the code with -O3 with *optimizations disabled*, then I linked it together (using gllvm), and gave it to opt with -O3.

Dec 10 2019, 6:29 AM · Restricted Project

Dec 9 2019

kuhar added inline comments to D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 9 2019, 10:43 AM · Restricted Project
kuhar updated the diff for D71145: [InstCombine] Allow to limit the max number of iterations.

Thanks for the suggestions.

Dec 9 2019, 9:56 AM · Restricted Project

Dec 6 2019

kuhar created D71145: [InstCombine] Allow to limit the max number of iterations.
Dec 6 2019, 12:43 PM · Restricted Project
kuhar updated the diff for D71093: [InstCombine] Insert instructions before adding them to worklist.

I added an assertion checking if the instructions added have a parent (block).
Also restored the previous debug message.

Dec 6 2019, 10:31 AM · Restricted Project
kuhar updated the diff for D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 6 2019, 8:20 AM · Restricted Project
kuhar added a comment to D71093: [InstCombine] Insert instructions before adding them to worklist.

This looks fine, I wonder whether it's worth testing [how easy it's to test, that is]

Dec 6 2019, 8:20 AM · Restricted Project

Dec 5 2019

kuhar created D71093: [InstCombine] Insert instructions before adding them to worklist.
Dec 5 2019, 2:54 PM · Restricted Project

Oct 8 2019

kuhar accepted D68460: [MachineSink] Don't preserve MachineLoopInfo.
Oct 8 2019, 7:38 AM · Restricted Project

Oct 4 2019

kuhar added a comment to D68460: [MachineSink] Don't preserve MachineLoopInfo.

Would it be possible to add a verifyAnalysis function to MLI and check if a freshly calculated one matches the 'preserved' one?

Oct 4 2019, 2:04 PM · Restricted Project

Oct 2 2019

kuhar added inline comments to D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
Oct 2 2019, 7:10 AM · Restricted Project
kuhar added inline comments to D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
Oct 2 2019, 6:28 AM · Restricted Project

Oct 1 2019

kuhar accepted D68298: [GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing..

Looks good to me.

Oct 1 2019, 2:19 PM · Restricted Project
kuhar committed rG7ed4fb389bab: Add a missing pass in ARM O3 pipeline (authored by kuhar).
Add a missing pass in ARM O3 pipeline
Oct 1 2019, 11:54 AM
kuhar committed rL373382: Add a missing pass in ARM O3 pipeline.
Add a missing pass in ARM O3 pipeline
Oct 1 2019, 11:52 AM
kuhar committed rG856c1cd8520c: [Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in… (authored by kuhar).
[Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in…
Oct 1 2019, 11:28 AM
kuhar committed rG5be08ee9025d: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination (authored by kuhar).
[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination
Oct 1 2019, 11:28 AM
kuhar committed rG925c285f4381: Reapply [Dominators][CodeGen] Clean up MachineDominators (authored by kuhar).
Reapply [Dominators][CodeGen] Clean up MachineDominators
Oct 1 2019, 11:28 AM
kuhar committed rL373377: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.
[Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination
Oct 1 2019, 11:27 AM
kuhar committed rL373378: [Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in….
[Dominators][CodeGen] Don't mark MachineDominatorTree as preserved in…
Oct 1 2019, 11:27 AM
kuhar closed D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.
Oct 1 2019, 11:27 AM · Restricted Project
kuhar committed rL373376: Reapply [Dominators][CodeGen] Clean up MachineDominators.
Reapply [Dominators][CodeGen] Clean up MachineDominators
Oct 1 2019, 11:27 AM
kuhar added a comment to D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.

@arsenm @hiraditya
Are you fine with committing the patch as-is and exploring using the incremental updater later?

Oct 1 2019, 8:25 AM · Restricted Project
kuhar committed rG56b52a207fef: [Dominators][CodeGen] Add MachinePostDominatorTree verification (authored by kuhar).
[Dominators][CodeGen] Add MachinePostDominatorTree verification
Oct 1 2019, 8:23 AM
kuhar committed rL373341: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
[Dominators][CodeGen] Add MachinePostDominatorTree verification
Oct 1 2019, 8:23 AM
kuhar closed D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
Oct 1 2019, 8:22 AM · Restricted Project
kuhar updated the diff for D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
Oct 1 2019, 8:04 AM · Restricted Project

Sep 30 2019

kuhar added inline comments to D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
Sep 30 2019, 12:10 PM · Restricted Project
kuhar updated the diff for D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.

Fix a typo

Sep 30 2019, 11:34 AM · Restricted Project
kuhar created D68235: [Dominators][CodeGen] Add MachinePostDominatorTree verification.
Sep 30 2019, 11:29 AM · Restricted Project
kuhar resigned from D58187: Teach DTU to recalculate DT/PDT automatically when EntryBB is changed.
Sep 30 2019, 9:50 AM · Restricted Project
kuhar resigned from D50300: [WIP!][Dominators] Collect DomTree construction/update statistics and timing data.
Sep 30 2019, 9:50 AM
kuhar resigned from D54730: [DomTree] Fix order of domtree updates in MergeBlockIntoPredecessor..
Sep 30 2019, 9:50 AM · Restricted Project
kuhar resigned from D35142: WIP! [CFG] Create a new removeUnreachable utility that updates the dom in place.
Sep 30 2019, 9:50 AM
kuhar resigned from D45151: [LICM] Hoisting invariant.group loads.
Sep 30 2019, 9:50 AM · Restricted Project
kuhar resigned from D45150: Less conservative LoopSafetyInfo for headers.
Sep 30 2019, 9:50 AM · Restricted Project
kuhar resigned from D38586: SLPVectorizer.cpp: Ensure SLPVectorizer can visit each block by dominated order.
Sep 30 2019, 9:47 AM · Restricted Project
kuhar resigned from D36135: [RFC] Make infinite loops available in postdom tree, but do not connect them to the reverse reachable part of the CFG.
Sep 30 2019, 9:47 AM
kuhar updated the diff for D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.

I'd like to commit this simple fix as-is, make sure no buildbots complain, and then introduce a proper incremental updating in a later revision.

Sep 30 2019, 7:56 AM · Restricted Project
kuhar added a comment to D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.

Is there some reason it’s difficult to update the tree where needed here? I would try to just handle that instead of figuring out how to unpreserve it

Will try that, we have a generic updater that we should be able to use.

Sep 30 2019, 7:22 AM · Restricted Project

Sep 29 2019

kuhar added a comment to D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.

Is there some reason it’s difficult to update the tree where needed here? I would try to just handle that instead of figuring out how to unpreserve it

Will try that, we have a generic updater that we should be able to use.

Sep 29 2019, 1:13 PM · Restricted Project
kuhar planned changes to D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.

Thanks for the comments, @arsenm and @hiraditya.

Sep 29 2019, 12:35 PM · Restricted Project

Sep 27 2019

kuhar committed rG159ef37735f2: Revert [Dominators][CodeGen] Clean up MachineDominators (authored by kuhar).
Revert [Dominators][CodeGen] Clean up MachineDominators
Sep 27 2019, 12:37 PM
kuhar committed rG9bccdfcd4c4f: Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll (authored by kuhar).
Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll
Sep 27 2019, 12:37 PM
kuhar committed rL373117: Revert [Dominators][CodeGen] Clean up MachineDominators.
Revert [Dominators][CodeGen] Clean up MachineDominators
Sep 27 2019, 12:37 PM
kuhar committed rL373116: Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll.
Revert XFAIL a codegen test AArch64/tailmerging_in_mbp.ll
Sep 27 2019, 12:36 PM
kuhar created D68154: [Dominators][CodeGen] Fix MachineDominatorTree preservation in PHIElimination.
Sep 27 2019, 12:09 PM · Restricted Project
kuhar added a comment to D67976: [Dominators][CodeGen] Clean up MachineDominators.

The changes to verifier caught a MDT bug on AArch64:

test/CodeGen/AArch64/tailmerging_in_mbp.ll -mtriple=aarch64-eabi -verify-machine-dom-info 
DominatorTree is different than a freshly computed one!
	Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 25 slow queries.
  [1] %bb.0 {4294967295,4294967295} [0]
    [2] %bb.1 {4294967295,4294967295} [1]
      [3] %bb.2 {4294967295,4294967295} [2]
        [4] %bb.3 {4294967295,4294967295} [3]
          [5] %bb.7 {4294967295,4294967295} [4]
          [5] %bb.4 {4294967295,4294967295} [4]
            [6] %bb.5 {4294967295,4294967295} [5]
              [7] %bb.6 {4294967295,4294967295} [6]
    [2] %bb.8 {4294967295,4294967295} [1]
Roots: %bb.0
Sep 27 2019, 10:53 AM · Restricted Project
kuhar committed rGa524e630a793: XFAIL a codegen test AArch64/tailmerging_in_mbp.ll (authored by kuhar).
XFAIL a codegen test AArch64/tailmerging_in_mbp.ll
Sep 27 2019, 10:41 AM
kuhar committed rL373103: XFAIL a codegen test AArch64/tailmerging_in_mbp.ll.
XFAIL a codegen test AArch64/tailmerging_in_mbp.ll
Sep 27 2019, 10:39 AM
kuhar committed rG72c57ec3e6b3: [Dominators][CodeGen] Clean up MachineDominators (authored by kuhar).
[Dominators][CodeGen] Clean up MachineDominators
Sep 27 2019, 10:27 AM
kuhar committed rL373101: [Dominators][CodeGen] Clean up MachineDominators.
[Dominators][CodeGen] Clean up MachineDominators
Sep 27 2019, 10:23 AM
kuhar closed D67976: [Dominators][CodeGen] Clean up MachineDominators.
Sep 27 2019, 10:23 AM · Restricted Project
kuhar added a reviewer for D67976: [Dominators][CodeGen] Clean up MachineDominators: hliao.
Sep 27 2019, 9:04 AM · Restricted Project

Sep 26 2019

kuhar committed rGd98cb81cd11c: Handle successor's PHI node correctly when flattening CFG merges two if-regions (authored by kuhar).
Handle successor's PHI node correctly when flattening CFG merges two if-regions
Sep 26 2019, 8:23 AM
kuhar committed rL372989: Handle successor's PHI node correctly when flattening CFG merges two if-regions.
Handle successor's PHI node correctly when flattening CFG merges two if-regions
Sep 26 2019, 8:18 AM
kuhar closed D68032: Handle successor's PHI node correctly when flattening CFG merges two if-regions.
Sep 26 2019, 8:18 AM · Restricted Project

Sep 25 2019

kuhar accepted D68032: Handle successor's PHI node correctly when flattening CFG merges two if-regions.

Seems fine to me. Thanks for the fixes.
Please wait some time and see if others are OK with this change too.

Sep 25 2019, 2:17 PM · Restricted Project
kuhar added inline comments to D68032: Handle successor's PHI node correctly when flattening CFG merges two if-regions.
Sep 25 2019, 10:51 AM · Restricted Project
kuhar committed rG269bd15c68ca: [Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. (authored by kuhar).
[Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator.
Sep 25 2019, 7:04 AM
kuhar committed rL372874: [Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator..
[Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator.
Sep 25 2019, 7:04 AM
kuhar closed D67974: [Dominators][AMDGPU] Don't use virtual exit node in findNearestCommonDominator. Cleanup MachinePostDominators..
Sep 25 2019, 7:04 AM · Restricted Project, Restricted Project