Page MenuHomePhabricator

nikic (Nikita Popov)
User

Projects

User does not belong to any projects.

User Details

User Since
May 5 2018, 9:37 AM (141 w, 2 d)

Recent Activity

Today

nikic added a comment to D94827: [SimplifyCFG] Require and preserve dominator tree.

Wow. So much polarization here.

Wow, this is fantastic. When I first started working on the domtree updater back in 2017, SimplifyGFG seemed like one of the most difficult passes to handle, and I wasn't sure if we ever get there. Very impressive work, @lebedev.ri!

This is awesome. And scary. This is scarily awesome. :)

Why thank you.
It ended up being rather boringly trivial after all to me.
The hard part was coming up with the gradual roll-out part (the flag)

As for the rest of comments, let me split this up into parts.

  1. Should SimplifyCFG know how to preserve {,Post}DominatorTree
  2. Should SimplifyCFG make use of DominatorTree
  3. Should SimplifyCFGPass require DominatorTree

As for 1., for the life of me i can not take that question seriously.
Let me point out that SimplifyCFG is an *Utility*, it can be called from other passes,
and as is painfully visible from the diff, both the DwarfEHPrepare
and AMDGPUUnifyDivergentExitNodes do that already.

By keeping SimplifyCFG illiterate about DomTrees, we force it's users
to also avoid DomTrees to some extent, be it either to just not preserve them,
or recompute them each time after calling SimplifyCFG.

Is that really what we want to be doing?
So if such a question is seriously being asked,
i'd personally suggest to take a step back and really think about it.

3 - ignoring the cost of domtree preservation, this is basically free.
As far as i can tell from the tests, it doesn't result in any new domtree creations,
we'd always already calculate domtree after the simplifycfg invocation,
now we'll just do that earlier.

2 - well, yeah, that is a question of the patch, isn't it? :)
Not sure why it's being met with such surprisingly-hostile comments.

Mon, Jan 18, 3:05 PM · Restricted Project, Restricted Project, Restricted Project
nikic accepted D94934: [llvm] Prevent infinite loop in InstCombine of select statements.

A test case would be nice of course, but with this kind of worklist order issue (select folded before icmp) it's always tricky.

Mon, Jan 18, 2:49 PM · Restricted Project
nikic added a comment to D94447: [PredicateInfo] Generalize processing of conditions.

I believe compile-time is at least partly a motivation for some limitation here, but not in a way that is exposed by CTMark. I think here we mostly want to guard against the worst case (deeply nested AND/OR). Those kind of cases are not really covered by the tests in CTMark (or other parts in the test-suite), but are surprisingly common in practice (e.g. various code-generators that feed into Clang/LLVM). I think it would be desirable to have a limit on the number of items in the worklist to guard against that.

Mon, Jan 18, 1:30 PM · Restricted Project
nikic updated the diff for D94447: [PredicateInfo] Generalize processing of conditions.

Rebase over more tests, prevent exponential renaming with reused operands.

Mon, Jan 18, 1:29 PM · Restricted Project
nikic committed rG22b68440e164: [PredicateInfo] Add more and/or tests (NFC) (authored by nikic).
[PredicateInfo] Add more and/or tests (NFC)
Mon, Jan 18, 1:16 PM
nikic added a comment to D94827: [SimplifyCFG] Require and preserve dominator tree.

I'm somewhat skeptical about this change. The motivation seems a bit weak given the costs involved. The costs are:

Mon, Jan 18, 11:55 AM · Restricted Project, Restricted Project, Restricted Project
nikic added a comment to D93789: Add accessors for MCSubtargetInfo CPU and Feature tables.

I’m not against this, but do want to mention the help text is incorrect for x86-64. It lists CPUs that don’t support 64-bit. Using one of those CPUs will trigger a fatal error. A better list is fillValidCPUList from X86TargetParser.cpp in lib/Support. It takes a mode argument. That’s the interface clang uses.

Mon, Jan 18, 11:28 AM · Restricted Project
nikic added a comment to D94232: [LoopRotate] Add PrepareForLTO stage, avoid rotating with inline cands (WIP)..

Does the same issue apply to ThinLTO?

Mon, Jan 18, 11:18 AM · Restricted Project
nikic accepted D94861: [InstCombine,InstSimplify] Optimize select followed by and/or/xor.

LGTM

Mon, Jan 18, 10:14 AM · Restricted Project
nikic added a comment to D94866: [ValueTracking] Strengthen impliesPoison reasoning.

Okay, I agree that this is more general.
I was cautious about possible compile time degradation - do you have a number for this?

Mon, Jan 18, 9:59 AM · Restricted Project
nikic accepted D93943: [SimplifyCFG] Update SimplifyBranchOnICmpChain to recognize select form of and/or.

LGTM

Mon, Jan 18, 9:35 AM · Restricted Project
nikic updated the diff for D94866: [ValueTracking] Strengthen impliesPoison reasoning.

Fix typos in mask test.

Mon, Jan 18, 9:30 AM · Restricted Project
nikic added a comment to D94447: [PredicateInfo] Generalize processing of conditions.

Ping!

Mon, Jan 18, 12:39 AM · Restricted Project

Yesterday

nikic added a comment to D81678: Introduce noundef attribute at call sites for stricter poison analysis.

As the discussion is spread out across multiple threads, do I understand correctly that the current consensus is to introduce the -disable-noundef-analysis flag, and explicitly add it to all the relevant tests (rather than adding it to the substitutions)?

Sun, Jan 17, 2:35 PM · Restricted Project, Restricted Project
nikic added a comment to D92739: [ValueTracking] Branch on poison is UB.

I've reported the polly bug at https://bugs.llvm.org/show_bug.cgi?id=48783.

Sun, Jan 17, 2:11 PM · Restricted Project
nikic committed rG4229b87ed36c: [ValueTracking] Fix isSafeToSpeculativelyExecute for sdiv (PR48778) (authored by nikic).
[ValueTracking] Fix isSafeToSpeculativelyExecute for sdiv (PR48778)
Sun, Jan 17, 11:07 AM
nikic committed rG1cc477f030bd: [SimplifyCFG] Add test for PR48778 (NFC) (authored by nikic).
[SimplifyCFG] Add test for PR48778 (NFC)
Sun, Jan 17, 11:06 AM
nikic added inline comments to D93040: [InlineFunction] Use llvm.experimental.noalias.scope.decl for noalias arguments..
Sun, Jan 17, 9:35 AM · Restricted Project
nikic accepted D93042: [noalias.decl] Look through llvm.experimental.noalias.scope.decl.

LGTM

Sun, Jan 17, 8:24 AM · Restricted Project
nikic accepted D94874: [InstCombine] Transform abs pattern using multiplication to abs intrinsic (PR45691).

LGTM

Sun, Jan 17, 7:55 AM · Restricted Project
nikic added inline comments to D94874: [InstCombine] Transform abs pattern using multiplication to abs intrinsic (PR45691).
Sun, Jan 17, 7:12 AM · Restricted Project
nikic committed rGa13c0f62c381: [InstSimplify] Fold x*C1/C2 <= x (PR48744) (authored by nikic).
[InstSimplify] Fold x*C1/C2 <= x (PR48744)
Sun, Jan 17, 7:03 AM
nikic committed rG4bfbfb9bcb79: [InstSimplify] Add tests for x*C1/C2<=x (NFC) (authored by nikic).
[InstSimplify] Add tests for x*C1/C2<=x (NFC)
Sun, Jan 17, 7:03 AM
nikic accepted D93789: Add accessors for MCSubtargetInfo CPU and Feature tables.

LGTM. I'm not particularly familiar with this code, but don't see an issue with exposing this information. Currently MCSubtargetInfo directly incorporates the logic for printing a help text to the error stream, which is very dubious design. It should be possible to obtain the same information for printing a help text manually.

Sun, Jan 17, 1:51 AM · Restricted Project
nikic added a comment to D90094: [BasicAA] Handle recursive queries more efficiently (NFCI).

I've fixed the issue in b1c2f1282a237e9bc60f1b0020bc7535ca019739 and reapplied this change. The problem was introduced by D91936 and exposed here.

Sun, Jan 17, 1:39 AM · Restricted Project
nikic committed rG0b84afa5fcb4: Reapply [BasicAA] Handle recursive queries more efficiently (authored by nikic).
Reapply [BasicAA] Handle recursive queries more efficiently
Sun, Jan 17, 1:35 AM
nikic committed rGb1c2f1282a23: [BasicAA] Move assumption tracking into AAQI (authored by nikic).
[BasicAA] Move assumption tracking into AAQI
Sun, Jan 17, 1:35 AM

Sat, Jan 16

nikic committed rG5238e7b302ff: [InstCombine] Replace one-use select operand based on condition (authored by nikic).
[InstCombine] Replace one-use select operand based on condition
Sat, Jan 16, 2:25 PM
nikic closed D94862: [InstCombine] Replace one-use select operand based on condition.
Sat, Jan 16, 2:25 PM · Restricted Project
nikic added a comment to D94859: [ValueTracking] Make impliesPoison look into operands of V.

I posted an alternative patch at D94866. It's potentially more expensive, but I think it will cover more of the cases we need.

Sat, Jan 16, 8:27 AM · Restricted Project
nikic requested review of D94866: [ValueTracking] Strengthen impliesPoison reasoning.
Sat, Jan 16, 8:24 AM · Restricted Project
nikic added inline comments to D94861: [InstCombine,InstSimplify] Optimize select followed by and/or/xor.
Sat, Jan 16, 6:09 AM · Restricted Project
nikic requested review of D94862: [InstCombine] Replace one-use select operand based on condition.
Sat, Jan 16, 4:23 AM · Restricted Project
nikic committed rGf0a0ec2d085b: [InstCombine] Add more tests for select operand replacement (NFC) (authored by nikic).
[InstCombine] Add more tests for select operand replacement (NFC)
Sat, Jan 16, 4:12 AM
nikic added a comment to D94860: [InstCombine] Optimize select (X == C), (icmp X Y), false.

I think this is a case where being in select form favors us, and we can handle this through a more general transform, rather than the special case that is needed for and/or. The general transform is something along these lines: https://gist.github.com/nikic/4bad7e7e7ecda8d9c9e9633d86836b4d I've wanted to do this for a while, and this looks like a good excuse to make it happen :)

Sat, Jan 16, 3:42 AM · Restricted Project

Fri, Jan 15

nikic accepted D94800: ADT: Skip SmallVector::isReferenceToStorage when TakesParamByValue, NFC.

I tested the original three patches plus this one, and the results look good (or at least in line with expectations): https://llvm-compile-time-tracker.com/compare.php?from=33be50daa9ce1074c3b423a4ab27c70c0722113a&to=972a64b1331d1b3022154297593837234a958d0b&stat=instructions

Fri, Jan 15, 1:47 PM · Restricted Project
nikic added a comment to D90094: [BasicAA] Handle recursive queries more efficiently (NFCI).

@rnk Sorry, I got my binaries mixed up again... I can reproduce the crash now.

Fri, Jan 15, 1:26 PM · Restricted Project
nikic added a comment to D90094: [BasicAA] Handle recursive queries more efficiently (NFCI).

@rnk Thanks the the reproducer! Unfortunately I'm not seeing the crash. I'm at a1be47b4771467998d7549dcd1b9f9cebdaa9af9 directly before your revert using a Release+Asserts build.

Fri, Jan 15, 1:06 PM · Restricted Project
nikic added a comment to D94363: [AA] Pass AAResults through AAQueryInfo.

Do you have an idea if there is overhead of adding the AAR object to each query (each query info object)? (vs the setAAResults being done once for all the AAs available).

Fri, Jan 15, 12:46 PM · Restricted Project
nikic added inline comments to D94743: [Attributor][FIX] Do not delete non`-mustprogress` calls.
Fri, Jan 15, 12:16 PM · Restricted Project
nikic added a comment to D94180: [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument.

Logic looks fine now, though the GEP handling can be made a bit more lax.

Fri, Jan 15, 12:09 PM · Restricted Project
nikic added a comment to D94106: [Local] Treat calls that may not return as being alive (WIP)..

The new direction of the patch looks good to me. And yes, I would prefer it if the intrinsic attribute updates were split off into a separate patch.

Fri, Jan 15, 8:53 AM · Restricted Project
nikic accepted D94684: [InferAttrs] Mark some library functions as willreturn..

LGTM

Fri, Jan 15, 1:32 AM · Restricted Project
nikic added inline comments to D94743: [Attributor][FIX] Do not delete non`-mustprogress` calls.
Fri, Jan 15, 12:30 AM · Restricted Project
nikic added a reverting change for rG49142991a685: Reapply "ADT: Fix reference invalidation in SmallVector::push_back and single…: rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and….
Fri, Jan 15, 12:29 AM
nikic added a reverting change for rG3043e5a5c33c: ADT: Fix reference invalidation in N-element SmallVector::append and insert: rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and….
Fri, Jan 15, 12:29 AM
nikic added a reverting change for rG260a856c2abc: ADT: Fix reference invalidation in SmallVector::resize: rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and….
Fri, Jan 15, 12:29 AM
nikic added a reverting change for D93781: ADT: Fix reference invalidation in SmallVector::resize: rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and….
Fri, Jan 15, 12:29 AM · Restricted Project
nikic added a reverting change for D93780: ADT: Fix reference invalidation in N-element SmallVector::append and insert: rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and….
Fri, Jan 15, 12:29 AM · Restricted Project
nikic added a reverting change for D93779: ADT: Fix reference invalidation in SmallVector::push_back and single-element insert: rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and….
Fri, Jan 15, 12:29 AM · Restricted Project
nikic committed rG33be50daa9ce: Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and… (authored by nikic).
Revert "Reapply "ADT: Fix reference invalidation in SmallVector::push_back and…
Fri, Jan 15, 12:29 AM

Thu, Jan 14

nikic added a comment to D94633: [FunctionAttrs] Infer willreturn for functions without loops.

The logic seems sound, could be improved since this does initialize the fixpoint computation with a pessimistic starting value. One comment below, the rest is OK for merging.

I thought about this, but I don't think that we can use an optimistic fixpoint here without some much more sophisticated analysis. Just naively assuming "willreturn until proven otherwise" will incorrectly mark infinite recursion as willreturn:

; Not willreturn.
define void @willreturn_recursion() {
  tail call void @willreturn_recursion()
  ret void
}

So, I run this through the Attributor: https://opt.godbolt.org/z/TqsK86
Not what we were looking for, so here is the non-trivial version: https://opt.godbolt.org/z/rbeedM

Just to make sure we're on the same page, both of those would be bugs in attributor right? The first one shouldn't be unreachable, and the second one shouldn't be willreturn, at least not without more information than is contained in that IR.

I agree for the first one. Mustprogress is missing for unreachable to correct. The second one is correct, or am I missing something?

Thu, Jan 14, 2:57 PM · Restricted Project
nikic added a comment to D90328: Eliminates dead store of an exisiting value.

Compile-time: https://llvm-compile-time-tracker.com/compare.php?from=a3904cc77f181cff7355357688edfc392a236f5d&to=b5ccbbb5b1d8fc76e2291a860e4cf0a4787b77d4&stat=instructions Seems mostly fine, only outlier is kimwitu++ in NewPM-O3 configuration (k.cc has 1.25% regression).

Thu, Jan 14, 1:16 PM · Restricted Project
nikic added a comment to D93779: ADT: Fix reference invalidation in SmallVector::push_back and single-element insert.

Over in D91837 the reserveForAndGetAddress() implementation contained a check for TakesParamByValue that seems to be gone in this revision. My first guess is that this is the culprit, and we're now always performing the isReferenceToStorage() check.

Thu, Jan 14, 1:07 PM · Restricted Project
nikic added a comment to D93779: ADT: Fix reference invalidation in SmallVector::push_back and single-element insert.

The last time I tested this in https://reviews.llvm.org/D91837#2464554, the impact was much smaller. Some change between then and the landed version must have regressed things again. I think the numbers are now similar to what we saw before the "small value" optimization was added.

Thu, Jan 14, 12:59 PM · Restricted Project
nikic added inline comments to D94713: Do not traverse ConstantData use-list in SLPVectorizer.
Thu, Jan 14, 12:42 PM · Restricted Project
nikic added inline comments to D90328: Eliminates dead store of an exisiting value.
Thu, Jan 14, 12:22 PM · Restricted Project
nikic added a comment to D94633: [FunctionAttrs] Infer willreturn for functions without loops.

EDIT: I'm fine with this patch, FWIW.

I still think we should check to enable a light-attributor run in the beginning of the pipeline.

I was hoping to get the willreturn-related bugs fixed in time for LLVM 12, so sticking to the existing infrastructure seems like the safer bet :) It probably makes more sense to enable the attributor after branching rather than before.

Fair. As I said, we can enable it in a restricted, lightweight mode first. Could you remind me which bugs?

Thu, Jan 14, 12:02 PM · Restricted Project
nikic added inline comments to D94684: [InferAttrs] Mark some library functions as willreturn..
Thu, Jan 14, 11:42 AM · Restricted Project
nikic committed rGa3904cc77f18: [BasicAA] Handle recursive queries more efficiently (authored by nikic).
[BasicAA] Handle recursive queries more efficiently
Thu, Jan 14, 11:34 AM
nikic closed D90094: [BasicAA] Handle recursive queries more efficiently (NFCI).
Thu, Jan 14, 11:34 AM · Restricted Project
nikic added a comment to D90094: [BasicAA] Handle recursive queries more efficiently (NFCI).

Thank you @dmgreen and @asbirlea for testing!

Thu, Jan 14, 11:27 AM · Restricted Project
nikic added inline comments to D94633: [FunctionAttrs] Infer willreturn for functions without loops.
Thu, Jan 14, 10:01 AM · Restricted Project
nikic updated the diff for D94633: [FunctionAttrs] Infer willreturn for functions without loops.

Use all_of(instructions(F)).

Thu, Jan 14, 9:56 AM · Restricted Project
nikic added a comment to D94633: [FunctionAttrs] Infer willreturn for functions without loops.

I still think we should check to enable a light-attributor run in the beginning of the pipeline.

Thu, Jan 14, 9:42 AM · Restricted Project
nikic updated the diff for D94633: [FunctionAttrs] Infer willreturn for functions without loops.

Add test for infinite recursion and irreducible flow.

Thu, Jan 14, 9:29 AM · Restricted Project

Wed, Jan 13

nikic updated the diff for D94376: [MemCpyOpt] Enable MemorySSA by default.

Fix clang tests. Don't disable MemCpyOpt at O1 (previous version disabled it by accident).

Wed, Jan 13, 2:41 PM · Restricted Project
nikic requested review of D94633: [FunctionAttrs] Infer willreturn for functions without loops.
Wed, Jan 13, 1:48 PM · Restricted Project
nikic committed rGf711cb9a8ad9: [FuncAttrs] Add additional willreturn tests (NFC) (authored by nikic).
[FuncAttrs] Add additional willreturn tests (NFC)
Wed, Jan 13, 1:33 PM
nikic committed rG17863614da1e: [InstCombine] Fold select -> and/or using impliesPoison (authored by nikic).
[InstCombine] Fold select -> and/or using impliesPoison
Wed, Jan 13, 8:46 AM
nikic closed D94550: [InstCombine] Fold select -> and/or using impliesPoison.
Wed, Jan 13, 8:46 AM · Restricted Project

Tue, Jan 12

nikic added a comment to D94448: [NewPM] Run non-trivial loop unswitching under -O2/3/s/z.

FYI this change had some pretty significant impact on compile-time (https://llvm-compile-time-tracker.com/compare.php?from=4718ec01669b01373180f4cd1256c6e2dd6f3999&to=f748e92295515ea7b39cd687a718915b559de6ec&stat=instructions) and code size (https://llvm-compile-time-tracker.com/compare.php?from=4718ec01669b01373180f4cd1256c6e2dd6f3999&to=f748e92295515ea7b39cd687a718915b559de6ec&stat=size-text). Is that expected?

Tue, Jan 12, 1:58 PM · Restricted Project
nikic added a comment to D94550: [InstCombine] Fold select -> and/or using impliesPoison.

With this patch applied, this is the impact on InstCombine after flipping the flag: https://gist.github.com/nikic/052815150762859dddaefde10f25374d We can see that there are still quite a few cases where we regress. However, many can be fixed by stronger impliesPoison handling. E.g. we're currently missing icmp X, Y && icmp X, Y and icmp (X & C), C2 && icmp (X, C'), C2'.

Tue, Jan 12, 1:47 PM · Restricted Project
nikic committed rG23390e7a131a: [InstCombine] Handle logical and/or in assume optimization (authored by nikic).
[InstCombine] Handle logical and/or in assume optimization
Tue, Jan 12, 1:37 PM
nikic requested review of D94550: [InstCombine] Fold select -> and/or using impliesPoison.
Tue, Jan 12, 1:25 PM · Restricted Project
nikic committed rGe15f3ddcae65: [InstCombine] Add tests for logical and/or poison implication (NFC) (authored by nikic).
[InstCombine] Add tests for logical and/or poison implication (NFC)
Tue, Jan 12, 1:19 PM
nikic committed rGfb063c933f00: [InstCombine] Duplicate tests for logical and/or (NFC) (authored by nikic).
[InstCombine] Duplicate tests for logical and/or (NFC)
Tue, Jan 12, 12:51 PM
nikic committed rGd49974f9c98e: [InstCombine] Regenerate test checks (NFC) (authored by nikic).
[InstCombine] Regenerate test checks (NFC)
Tue, Jan 12, 12:27 PM
nikic committed rG7ecad2e4ced1: [InstSimplify] Don't fold gep p, -p to null (authored by nikic).
[InstSimplify] Don't fold gep p, -p to null
Tue, Jan 12, 11:25 AM
nikic closed D93820: [InstSimplify] Don't fold gep p, -p to null.
Tue, Jan 12, 11:25 AM · Restricted Project
nikic added a reviewer for D93789: Add accessors for MCSubtargetInfo CPU and Feature tables: craig.topper.
Tue, Jan 12, 9:34 AM · Restricted Project
nikic added inline comments to D94180: [SimplifyCFG] Optimize CFG when null is passed to a function with nonnull argument.
Tue, Jan 12, 9:32 AM · Restricted Project
nikic accepted D94502: [FunctionAttrs] Derive willreturn for fns with readonly` & `mustprogress`..

LGTM as well.

Tue, Jan 12, 9:29 AM · Restricted Project
nikic added a comment to D92015: [DAGCombiner] Fold BRCOND(FREEZE(COND)) to BRCOND(COND).

Yes, I think this is fine to land as-is. Note that SDAG always works on a single basic block, so I don't think there is any value in having "branch on undef is UB" semantics, as we can't infer information from branch conditions anyway.

Tue, Jan 12, 9:26 AM · Restricted Project
nikic added a comment to D94447: [PredicateInfo] Generalize processing of conditions.

The thought that the current limitations are compile-time related crossed my mind, but that doesn't seem to be a concern: https://llvm-compile-time-tracker.com/compare.php?from=00f773cf424699d8eb31591fdc95e0ca18b2682c&to=10ec7c7960ea47e899003fcd7d1ba5c389ba1cae&stat=instructions

Tue, Jan 12, 9:22 AM · Restricted Project
nikic added inline comments to D94502: [FunctionAttrs] Derive willreturn for fns with readonly` & `mustprogress`..
Tue, Jan 12, 8:58 AM · Restricted Project

Mon, Jan 11

nikic added a comment to D93039: Introduce llvm.noalias.decl intrinsic.

@jdoerfert It would be great if you could look over this as well.

Mon, Jan 11, 2:40 PM · Restricted Project
nikic requested review of D94447: [PredicateInfo] Generalize processing of conditions.
Mon, Jan 11, 1:44 PM · Restricted Project
nikic committed rG00f773cf4246: [SCCP] Fix misclassified conditions in test (NFC) (authored by nikic).
[SCCP] Fix misclassified conditions in test (NFC)
Mon, Jan 11, 1:34 PM
nikic committed rGa808d89d355c: [PredicateInfo] Add test for one unknown condition in and/or (NFC) (authored by nikic).
[PredicateInfo] Add test for one unknown condition in and/or (NFC)
Mon, Jan 11, 1:34 PM

Sun, Jan 10

nikic requested review of D94376: [MemCpyOpt] Enable MemorySSA by default.
Sun, Jan 10, 12:11 PM · Restricted Project
nikic committed rG1ecae1e62ad0: [ConstantFold] Fold fptoi.sat intrinsics (authored by nikic).
[ConstantFold] Fold fptoi.sat intrinsics
Sun, Jan 10, 8:48 AM
nikic committed rGbdb748a0ab24: [ConstantFold] Add tests for fptoi.sat (NFC) (authored by nikic).
[ConstantFold] Add tests for fptoi.sat (NFC)
Sun, Jan 10, 8:36 AM
nikic updated subscribers of D93820: [InstSimplify] Don't fold gep p, -p to null.

Based on what @RalfJung mentioned on zulip, the question of whether the transform is legal for inbounds comes down to the particular choice of inbounds semantics. I was using the semantics specified in LangRef, which make the optimization illegal, while @nlopes used the semantics from https://people.mpi-sws.org/~jung/twinsem/twinsem.pdf (or something similar), which makes it legal. The relevant difference to the LangRef semantics (if we stick to the gep-inbounds-logical case) would be:

Sun, Jan 10, 7:02 AM · Restricted Project
nikic added a comment to D54749: Saturating float to int casts..

@bjope There are two more revisions based on this one, D86079 implements improved X86 lowerings and is already accepted, and D86078 implements improved AArch64 lowerings. Do you plan to land these as well?

Sun, Jan 10, 4:44 AM · Restricted Project
nikic accepted D94138: Require chained analyses in BasicAA and AAResults to be transitive.

LGTM. I'm not an expert on the pass manager, but after looking into it a bit this seems like the right direction. I don't think not preserving AAResults in HexagonLoopIdiomRecognition/GVNHoist is much of a problem. Preserving AAResults is generally not important (this "analysis" is essentially free) and these are non-default passes anyway.

Sun, Jan 10, 2:21 AM · Restricted Project
nikic added inline comments to D94138: Require chained analyses in BasicAA and AAResults to be transitive.
Sun, Jan 10, 2:14 AM · Restricted Project

Sat, Jan 9

nikic accepted D93039: Introduce llvm.noalias.decl intrinsic.

LGTM, but please wait for @jdoerfert to check this as well.

Sat, Jan 9, 1:22 PM · Restricted Project
nikic added inline comments to D94363: [AA] Pass AAResults through AAQueryInfo.
Sat, Jan 9, 1:15 PM · Restricted Project
nikic requested review of D94363: [AA] Pass AAResults through AAQueryInfo.
Sat, Jan 9, 1:14 PM · Restricted Project