Page MenuHomePhabricator

efriedma (Eli Friedman)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 10 2016, 1:07 PM (122 w, 2 d)

Recent Activity

Today

efriedma created D55729: [CodeGenPrepare] Fix bad IR created by large offset GEP splitting..
Fri, Dec 14, 4:55 PM
efriedma added inline comments to D55709: [docs][ARM] Improve How to Cross Compile Compiler-rt Builtins For Arm.
Fri, Dec 14, 2:58 PM
efriedma added a comment to D55147: Exclude non-integral pointers in isBytewiseValue.

I'm okay with this, I guess... but someone more familiar with non-integral pointers in practice should approve.

Fri, Dec 14, 1:27 PM

Yesterday

efriedma added a comment to D55572: [AArch64] Add patterns for zext/sext of shift amount..

I suspect it would need to bake quite a bit of target-specific knowledge into it to get reasonable output

Thu, Dec 13, 2:16 PM
efriedma added a comment to D55555: [LLD][ELF][ARM] Add support for architecture v6m thunks.

The thunks look fine.

Thu, Dec 13, 2:00 PM
efriedma added a comment to D55120: [MemCpyOpt] memset->memcpy forwarding with undef tail.

LGTM. Sorry, I should have considered the dependency check a little more carefully the first time around.

Thu, Dec 13, 11:35 AM

Wed, Dec 12

efriedma updated the diff for D55630: [ARM] Complete the Thumb1 shift+and->shift+shift transforms..

Remove unnecessary call to target hook from DAGCombine. (It might be necessary in the future, possibly, but it isn't useful for now.)

Wed, Dec 12, 5:39 PM
efriedma created D55630: [ARM] Complete the Thumb1 shift+and->shift+shift transforms..
Wed, Dec 12, 5:29 PM
efriedma added inline comments to D55616: Emit ASM input in a constant context.
Wed, Dec 12, 2:34 PM
efriedma accepted D55449: [InstCombine] Fix negative GEP offset evaluation for 32-bit pointers.

LGTM

Wed, Dec 12, 2:19 PM
efriedma added a comment to D55555: [LLD][ELF][ARM] Add support for architecture v6m thunks.

Compilers don't preserve 8-byte alignment within function prologues anyway, in general. For example, LLVM and other compilers frequently generate "push {r4, r5, r6, r7, lr}".

Wed, Dec 12, 1:12 PM
efriedma added a comment to D55449: [InstCombine] Fix negative GEP offset evaluation for 32-bit pointers.

Checking for overflow would also be fine, but I think you would want to check overflow on each operation that modifies the offset, as opposed to the final result (which might have overflowed the 64-bit integer anyway).

Wed, Dec 12, 12:59 PM
efriedma added a comment to D53865: [LoopVectorizer] Improve computation of scalarization overhead..

Are you proposing some kind of search over instruction sequences with some limited lookahead?

Wed, Dec 12, 12:54 PM
efriedma added a comment to D55449: [InstCombine] Fix negative GEP offset evaluation for 32-bit pointers.

I think I would rather SignExtend64(X, 32) or something like that... yes, it's effectively the same for well-defined code, but I'd rather explicitly truncate the offset rather than implicitly truncate it in ConstantInt::get.

Wed, Dec 12, 12:32 PM
efriedma added a comment to D55572: [AArch64] Add patterns for zext/sext of shift amount..

update_llc_test_checks is a useful starting point because it generates the right checks to ensure you're checking the whole function, which is inconvenient to do by hand (trying to CHECK-NOT your way to checking the whole function is a bad idea).

Wed, Dec 12, 11:40 AM

Tue, Dec 11

efriedma updated subscribers of D55525: [Driver] Add support for -fembed-bitcode for assembly file.
Tue, Dec 11, 5:36 PM
efriedma added a comment to D54498: AbstractCallSite -- A unified interface for (in)direct and callback calls.

Does the ipcp transform need to check isThreadDependent() on the Constant?

Tue, Dec 11, 5:35 PM
efriedma created D55572: [AArch64] Add patterns for zext/sext of shift amount..
Tue, Dec 11, 1:04 PM
efriedma added inline comments to D55555: [LLD][ELF][ARM] Add support for architecture v6m thunks.
Tue, Dec 11, 12:21 PM
efriedma accepted D55536: [ConstantFold] Use getMinSignedBits for APInt in isIndexInRangeOfArrayType..

LGTM

Tue, Dec 11, 11:42 AM
efriedma accepted D55547: [ConstantInt] Check active bits before calling getZExtValue..

LGTM; arrays/struct types are currently limited to 2^64 elements anyway.

Tue, Dec 11, 11:40 AM
efriedma accepted D55169: [ConstantFolding] Handle leading zero-length elements in load folding.

LGTM. (We should fix the constant stuff to be consistent with the type system at some point, but not urgent, I guess.)

Tue, Dec 11, 11:33 AM

Mon, Dec 10

efriedma added inline comments to D55169: [ConstantFolding] Handle leading zero-length elements in load folding.
Mon, Dec 10, 3:41 PM
efriedma added a comment to D53865: [LoopVectorizer] Improve computation of scalarization overhead..

My question then is how to fix this? My idea was to let the loop vectorizer keep thinking about these instructions as vectorized, while being aware of a later expansion during isel (perhaps ISelExpanded would be a better name than TargetScalarized?).

Mon, Dec 10, 12:57 PM

Fri, Dec 7

efriedma added a comment to D55464: [SelectionDAG] Remove SUBC handling from computeKnownBits.

SUBC doesn't have an incoming carry...

Fri, Dec 7, 5:08 PM
efriedma added a comment to D49691: [DAGCombine] Allow alias analysis with inline asm calls and GluedNodes..

I'm not sure I like the algorithm here. It seems like it would be more straightforward to handle the INLINEASM and all the glued nodes together, in a separate inner loop.

Fri, Dec 7, 2:24 PM
efriedma accepted D55120: [MemCpyOpt] memset->memcpy forwarding with undef tail.

LGTM

Fri, Dec 7, 12:50 PM

Thu, Dec 6

efriedma created D55403: [PHIElimination] Allow breaking loop backedges in certain cases..
Thu, Dec 6, 6:08 PM
efriedma added a comment to D55150: Emit warnings from the driver for use of -mllvm or -Xclang options..

In fact -mllvm is used extensively in a lot of lit/FileCheck tests, so that's also going to cause problems.

Thu, Dec 6, 12:35 PM
efriedma added a comment to D55150: Emit warnings from the driver for use of -mllvm or -Xclang options..

Or actually, if you really want to discourage people from using them, maybe we could use the LLVM version number in the name, like "--unstable-llvm-option-8" (which would change to "--unstable-llvm-option-9" in in 9.0, etc.). This would allow developers to continue using the same workflows, but it would strongly discourage users from putting them into their build systems.

Thu, Dec 6, 11:53 AM
efriedma added a comment to D55150: Emit warnings from the driver for use of -mllvm or -Xclang options..

I'm not sure that putting a warning that can be disabled really helps here; anyone who needs the option will just disable the warning anyway, and then users adding additional options somewhere else in the build system will miss the warning.

Thu, Dec 6, 11:41 AM
efriedma added inline comments to D55120: [MemCpyOpt] memset->memcpy forwarding with undef tail.
Thu, Dec 6, 11:13 AM
efriedma added a comment to D55115: [IR] Don't assume all functions are 4 byte aligned.

Sure, looks fine.

Thu, Dec 6, 11:11 AM

Tue, Dec 4

efriedma accepted D55073: [SelectionDAG] Split very large token factors for loads into 64k chunks.

LGTM

Tue, Dec 4, 3:54 PM
efriedma added inline comments to D54719: [Intrinsic] Signed Fixed Point Multiplication Intrinsic.
Tue, Dec 4, 3:46 PM
efriedma accepted D55296: [Support] Fix GNU/kFreeBSD build.

Okay, then LGTM

Tue, Dec 4, 2:21 PM
efriedma added inline comments to D55296: [Support] Fix GNU/kFreeBSD build.
Tue, Dec 4, 2:07 PM
efriedma added inline comments to D55120: [MemCpyOpt] memset->memcpy forwarding with undef tail.
Tue, Dec 4, 1:08 PM

Mon, Dec 3

efriedma accepted D53794: [TargetLowering] expandFP_TO_UINT - avoid FPE due to out of range conversion (PR17686).

LGTM

Mon, Dec 3, 5:23 PM
efriedma added a comment to D54719: [Intrinsic] Signed Fixed Point Multiplication Intrinsic.

You might need PromoteIntOp_SMULFIX for certain targets, like 64-bit RISCV.

Mon, Dec 3, 3:30 PM
efriedma added inline comments to D55147: Exclude non-integral pointers in isBytewiseValue.
Mon, Dec 3, 2:47 PM
efriedma added a comment to D55063: [IR] Set nocapture attribute for va_start, va_end, and va_copy.

As far as I know, for all in-tree targets, this should be fine... and for all ABIs I know of in common use. I'm a little nervous that it will eventually break some obscure platform where a va_list can somehow point to itself, though. (At least, an implementation like that seems plausible.)

Mon, Dec 3, 1:05 PM
efriedma added inline comments to D55147: Exclude non-integral pointers in isBytewiseValue.
Mon, Dec 3, 12:22 PM
efriedma accepted D54137: AArch64: Fix invalid CCMP emission.

LGTM

Mon, Dec 3, 11:42 AM
efriedma accepted D55115: [IR] Don't assume all functions are 4 byte aligned.

LGTM with formatting fixed.

Mon, Dec 3, 11:35 AM

Fri, Nov 30

efriedma added inline comments to D52977: [RISCV] Introduce codegen patterns for instructions introduced in RV64I.
Fri, Nov 30, 2:39 PM
efriedma added inline comments to D55115: [IR] Don't assume all functions are 4 byte aligned.
Fri, Nov 30, 2:13 PM
efriedma accepted D54954: [DAGCombiner] guard against an oversized shift crash.

LGTM

Fri, Nov 30, 9:38 AM

Thu, Nov 29

efriedma accepted D55096: [ARM64] [Windows] Fix the local stack size for funclets.

LGTM

Thu, Nov 29, 5:27 PM
efriedma added inline comments to D53794: [TargetLowering] expandFP_TO_UINT - avoid FPE due to out of range conversion (PR17686).
Thu, Nov 29, 4:30 PM
efriedma added inline comments to D54954: [DAGCombiner] guard against an oversized shift crash.
Thu, Nov 29, 3:47 PM
efriedma added inline comments to D49691: [DAGCombine] Allow alias analysis with inline asm calls and GluedNodes..
Thu, Nov 29, 3:44 PM
efriedma accepted D54546: [ARM] Don't expand sdiv when optimising for minsize.

LGTM

Thu, Nov 29, 3:33 PM
efriedma added a comment to D55059: [ARM] FP16: constant initialised v4f16 and v8f16 vectors.

The lib/Target/ARM/ARMInstrNEON.td look like they belong in a separate patch. And it looks like there isn't any explicit test coverage of bitcasts.

Thu, Nov 29, 3:23 PM
efriedma added inline comments to D55073: [SelectionDAG] Split very large token factors for loads into 64k chunks.
Thu, Nov 29, 3:01 PM
efriedma added inline comments to D55073: [SelectionDAG] Split very large token factors for loads into 64k chunks.
Thu, Nov 29, 2:40 PM

Wed, Nov 28

efriedma accepted D54956: [ValueTracking] Look through casts when determining non-nullness.

LGTM

Wed, Nov 28, 2:26 PM
efriedma accepted D55021: Mark __builtin_shufflevector as using custom type checking.

LGTM

Wed, Nov 28, 2:22 PM
efriedma added inline comments to D54956: [ValueTracking] Look through casts when determining non-nullness.
Wed, Nov 28, 11:27 AM

Mon, Nov 26

efriedma added inline comments to D54546: [ARM] Don't expand sdiv when optimising for minsize.
Mon, Nov 26, 1:42 PM
efriedma added a comment to D54774: [GlobalOpt] Optimize comdat dynamic initializers on Windows.

Global metadata pointing to what, exactly? The global variables?

Mon, Nov 26, 1:18 PM
efriedma added a comment to D54906: [LegalizeVectorTypes][X86][ARM][AArch64][PowerPC] Don't use SplitVecOp_TruncateHelper for FP_TO_SINT/UINT..

AArch64 changes look fine.

Mon, Nov 26, 12:31 PM
efriedma updated subscribers of D54472: Disable invalid isPodLike<> specialization.

Maybe using the correct definition of "trivially copyable" will fix the gcc issues with Optional, if we're lucky. I guess we can try.

Mon, Nov 26, 12:20 PM

Wed, Nov 21

efriedma added a comment to D53485: [ScheduleDAGRRList] Do not preschedule the node has ADJCALLSTACKDOWN parent.

I don't really want to merge this without any test coverage.

Wed, Nov 21, 3:30 PM
efriedma added inline comments to D54472: Disable invalid isPodLike<> specialization.
Wed, Nov 21, 3:14 PM
efriedma added inline comments to D54774: [GlobalOpt] Optimize comdat dynamic initializers on Windows.
Wed, Nov 21, 2:31 PM
efriedma added inline comments to D54546: [ARM] Don't expand sdiv when optimising for minsize.
Wed, Nov 21, 2:10 PM
efriedma added inline comments to D54719: [Intrinsic] Signed Fixed Point Multiplication Intrinsic.
Wed, Nov 21, 2:05 PM

Tue, Nov 20

efriedma added a comment to D54730: [DomTree] Fix order of domtree updates in MergeBlockIntoPredecessor..

Another testcase variation (again, generate IR with Python, run opt -gvn):

Tue, Nov 20, 1:39 PM
efriedma added a comment to D54730: [DomTree] Fix order of domtree updates in MergeBlockIntoPredecessor..

Has anyone run CTMark test-suite numbers on this patch before and after?

Tue, Nov 20, 12:28 PM
efriedma added inline comments to D54546: [ARM] Don't expand sdiv when optimising for minsize.
Tue, Nov 20, 11:57 AM
efriedma accepted D54392: [DAGCombiner] look through bitcasts when trying to narrow vector binops.

Yes, we don't need to block this fix, I think; LGTM

Tue, Nov 20, 11:28 AM
efriedma added a comment to D54533: InstCombine: don't assume malloc will never return nullptr.

It might be worth adding a comment to the code to make this more clear.

Tue, Nov 20, 11:21 AM

Mon, Nov 19

efriedma added a comment to D54392: [DAGCombiner] look through bitcasts when trying to narrow vector binops.

It's probably okay to canonicalize the way you are, but you're hitting a missing pattern for AArch64. Something like the following appears to work:

Mon, Nov 19, 6:33 PM
efriedma added a comment to D53876: Preserve loop metadata when splitting exit blocks.

Maybe add a separate testcase, instead of modifying an existing testcase? Otherwise looks fine, although maybe wait for @mkazantsev to look again.

Mon, Nov 19, 5:12 PM
efriedma created D54732: [LoopUnroll] Don't verify domtree by default with +Asserts..
Mon, Nov 19, 3:38 PM
efriedma created D54730: [DomTree] Fix order of domtree updates in MergeBlockIntoPredecessor..
Mon, Nov 19, 3:00 PM

Fri, Nov 16

efriedma added inline comments to D53876: Preserve loop metadata when splitting exit blocks.
Fri, Nov 16, 5:25 PM
efriedma added a comment to D53876: Preserve loop metadata when splitting exit blocks.

You're calling std::unique on an unsorted array?

Fri, Nov 16, 4:29 PM
efriedma added inline comments to D54623: [MSP430] Optimize srl/sra in case of A >> (8 + N).
Fri, Nov 16, 11:18 AM

Thu, Nov 15

efriedma accepted D53281: [SelectionDAG] Support promotion of PREFETCH operands.

LGTM

Thu, Nov 15, 11:29 AM
efriedma accepted D54574: [SelectionDAG] Support promotion of the FPOWI integer operand.

Probably worth putting a note in ISDOpcodes.h that the behavior is undefined if the integer doesn't fit in 32 bits. Otherwise LGTM.

Thu, Nov 15, 11:27 AM

Nov 14 2018

efriedma added a comment to D54546: [ARM] Don't expand sdiv when optimising for minsize.

On thumbv8, if you're dividing by a power of two greater than 128, I think you save zero bytes (it's eight bytes either way); is that right?

Nov 14 2018, 2:50 PM
efriedma added a comment to D54546: [ARM] Don't expand sdiv when optimising for minsize.

But this is suboptimial for minimum code size, so instead we just generate a MOV and a SDIV.

Nov 14 2018, 2:40 PM
efriedma added inline comments to D53794: [TargetLowering] expandFP_TO_UINT - avoid FPE due to out of range conversion (PR17686).
Nov 14 2018, 2:07 PM
efriedma added inline comments to D54538: [LV] Avoid vectorizing unsafe dependencies in uniform address.
Nov 14 2018, 1:14 PM
efriedma added a comment to D54270: [ThinLTO] Update handling of vararg functions to match inliner.

This doesn't completely match what the inliner is doing. We actually can inline functions that call va_start in some cases: specifically, we can inline in cases where we can prove the call to va_start is dead at a particular callsite. Probably doesn't come up often enough to matter, though.

Nov 14 2018, 11:54 AM
efriedma added a comment to D54533: InstCombine: don't assume malloc will never return nullptr.

I don't think any of your testcases actually indicate a bug.

Nov 14 2018, 11:33 AM

Nov 13 2018

efriedma committed rL346821: [CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness..
[CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness.
Nov 13 2018, 4:42 PM
efriedma closed D54491: [CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness..
Nov 13 2018, 4:42 PM
efriedma created D54491: [CodeGen] Fix forward scan in MachineBasicBlock::computeRegisterLiveness..
Nov 13 2018, 12:54 PM

Nov 12 2018

efriedma added inline comments to D54137: AArch64: Fix invalid CCMP emission.
Nov 12 2018, 3:45 PM
efriedma accepted D54285: [DAGCombiner] Enable tryToFoldExtendOfConstant to run after legalize vector ops.

LGTM

Nov 12 2018, 2:18 PM

Nov 9 2018

efriedma committed rL346568: [ARM64] [Windows] Handle funclets.
[ARM64] [Windows] Handle funclets
Nov 9 2018, 3:36 PM
efriedma closed D51524: [ARM64] [Windows] Handle funclets.
Nov 9 2018, 3:36 PM
efriedma committed rL346563: [ARM] Add MemOperand to LDRcp to enable DCE..
[ARM] Add MemOperand to LDRcp to enable DCE.
Nov 9 2018, 3:11 PM
efriedma closed D54173: [ARM] Add MemOp into LDRcp to enable removing.
Nov 9 2018, 3:11 PM
efriedma committed rL346562: [JumpThreading] Fix exponential time algorithm computing known values..
[JumpThreading] Fix exponential time algorithm computing known values.
Nov 9 2018, 2:39 PM
efriedma closed D54239: [JumpThreading] Fix exponential time algorithm computing known values..
Nov 9 2018, 2:39 PM
efriedma added inline comments to D51524: [ARM64] [Windows] Handle funclets.
Nov 9 2018, 2:25 PM