Page MenuHomePhabricator
Feed Advanced Search

Today

efriedma added inline comments to D64757: [PEI] Don't re-allocate a pre-allocated stack protector slot.
Mon, Jul 15, 10:36 AM · Restricted Project

Fri, Jul 12

efriedma added inline comments to D64621: [ARM] Make sure that the constant pool does not keep in the middle of an IT block..
Fri, Jul 12, 1:24 PM · Restricted Project

Thu, Jul 11

efriedma accepted D64052: Return Undef from isBytewiseValue for empty arrays or structs.

LGTM

Thu, Jul 11, 4:39 PM · Restricted Project

Wed, Jul 10

efriedma added a comment to D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics.

How aggressive is LLVM's UB handling? Would it remove an entire block/function if UB is found in it?

Wed, Jul 10, 3:56 PM · Restricted Project
efriedma accepted D64368: [LoopUnroll+LoopUnswitch] do not transform loops containing callbr.

LGTM

Wed, Jul 10, 11:26 AM · Restricted Project

Wed, Jul 3

efriedma added a comment to D64101: [LoopUnroll] fix cloning callbr.

Or actually, it might make more sense to change the way we generate/lower callbr, to make the label parameters implicit; instead of modeling them with blockaddress, we never write them in IR at all, and automatically generate them later based on the successor list.

Wed, Jul 3, 5:24 PM · Restricted Project
efriedma added a comment to D64101: [LoopUnroll] fix cloning callbr.

The question is whether something like the following is legal:

Wed, Jul 3, 5:17 PM · Restricted Project
efriedma added a comment to D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible..

If they're all syntactically together like this, maybe that's safe?

Wed, Jul 3, 4:53 PM · Restricted Project, Restricted Project
efriedma committed rG41ee3977c45a: [JumpThreading] Fix threading with unusual PHI nodes. (authored by efriedma).
[JumpThreading] Fix threading with unusual PHI nodes.
Wed, Jul 3, 4:14 PM
efriedma committed rL365094: [JumpThreading] Fix threading with unusual PHI nodes..
[JumpThreading] Fix threading with unusual PHI nodes.
Wed, Jul 3, 4:14 PM
efriedma closed D63913: [JumpThreading] Fix threading with unusual PHI nodes..
Wed, Jul 3, 4:14 PM · Restricted Project
efriedma added a comment to D64164: [clang][ARM] Fix msvc arm{64} builtins to use int on LP64 systems..

Do the changes to BuiltinsARM.def have any practical effect? long should be 32 bits on all 32-bit ARM targets.

Wed, Jul 3, 4:05 PM · Restricted Project
efriedma accepted D64160: [ARM] Favour PL/MI over GE/LT when possible.

LGTM

Wed, Jul 3, 4:03 PM · Restricted Project
efriedma added a comment to D64101: [LoopUnroll] fix cloning callbr.

If there's some rule that distinguishes blockaddresses used in callbr from general blockaddresses, we should state that explicitly somewhere in LangRef.

Wed, Jul 3, 3:16 PM · Restricted Project
efriedma added a comment to D64101: [LoopUnroll] fix cloning callbr.

Is this transform safe? The inline asm could stash the address of a destination in a variable in one loop iteration, and use it in a later loop iteration. Or is that not legal?

Wed, Jul 3, 2:02 PM · Restricted Project
efriedma added a comment to D64160: [ARM] Favour PL/MI over GE/LT when possible.

I wrote a very similar patch at one point, but I didn't submit it because I couldn't demonstrate any significant benefit. Then again, I only tested it with Thumb1; maybe it's more useful for Thumb2?

Wed, Jul 3, 2:01 PM · Restricted Project
efriedma added a comment to D63972: [PowerPC] Do the Early Return for the li and unconditional branch.

The line 29 b .LBB0_10 is created after running the pass branch-folder,

Wed, Jul 3, 11:46 AM · Restricted Project
efriedma added a comment to D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible..

I don't think this transform is valid, for the same reasons we don't do it in IR optimizations.

Wed, Jul 3, 11:02 AM · Restricted Project, Restricted Project

Tue, Jul 2

efriedma added inline comments to D61259: AArch64: support arm64_32, an ILP32 slice for watchOS..
Tue, Jul 2, 5:02 PM · Restricted Project
efriedma accepted D64090: [Codegen][X86][AArch64][ARM][PowerPC] Inc-of-add vs sub-of-not (PR42457).

LGTM

Tue, Jul 2, 4:49 PM · Restricted Project
efriedma added inline comments to D64099: [InstCombine] pow(C,x) -> exp2(log2(C)*x).
Tue, Jul 2, 4:08 PM · Restricted Project
efriedma added inline comments to D64090: [Codegen][X86][AArch64][ARM][PowerPC] Inc-of-add vs sub-of-not (PR42457).
Tue, Jul 2, 3:51 PM · Restricted Project
efriedma added inline comments to D64090: [Codegen][X86][AArch64][ARM][PowerPC] Inc-of-add vs sub-of-not (PR42457).
Tue, Jul 2, 2:55 PM · Restricted Project
efriedma committed rGe97aa961d325: [ARM] Fix unwind info for Thumb1 functions that save high registers. (authored by efriedma).
[ARM] Fix unwind info for Thumb1 functions that save high registers.
Tue, Jul 2, 2:37 PM
efriedma committed rL364970: [ARM] Fix unwind info for Thumb1 functions that save high registers..
[ARM] Fix unwind info for Thumb1 functions that save high registers.
Tue, Jul 2, 2:36 PM
efriedma closed D63964: [ARM] Fix unwind info for Thumb1 functions that save high registers..
Tue, Jul 2, 2:36 PM · Restricted Project
efriedma updated the diff for D63913: [JumpThreading] Fix threading with unusual PHI nodes..

Fix variable name.

Tue, Jul 2, 2:27 PM · Restricted Project
efriedma added a comment to D64099: [InstCombine] pow(C,x) -> exp2(log2(C)*x).

I'm a little wary about fold the case where doesNotAccessMemory is false, but I guess it's likely okay.

Tue, Jul 2, 2:24 PM · Restricted Project
efriedma added inline comments to D64090: [Codegen][X86][AArch64][ARM][PowerPC] Inc-of-add vs sub-of-not (PR42457).
Tue, Jul 2, 2:03 PM · Restricted Project
efriedma added inline comments to D64052: Return Undef from isBytewiseValue for empty arrays or structs.
Tue, Jul 2, 1:54 PM · Restricted Project
efriedma added a comment to D64053: [Verifier] add test case for callbr.

Is this documented in LangRef somewhere? I'm not seeing anything that indicates the blockaddress has to be an operand of the callbr, and I'm not sure why it would be necessary.

Tue, Jul 2, 1:49 PM · Restricted Project
efriedma added inline comments to D64090: [Codegen][X86][AArch64][ARM][PowerPC] Inc-of-add vs sub-of-not (PR42457).
Tue, Jul 2, 12:23 PM · Restricted Project

Mon, Jul 1

efriedma accepted D63038: [SimplifyLibCalls] powf(x, sitofp(n)) -> powi(x, n).

LGTM

Mon, Jul 1, 4:42 PM · Restricted Project
efriedma added inline comments to D63913: [JumpThreading] Fix threading with unusual PHI nodes..
Mon, Jul 1, 3:32 PM · Restricted Project
efriedma added a comment to D63972: [PowerPC] Do the Early Return for the li and unconditional branch.

This seems like simple tail duplication, which the target-independent taildup pass should handle. Can you give an example which taildup doesn't handle?

Mon, Jul 1, 12:33 PM · Restricted Project
efriedma added a comment to D63992: [InstCombine] Y - ~X --> X + Y + 1 fold (PR42457).

Yes, we should probably teach DAGCombine to choose the right form for each target/type.

Mon, Jul 1, 11:49 AM · Restricted Project
efriedma added inline comments to D60613: Make setInitializer() assert that the entire initializer is usable..
Mon, Jul 1, 11:29 AM · Restricted Project

Fri, Jun 28

efriedma created D63964: [ARM] Fix unwind info for Thumb1 functions that save high registers..
Fri, Jun 28, 4:17 PM · Restricted Project
efriedma accepted D63855: [ADCE] Fix for non-determistic uselists after dead block removal.

Maybe worth explicitly mentioning in the commit message that AggressiveDeadCodeElimination::updateDeadRegions loops over BlocksWithDeadTerminators.

Fri, Jun 28, 2:29 PM · Restricted Project
efriedma added a comment to D62962: Clang implementation of sizeless types.

Since this is an extension, it wouldb be great to have a (on-by-default? at least in -Wall) diagnostic for every instance of usage of this extension.

Fri, Jun 28, 2:15 PM · Restricted Project
efriedma added a comment to D63952: [LoopBase] Strengthen isLoopExiting by requiring that BB must be inside the loop..

I agree the change to the API makes sense.

Fri, Jun 28, 1:49 PM · Restricted Project

Thu, Jun 27

efriedma added inline comments to D60613: Make setInitializer() assert that the entire initializer is usable..
Thu, Jun 27, 6:58 PM · Restricted Project
efriedma added a comment to D61809: [BPF] Preserve debuginfo array/union/struct type/access index.

The new approach to tracking expressions inside of __builtin_preserve_access_index seems okay.

Thu, Jun 27, 6:50 PM · Restricted Project, Restricted Project
efriedma created D63913: [JumpThreading] Fix threading with unusual PHI nodes..
Thu, Jun 27, 5:53 PM · Restricted Project
efriedma added a comment to D63629: [JumpThreading][PR42085] Fold constant TIs before calculating LoopHeaders.

Posted https://reviews.llvm.org/D63913

Thu, Jun 27, 5:53 PM · Restricted Project
efriedma added a comment to D62653: [Mips][DSP] Fix physregs incorrectly marked as dead..

Machine verifier would fail if only RDDSP was used without some other instruction previously defining a register

Thu, Jun 27, 3:37 PM
efriedma accepted D63214: [InstCombine] canonicalize fmin/fmax to LLVM intrinsics minnum/maxnum.

LGTM

Thu, Jun 27, 3:35 PM · Restricted Project
efriedma added a comment to D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics.

If we say the result of the constrained intrinsic is poison, will the fact that the intrinsic is defined as having side effects keep it from being eliminated?

Thu, Jun 27, 3:27 PM · Restricted Project

Wed, Jun 26

efriedma committed rGab1d73ee3248: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot. (authored by efriedma).
[ARM] Don't reserve R12 on Thumb1 as an emergency spill slot.
Wed, Jun 26, 4:49 PM
efriedma committed rL364490: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..
[ARM] Don't reserve R12 on Thumb1 as an emergency spill slot.
Wed, Jun 26, 4:49 PM
efriedma closed D63677: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..
Wed, Jun 26, 4:49 PM · Restricted Project
efriedma added a comment to D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics.

I think IEEE-754 does define this

Wed, Jun 26, 3:40 PM · Restricted Project
efriedma added a comment to D63629: [JumpThreading][PR42085] Fold constant TIs before calculating LoopHeaders.

there is a possibility of a miscompile when threading an edge across the LH

Wed, Jun 26, 3:31 PM · Restricted Project
efriedma added a comment to D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics.

Is this a general comment or referring to a change in Kevin's patch?

Wed, Jun 26, 2:51 PM · Restricted Project
efriedma added inline comments to D62653: [Mips][DSP] Fix physregs incorrectly marked as dead..
Wed, Jun 26, 12:08 PM
efriedma accepted D63215: Fixing @llvm.memcpy not honoring volatile.

Maybe mention in the commit message that this is explicitly not addressing target-specific code, or calls to memcpy?

Wed, Jun 26, 11:48 AM · Restricted Project
efriedma added a comment to D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics.

The problem with poison is that it eventually leads to UB, and then your program has no defined meaning. Practically, it might mean some codepath that involves a call to llvm.experimental.constrained.fptosi.i32.f64 could get folded away because it's provably UB, or something like that.

Wed, Jun 26, 11:43 AM · Restricted Project
efriedma added a comment to D63815: [DAGCombine] visitEXTRACT_SUBVECTOR - 'little to big' extract_subvector(bitcast()) support.

It looks like the arm64-neon-2velem.ll regressions are a shuffle lowering issue, yes; we're creating a DUPLANE where the operand is an extract_subvector, and it doesn't simplify.

Wed, Jun 26, 11:33 AM · Restricted Project

Tue, Jun 25

efriedma added a comment to D63782: [FPEnv] Add fptosi and fptoui constrained intrinsics.

What happens if the input float is out of range? fptosi/fptoui instructions produce poison; not sure if you want that here.

Tue, Jun 25, 6:12 PM · Restricted Project
efriedma updated the diff for D63677: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..

Fix Thumb1FrameLowering::emitPrologue and Thumb1FrameLowering::emitEpilogue so they don't scavenge a register inside of frame setup/teardown. Instead, just pick a register we know is available.

Tue, Jun 25, 5:28 PM · Restricted Project
efriedma added a comment to D63677: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..

The third instruction in the function looks like it is using r6 as the base pointer to save one of the argument registers on the stack, but r6 isn't set until further down.

Tue, Jun 25, 2:21 PM · Restricted Project
efriedma added a comment to D61911: [GlobalOpt] Allow dead struct fields in SRA with non constant offset..

The problem here is that the IR semantics don't allow this transform in general.

Tue, Jun 25, 12:35 PM · Restricted Project
efriedma accepted D60601: [DAGCombiner] Exploiting more about the transformation of TransformFPLoadStorePair function.

Sorry, I meant to reply to this earlier. If you've tested the performance on PowerPC, it's probably fine. ARM has fewer registers, but not so few that it's likely to cause problems here.

Tue, Jun 25, 10:09 AM · Restricted Project

Mon, Jun 24

efriedma updated the diff for D63677: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..

Improved comment on ExtraCSSpill.

Mon, Jun 24, 11:38 AM · Restricted Project
efriedma added a comment to D63677: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..

This looks a lot like a bug I hit a while ago while writing a fuzzer for ABI
compatibility between clang and gcc. I've currently got Thumb1-only targets
disabled because of this.

Mon, Jun 24, 11:33 AM · Restricted Project

Fri, Jun 21

efriedma created D63677: [ARM] Don't reserve R12 on Thumb1 as an emergency spill slot..
Fri, Jun 21, 3:13 PM · Restricted Project
efriedma accepted D63635: [COFF, ARM64] Fix encoding of debugtrap for Windows.

LGTM

Fri, Jun 21, 2:40 PM · Restricted Project
efriedma added a comment to D63038: [SimplifyLibCalls] powf(x, sitofp(n)) -> powi(x, n).

It looks like you didn't change all the uses of isFast() in optimizePow?

Fri, Jun 21, 2:38 PM · Restricted Project
efriedma added a comment to D63038: [SimplifyLibCalls] powf(x, sitofp(n)) -> powi(x, n).

It would be nice to use the exact necessary fast-math flags here, while we're thinking about it, instead of just "isFast()". From the discussion, it seems like we only need "afn"?

Fri, Jun 21, 12:06 PM · Restricted Project
efriedma added a comment to D63635: [COFF, ARM64] Fix encoding of debugtrap for Windows.

I believe it's the default strategy for O0 AArch64 codegen these days

Fri, Jun 21, 11:47 AM · Restricted Project

Thu, Jun 20

efriedma committed rG45270054bc27: [ARM GlobalISel] Tests for s64 G_ADD and G_SUB. (authored by efriedma).
[ARM GlobalISel] Tests for s64 G_ADD and G_SUB.
Thu, Jun 20, 3:00 PM
efriedma added a comment to D63585: [ARM GlobalISel] Add support for s64 G_ADD and G_SUB..

Tests committed in r363991 (https://reviews.llvm.org/rL363991)

Thu, Jun 20, 2:57 PM · Restricted Project
efriedma committed rL363991: [ARM GlobalISel] Tests for s64 G_ADD and G_SUB..
[ARM GlobalISel] Tests for s64 G_ADD and G_SUB.
Thu, Jun 20, 2:57 PM
efriedma committed rG25f08a17c318: [ARM GlobalISel] Add support for s64 G_ADD and G_SUB. (authored by efriedma).
[ARM GlobalISel] Add support for s64 G_ADD and G_SUB.
Thu, Jun 20, 2:56 PM
efriedma committed rL363989: [ARM GlobalISel] Add support for s64 G_ADD and G_SUB..
[ARM GlobalISel] Add support for s64 G_ADD and G_SUB.
Thu, Jun 20, 2:56 PM
efriedma closed D63585: [ARM GlobalISel] Add support for s64 G_ADD and G_SUB..
Thu, Jun 20, 2:56 PM · Restricted Project
efriedma updated subscribers of D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

I think this is sound now.

Thu, Jun 20, 2:20 PM · Restricted Project
efriedma added a comment to D46262: Enable sibling-call optimization for functions returning structs.

The testcase I actually wanted, which incorrectly forms a tail call:

Thu, Jun 20, 12:22 PM · Restricted Project

Wed, Jun 19

efriedma created D63585: [ARM GlobalISel] Add support for s64 G_ADD and G_SUB..
Wed, Jun 19, 5:38 PM · Restricted Project
efriedma committed rGd88e28d13e66: [llvm-objdump] Switch between ARM/Thumb based on mapping symbols. (authored by efriedma).
[llvm-objdump] Switch between ARM/Thumb based on mapping symbols.
Wed, Jun 19, 5:27 PM
efriedma committed rL363903: [llvm-objdump] Switch between ARM/Thumb based on mapping symbols..
[llvm-objdump] Switch between ARM/Thumb based on mapping symbols.
Wed, Jun 19, 5:27 PM
efriedma closed D60927: [llvm-objdump] Switch between ARM/Thumb based on mapping symbols..
Wed, Jun 19, 5:27 PM · Restricted Project
efriedma added a comment to D63294: [Analysis] enhance FP library function prototype checking to match types with name suffix .

Should clang translate that call into "sqrtf" to be more accurate?

Wed, Jun 19, 1:58 PM · Restricted Project
efriedma added a comment to D63068: [AVR] Fix incorrect stack parameter push order.

In AVR, it uses push instruction to store arguments. Therefore. the order of store(push) instruction can't be changed.

Wed, Jun 19, 12:18 PM · Restricted Project
efriedma added a comment to D62653: [Mips][DSP] Fix physregs incorrectly marked as dead..

So we would need to mark every instruction that uses any part of DSPControl as having an post-isel hook and there are more than 100 instructions

Wed, Jun 19, 11:37 AM
efriedma added a comment to D63294: [Analysis] enhance FP library function prototype checking to match types with name suffix .

How do we test that?

Wed, Jun 19, 11:25 AM · Restricted Project

Tue, Jun 18

efriedma added a comment to D59744: Fix i386 ABI "__m64" type bug.

I'm just laying out the basic requirements for getting this patch back in, because the current patch is invalid given LLVM's current requirements.

Tue, Jun 18, 4:40 PM · Restricted Project, Restricted Project
efriedma added a comment to D59744: Fix i386 ABI "__m64" type bug.

If we're going to insert emms instructions automatically, it doesn't really make sense to do it in the frontend; the backend could figure out the most efficient placement itself. (See lib/Target/X86/X86VZeroUpper.cpp, which implements similar logic for AVX.) The part I'd be worried about is the potential performance hit from calling emms in places where other compilers wouldn't, for code using MMX intrinsics.

Tue, Jun 18, 3:02 PM · Restricted Project, Restricted Project
efriedma updated subscribers of D63294: [Analysis] enhance FP library function prototype checking to match types with name suffix .

AVR intentionally makes the C type "double" a single-precision float ("float" in IR). So we could fail to recognize "fabs" etc. on AVR with this patch, I think?

Tue, Jun 18, 2:36 PM · Restricted Project
efriedma added a comment to D59744: Fix i386 ABI "__m64" type bug.

Are you saying that using MMX in LLVM requires source-level workarounds in some way, and so we can't lower portable code to use MMX because that code will (reasonably) lack those workarounds?

Tue, Jun 18, 2:17 PM · Restricted Project, Restricted Project
efriedma added a comment to D59744: Fix i386 ABI "__m64" type bug.

Now, we could theoretically use a different ABI rule for vectors defined with Clang-specific extensions, but that seems like it would cause quite a few problems of its own.

Tue, Jun 18, 11:38 AM · Restricted Project, Restricted Project

Mon, Jun 17

efriedma updated the diff for D60927: [llvm-objdump] Switch between ARM/Thumb based on mapping symbols..

Switched to a single vector for mapping symbols. Switched isArmElf() to use getEMachine(). Updated title/commit message.

Mon, Jun 17, 3:17 PM · Restricted Project
efriedma added inline comments to D63371: Rewrite ConstStructBuilder with a mechanism that can cope with splitting and updating constants..
Mon, Jun 17, 1:17 PM · Restricted Project, Restricted Project
efriedma accepted D62944: [Driver] Fix wchar_t and wint_t definitions on Solaris.

LGTM

Mon, Jun 17, 12:52 PM · Restricted Project, Restricted Project

Jun 13 2019

efriedma accepted D61750: [Targets] Move soft-float-abi filtering to `initFeatureMap`.

LGTM

Jun 13 2019, 4:37 PM · Restricted Project, Restricted Project
efriedma added a comment to D46262: Enable sibling-call optimization for functions returning structs.

Also, it looks like you never cc'ed llvm-commits; please abandon this and post a new revision with llvm-commits properly cc'ed

Jun 13 2019, 2:58 PM · Restricted Project
efriedma requested changes to D46262: Enable sibling-call optimization for functions returning structs.

Please fix the "summary" to include the full expected commit message.

Jun 13 2019, 2:54 PM · Restricted Project
efriedma added inline comments to D63260: [Attr] Support _attribute__ ((fallthrough)).
Jun 13 2019, 11:36 AM · Restricted Project
efriedma added a comment to D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT.

Is the isLoopEntryGuardedByCond actually proving what you need it to prove? Even if Start-Stride is in the range [0, End), that doesn't necessarily imply Start-Stride doesn't overflow. For example, suppose Start is 0, End is -1, and Stride is 2.

Jun 13 2019, 11:26 AM · Restricted Project
efriedma added inline comments to D63260: [Attr] Support _attribute__ ((fallthrough)).
Jun 13 2019, 11:20 AM · Restricted Project