Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

joanlluch (Joan LLuch)
User

Projects

User does not belong to any projects.

User Details

User Since
Apr 9 2019, 2:05 AM (233 w, 3 d)

Recent Activity

Nov 13 2019

joanlluch committed rGd384ad6b636d: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4) (authored by joanlluch).
[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4)
Nov 13 2019, 12:24 AM
joanlluch closed D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4).
Nov 13 2019, 12:24 AM · Restricted Project

Nov 11 2019

joanlluch updated the summary of D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4).
Nov 11 2019, 10:04 AM · Restricted Project
joanlluch added inline comments to D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4).
Nov 11 2019, 8:22 AM · Restricted Project
joanlluch updated the diff for D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4).
Nov 11 2019, 8:13 AM · Restricted Project
joanlluch added inline comments to D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4).
Nov 11 2019, 7:36 AM · Restricted Project
joanlluch committed rGabbbf9880c27: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4)… (authored by joanlluch).
[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4)…
Nov 11 2019, 7:18 AM
joanlluch closed D70083: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4) (Baseline tests).
Nov 11 2019, 7:18 AM · Restricted Project
joanlluch created D70083: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4) (Baseline tests).
Nov 11 2019, 7:18 AM · Restricted Project
joanlluch committed rGe0012c5d6acb: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (authored by joanlluch).
[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3)
Nov 11 2019, 1:20 AM
joanlluch closed D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).
Nov 11 2019, 1:20 AM · Restricted Project
joanlluch updated the summary of D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).
Nov 11 2019, 1:10 AM · Restricted Project

Nov 9 2019

joanlluch created D70042: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (4).
Nov 9 2019, 2:47 AM · Restricted Project

Nov 8 2019

joanlluch updated the diff for D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).

Updated after D69975 was reviewed and committed.
Now showing the codegen improvements related with this patch

Nov 8 2019, 11:55 PM · Restricted Project
joanlluch added a comment to D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests).

This is now commited to the github repo
https://github.com/llvm/llvm-project/commit/fe0763d28a572f72007637c7bd097bc19cbb58fc

Nov 8 2019, 2:33 PM · Restricted Project
joanlluch committed rGfe0763d28a57: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3)… (authored by joanlluch).
[TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3)…
Nov 8 2019, 2:25 PM
joanlluch closed D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests).
Nov 8 2019, 2:24 PM · Restricted Project
joanlluch added a comment to D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests).

Hi @spatel, @asl
Thanks for reviewing this. I'm getting some trouble at committing to the upstream repo in the way I would like. I asked for help here first, but then I thought it was better to use llvm-dev instead to avoid clutter here. So this is an edit removing my previous comment. Thanks again

Nov 8 2019, 2:03 AM · Restricted Project

Nov 7 2019

joanlluch added a reviewer for D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests): lebedev.ri.
Nov 7 2019, 3:50 PM · Restricted Project
joanlluch planned changes to D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).

Following the above conversation, I created D69975 as the base tests before this patch can be committed.
I put the base tests in a separate patch to actually show the differential effects of this one.
I will open this for review after D69975 is reviewed.
Thanks,

Nov 7 2019, 3:50 PM · Restricted Project
joanlluch updated the diff for D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests).
Nov 7 2019, 3:41 PM · Restricted Project
joanlluch added reviewers for D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests): spatel, asl.
Nov 7 2019, 3:41 PM · Restricted Project
joanlluch created D69975: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3) (baseline tests).
Nov 7 2019, 3:32 PM · Restricted Project
joanlluch added a comment to D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).

Usually, a first commit will fix a code comment with a spelling error or formatting problem and be "NFC" (no-functional-change). Feel free to try that to make sure things are working.

Nov 7 2019, 9:42 AM · Restricted Project
joanlluch added a comment to D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).

You will want to rebase this patch either way - I had to do some cleaning just to step through this function:
rG2fdd58c5066f
rG777d1d1d9811

Ok, no problem.

Nov 7 2019, 9:42 AM · Restricted Project
joanlluch committed rG0d3d3822f53b: comment shiftamountthreshold (authored by joanlluch).
comment shiftamountthreshold
Nov 7 2019, 8:46 AM

Nov 6 2019

joanlluch added a comment to D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).

@spatel Thanks for reviewing and commiting my previous patches on this subject. I have now been given commit access. I have not tried yet, but it should be good.

Nov 6 2019, 4:25 PM · Restricted Project
joanlluch updated the diff for D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).

Made sure diff matches latest trunk changes

Nov 6 2019, 3:19 PM · Restricted Project

Oct 31 2019

joanlluch added a comment to D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

@asl Ok thanks, I agree that 9 bit shifts may also benefit from the version with amount.
If this is ok, I will propose the TLI function replacement on a different patch after this is reviewed, to keep things organised.

Oct 31 2019, 11:16 AM · Restricted Project
joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

Updated diff to account for the latest trunk changes

Oct 31 2019, 10:58 AM · Restricted Project

Oct 30 2019

joanlluch added inline comments to D69609: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline).
Oct 30 2019, 11:12 AM · Restricted Project
joanlluch added a comment to D69609: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline).

LGTM - have you requested/acquired commit privilege yet?

Oct 30 2019, 9:21 AM · Restricted Project
joanlluch added inline comments to D69609: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline).
Oct 30 2019, 9:12 AM · Restricted Project
joanlluch added a comment to D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

@asl I identified you as the creator of the MSP430 patch that optimised 8 bit and larger shifts by combining them with bswap and extend instructions. This creates relatively cheap instruction sequences for exactly 8 bit shifts.

Oct 30 2019, 3:08 AM · Restricted Project
joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

@spatel I updated this revision diff according to your suggestions. I also created a new baseline test revision to help identify the effects of this patch. I hope this is ok. Thanks in advance for your time.

Oct 30 2019, 2:12 AM · Restricted Project
joanlluch added a comment to D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

I created a new baseline revision, D69609, that help to better reflect the effects of applying this patch. The referred revision should therefore be applied before this one for consistency reasons.

Oct 30 2019, 2:03 AM · Restricted Project
joanlluch created D69609: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline).
Oct 30 2019, 1:44 AM · Restricted Project

Oct 29 2019

joanlluch planned changes to D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).
Oct 29 2019, 9:44 PM · Restricted Project
joanlluch added inline comments to D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).
Oct 29 2019, 2:40 PM · Restricted Project
joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

Updated tests to reflect each covered case in an independent way with more focused IR patterns.
Added comments to the test file that refer to the transformation we are dealing with.

Oct 29 2019, 2:23 PM · Restricted Project

Oct 22 2019

joanlluch updated the summary of D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).
Oct 22 2019, 11:34 PM · Restricted Project
joanlluch created D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3).
Oct 22 2019, 3:18 PM · Restricted Project
joanlluch added reviewers for D69326: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (3): spatel, lebedev.ri, asl.
Oct 22 2019, 3:18 PM · Restricted Project
joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

Code style correction

Oct 22 2019, 4:20 AM · Restricted Project

Oct 20 2019

joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).

Made sure the updated diff file accounts for recent trunk changes

Oct 20 2019, 11:46 AM · Restricted Project

Oct 19 2019

joanlluch updated the diff for D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).

Move repeated calls to N0.getValueType() into a variable

Oct 19 2019, 1:33 AM · Restricted Project

Oct 18 2019

joanlluch added a comment to D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).

LGTM - see inline for a minor improvement.

Do you have commit access?

Oct 18 2019, 3:27 PM · Restricted Project
joanlluch added inline comments to D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).
Oct 18 2019, 3:27 PM · Restricted Project
joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).
Oct 18 2019, 4:02 AM · Restricted Project
joanlluch updated the diff for D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).

Updated with latest suggestions

Oct 18 2019, 3:38 AM · Restricted Project

Oct 17 2019

joanlluch added inline comments to D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).
Oct 17 2019, 3:06 PM · Restricted Project
joanlluch added inline comments to D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).
Oct 17 2019, 2:46 PM · Restricted Project
joanlluch added a reviewer for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2): asl.
Oct 17 2019, 12:26 PM · Restricted Project
joanlluch updated the diff for D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).
Oct 17 2019, 11:21 AM · Restricted Project
joanlluch abandoned D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine.

Follow ups in D69099 , D69116 and D69120

Oct 17 2019, 10:42 AM · Restricted Project
joanlluch created D69120: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (2/2).
Oct 17 2019, 10:42 AM · Restricted Project
joanlluch created D69116: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (1/2).
Oct 17 2019, 9:55 AM · Restricted Project
joanlluch updated the diff for D69099: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests).

Should be ok now.

Oct 17 2019, 8:49 AM · Restricted Project
joanlluch planned changes to D69099: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests).

@spatel
I just realised that I somehow messed this test file with the already optimised one. Please discard this until I upload the right one. Thanks

Oct 17 2019, 7:39 AM · Restricted Project
joanlluch updated the diff for D69099: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests).

Updated baseline test file with the given recommendations:

  • removed explicit target and datalayout from .ll test file
  • removed dso_local
Oct 17 2019, 7:12 AM · Restricted Project
joanlluch added inline comments to D69099: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests).
Oct 17 2019, 6:03 AM · Restricted Project
joanlluch created D69099: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine (Baseline Tests).
Oct 17 2019, 4:20 AM · Restricted Project

Oct 16 2019

joanlluch added a comment to D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine.

I know this is possibly not the right place to ask this particular question, but I thought that I would get a more focused reply by asking here:

Oct 16 2019, 7:11 AM · Restricted Project
joanlluch added a comment to D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine.
In D68982#1710606, @asl wrote:

@joanlluch There are two things here. We understand that there might be some out-of-tree targets that would benefit from changes in the mainline. However, it is still important to add tests that utilize mainline targets as this ensures that the proposed changes won't e.g. break during some refactoring, etc. So, using MSP430 (probably the smallest) / AVR is perfectly fine for tests, etc.!

Oct 16 2019, 3:08 AM · Restricted Project
joanlluch added a comment to D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine.
In D68982#1710529, @asl wrote:

The MSP430 changes / overall direction looks extremely useful to me. We just need to ensure everything is done properly. This is exactly what @spatel proposed.

I will be happy to review all MSP430 stuff :)

Hi,
Sorry, I somehow missed your post before I posted my last one. Thanks for that.

Oct 16 2019, 2:54 AM · Restricted Project
joanlluch added a comment to D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine.

Hi @spatel
Thank you for your support. I'll try to do what you suggest regarding generating of baseline tests and splitting the patch.

Oct 16 2019, 2:20 AM · Restricted Project

Oct 15 2019

joanlluch abandoned D68957: Shift Amount Threshold in DAGCombine.

I abandoned this, created D68982 instead

Oct 15 2019, 4:33 AM · Restricted Project
joanlluch created D68982: [TargetLowering][DAGCombine][MSP430] Shift Amount Threshold in DAGCombine.
Oct 15 2019, 4:22 AM · Restricted Project

Oct 14 2019

joanlluch updated the summary of D68957: Shift Amount Threshold in DAGCombine.
Oct 14 2019, 3:46 PM · Restricted Project
joanlluch updated the summary of D68957: Shift Amount Threshold in DAGCombine.
Oct 14 2019, 3:46 PM · Restricted Project
joanlluch updated the summary of D68957: Shift Amount Threshold in DAGCombine.
Oct 14 2019, 3:41 PM · Restricted Project
joanlluch created D68957: Shift Amount Threshold in DAGCombine.
Oct 14 2019, 3:28 PM · Restricted Project

Oct 13 2019

joanlluch added a comment to D63382: [InstCombine] fold a shifted zext to a select.

@spatel I want to express my support to selects over bit manipulation instructions in IR, as stated above, in order to move such optimisations to DAGCombine. Ideally, this should involve the removal of some of the existing InstCombineSelect transformations, particularly most of the ones in foldSelectInstWithICmp. However, as I exposed earlier in LLVM-dev, the DAGCombine code should incorporate hooks to allow targets to decide whether such bihacks are actually profitable, or it's best to keep them as selects.

Oct 13 2019, 12:18 PM · Restricted Project

Oct 12 2019

joanlluch added a comment to D63382: [InstCombine] fold a shifted zext to a select.

@joanlluch - this is a case where we could transform incoming shift to select and benefit small targets as you've noted.

Oct 12 2019, 11:31 AM · Restricted Project

Oct 3 2019

joanlluch accepted D68397: [DAGCombiner] add operation legality checks before creating shift ops (PR43542).

It works for me.

Oct 3 2019, 2:15 PM · Restricted Project

Jul 8 2019

joanlluch accepted D64300: Fix issues building libraries as more than one type with Xcode.

This fixed bug 42528. okey to me.

Jul 8 2019, 10:51 AM · Restricted Project
joanlluch abandoned D63692: [LSR] Improved code generation for Zero Compare loops.
Jul 8 2019, 8:26 AM · Restricted Project

Jun 27 2019

joanlluch added a comment to D63692: [LSR] Improved code generation for Zero Compare loops.

@craig.topper , can this be considered ok for the X86?. Thanks.

Jun 27 2019, 1:28 AM · Restricted Project

Jun 26 2019

joanlluch added a comment to D63692: [LSR] Improved code generation for Zero Compare loops.

Hi Craig, thanks for commenting.
Yes, I was actually compiling for -Oz, but the differences when using -Os are even bigger. Let me try to explain every case.

  • For Oz, the compiler indeed generates expensive push/pop instructions as an attempt to reduce code size. However, after the patch is applied these instructions are removed without any code size increase. I have checked that in several scenarios and the result is either the same size or less size. This is because the patch reduces the overall number of instructions. On the examples above, the resulting code size is identical, this is because the sequence:
Jun 26 2019, 2:11 AM · Restricted Project
joanlluch added a comment to D63692: [LSR] Improved code generation for Zero Compare loops.

Hi shchenz,

Jun 26 2019, 12:57 AM · Restricted Project
joanlluch updated the diff for D63692: [LSR] Improved code generation for Zero Compare loops.

Fixes reported assertion crash on SystemZ

Jun 26 2019, 12:15 AM · Restricted Project

Jun 25 2019

joanlluch added a comment to D63477: [PowerPC] exclude ICmpZero Use in LSR if icmp can be replaced inside hardware loop..

I recently sent a new LSR patch proposal, D63692, that to some extent runs in the opposite direction than this one. I mean, I am adding an additional initial formula for ICmpZero as opposed to excluding it. I think that both patches are however fully compatible and probably worth merging together to get the best of all platforms. I added @shchenz, the author of this, as a D63692 reviewer so he can post any considerations.

Jun 25 2019, 12:47 PM · Restricted Project
joanlluch added a reviewer for D63692: [LSR] Improved code generation for Zero Compare loops: shchenz.
Jun 25 2019, 4:51 AM · Restricted Project
joanlluch added a reviewer for D63692: [LSR] Improved code generation for Zero Compare loops: javed.absar.
Jun 25 2019, 12:34 AM · Restricted Project
joanlluch changed the repository for D63692: [LSR] Improved code generation for Zero Compare loops from rL LLVM to rG LLVM Github Monorepo.
Jun 25 2019, 12:34 AM · Restricted Project

Jun 23 2019

joanlluch created D63692: [LSR] Improved code generation for Zero Compare loops.
Jun 23 2019, 10:25 AM · Restricted Project