Page MenuHomePhabricator

luqmana (Luqman Aden)
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 14 2013, 2:35 AM (330 w, 4 h)

Recent Activity

Apr 20 2019

luqmana committed rG2993661cc0e5: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw. (authored by luqmana).
[CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw.
Apr 20 2019, 6:13 AM
luqmana committed rL358816: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..
[CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw.
Apr 20 2019, 6:12 AM
luqmana closed D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..
Apr 20 2019, 6:12 AM · Restricted Project
luqmana updated the diff for D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..

Rebase over committed baseline tests.

Apr 20 2019, 3:40 AM · Restricted Project

Apr 19 2019

luqmana added a comment to D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..

We should probably give reenabling the option by default another try (in a separate revision), at least I can't seem to reproduce the issue in PR31181 anymore.

Apr 19 2019, 11:18 PM · Restricted Project
luqmana updated the diff for D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..

Rename option and method to be more general.

Apr 19 2019, 11:12 PM · Restricted Project
luqmana added inline comments to D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..
Apr 19 2019, 11:12 PM · Restricted Project

Apr 4 2019

luqmana added a comment to D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..

Ping?

Apr 4 2019, 12:13 AM · Restricted Project
luqmana committed rG8911c5be46b9: [InstCombine] Combine no-wrap sub and icmp w/ constant. (authored by luqmana).
[InstCombine] Combine no-wrap sub and icmp w/ constant.
Apr 4 2019, 12:10 AM
luqmana committed rL357674: [InstCombine] Combine no-wrap sub and icmp w/ constant..
[InstCombine] Combine no-wrap sub and icmp w/ constant.
Apr 4 2019, 12:10 AM
luqmana closed D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..
Apr 4 2019, 12:10 AM · Restricted Project

Mar 31 2019

luqmana updated the diff for D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..

Rebased on committed tests.

Mar 31 2019, 2:03 AM · Restricted Project
luqmana committed rG7c67dbdc65fe: [NFC][InstCombine] Add tests for combining icmp of no-wrap sub w/ constant. (authored by luqmana).
[NFC][InstCombine] Add tests for combining icmp of no-wrap sub w/ constant.
Mar 31 2019, 1:58 AM
luqmana committed rL357360: [NFC][InstCombine] Add tests for combining icmp of no-wrap sub w/ constant..
[NFC][InstCombine] Add tests for combining icmp of no-wrap sub w/ constant.
Mar 31 2019, 1:57 AM
luqmana added inline comments to D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..
Mar 31 2019, 1:08 AM · Restricted Project
luqmana updated the diff for D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..

Give tests more descriptive names and add one more negative test.

Mar 31 2019, 1:08 AM · Restricted Project

Mar 30 2019

luqmana added a comment to D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..

Can you please split off the InstCombine change into a separate revision?

Mar 30 2019, 2:42 PM · Restricted Project
luqmana updated the diff for D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..

Split off CorrelatedValuePropagation changes to new revision: D60036

Mar 30 2019, 2:42 PM · Restricted Project
luqmana created D60036: [CorrelatedValuePropagation] Mark subs that we know not to wrap with nuw/nsw..
Mar 30 2019, 2:39 PM · Restricted Project

Mar 27 2019

luqmana created D59916: [InstCombine] Combine no-wrap sub and icmp w/ constant..
Mar 27 2019, 10:54 PM · Restricted Project

Mar 22 2017

luqmana committed rL298540: Preserve nonnull metadata on Loads through SROA & mem2reg..
Preserve nonnull metadata on Loads through SROA & mem2reg.
Mar 22 2017, 12:29 PM
luqmana closed D27114: Preserve nonnull metadata on Loads through SROA & mem2reg. by committing rL298540: Preserve nonnull metadata on Loads through SROA & mem2reg..
Mar 22 2017, 12:28 PM
luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

LGTM.

Luqman, thanks for putting up with the long delay in reviewing this.

Do you have commit access, or should I commit this for you?

Mar 22 2017, 11:33 AM

Mar 21 2017

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

I added another test for all the relevant codepaths in PromoteMemoryToRegister.
I also addressed one case I missed earlier: when the alloca in question has
multiple stores but all within the same basic block.

Mar 21 2017, 9:57 PM

Mar 4 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Ping?

Mar 4 2017, 8:08 PM

Feb 28 2017

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Use copyMetadata method instead of manually copying metadata.

Feb 28 2017, 7:57 AM

Feb 24 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Ping

Feb 24 2017, 3:19 PM

Feb 17 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Ping?

Feb 17 2017, 2:31 PM

Feb 9 2017

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Don't add assume if the value is already known to be nonnull.

Feb 9 2017, 8:02 PM

Feb 8 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Ping

Feb 8 2017, 11:37 AM

Jan 26 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Ping

Jan 26 2017, 7:56 PM

Jan 18 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Ping

Jan 18 2017, 1:15 PM

Jan 11 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

So at least running the test suite I didn't come across any performance regressions. Could we land this and observe the buildbots or something for any regressions and back out as necessary?

Jan 11 2017, 10:54 AM

Jan 6 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Well, you can run the LLVM testsuite (http://llvm.org/docs/lnt/quickstart.html)... but that's written entirely written in C and C++, and I don't think clang produces nonnull metadata at all. Maybe you have some Rust performance tests you could use?

Jan 6 2017, 8:15 AM

Jan 5 2017

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

I want to make sure Eli is happy with this approach w.r.t. any semantic differences between !nonnull metadata and the assume. Haven't seen an update from him since the switch of formulation.

Semantically, this seems consistent with existing code dealing with !nonnull. That said, creating calls to @llvm.assume has the potential to cause performance regressions; there are a bunch of places in the optimizer which don't handle them well, so it's probably worth checking that this change doesn't create more problems than it solves.

Jan 5 2017, 10:56 AM
luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Bunch of little comments below.

I'd like to see two high level thinsg before this goes in though:

  1. I want to make sure Eli is happy with this approach w.r.t. any semantic differences between !nonnull metadata and the assume. Haven't seen an update from him since the switch of formulation.
  2. I'd like at least a test case and a FIXME around the case where SROA rewrites the load and store to be integer loads and stores. This will happen fairly often due to things like unions, memcpy and other "bag of bits" interpretations of memory operations. We should work to not destroy !nonnull in the process by translating it to an assume. I'm happy for this to be handled in a subsequent patch, but I'd like to at least document the issue for anyone who ends up working on it.
Jan 5 2017, 10:47 AM
luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..
Fix some formatting and update test.
Jan 5 2017, 10:43 AM

Jan 4 2017

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Simplify test and remove instcombine dependency.

Jan 4 2017, 11:20 AM

Jan 3 2017

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..
Move duplicate code to helper function.
Jan 3 2017, 5:44 PM

Dec 29 2016

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Run clang-format.

Dec 29 2016, 2:39 PM
luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

The problem wasn't that. We do have llvm.assume which InstCombine turns assume( (load addr) != null ) to a load addr !nonnull. Then, SROA/mem2reg end up eating the !nonnull metadata.

You can do the reverse transform in mem2reg: load addr !nonnull -> assume( (load addr) != null ), then when the load gets erased the nonnull assumption is preserved.

Or we could stop instcombine from doing this in the first place.

I think we should canonicalize on the assume formulation as it is strictly more general than the nonnull metadata formulation.

Dec 29 2016, 12:53 PM
luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Use assume to preserve nonnull-ness of Load.

Dec 29 2016, 12:51 PM

Dec 20 2016

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

I don't think there's any existing analysis which computes the sort of post-dominator tree you want.

Anyway, I'm not sure this is really what you want... have you experimented with inserting llvm.assume calls?

Dec 20 2016, 5:34 PM
luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

PostDominatorTree doesn't provide the kind of post-dominance you need for this transformation: LLVM basic blocks have implicit edges which exit the function early, and those edges aren't reflected in the tree. For example, execution doesn't actually continue after a call to exit(). (See also the llvm::isGuaranteedToTransferExecutionToSuccessor() utility.)

Dec 20 2016, 1:52 PM

Dec 19 2016

luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Remove unnecessary changes.

Dec 19 2016, 4:41 PM
luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Lines 361-381 assert that LI is dominated by the Store and the Store trivially dominates ReplVal?

Post-dominates, not dominates... they're sort of similar, but post-dominance involves following the control flow edges the other way. A compiler textbook should cover this.

Dec 19 2016, 4:28 PM
luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Address comments from review.

Dec 19 2016, 4:26 PM
luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

I am quite sure I was told that !nonnull causes UB rather than poison. Is there some real documentation for that?

Err, no, you're probably right; I haven't really worked with it, and LangRef doesn't say anything, so "must" defaults to undefined behavior.

You still can't propagate backwards without proving post-dominance.

Dec 19 2016, 1:46 PM

Dec 16 2016

luqmana added inline comments to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..
Dec 16 2016, 9:39 PM

Nov 24 2016

luqmana added a comment to D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Are you always guaranteed that the range doesn't contain zero?

Nov 24 2016, 4:46 PM
luqmana updated the diff for D27114: Preserve nonnull metadata on Loads through SROA & mem2reg..

Whoops, that was my mistake. The diff was inverted and should be corrected now.

Nov 24 2016, 4:16 PM
luqmana retitled D27114: Preserve nonnull metadata on Loads through SROA & mem2reg. from to Preserve nonnull metadata on Loads through SROA & mem2reg..
Nov 24 2016, 2:23 PM

Apr 22 2015

luqmana committed rL235526: Test commit: fix typo in comment..
Test commit: fix typo in comment.
Apr 22 2015, 10:45 AM
luqmana abandoned D5125: Make sure to set trunc store action to Expand for all X86 targets..
Apr 22 2015, 7:55 AM
luqmana abandoned D9041: llvm-link: Add -override flag to prefer duplicate symbols from one module..
Apr 22 2015, 7:55 AM

Apr 20 2015

luqmana added a comment to D9041: llvm-link: Add -override flag to prefer duplicate symbols from one module..

Ping?

Apr 20 2015, 11:41 AM

Apr 15 2015

luqmana added a reviewer for D9041: llvm-link: Add -override flag to prefer duplicate symbols from one module.: dexonsmith.

Not sure who owns llvm-link but you seem to have touched it last.

Apr 15 2015, 3:43 PM
luqmana retitled D9041: llvm-link: Add -override flag to prefer duplicate symbols from one module. from to llvm-link: Add -override flag to prefer duplicate symbols from one module..
Apr 15 2015, 2:51 PM

Sep 17 2014

luqmana accepted D5386: Restore "[ARM, Fix] Fix emitLeading/TrailingFence on old ARM processors".

LGTM

Sep 17 2014, 2:57 PM

Sep 12 2014

luqmana added a comment to D5304: [ARM, Fix] Fix emitLeading/TrailingFence on old ARM processors.

Looks fine to me but I'm not really all that familiar with this code.

Sep 12 2014, 10:06 AM

Sep 8 2014

luqmana added a comment to D4595: Correctly handle range metadata when hoisting instructions out of then/else into if blocks.

It seems like the test didn't get committed?

Sep 8 2014, 7:56 PM

Sep 5 2014

luqmana added a comment to D5125: Make sure to set trunc store action to Expand for all X86 targets..

Cool thanks! Could someone commit this for me?

Sep 5 2014, 10:04 AM

Sep 4 2014

luqmana added a comment to D5125: Make sure to set trunc store action to Expand for all X86 targets..

Ping?

Sep 4 2014, 8:26 AM

Sep 1 2014

luqmana abandoned D3389: `nonnull` argument attribute..
Sep 1 2014, 2:38 PM
luqmana abandoned D1905: Add a "split-stack" function attribute..
Sep 1 2014, 2:28 PM

Aug 29 2014

luqmana added a reviewer for D5125: Make sure to set trunc store action to Expand for all X86 targets.: nadav.
Aug 29 2014, 11:58 AM
luqmana retitled D5125: Make sure to set trunc store action to Expand for all X86 targets. from to Make sure to set trunc store action to Expand for all X86 targets..
Aug 29 2014, 11:56 AM

Aug 27 2014

luqmana added a comment to D5020: Ignore lifetime intrinsics in use list for MemCpyOptimizer..

Cool! Could someone please land this for me, I don't have commit access.

Aug 27 2014, 7:08 AM

Aug 22 2014

luqmana added reviewers for D5020: Ignore lifetime intrinsics in use list for MemCpyOptimizer.: nicholas, nlewycky.
Aug 22 2014, 10:33 AM

Aug 21 2014

luqmana retitled D5020: Ignore lifetime intrinsics in use list for MemCpyOptimizer. from to Ignore lifetime intrinsics in use list for MemCpyOptimizer..
Aug 21 2014, 9:28 PM

May 14 2014

luqmana added a reviewer for D3389: `nonnull` argument attribute.: nicholas.

Updated to address review comments.

May 14 2014, 1:27 PM
luqmana added a comment to D3389: `nonnull` argument attribute..

dotdash:

This information could also be used in ArgPromotion::isSafeToPromoteArgument(). Its second argument, isByValOrInAlloca, is used to determine whether a pointer argument is always valid.

May 14 2014, 1:23 PM