Page MenuHomePhabricator

lebedev.ri (Roman Lebedev)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 27 2012, 6:35 AM (360 w, 1 d)

Recent Activity

Yesterday

lebedev.ri committed rG7c3d6f5a1bf6: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to… (authored by lebedev.ri).
[X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to…
Sun, Sep 22, 3:08 PM
lebedev.ri added a comment to D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).

@spatel will you want to review the sibling patch D67725, or should i "self-review" since it's rather identical to this one?

Sun, Sep 22, 3:02 PM · Restricted Project
lebedev.ri updated the diff for D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).

Fixup comments.

Sun, Sep 22, 2:57 PM · Restricted Project
lebedev.ri requested review of D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).
Sun, Sep 22, 2:43 PM · Restricted Project
lebedev.ri added a comment to D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).

What if we just do the larger than 32-bit mask? Its not clear that making BZHI just to fold a load is an improvement. You have to materialize an immediate instead so the total uops increased.

Actually, i think it's clearly still not an improvement: https://godbolt.org/z/1M1deG

Sun, Sep 22, 2:43 PM · Restricted Project
lebedev.ri updated the diff for D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).
Sun, Sep 22, 1:27 PM · Restricted Project
lebedev.ri added a comment to D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).

What if we just do the larger than 32-bit mask? Its not clear that making BZHI just to fold a load is an improvement. You have to materialize an immediate instead so the total uops increased.

Sun, Sep 22, 1:19 PM · Restricted Project
lebedev.ri updated the diff for D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).

Scaling down ambigiousness of the patch: if not using BEXTR, only use BZHI if either the mask is larger than 32-bit, or the load folding will happen.

Sun, Sep 22, 12:54 PM · Restricted Project
lebedev.ri committed rG24159592cac9: [NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875) (authored by lebedev.ri).
[NFC][X86] Add BEXTR test with load and 33-bit mask (PR43381 / D67875)
Sun, Sep 22, 12:38 PM
lebedev.ri added inline comments to D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).
Sun, Sep 22, 11:17 AM · Restricted Project

Sat, Sep 21

lebedev.ri committed rGbaf809811b06: [InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0 --> Y == 0 (authored by lebedev.ri).
[InstSimplify] simplifyUnsignedRangeCheck(): X >= Y && Y == 0 --> Y == 0
Sat, Sep 21, 3:29 PM
lebedev.ri committed rGe94f156f778c: [InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or… (authored by lebedev.ri).
[InstSimplify][NFC] Reorganize simplifyUnsignedRangeCheck() to emphasize and/or…
Sat, Sep 21, 3:27 PM
lebedev.ri committed rGac4dda805217: [NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck… (authored by lebedev.ri).
[NFC][InstSimplify] Add exhaustive test coverage for simplifyUnsignedRangeCheck…
Sat, Sep 21, 3:27 PM
lebedev.ri added a comment to D67877: [analyzer] Conditionnaly include clang Analysis examples with cmake..

Please upload all patches with full context (-U99999)

Sat, Sep 21, 9:29 AM · Restricted Project
lebedev.ri added a comment to D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).

If you have the time, the BZHI bits-to-preserve operand only needs MOVB for initialization. That being said, MOVL probably avoids partial register update stalls, so maybe that’s why you’re seeing a performance gain.

Sat, Sep 21, 9:10 AM · Restricted Project
lebedev.ri requested changes to D67799: [InstCombine] Fold a shifty implementation of clamp0..

Ah, finally got it. There is more general fold here:

Name: sub_ashr_and_nsw
  %sub = sub nsw i8 %X, %v
  %ashr = ashr i8 %sub, 7
  %r = and i8 %ashr, %v
=>
  %cmp = icmp sle i8 %v, %X
  %r = select i1 %cmp, i8 0, i8 %v
Sat, Sep 21, 8:03 AM · Restricted Project
lebedev.ri updated the diff for D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).

Fixup comment, NFC.

Sat, Sep 21, 6:16 AM · Restricted Project
lebedev.ri updated the summary of D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).
Sat, Sep 21, 4:49 AM · Restricted Project
lebedev.ri created D67875: [X86] X86DAGToDAGISel::matchBEXTRFromAndImm(): if can't use BEXTR, fallback to BZHI (PR43381).
Sat, Sep 21, 4:49 AM · Restricted Project
lebedev.ri committed rG854b0f0f0030: [NFC][X86] Adjust check prefixes in bmi.ll (PR43381) (authored by lebedev.ri).
[NFC][X86] Adjust check prefixes in bmi.ll (PR43381)
Sat, Sep 21, 4:14 AM
lebedev.ri added inline comments to D67800: [InstCombine] Fold a shifty implementation of clamp (e.g., clamp255)..
Sat, Sep 21, 3:07 AM · Restricted Project
lebedev.ri accepted D67799: [InstCombine] Fold a shifty implementation of clamp0..

Please change clamp0 everywhere to clamp negative to zero, it wasn't obvious to what clamp0 means until reading all of the patch.
This looks ok otherwise. Please wait for @spatel to comment.

Sat, Sep 21, 2:46 AM · Restricted Project
lebedev.ri added a comment to D67873: Allow llvm-objdump to run on executable files.

Certainly missing a test.

Sat, Sep 21, 1:30 AM · Restricted Project
lebedev.ri added a comment to D29121: [Docs] Add LangRef documention for freeze instruction.

ping @jdoerfert

Sat, Sep 21, 1:19 AM · Restricted Project

Fri, Sep 20

lebedev.ri added a comment to D67855: [X86] Add new calling convention that guarantees tail call optimization.

I'd think this needs more test coverage.

Fri, Sep 20, 1:18 PM · Restricted Project
lebedev.ri added a comment to D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).

LGTM

Fri, Sep 20, 12:22 PM · Restricted Project
lebedev.ri added a parent revision for D67849: [InstCombine] (a+b) < a && (a+b) != 0 -> (0-b) < a iff a/b != 0 (PR43259): D67846: [InstCombine] (a+b) <= a && (a+b) != 0 -> (0-b) < a (PR43259).
Fri, Sep 20, 11:02 AM · Restricted Project
lebedev.ri added a child revision for D67846: [InstCombine] (a+b) <= a && (a+b) != 0 -> (0-b) < a (PR43259): D67849: [InstCombine] (a+b) < a && (a+b) != 0 -> (0-b) < a iff a/b != 0 (PR43259).
Fri, Sep 20, 11:02 AM · Restricted Project
lebedev.ri created D67849: [InstCombine] (a+b) < a && (a+b) != 0 -> (0-b) < a iff a/b != 0 (PR43259).
Fri, Sep 20, 11:02 AM · Restricted Project
lebedev.ri created D67846: [InstCombine] (a+b) <= a && (a+b) != 0 -> (0-b) < a (PR43259).
Fri, Sep 20, 11:00 AM · Restricted Project
lebedev.ri committed rG081eebc58fcc: [NFC][InstCombine] Fixup newly-added tests (authored by lebedev.ri).
[NFC][InstCombine] Fixup newly-added tests
Fri, Sep 20, 10:43 AM
lebedev.ri added a comment to D67841: [SLP] avoid reduction transform on patterns that the backend can load-combine.

We decided that load combining was unsuitable for IR because it could obscure other optimizations in IR. So we removed the LoadCombiner pass and deferred to the backend.

Fri, Sep 20, 9:54 AM · Restricted Project
lebedev.ri committed rGd21087af9586: [InstCombine] Tests for (a+b)<=a && (a+b)!=0 fold (PR43259) (authored by lebedev.ri).
[InstCombine] Tests for (a+b)<=a && (a+b)!=0 fold (PR43259)
Fri, Sep 20, 8:06 AM
lebedev.ri added inline comments to D67799: [InstCombine] Fold a shifty implementation of clamp0..
Fri, Sep 20, 3:10 AM · Restricted Project
lebedev.ri added inline comments to D67799: [InstCombine] Fold a shifty implementation of clamp0..
Fri, Sep 20, 1:42 AM · Restricted Project
lebedev.ri added inline comments to D67800: [InstCombine] Fold a shifty implementation of clamp (e.g., clamp255)..
Fri, Sep 20, 1:28 AM · Restricted Project
lebedev.ri added inline comments to D67799: [InstCombine] Fold a shifty implementation of clamp0..
Fri, Sep 20, 1:28 AM · Restricted Project

Thu, Sep 19

lebedev.ri added inline comments to D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps.
Thu, Sep 19, 3:25 PM · Restricted Project, Restricted Project
lebedev.ri added inline comments to D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).
Thu, Sep 19, 10:39 AM · Restricted Project
lebedev.ri committed rG7a67ed579520: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251) (authored by lebedev.ri).
[InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251)
Thu, Sep 19, 10:26 AM
lebedev.ri added a comment to D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251).

Thanks everyone!

Thu, Sep 19, 10:23 AM · Restricted Project
lebedev.ri added inline comments to D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).
Thu, Sep 19, 9:21 AM · Restricted Project
lebedev.ri added inline comments to D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).
Thu, Sep 19, 9:20 AM · Restricted Project
lebedev.ri added a comment to D67766: [Float2Int] avoid crashing on unreachable code (PR38502).

SGTM

Thu, Sep 19, 8:10 AM · Restricted Project
lebedev.ri added a comment to D67747: [utils] Add support to git-llvm to upload to Phabricator..

Why reimplement the wheel?
Does arc diff --update not work with git monorepo?

Thu, Sep 19, 1:10 AM · Restricted Project
lebedev.ri added a comment to D67315: [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction count.

When running test/Transforms/SimplifyCFG/merge-cond-stores-2.ll.test under address sanitizer, this revision creates a stack-use-after-scope failure at llvm/lib/Transforms/Utils/SimplifyCFG.cpp:3008:13:

Does this still happen after rL372262?

Thu, Sep 19, 1:02 AM · Restricted Project

Wed, Sep 18

lebedev.ri added inline comments to D67545: [clang-tidy] Added DefaultOperatorNewCheck..
Wed, Sep 18, 3:31 PM · Restricted Project
lebedev.ri added a comment to D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251).

Btw, I am in favour of this patch.

It both blocks the UBSan patch itself,

Well, I dont think so. ubsan patch works now, right? these folds just makes overhead a bit smaller, right? I would not connect ubsan patch with these folds. We could have ubsan patch in tree and these folds would land a bit later - no problem I think. Or miss I something?

Wed, Sep 18, 2:39 PM · Restricted Project
lebedev.ri added a comment to D62450: [DAGCombine][ARM] x ==/!= c -> (x - c) ==/!= 0 iff '-c' can be folded into the x node..

Can you add test coverage for some other target, maybe x86?

Can you add test coverage for a few more variations? Maybe something with SUBCARRY?

Wed, Sep 18, 2:21 PM · Restricted Project
lebedev.ri committed rGfeea722cf3dc: [SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN (authored by lebedev.ri).
[SimplifyCFG] mergeConditionalStoreToAddress(): try to pacify MSAN
Wed, Sep 18, 2:06 PM
lebedev.ri committed rGc00f3182243d: [DAGCombine][ARM][X86] (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold (authored by lebedev.ri).
[DAGCombine][ARM][X86] (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold
Wed, Sep 18, 1:52 PM
lebedev.ri committed rGa042aa1d829b: [CodeGen][X86][NFC] Tests for (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry)… (authored by lebedev.ri).
[CodeGen][X86][NFC] Tests for (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry)…
Wed, Sep 18, 1:52 PM
lebedev.ri added a comment to D62392: [DAGCombine][ARM] (sub Carry, X) -> (addcarry (sub 0, X), 0, Carry) fold.

@lebedev.ri I think these are reasonable assumptions. Just add a test case for X86 and this is good to go as far as I'm concerned.

Wed, Sep 18, 1:51 PM · Restricted Project
lebedev.ri updated the diff for D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251).

Rebased by swapping patches around.

Wed, Sep 18, 1:18 PM · Restricted Project
lebedev.ri added a parent revision for D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251): D67412: [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251).
Wed, Sep 18, 1:10 PM · Restricted Project
lebedev.ri added a child revision for D67412: [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251): D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251).
Wed, Sep 18, 1:10 PM · Restricted Project
lebedev.ri committed rGb646dd92c238: [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251) (authored by lebedev.ri).
[InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251)
Wed, Sep 18, 1:10 PM
lebedev.ri removed a parent revision for D67412: [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251): D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251).
Wed, Sep 18, 1:10 PM · Restricted Project
lebedev.ri removed a child revision for D67356: [InstCombine] Simplify @llvm.usub.with.overflow+non-zero check (PR43251): D67412: [InstCombine] foldUnsignedUnderflowCheck(): handle last few cases (PR43251).
Wed, Sep 18, 1:10 PM · Restricted Project
lebedev.ri added inline comments to D66805: [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate.
Wed, Sep 18, 12:59 PM · Restricted Project
lebedev.ri committed rGdd0170ab2457: [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction… (authored by lebedev.ri).
[SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction…
Wed, Sep 18, 12:51 PM
lebedev.ri committed rGec6b91b6655a: [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline… (authored by lebedev.ri).
[MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline…
Wed, Sep 18, 12:41 PM
lebedev.ri committed rG260b69490409: [CodeGen][MIPS][NFC] Some standalone tests for D66805 "or vectors, select `add… (authored by lebedev.ri).
[CodeGen][MIPS][NFC] Some standalone tests for D66805 "or vectors, select `add…
Wed, Sep 18, 12:41 PM
lebedev.ri added inline comments to D66805: [MIPS] For vectors, select `add %x, C` as `sub %x, -C` if it results in inline immediate.
Wed, Sep 18, 11:54 AM · Restricted Project
lebedev.ri added inline comments to D67725: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563).
Wed, Sep 18, 11:49 AM · Restricted Project
lebedev.ri updated the summary of D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).
Wed, Sep 18, 11:49 AM · Restricted Project
lebedev.ri committed rGba4cad903966: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup before… (authored by lebedev.ri).
[InstCombine] dropRedundantMaskingOfLeftShiftInput(): some cleanup before…
Wed, Sep 18, 11:40 AM
lebedev.ri committed rG8b719a3b8a4e: [NFC][InstCombine] More tests for PR42563 "Dropping pointless masking before… (authored by lebedev.ri).
[NFC][InstCombine] More tests for PR42563 "Dropping pointless masking before…
Wed, Sep 18, 11:40 AM
lebedev.ri added a parent revision for D67725: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563): D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).
Wed, Sep 18, 11:40 AM · Restricted Project
lebedev.ri added a child revision for D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563): D67725: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563).
Wed, Sep 18, 11:40 AM · Restricted Project
lebedev.ri created D67725: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask (PR42563).
Wed, Sep 18, 11:40 AM · Restricted Project
lebedev.ri updated the diff for D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).

Rebased, NFC.

Wed, Sep 18, 11:40 AM · Restricted Project
lebedev.ri added a comment to D67315: [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction count.

On Wed, Sep 18, 2019 at 9:02 PM James Molloy via Phabricator <reviews@reviews.llvm.org> wrote:

jmolloy accepted this revision.
This revision is now accepted and ready to land.

Wed, Sep 18, 11:06 AM · Restricted Project
lebedev.ri added a comment to D67315: [SimplifyCFG] mergeConditionalStoreToAddress(): consider cost, not instruction count.

Any stats for this patch from your rawspeed?

Wed, Sep 18, 10:40 AM · Restricted Project
lebedev.ri added a comment to D67679: [SLC] Convert some strndup calls to strdup calls.

I think some patches just severely lack words.
It is entirely non-obvious to me why this fold should happen, yet the patch description is empty.

Wed, Sep 18, 8:25 AM · Restricted Project
lebedev.ri added inline comments to D67545: [clang-tidy] Added DefaultOperatorNewCheck..
Wed, Sep 18, 8:23 AM · Restricted Project
lebedev.ri added a comment to D67661: [RISCV] Headers: Add Bitmanip extension Clang header files and rvintrin.h.

Sorry I misread your original comment.

(which one?)

These functions exist so that we can guarantee that these particular instructions will be emitted;

Sure, that makes sense.

the other option was LLVM IR intrinsics and Clang builtins, this was the other patch (https://reviews.llvm.org/D66479).
We are planning on abandoning that patch in favour of this one after the discussions on the patch and the mailing list.

I sure did comment that both of these approaches (emitting inline asm, or having arch-specific intrinsics)
are worse than emitting plain IR (as there is no 'real' incentive to enhance backend pattern-matching),
but arch-specific intrinsics are certainly better than inline asm.
Sorry if that thought got convoluted.

Wed, Sep 18, 8:16 AM · Restricted Project, Restricted Project
lebedev.ri added a comment to D67661: [RISCV] Headers: Add Bitmanip extension Clang header files and rvintrin.h.

Sorry I misread your original comment.

(which one?)

Wed, Sep 18, 8:16 AM · Restricted Project, Restricted Project
lebedev.ri added a comment to D62067: [Support] Time profiler: support new PassManager.

With new-pm soon being the default, i'm curious what's the plan with -ftime-trace?
Will it simply turn into a pumpkin? Is there an upcoming patch (along the lines of D62067#1511128)?

It still will be actual for FE part of profiler timers.

Wed, Sep 18, 6:30 AM · Restricted Project
lebedev.ri added a comment to D67661: [RISCV] Headers: Add Bitmanip extension Clang header files and rvintrin.h.

I agree inline asm is a far from optimal solution but it seems like the lesser of two evils for now.

Hm, i thought some previous patch already adds llvm ir riscv-specific intrinsics for those.

Wed, Sep 18, 5:55 AM · Restricted Project, Restricted Project
lebedev.ri added inline comments to D67545: [clang-tidy] Added DefaultOperatorNewCheck..
Wed, Sep 18, 5:49 AM · Restricted Project

Tue, Sep 17

lebedev.ri updated the diff for D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).

Upload correct diff with no noise in tests..

Tue, Sep 17, 1:18 PM · Restricted Project
lebedev.ri created D67677: [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask (PR42563).
Tue, Sep 17, 1:12 PM · Restricted Project
lebedev.ri committed rGad0c2e00a80b: AArch64CallLowering::lowerCall(): fix build by not passing InArgs into… (authored by lebedev.ri).
AArch64CallLowering::lowerCall(): fix build by not passing InArgs into…
Tue, Sep 17, 12:38 PM
lebedev.ri committed rG97bc5ae993bf: [NFC][InstCombine] dropRedundantMaskingOfLeftShiftInput(): some NFC diff shaving (authored by lebedev.ri).
[NFC][InstCombine] dropRedundantMaskingOfLeftShiftInput(): some NFC diff shaving
Tue, Sep 17, 12:35 PM
lebedev.ri committed rGbed6e08e23b3: [NFC][InstCombine] More tests for "Dropping pointless masking before left… (authored by lebedev.ri).
[NFC][InstCombine] More tests for "Dropping pointless masking before left…
Tue, Sep 17, 12:35 PM
lebedev.ri added a comment to D62067: [Support] Time profiler: support new PassManager.

With new-pm soon being the default, i'm curious what's the plan with -ftime-trace?
Will it simply turn into a pumpkin? Is there an upcoming patch (along the lines of D62067#1511128)?

Tue, Sep 17, 9:26 AM · Restricted Project
lebedev.ri added a comment to D67661: [RISCV] Headers: Add Bitmanip extension Clang header files and rvintrin.h.

Inline asm is really unfriendly to the optimizer.
Ideally the plan should be to incrementally getting rid of it as soon as backend learns to properly match particular builtin.

Tue, Sep 17, 9:19 AM · Restricted Project, Restricted Project
lebedev.ri added inline comments to D67517: Create UsersManual section entitled 'Controlling Floating Point Behavior'.
Tue, Sep 17, 7:33 AM · Restricted Project
lebedev.ri added a comment to D67658: Revert "[SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)".

There was several commits touching this code in rapid succession.
This seems to revert rL372101, but what about rL372097, rL372096, and possibly relevant part of D53342/rL372091 ?

Tue, Sep 17, 7:19 AM · Restricted Project
lebedev.ri added a comment to D67318: [SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per-BB cost.

Just curious, did you try threshold 5 or 6 for your rawspeed benchmark?

Tue, Sep 17, 1:08 AM · Restricted Project
lebedev.ri accepted D67648: Move DK_Misexpect for compatability with getNextAvailablePluginDiagnosticKind.

LG

Tue, Sep 17, 1:01 AM · Restricted Project

Mon, Sep 16

lebedev.ri added a comment to D67318: [SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per-BB cost.

Seems pretty ok: http://lnt.llvm.org/db_default/v4/nts/129108

except "MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow" really big perf/code size regression. Roman, can you look at it?

Mon, Sep 16, 2:33 PM · Restricted Project
lebedev.ri committed rG69911b8d01c6: [ARM][Codegen] Autogenerate arm-cgp-casts.ll test. (authored by lebedev.ri).
[ARM][Codegen] Autogenerate arm-cgp-casts.ll test.
Mon, Sep 16, 11:30 AM
lebedev.ri committed rG6fcd4e080f09: [Clang][Codegen] Disable arm_acle.c test. (authored by lebedev.ri).
[Clang][Codegen] Disable arm_acle.c test.
Mon, Sep 16, 10:50 AM
lebedev.ri committed rGb9909ffed82f: [Clang][Codegen] Relax available-externally-suppress.c test (authored by lebedev.ri).
[Clang][Codegen] Relax available-externally-suppress.c test
Mon, Sep 16, 10:49 AM
lebedev.ri added a comment to D67567: [clang-tidy] New check to warn when storing dispatch_once_t in non-static, non-global storage.
In D67567#1670264, @NoQ wrote:

FTR, we already have a similar Static Analyzer check, eg.:
https://github.com/llvm-mirror/clang/blob/release_80/test/Analysis/dispatch-once.m#L15
https://github.com/llvm-mirror/clang/blob/release_80/test/Analysis/dispatch-once.m#L26

Your check is a bit more aggressive but i don't see why didn't we do it that way in the first place :) Though you won't be able to warn on the heap example.

The Static Analyzer check was pointed out by a colleague; unfortunately our build environment doesn't currently play nice with running the static analyzer (so many devs don't end up running it) but ClangTidy gets run as part of our code review process. Given libdispatch's documented requirements, it seemed reasonable to be aggressive with a ClangTidy check when we can reasonably identify non-static/global storage.

Mon, Sep 16, 10:12 AM · Restricted Project, Restricted Project
lebedev.ri committed rG10151f661854: [SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per… (authored by lebedev.ri).
[SimplifyCFG] FoldTwoEntryPHINode(): consider *total* speculation cost, not per…
Mon, Sep 16, 9:25 AM
lebedev.ri added a comment to D67545: [clang-tidy] Added DefaultOperatorNewCheck..

Some thoughts:

  1. Docs missing
  2. How does this play with C++17 aligned new? Assuming compiler/library support for that isn't broken ('bye, OSX!', ?), i'm not sure why it would be UB for C++17, see https://godbolt.org/z/kwxRbu vs https://godbolt.org/z/om-bR2
  3. I'm not sure what's getCharAlign() has to do with anything here? You want to check the alignment requirement against the __STDCPP_DEFAULT_NEW_ALIGNMENT__ (i don't recall how to get it inside of clang) i would think?
Mon, Sep 16, 8:00 AM · Restricted Project
lebedev.ri added a comment to D65057: [ConstantFolding] Use FoldBitCast correctly.

LGTM. @lebedev.ri, do you have further review?

Mon, Sep 16, 6:58 AM · Restricted Project