Page MenuHomePhabricator

nikic (Nikita Popov)
Red Hat

Projects

User does not belong to any projects.

User Details

User Since
May 5 2018, 9:37 AM (255 w, 3 d)

Recent Activity

Sun, Mar 26

nikic added reviewers for D146905: [IR] Add llvm.tan.* intrinsic: efriedma, jdoerfert, arsenm.

Adding some people who might have opinions on more FP intrinsics.

Sun, Mar 26, 10:38 AM · Restricted Project, Restricted Project

Sat, Mar 25

nikic requested changes to D146872: [1/N][IR] Permit load/store/alloca for struct of the same scalable vector type.

isSized() should return true for these structs. They are sized for our definition of sized.

Sat, Mar 25, 8:20 AM · Restricted Project, Restricted Project

Fri, Mar 24

nikic added a comment to D145265: [Pipeline] Remove GlobalCleanupPM.

I think this (removing GlobalCleanupPM) makes sense at a high level, but this is a pretty substantial pipeline change and will need more thorough evaluation (e.g. looking at IR diffs on test suite). For example, it is not at all obvious to me that moving InstCombine before EarlyCSE is harmless, given the impact this may have on one-use heuristics.

Fri, Mar 24, 11:23 AM · Restricted Project, Restricted Project, Restricted Project
nikic committed rG172094cad31a: [LICM] Require MSSA in SinkAndHoistLICMFlags (NFC) (authored by nikic).
[LICM] Require MSSA in SinkAndHoistLICMFlags (NFC)
Fri, Mar 24, 8:09 AM · Restricted Project, Restricted Project
nikic added a comment to D144274: [InstCombine] use loop info when running the pass after loop vectorization.

I've put up https://reviews.llvm.org/D146813 to move the loop invariant GEP reassociation into LICM, which should allow us to drop the LoopInfo dependency from InstCombine.

Fri, Mar 24, 7:54 AM · Restricted Project, Restricted Project
nikic requested review of D146813: [LICM] Reassociate GEPs to allow hoisting.
Fri, Mar 24, 7:47 AM · Restricted Project, Restricted Project
nikic committed rG04f61fb73dc6: [LICM] Add tests for GEP reassociation (NFC) (authored by nikic).
[LICM] Add tests for GEP reassociation (NFC)
Fri, Mar 24, 7:25 AM · Restricted Project, Restricted Project
nikic committed rG11313108ff77: [SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265) (authored by nikic).
[SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265)
Fri, Mar 24, 6:32 AM · Restricted Project, Restricted Project
nikic closed D146723: [SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265).
Fri, Mar 24, 6:32 AM · Restricted Project, Restricted Project
nikic added a comment to D146723: [SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265).

@mkazantsev Thanks for the context! In that case I'll go with this patch, as it seems like we are already disallowing this everywhere apart from this one fold, so it makes more sense to be consistent.

Fri, Mar 24, 6:27 AM · Restricted Project, Restricted Project
nikic committed rG84717a78a348: [GlobalOpt] Fix dead const handling in pointer root user cleanup (PR61674) (authored by nikic).
[GlobalOpt] Fix dead const handling in pointer root user cleanup (PR61674)
Fri, Mar 24, 6:20 AM · Restricted Project, Restricted Project
nikic committed rG4923b4dbaca3: [Local] Check for null VH in RecursivelyDeleteTriviallyDeadInstructionsPermissi… (authored by nikic).
[Local] Check for null VH in RecursivelyDeleteTriviallyDeadInstructionsPermissi…
Fri, Mar 24, 4:56 AM · Restricted Project, Restricted Project
nikic added a comment to D146327: [ArgPromotion] Remove dead code produced by removing dead arguments.

@uabelho Should be fixed by https://github.com/llvm/llvm-project/commit/4923b4dbaca386b532c80f0572c2d6a0547a2a3d.

Fri, Mar 24, 4:56 AM · Restricted Project, Restricted Project
nikic added a comment to D146327: [ArgPromotion] Remove dead code produced by removing dead arguments.

Minimal test case:

define internal ptr @callee(ptr %dead) {
  ret ptr null
}
Fri, Mar 24, 4:48 AM · Restricted Project, Restricted Project
nikic accepted D146798: [AggressiveInstCombine] use m_Deferred on funnel shift(NFC).

LGTM

Fri, Mar 24, 4:36 AM · Restricted Project, Restricted Project
nikic accepted D146799: [Local] Preserve !nonnull only when K dominate J and K has a !noundef.

LGTM

Fri, Mar 24, 4:35 AM · Restricted Project, Restricted Project

Thu, Mar 23

nikic added a comment to D146466: [clang] diagnose function fallthrough.

@nickdesaulniers I don't think we want to handle that on the LLVM side. That will be fundamentally unreliable. If Clang wishes to make "recoverable" ubsan have arbitrary but well-defined behavior in the case of UB, it needs to generate appropriate IR to model that. For example, instead of generating

if (x == 0) {
  report_div_by_zero();
}
res = y / x;

it needs to generate

if (x == 0) {
  report_div_by_zero();
  res = 0; // or any other value
} else {
  res = y / x;
}

And similarly for other cases.

Thu, Mar 23, 1:14 PM · Restricted Project, Restricted Project, Restricted Project
nikic committed rG2f5fdbfab8c6: [MergeFunc] Don't assume constant metadata operands (authored by nikic).
[MergeFunc] Don't assume constant metadata operands
Thu, Mar 23, 9:35 AM · Restricted Project, Restricted Project
nikic committed rG16b6826bdd6e: [MergeFuncs] Add tests for D144682 (NFC) (authored by dingxiangfei2009).
[MergeFuncs] Add tests for D144682 (NFC)
Thu, Mar 23, 9:05 AM · Restricted Project, Restricted Project
nikic requested review of D146723: [SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265).
Thu, Mar 23, 7:26 AM · Restricted Project, Restricted Project
nikic added a comment to D146702: [MergeICmps] Attach metadata to new created loads.

I think this is right, but I'm not very confident about it. The problem is that mergeicmps can reorder loads, but I think these isolated comparisons will not get reordered before other ones (only possibly after), so I think it's fine. But maybe I just didn't manage to construct the right test case.

Thu, Mar 23, 4:57 AM · Restricted Project, Restricted Project
nikic accepted D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment.

LGTM

Thu, Mar 23, 4:40 AM · Restricted Project, Restricted Project
nikic accepted D142687: [Local] Use most generic range if K does not dominate J or K doesn't have a !noundef.

LGTM

Thu, Mar 23, 4:27 AM · Restricted Project, Restricted Project
nikic accepted D145299: [InstCombine] Generate better code for std::bit_ceil.

LG

Thu, Mar 23, 4:19 AM · Restricted Project, Restricted Project
nikic accepted D146637: [InstCombine] Try to recognize bswap pattern when calling funnel shifts.

LGTM

Thu, Mar 23, 4:05 AM · Restricted Project, Restricted Project
nikic added inline comments to D142687: [Local] Use most generic range if K does not dominate J or K doesn't have a !noundef.
Thu, Mar 23, 3:47 AM · Restricted Project, Restricted Project
nikic requested changes to D142687: [Local] Use most generic range if K does not dominate J or K doesn't have a !noundef.
Thu, Mar 23, 1:29 AM · Restricted Project, Restricted Project
nikic added inline comments to D146637: [InstCombine] Try to recognize bswap pattern when calling funnel shifts.
Thu, Mar 23, 1:24 AM · Restricted Project, Restricted Project
nikic added inline comments to D146637: [InstCombine] Try to recognize bswap pattern when calling funnel shifts.
Thu, Mar 23, 1:21 AM · Restricted Project, Restricted Project

Wed, Mar 22

nikic accepted D146327: [ArgPromotion] Remove dead code produced by removing dead arguments.

Thanks for the PhaseOrdering test, I think I get the problem now. ArgPromotion is the first pass in the CGSCC pipeline, and works a bit unusually in that promotion will insert loads in the caller (outside the current SCC). This means the we run ArgPromotion on a child function, which inserts instructions in the parent and simplify the child. Then we run ArgPromotion on the parent, but at this point the parent has not been simplified yet. As such, it is important for ArgPromotion to clean up instructions it inserts. There's possibly some phase ordering improvement we could make here, but I don't see anything obvious. (Just moving ArgPromotion to the end of the CGSCC pipeline would cause the reverse issue that function simplification can not make use of the promotion for cleanup.)

Wed, Mar 22, 1:19 PM · Restricted Project, Restricted Project
nikic added a comment to D146327: [ArgPromotion] Remove dead code produced by removing dead arguments.

This looks good to me, but could you please pre-commit the new tests with baseline check lines, and then rebase this patch so that only the test diff is visible?

Wed, Mar 22, 11:44 AM · Restricted Project, Restricted Project
nikic accepted D146638: [LFTR] Simplify integer case for genLoopLimit [nfc-ish].

LGTM

Wed, Mar 22, 10:44 AM · Restricted Project, Restricted Project
nikic accepted D146596: [SCEV] Infer no-self-wrap via constant ranges.

LGTM

Wed, Mar 22, 10:42 AM · Restricted Project, Restricted Project
nikic requested changes to D146637: [InstCombine] Try to recognize bswap pattern when calling funnel shifts.

As @RKSimon said, this transform is in the wrong place. It has nothing to do with shuffled intrinsic operands...

Wed, Mar 22, 10:38 AM · Restricted Project, Restricted Project
nikic planned changes to D146629: [SimplifyCFG][LICM] Preserve nonnull, range and align metadata when speculating.

@jdoerfert Yeah, there is a pending patch that fixes this for !range here: https://reviews.llvm.org/D142687 We'll need similar changes for nonnull/align as well.

Wed, Mar 22, 9:20 AM · Restricted Project, Restricted Project
nikic added a reverting change for rGd6ad4f01c3da: [MemProf] Context disambiguation cloning pass [patch 1a/3]: rG883dbb9c86be: Revert "[MemProf] Context disambiguation cloning pass [patch 1a/3]".
Wed, Mar 22, 7:45 AM · Restricted Project, Restricted Project
nikic committed rG883dbb9c86be: Revert "[MemProf] Context disambiguation cloning pass [patch 1a/3]" (authored by nikic).
Revert "[MemProf] Context disambiguation cloning pass [patch 1a/3]"
Wed, Mar 22, 7:45 AM · Restricted Project, Restricted Project
nikic added a reverting change for D140908: [MemProf] Context disambiguation cloning pass [patch 1a/3]: rG883dbb9c86be: Revert "[MemProf] Context disambiguation cloning pass [patch 1a/3]".
Wed, Mar 22, 7:45 AM · Restricted Project, Restricted Project
nikic committed rGe7618a6361f8: [GVN] Fix change reporting when removing assume (PR61574) (authored by nikic).
[GVN] Fix change reporting when removing assume (PR61574)
Wed, Mar 22, 7:24 AM · Restricted Project, Restricted Project
nikic added inline comments to D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment.
Wed, Mar 22, 7:02 AM · Restricted Project, Restricted Project
nikic requested review of D146629: [SimplifyCFG][LICM] Preserve nonnull, range and align metadata when speculating.
Wed, Mar 22, 6:46 AM · Restricted Project, Restricted Project
nikic committed rG3a3ad9fe1811: [SimplifyCFG][LICM] Add metadata speculation tests (NFC) (authored by nikic).
[SimplifyCFG][LICM] Add metadata speculation tests (NFC)
Wed, Mar 22, 6:33 AM · Restricted Project, Restricted Project
nikic added inline comments to D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment.
Wed, Mar 22, 4:09 AM · Restricted Project, Restricted Project
nikic requested changes to D142687: [Local] Use most generic range if K does not dominate J or K doesn't have a !noundef.

Could you please also add tests for the !noundef case? (Preferably one with the first load noundef and one with the second. I'm not sure you're checking the right one currently.)

Wed, Mar 22, 3:41 AM · Restricted Project, Restricted Project
nikic committed rG1a9d49524a52: [GVN] Regenerate test checks (NFC) (authored by nikic).
[GVN] Regenerate test checks (NFC)
Wed, Mar 22, 3:40 AM · Restricted Project, Restricted Project
nikic committed rGa5788836b92c: [IR] Rename dropUndefImplying to dropUBImplying (NFC) (authored by nikic).
[IR] Rename dropUndefImplying to dropUBImplying (NFC)
Wed, Mar 22, 3:16 AM · Restricted Project, Restricted Project
nikic requested changes to D145299: [InstCombine] Generate better code for std::bit_ceil.

Implementation looks fine, but this needs more test coverage.

Wed, Mar 22, 2:32 AM · Restricted Project, Restricted Project
nikic added inline comments to D146596: [SCEV] Infer no-self-wrap via constant ranges.
Wed, Mar 22, 2:23 AM · Restricted Project, Restricted Project
nikic accepted D146599: [InstSimplify] Actually use NewOps for calls in simplifyInstructionWithOperands.

LGTM

Wed, Mar 22, 1:11 AM · Restricted Project, Restricted Project
nikic accepted D146598: [Constant] Inline ConstantInt::getSigned.

LGTM

Wed, Mar 22, 1:08 AM · Restricted Project, Restricted Project
nikic added a comment to D145846: [InstCombine] enhance icmp with sub folds.

Proof: https://alive2.llvm.org/ce/z/VNNPeG

Wed, Mar 22, 1:05 AM · Restricted Project, Restricted Project
nikic accepted D145846: [InstCombine] enhance icmp with sub folds.

LGTM

Wed, Mar 22, 1:03 AM · Restricted Project, Restricted Project

Tue, Mar 21

nikic committed rGb4307437e51d: [ModuleUtils] Handle globals_ctors/dtors with non-literal type (PR56809) (authored by nikic).
[ModuleUtils] Handle globals_ctors/dtors with non-literal type (PR56809)
Tue, Mar 21, 8:19 AM · Restricted Project, Restricted Project
nikic added inline comments to D145846: [InstCombine] enhance icmp with sub folds.
Tue, Mar 21, 7:55 AM · Restricted Project, Restricted Project
nikic added inline comments to D145299: [InstCombine] Generate better code for std::bit_ceil.
Tue, Mar 21, 7:53 AM · Restricted Project, Restricted Project
nikic added a reviewer for D146404: Improve min/max vector reductions on arm: dmgreen.
Tue, Mar 21, 7:34 AM · Restricted Project, Restricted Project
nikic requested changes to D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment.

Nearly there, I think...

Tue, Mar 21, 7:33 AM · Restricted Project, Restricted Project
nikic added inline comments to D146518: [AArch64] Extend icmp bitcast to vecreduce fold to comparison with -1.
Tue, Mar 21, 6:07 AM · Restricted Project, Restricted Project
nikic requested review of D146518: [AArch64] Extend icmp bitcast to vecreduce fold to comparison with -1.
Tue, Mar 21, 5:25 AM · Restricted Project, Restricted Project
nikic committed rG35130e4d6efb: [AArch64] Add tests for bitcast to and mask reduction (NFC) (authored by nikic).
[AArch64] Add tests for bitcast to and mask reduction (NFC)
Tue, Mar 21, 5:18 AM · Restricted Project, Restricted Project
nikic accepted D146457: [LSR] Use evaluateAtIteration in lsr-term-fold.

All of the test changes are, to my eye, semantically the same.

Tue, Mar 21, 3:53 AM · Restricted Project, Restricted Project
nikic accepted D146464: [LSR] Fix "new use of poison" problem in lsr-term-fold.

LGTM

Tue, Mar 21, 3:47 AM · Restricted Project, Restricted Project
nikic accepted D146444: [IndVarSimplify] Remove duplicate call to getSCEV. NFC.

LGTM

Tue, Mar 21, 3:42 AM · Restricted Project, Restricted Project
nikic accepted D146468: [LFTR] Use evaluateAtIteration in genLoopLimit [nfc].

LGTM

Tue, Mar 21, 3:41 AM · Restricted Project, Restricted Project
nikic added a comment to D145650: [X86] Create extra prolog/epilog for stack realignment.

It looks like this broke the expensive checks build (x86-64-baseptr.ll and i386-baseptr.ll fail).

Tue, Mar 21, 3:34 AM · Restricted Project, Restricted Project
nikic added inline comments to D144492: [InstCombine] Support multiple comparisons in foldAllocaCmp().
Tue, Mar 21, 3:12 AM · Restricted Project, Restricted Project
nikic updated the diff for D144492: [InstCombine] Support multiple comparisons in foldAllocaCmp().

Upload correct patch.

Tue, Mar 21, 3:11 AM · Restricted Project, Restricted Project
nikic updated the diff for D144492: [InstCombine] Support multiple comparisons in foldAllocaCmp().

Improve comments.

Tue, Mar 21, 3:07 AM · Restricted Project, Restricted Project
nikic added inline comments to D144492: [InstCombine] Support multiple comparisons in foldAllocaCmp().
Tue, Mar 21, 2:53 AM · Restricted Project, Restricted Project
nikic accepted D146508: Mark widenable condition as noundef.

LGTM

Tue, Mar 21, 2:52 AM · Restricted Project, Restricted Project
nikic committed rG289542b1e72d: [InstCombine] Fold icmp eq of non-inbounds geps (authored by nikic).
[InstCombine] Fold icmp eq of non-inbounds geps
Tue, Mar 21, 2:52 AM · Restricted Project, Restricted Project
nikic committed rG3cfb081c19f7: [InstCombine] Add icmp gep tests without inbounds (NFC) (authored by nikic).
[InstCombine] Add icmp gep tests without inbounds (NFC)
Tue, Mar 21, 2:41 AM · Restricted Project, Restricted Project
nikic committed rGe8ec42b80b5d: [InstCombine] Fold icmp eq of non-inbounds gep with base pointer (authored by nikic).
[InstCombine] Fold icmp eq of non-inbounds gep with base pointer
Tue, Mar 21, 2:20 AM · Restricted Project, Restricted Project
nikic requested changes to D146349: [InstCombine] Make `FoldOpIntoSelect` handle non-constants and use condition to deduce constants..

Can you please rebase over https://github.com/llvm/llvm-project/commit/d0de2c51c9a9fc0fedb97ee98f61ce08cb34972b? I hope that will clarify what the actual change here is, because making foldOperationIntoSelectOperand() fallible doesn't make a whole lot of sense.

Tue, Mar 21, 2:04 AM · Restricted Project, Restricted Project
nikic committed rGd0de2c51c9a9: [InstCombine] Simplify foldOperationIntoSelectOperand() (NFCI) (authored by nikic).
[InstCombine] Simplify foldOperationIntoSelectOperand() (NFCI)
Tue, Mar 21, 2:03 AM · Restricted Project, Restricted Project
nikic committed rG8325d46a4ab8: [MergeFuncs] Compare load instruction metadata (authored by dingxiangfei2009).
[MergeFuncs] Compare load instruction metadata
Tue, Mar 21, 1:49 AM · Restricted Project, Restricted Project
nikic closed D144682: [MergeFuncs] Compare load instruction metadata.
Tue, Mar 21, 1:49 AM · Restricted Project, Restricted Project
nikic committed rGd9b3a9442530: [NFC] Change strcpy to std::copy (authored by 1lyasm).
[NFC] Change strcpy to std::copy
Tue, Mar 21, 1:44 AM · Restricted Project, Restricted Project
nikic closed D146382: [NFC] Change strcpy to std::copy.
Tue, Mar 21, 1:44 AM · Restricted Project, Restricted Project
nikic added a comment to D146423: [Analys] Added new context analys for BB/Inst.

Actually it was I who proposed Dmitry to split it off into a separate analysis. The main advantage of this approach is that we can then create some static analysis tools that don't necessarily modify the IR to give you the same info.

Tue, Mar 21, 1:42 AM · Restricted Project, Restricted Project
nikic committed rG6fc670e5e370: [WebAssembly] Add auto-upgrade for renamed intrinsics (authored by nikic).
[WebAssembly] Add auto-upgrade for renamed intrinsics
Tue, Mar 21, 1:27 AM · Restricted Project, Restricted Project
nikic closed D146424: [WebAssembly] Add auto-upgrade for renamed intrinsics.
Tue, Mar 21, 1:27 AM · Restricted Project, Restricted Project
nikic accepted D146470: [LFTR] Assert and simplify under assumption exit counts are integers.

LGTM

Tue, Mar 21, 1:05 AM · Restricted Project, Restricted Project

Mon, Mar 20

nikic added inline comments to D145299: [InstCombine] Generate better code for std::bit_ceil.
Mon, Mar 20, 12:40 PM · Restricted Project, Restricted Project
nikic accepted D146429: [LSR] Fix wrapping bug in lsr-term-fold logic.

LGTM

Mon, Mar 20, 12:35 PM · Restricted Project, Restricted Project
nikic added inline comments to D146429: [LSR] Fix wrapping bug in lsr-term-fold logic.
Mon, Mar 20, 11:13 AM · Restricted Project, Restricted Project
nikic accepted D146382: [NFC] Change strcpy to std::copy.

LGTM. Assuming you don't have commit access, can you tell me the Name <email> to use for the commit?

Mon, Mar 20, 10:59 AM · Restricted Project, Restricted Project
nikic added inline comments to D144492: [InstCombine] Support multiple comparisons in foldAllocaCmp().
Mon, Mar 20, 10:51 AM · Restricted Project, Restricted Project
nikic added a comment to D109958: [LoopFlatten] Enable it by default.

FWIW, I am quite unhappy with the implementation quality of this pass, but I don't think I have the energy to deal with this. In the future, due diligence for pass enablement needs to include a review of the pass implementation by a domain expert, if this was not already done as part of the initial implementation. (Domain expert = SCEV reviewer in this context.)

Mon, Mar 20, 9:45 AM · Restricted Project, Restricted Project
nikic added a comment to D146424: [WebAssembly] Add auto-upgrade for renamed intrinsics.

Thanks! I didn't know about this functionality. Is there a generally accepted mechanism to mark intrinsics as experimental so that there is no expectation that they will be auto-upgraded like this?

Mon, Mar 20, 9:16 AM · Restricted Project, Restricted Project
nikic requested review of D146424: [WebAssembly] Add auto-upgrade for renamed intrinsics.
Mon, Mar 20, 7:50 AM · Restricted Project, Restricted Project
nikic requested changes to D145905: [LSR]: Terminate folding condition use SymbolicMax..

Using max exit count is incorrect. The computed max may be larger than the actual trip count of this exit.

Mon, Mar 20, 4:40 AM · Restricted Project, Restricted Project
nikic requested changes to D146415: [LSR]: Fix cast to BranchInst..

Change looks fine, but is missing a test case.

Mon, Mar 20, 4:33 AM · Restricted Project, Restricted Project
nikic added inline comments to D136889: Infrastructure for alias analysis in flang.
Mon, Mar 20, 3:41 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
nikic added a reviewer for D144492: [InstCombine] Support multiple comparisons in foldAllocaCmp(): goldstein.w.n.

ping ;)

Mon, Mar 20, 2:19 AM · Restricted Project, Restricted Project

Sun, Mar 19

nikic requested changes to D145299: [InstCombine] Generate better code for std::bit_ceil.

I haven't looked in detail what you're doing here, but you're clearly looking for the ConstantRange class. makeExactICmpRegion(), add(), sub(), binaryNot(), etc.

Sun, Mar 19, 2:53 PM · Restricted Project, Restricted Project
nikic requested changes to D146382: [NFC] Change strcpy to std::copy.
Sun, Mar 19, 8:11 AM · Restricted Project, Restricted Project
nikic added a comment to D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment.

Extracting the stride from GEPs turned out to be trickier than I expected...

Sun, Mar 19, 8:03 AM · Restricted Project, Restricted Project
nikic accepted D145223: [InstCombine] Combine binary operator of two phi node.

LG

Sun, Mar 19, 8:03 AM · Restricted Project, Restricted Project
nikic requested changes to D144445: [AggressiveInstCombine] folding load for constant global patterened arrays and structs by alignment.

Extracting the stride from GEPs turned out to be trickier than I expected...

Sun, Mar 19, 7:54 AM · Restricted Project, Restricted Project