Page MenuHomePhabricator

efriedma (Eli Friedman)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 10 2016, 1:07 PM (223 w, 5 d)

Recent Activity

Fri, Oct 30

efriedma added inline comments to D90479: [WIP][ValueTracking] ComputeKnownBits - minimum leading/trailing zero bits in LSHR/SHL (PR44526).
Fri, Oct 30, 11:13 AM · Restricted Project

Thu, Oct 29

efriedma accepted D89786: [PowerPC] Avoid unnecessary fadd for unsigned to ppcf128.

LGTM

Thu, Oct 29, 12:28 PM · Restricted Project
efriedma added inline comments to D90329: [PowerPC] Fix va_arg in C++, Objective-C on 32-bit ELF targets.
Thu, Oct 29, 12:13 PM · Restricted Project
efriedma accepted D90230: [SVE] Add fatal error for unnamed SVE variadic arguments.

LGTM

Thu, Oct 29, 11:40 AM · Restricted Project, Restricted Project
efriedma added a comment to D90162: [llvm][AArch64] Prevent spurious zero extension..

This looks like it should be at least two separate changes; I think the AArch64ISelLowering change should have some impact on its own.

Thu, Oct 29, 11:34 AM · Restricted Project
efriedma accepted D89645: [InferAttrs] Add nocapture/writeonly to string/mem libcalls.

LGTM

Thu, Oct 29, 11:20 AM · Restricted Project

Wed, Oct 28

efriedma accepted D90176: [AArch64] Improve lowering of insert_vector_elt with 0.0 consts..

LGTM

Wed, Oct 28, 2:05 PM · Restricted Project
efriedma added a comment to D90176: [AArch64] Improve lowering of insert_vector_elt with 0.0 consts..

but for some reason the matching does not work for f16

Wed, Oct 28, 11:30 AM · Restricted Project
efriedma added a comment to D90233: [AArch64] Use DUP for BUILD_VECTOR with few different elements..

Maybe add a testcase for -0 in case someone else makes the same mistake?

Wed, Oct 28, 11:25 AM · Restricted Project
efriedma accepted D90233: [AArch64] Use DUP for BUILD_VECTOR with few different elements..

Maybe add a testcase for -0 in case someone else makes the same mistake? Otherwise LGTM

Wed, Oct 28, 11:18 AM · Restricted Project

Tue, Oct 27

efriedma accepted D90160: [SVE] Remove TypeSize comparison operators.

I don't think this is likely to significantly impact most out-of-tree users; no need to temporarily deprecate.

Tue, Oct 27, 1:43 PM · Restricted Project
efriedma added a comment to D90176: [AArch64] Improve lowering of insert_vector_elt with 0.0 consts..

We could turn this into a more general combine, We use fmov from a GPR to materialize fp constants in other cases. But maybe just zero is fine to start.

So for other FP constants that have values that can be cheaply matrialized into GPRs? That would be good. I guess that would be helpful in all contexts where we can use GPRs directly instead of FPRs. Is there a way to match something like that generically?

Tue, Oct 27, 1:39 PM · Restricted Project
efriedma added inline comments to D90233: [AArch64] Use DUP for BUILD_VECTOR with few different elements..
Tue, Oct 27, 12:13 PM · Restricted Project
efriedma added a comment to D90176: [AArch64] Improve lowering of insert_vector_elt with 0.0 consts..

We could turn this into a more general combine, We use fmov from a GPR to materialize fp constants in other cases. But maybe just zero is fine to start.

Tue, Oct 27, 12:01 PM · Restricted Project
efriedma added inline comments to D89978: Fix SROA with a PHI mergig values from a same block.
Tue, Oct 27, 11:47 AM · Restricted Project
efriedma added a comment to D90201: Try reading a smaller chunk when (p)read fails.
In D90201#2357105, @rnk wrote:

... in which case llvm prefers not to mmap (as to not waste a whole page for the terminating NULL byte)

We should really re-evaluate this behavior at some point. It is quite surprising.

Tue, Oct 27, 11:26 AM · Restricted Project
efriedma added a comment to D90230: [SVE] Add fatal error for unnamed SVE variadic arguments.

We should have corresponding handling for va_arg. (clang doesn't produce va_arg instructions, but other frontends do.)

Tue, Oct 27, 10:52 AM · Restricted Project, Restricted Project

Oct 22 2020

efriedma added inline comments to D89786: [PowerPC] Avoid unnecessary fadd for unsigned to ppcf128.
Oct 22 2020, 8:12 PM · Restricted Project
efriedma added inline comments to D89978: Fix SROA with a PHI mergig values from a same block.
Oct 22 2020, 5:19 PM · Restricted Project
efriedma added inline comments to D89978: Fix SROA with a PHI mergig values from a same block.
Oct 22 2020, 4:39 PM · Restricted Project
efriedma added a comment to D89938: [DAG][PowerPC] Fix dropped `nsw` flag in `SimplifySetCC` by adding `doesNodeExist` helper.

I think getNodeIfExists() should have the same semantics with respect to flags as getNode().

Oct 22 2020, 1:09 PM · Restricted Project
efriedma accepted D89954: [SCEV][NFC] Cache symbolic max exit count.

LGTM

Oct 22 2020, 12:59 PM · Restricted Project
efriedma added a comment to D85614: [TRE] Reland: allow TRE for non-capturing calls..

Sorry I didn't spot this sooner, but the current version of the memcpy-to-temp still isn't quite right. The operations aren't in the right order: you have to do all the copies to temporaries before any of the copies to arguments.

Oct 22 2020, 12:54 PM · Restricted Project
efriedma added a comment to D87651: [AArch64][SVE] Implement extractelement of i1 vectors..

I'm worried the usage of ANY_EXTEND and TRUNCATE in D89950 is going to cause a mess in the future. LegalizeDAG doesn't know how to legalize most vector operations; LegalizeVectorOps handles them. If someone tries to use "Promote" on a target where those operations aren't legal, it'll break. And then someone will try to "fix" LegalizeDAG, and cause other problems.

Oct 22 2020, 12:49 PM · Restricted Project
efriedma added a comment to D89826: [FunctionAttrs][NPM] Fix handling of convergent.

At a high level, it should be fine to assume an indirect call without the "convergent" attribute isn't convergent. If the language rules for some language say the callee of an indirect call might be convergent, the frontend can add the convergent attribute to that call. (Unlike most attributes, it's a negative attribute: it restricts optimizations, and attribute inference optimizations would remove it,)

Oct 22 2020, 12:23 AM · Restricted Project

Oct 21 2020

efriedma added a comment to D89786: [PowerPC] Avoid unnecessary fadd for unsigned to ppcf128.

This is not PowerPC specific patch, though ppcfp128 could be expanded.

Oct 21 2020, 11:00 PM · Restricted Project
efriedma added inline comments to D87115: [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding toward negative infinity.
Oct 21 2020, 2:45 PM · Restricted Project
efriedma added inline comments to D89831: [AArch64][SVE] Fix umin/umax lowering to handle out of range imm..
Oct 21 2020, 2:25 PM · Restricted Project
efriedma added a comment to D89645: [InferAttrs] Add nocapture/writeonly to string/mem libcalls.

Almost all the new setDoesNotCapture calls are wrong. If a call returns a pointer base on an argument, it can't be marked nocapture.

Oct 21 2020, 2:18 PM · Restricted Project
efriedma added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 21 2020, 2:04 PM · Restricted Project
efriedma added a comment to D88994: Fix the default alignment of i1 vectors..

@RKSimon @craig.topper Any thoughts from the x86 side?

Oct 21 2020, 1:59 PM · Restricted Project

Oct 20 2020

efriedma added inline comments to D89189: [ARM][MachineOutliner] Do not overestimate LR liveness in return block.
Oct 20 2020, 4:00 PM · Restricted Project
efriedma added a comment to D87063: [BitcodeReader] Fix O(N^2) in placeholder replacement algorithm..

Ping

Oct 20 2020, 2:53 PM · Restricted Project
efriedma updated the diff for D87651: [AArch64][SVE] Implement extractelement of i1 vectors..

Rebase and clang-format.

Oct 20 2020, 2:36 PM · Restricted Project
efriedma added a comment to D88994: Fix the default alignment of i1 vectors..

Ping

Oct 20 2020, 2:02 PM · Restricted Project
efriedma accepted D89573: [Driver] Incorporate -mfloat-abi in the computed triple on ARM.

LGTM

Oct 20 2020, 1:56 PM · Restricted Project
efriedma added a comment to D86364: [ValueTracking] Interpret GEPs as a series of adds multiplied by the related scaling factor.

A couple special cases might improve performance:

Oct 20 2020, 1:50 PM · Restricted Project
efriedma requested review of D89819: [ArgumentPromotion] Fix byval alignment handling..
Oct 20 2020, 1:17 PM · Restricted Project
efriedma committed rG95bda510fb7b: [ConstantFold] Fold the comparison of bitcasted global values (authored by scui).
[ConstantFold] Fold the comparison of bitcasted global values
Oct 20 2020, 12:44 PM
efriedma closed D87850: [ConstantFold] Fold the comparison of bitcasted global values .
Oct 20 2020, 12:44 PM · Restricted Project
efriedma accepted D89816: C API: support scalable vectors.

LGTM

Oct 20 2020, 12:36 PM · Restricted Project
efriedma added inline comments to D85614: [TRE] Reland: allow TRE for non-capturing calls..
Oct 20 2020, 12:18 PM · Restricted Project
efriedma accepted D88494: Add "SkipDead" parameter to TargetInstrInfo::DefinesPredicate.

but the common instructions are moved to the preceding block, and the IfConversion feasibility is then re-evaluated before any predication is performed.

Oct 20 2020, 11:36 AM · Restricted Project
efriedma added a comment to D88460: Strlen loop idiom recognition.

Phabricator doesn't track incremental patches the way you're uploading them; please upload the full diff against master.

Oct 20 2020, 11:23 AM · Restricted Project
efriedma accepted D89745: Get the address space within getVectorPtrTy.

LGTM

Oct 20 2020, 11:17 AM · Restricted Project
efriedma added a comment to D89711: [Coroutine] Prevent value reusing across coroutine suspensions in EarlyCSE and GVN.

First of all, we cannot drop the readnone tag in the definition of pthread_self in Clang, the regression in the non-coroutine cases are likely unacceptable and they shouldn't pay for it if not using coroutines.

Oct 20 2020, 11:16 AM · Restricted Project

Oct 19 2020

efriedma added a comment to D89711: [Coroutine] Prevent value reusing across coroutine suspensions in EarlyCSE and GVN.

but that would also mean we would never be able to optimize out redundant pthread_self() calls

Oct 19 2020, 12:09 PM · Restricted Project
efriedma added a comment to D89711: [Coroutine] Prevent value reusing across coroutine suspensions in EarlyCSE and GVN.

For the first point, if the IR definition isn't consistent, I'd prefer to actually fix that, instead of work around it. There are a lot of places that assume alias analysis is accurate.

Oct 19 2020, 11:15 AM · Restricted Project

Oct 18 2020

efriedma added inline comments to D89456: [SCEV] Introduce SCEVPtrToIntExpr (PR46786).
Oct 18 2020, 10:33 PM · Restricted Project

Oct 17 2020

efriedma added inline comments to D89451: [SystemZ] Mark unsaved argument R6 as live throughout function.
Oct 17 2020, 11:44 AM · Restricted Project

Oct 16 2020

efriedma accepted D89451: [SystemZ] Mark unsaved argument R6 as live throughout function.

LGTM

Oct 16 2020, 2:48 PM · Restricted Project
efriedma added inline comments to D89573: [Driver] Incorporate -mfloat-abi in the computed triple on ARM.
Oct 16 2020, 2:07 PM · Restricted Project
efriedma added a reviewer for D89576: [SVE][CodeGen] Lower scalable masked scatters: craig.topper.

I'm a little suspicious that the DAGCombine changes don't have any effect on x86 regression tests; are we missing test coverage?

Oct 16 2020, 1:56 PM · Restricted Project
efriedma accepted D89523: PR44406: Follow behavior of array bound constant folding in more recent versions of GCC..

LGTM

Oct 16 2020, 1:49 PM · Restricted Project
efriedma added a comment to D89456: [SCEV] Introduce SCEVPtrToIntExpr (PR46786).

I think this looks good. But I'd like a second opinion since this is a substantial change to SCEV modeling.

Oct 16 2020, 1:17 PM · Restricted Project
efriedma added a comment to D89540: [SCEV] Index type usually is, but is not guaranteed to be, equal to the pointer bit width.

Assuming we have properly typed SCEVs, we can pretend the high bits of the pointer don't exist in a pointer SCEV. We can't pretend they don't exist in an integer SCEV: that leads to miscompiles. This is why SCEVPtrToIntExpr, specifically, needs special handling.

Oct 16 2020, 10:46 AM · Restricted Project
efriedma added reviewers for D89540: [SCEV] Index type usually is, but is not guaranteed to be, equal to the pointer bit width: theraven, delena, Ayal.

I'm not sure I completely understand the history from https://reviews.llvm.org/D42123. But I think the idea is that for pointer-type SCEVs, we want to do SCEV arithmetic using the index type because the other bits aren't relevant: from my understanding, they don't participate in pointer arithmetic.

Oct 16 2020, 9:44 AM · Restricted Project

Oct 15 2020

efriedma added inline comments to D89523: PR44406: Follow behavior of array bound constant folding in more recent versions of GCC..
Oct 15 2020, 8:31 PM · Restricted Project
efriedma added a comment to D89523: PR44406: Follow behavior of array bound constant folding in more recent versions of GCC..

Also update the documentation? See https://clang.llvm.org/docs/UsersManual.html#differences-between-various-standard-modes .

Oct 15 2020, 8:27 PM · Restricted Project
efriedma added a comment to D89451: [SystemZ] Mark unsaved argument R6 as live throughout function.

This seems like the right approach. It feels weird, but I can't think of anything better.

Oct 15 2020, 3:54 PM · Restricted Project
efriedma added a comment to D89400: [SimplifyLibCalls] Keep calling convention when simplifying to libcall.

Remove the behaviour that the calling-convention is non-C when there's a mismatch between the triple and the float-abi and do something different to make sure we end up with the right calling convention in the end (maybe have -mfloat-abi implicitly modify the triple like -march and -mcpu do).

Oct 15 2020, 3:38 PM · Restricted Project
efriedma accepted D89362: [MS] Apply `inreg` to AArch64 sret parms on instance methods.

Makes a lot more sense now. LGTM

Oct 15 2020, 2:47 PM · Restricted Project
efriedma added inline comments to D88460: Strlen loop idiom recognition.
Oct 15 2020, 2:46 PM · Restricted Project
efriedma added a comment to D89456: [SCEV] Introduce SCEVPtrToIntExpr (PR46786).

Oh, also, are you planning to implement the SCEV simplifications in this patch, or a followup? I can see reasons to go either way, I guess. I'd weakly lean towards implementing them here, so we can avoid churn implementing handling for cases that can't happen after simplification.

Oct 15 2020, 1:28 PM · Restricted Project
efriedma added inline comments to D89456: [SCEV] Introduce SCEVPtrToIntExpr (PR46786).
Oct 15 2020, 1:25 PM · Restricted Project
efriedma accepted D89381: [SCEV] Re-enable "Use nw flag and symbolic iteration count to sharpen ranges of AddRecs", attempt 3.

LGTM

Oct 15 2020, 11:18 AM · Restricted Project
efriedma added inline comments to D89456: [SCEV] Introduce SCEVPtrToIntExpr (PR46786).
Oct 15 2020, 11:01 AM · Restricted Project

Oct 14 2020

efriedma added a comment to D88353: [BasicAA] Integrate MaxObjSize for NoAlias.

I think that phrase ("w/o maxobjsize deduction") could be a bit misleading, IINM, when @jdoerfert says w/o maxobjsize deduction he means without having the functionality built into the attributor to update the maximum object size estimate. So in the patch D87975, there's a crude over-approximation for the maxobjsize (getPointerMaxObjSize) and the numbers are for just using that over-approximation without including the changes in D87978 that refine it, so we would still need the maxobjsize attribute first in order to do this.

Oct 14 2020, 12:27 PM · Restricted Project
efriedma added inline comments to D87975: [IR] MaxObjSize Attribute.
Oct 14 2020, 12:18 PM · Restricted Project
efriedma added a comment to D89400: [SimplifyLibCalls] Keep calling convention when simplifying to libcall.

In general, if TargetLibraryInfo says a library function is available, that means it's available with the C calling convention. Copying the calling convention from some other call shouldn't be necessary. In general, there is no call to copy the calling convention from.

Oct 14 2020, 11:01 AM · Restricted Project
efriedma added inline comments to D89381: [SCEV] Re-enable "Use nw flag and symbolic iteration count to sharpen ranges of AddRecs", attempt 3.
Oct 14 2020, 10:30 AM · Restricted Project

Oct 13 2020

efriedma added inline comments to D89362: [MS] Apply `inreg` to AArch64 sret parms on instance methods.
Oct 13 2020, 9:47 PM · Restricted Project
efriedma added a comment to rGe92a8e0c743f: [SCEV] BuildConstantFromSCEV(): actually properly handle SExt-of-pointer case.

Try running opt -analyze -scalar-evolution on the following:

Oct 13 2020, 1:05 PM
efriedma added inline comments to D87975: [IR] MaxObjSize Attribute.
Oct 13 2020, 12:32 PM · Restricted Project
efriedma added a comment to D88353: [BasicAA] Integrate MaxObjSize for NoAlias.

Statistics changes for CTMark, this patch w/o maxobjsize deduction.

Oct 13 2020, 12:24 PM · Restricted Project
efriedma added a comment to D88669: [ValueTracking] Add tracking of the alignment assume bundle.

What does the third operand of an align bundle mean? It doesn't seem to be documented in LangRef.

Oct 13 2020, 11:55 AM · Restricted Project
efriedma accepted D89326: [SVE] Add fatal error when running out of registers for SVE tuple call arguments.

Can you add a testcase to check we properly trigger the error? Otherwise LGTM.

Oct 13 2020, 11:52 AM · Restricted Project
efriedma added inline comments to rGaaafe350bb65: [SCEV] BuildConstantFromSCEV(): properly handle SCEVSignExtend from ptr.
Oct 13 2020, 11:49 AM
efriedma added inline comments to D89249: [SimplifyLibCalls] Preserve tail call indicator.
Oct 13 2020, 11:20 AM · Restricted Project

Oct 12 2020

efriedma requested review of D89281: [AArch64] Optimize lowering of 128-bit shifts by a variable.
Oct 12 2020, 4:37 PM · Restricted Project
efriedma accepted D89222: [X86][SelectionDAG] Add SADDO_CARRY and SSUBO_CARRY to support multipart signed add/sub overflow legalization..

The title is still "WIP", but I don't see anything obviously missing.

Oct 12 2020, 4:20 PM · Restricted Project
efriedma committed rGa324d8f964bf: [AArch64] Add tests for 128-bit shift variations. (authored by efriedma).
[AArch64] Add tests for 128-bit shift variations.
Oct 12 2020, 2:52 PM
efriedma accepted D86900: [BitCodeAnalyzer] Add a few missing TYPE_CODES and MODULE_CODE_COMDAT to GetCodeName.

LGTM

Oct 12 2020, 1:45 PM · Restricted Project
efriedma accepted D87115: [FPEnv][X86][SystemZ] Use different algorithms for i64->double uint_to_fp under strictfp to avoid producing -0.0 when rounding toward negative infinity.

LGTM with one minor comment.

Oct 12 2020, 12:30 PM · Restricted Project
efriedma added inline comments to D89239: [RISCV][PrologEpilogInserter] "Float" emergency spill slots to avoid making them immediately unreachable from the stack pointer.
Oct 12 2020, 9:41 AM · Restricted Project
efriedma added a comment to D89246: [SVE] Remove aarch64_sve_vector_pcs attribute.

I thought we kept it around intentionally because it has a different set of callee-save registers? If it turns out we don't care about that, sure, I guess we can drop it.

Oct 12 2020, 9:10 AM · Restricted Project

Oct 11 2020

efriedma accepted D89192: [MemCpyOpt] Don't shorten memset if memcpy operands may be the same.

LGTM

Oct 11 2020, 3:04 PM · Restricted Project
efriedma added a comment to D89200: [X86] Add custom type legalization for i64 saddo/ssubo on 32-bit targets. Same for i128 on 64-bit targets..

Would it make sense to add target-independent SADDO_CARRY/SSUBO_CARRY? We already have SETCCCARRY.

Oct 11 2020, 1:43 PM · Restricted Project

Oct 9 2020

efriedma committed rG278299b0f0b0: [SCCP] Reduce the number of times ResolvedUndefsIn is called for large modules. (authored by efriedma).
[SCCP] Reduce the number of times ResolvedUndefsIn is called for large modules.
Oct 9 2020, 3:25 PM
efriedma closed D89080: [SCCP] Reduce the number of times ResolvedUndefsIn is called for large modules..
Oct 9 2020, 3:25 PM · Restricted Project
efriedma added a comment to D88921: [MemCpyOpt] Fix thread-safety of call slot opimization.

To clarify, the suggestion here is to add a boolean flag to callCapturesBefore() that determines whether arguments should always be considered capturing?

Oct 9 2020, 2:50 PM · Restricted Project
efriedma added inline comments to D88663: [AArch64] Use TargetRegisterClass::hasSubClassEq in tryToFindRegisterToRename.
Oct 9 2020, 2:45 PM · Restricted Project
efriedma added a comment to D88893: [SROA] Only generate memcpy if the slices is large 'enough' (WIP)..

Cost modeling is target-specific yes, and also depends on the alignment of the copy.

Oct 9 2020, 2:25 PM · Restricted Project
efriedma accepted D87850: [ConstantFold] Fold the comparison of bitcasted global values .

Do you have commit access? If not, I can commit it for you; what should I put in the git "Author" line?

Oct 9 2020, 2:04 PM · Restricted Project
efriedma accepted D72366: [AArch64] Stack frame reordering..

LGTM

Oct 9 2020, 1:42 PM · Restricted Project
efriedma added a comment to D88921: [MemCpyOpt] Fix thread-safety of call slot opimization.

Oh, I see, the unmodified callCapturesBefore result is correct if you're trying to determine whether the the call might modify a value that can be consumed by a load, but not if you're trying to determine if a store clobbers memory that might be used in another thread.

Oct 9 2020, 1:32 PM · Restricted Project
efriedma added a comment to D72366: [AArch64] Stack frame reordering..

this and https://reviews.llvm.org/D72365 ?

Oct 9 2020, 1:17 PM · Restricted Project
efriedma added a comment to D89080: [SCCP] Reduce the number of times ResolvedUndefsIn is called for large modules..

I would assume that the first pass of ResolveUndefsIn isn't that expensive relative to the other work SCCP does, so it would be more important to ensure we don't need additional passes. And probably we want to work towards removing the branch handling before we invest more effort into optimizing ResolveUndefsIn.

Oct 9 2020, 12:52 PM · Restricted Project
efriedma added inline comments to D88994: Fix the default alignment of i1 vectors..
Oct 9 2020, 12:27 PM · Restricted Project
efriedma accepted D86278: [compiler-rt][builtins] Add tests for atomic builtins support functions.

Okay, I wasn't sure how the builtin tests handle that sort of thing.

Oct 9 2020, 12:14 PM · Restricted Project