Page MenuHomePhabricator
Feed Advanced Search

Jun 3 2015

dinesh.d updated the diff for D3543: Some minor update in PassManager.h.

small correction in comment

Jun 3 2015, 11:58 PM
dinesh.d updated the diff for D3543: Some minor update in PassManager.h.

Update r238305 changes to fix compilation issue with MSVC.

Jun 3 2015, 10:09 AM

Apr 8 2015

dinesh.d added a comment to D3543: Some minor update in PassManager.h.

Sorry if it does not make any sense but following is my analysis on why we can't use
perfect forwarding here with the trick.

Apr 8 2015, 2:53 PM

Mar 31 2015

dinesh.d updated the diff for D3543: Some minor update in PassManager.h.

I have updated patch as per comments and re-based it with trunk. But I am facing
problem while using perfect forwarding as you have suggested. Type A1 and A2 is
deduced from passed function type. In our case, A2 is always pointer, just using
&&' in template parameter is not working.

Mar 31 2015, 7:47 AM

Mar 30 2015

dinesh.d added a comment to D3543: Some minor update in PassManager.h.

wow, thanks for looking into this. I will do needful and update this patch.

Mar 30 2015, 12:45 AM

Aug 25 2014

dinesh.d updated the diff for D4951: Moving few patterns from visitAnd/visitOr/visitXor to SimplifyUsingDistributiveLaws().

Updated as per comments.

Aug 25 2014, 1:36 AM

Aug 18 2014

dinesh.d retitled D4951: Moving few patterns from visitAnd/visitOr/visitXor to SimplifyUsingDistributiveLaws() from to Moving few patterns from visitAnd/visitOr/visitXor to SimplifyUsingDistributiveLaws().
Aug 18 2014, 12:44 AM

Jun 27 2014

dinesh.d closed D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3).

Closed by commit rL211881 (authored by dinesh).

Jun 27 2014, 12:55 AM
dinesh.d added a comment to D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3).

thanks

Jun 27 2014, 12:55 AM

Jun 26 2014

dinesh.d closed D4253: Removed pattern checks in instruction simplify/ combine which are now handled in SimplifyUsingDistributiveLaws().

Closed by commit rL211768 (authored by dinesh).

Jun 26 2014, 2:05 AM
dinesh.d added a comment to D4253: Removed pattern checks in instruction simplify/ combine which are now handled in SimplifyUsingDistributiveLaws().

Thanks :)

Jun 26 2014, 2:05 AM
dinesh.d added a comment to D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3).

I have a more high-level question. Why are these logics in checkForNegativeOperand instead of visitXor? Aren't transformations such as
XOR(AND(Z, ~C), (~C + 1)) => NEG(OR(Z, C))
beneficial even the XOR is not the RHS of an ADD?

Jun 26 2014, 12:22 AM
dinesh.d added inline comments to D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3).
Jun 26 2014, 12:12 AM
dinesh.d updated the diff for D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3).

I have updated patch for comments with following extra changes.

  1. ADD(XOR(AND(Z, ~C), ~C), 1) == NEG(OR(Z, C)) is true for both if C is even or odd. [http://rise4fun.com/Z3/Pwkf]
  2. Rearranged test cases, generated from following test code
Jun 26 2014, 12:11 AM

Jun 25 2014

dinesh.d closed D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Closed by commit rL211765 (authored by dinesh).

Jun 25 2014, 10:48 PM
dinesh.d added a comment to D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Thanks :)

Jun 25 2014, 10:48 PM
dinesh.d added a comment to D4253: Removed pattern checks in instruction simplify/ combine which are now handled in SimplifyUsingDistributiveLaws().

Yes, With SimplifyUsingDistributiveLaws() updated in r211261, now it can handle all transforms
handled by these removed code. This patch removes code duplication. I am planning to further
analyse transform using associative, commutative and distributive laws and generalize them.

Jun 25 2014, 12:16 AM

Jun 24 2014

dinesh.d updated the diff for D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3).

Removed code setting NSW/ NUW flag for now

Jun 24 2014, 11:52 PM
dinesh.d added inline comments to D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).
Jun 24 2014, 11:39 PM
dinesh.d updated the diff for D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Removed code setting NSW/ NUW flags

Jun 24 2014, 11:39 PM

Jun 23 2014

dinesh.d retitled D4253: Removed pattern checks in instruction simplify/ combine which are now handled in SimplifyUsingDistributiveLaws() from to Removed pattern checks in instruction simplify/ combine which are now handled in SimplifyUsingDistributiveLaws().
Jun 23 2014, 3:12 AM
dinesh.d added a comment to D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Sorry for delay in reply. I have added comments inline.

Jun 23 2014, 1:25 AM
dinesh.d updated the diff for D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Updated as per comments

Jun 23 2014, 1:25 AM

Jun 20 2014

dinesh.d added a comment to D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

forgot to reply for else if part.

Jun 20 2014, 11:46 AM
dinesh.d added a comment to D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Thanks. I have replied inline. I will update code based on your comment on them.

Jun 20 2014, 11:42 AM

Jun 19 2014

dinesh.d added a comment to D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2).

Hi Jingyue,

Jun 19 2014, 10:22 PM
dinesh.d retitled D4210: Added instruction combine to transform few more negative values addition to subtraction (Part 3) from to Added instruction combine to transform few more negative values addition to subtraction (Part 3).
Jun 19 2014, 5:22 AM
dinesh.d retitled D4209: Added instruction combine to transform few more negative values addition to subtraction (Part 2) from to Added instruction combine to transform few more negative values addition to subtraction (Part 2).
Jun 19 2014, 5:02 AM
dinesh.d closed D3733: Added instruction combine to transform few more negative values addition to subtraction.

Closed by commit rL211266 (authored by dinesh).

Jun 19 2014, 3:45 AM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

fixed typo in previous comment

Jun 19 2014, 3:08 AM
dinesh.d added inline comments to D3733: Added instruction combine to transform few more negative values addition to subtraction.
Jun 19 2014, 3:03 AM
dinesh.d updated the diff for D3733: Added instruction combine to transform few more negative values addition to subtraction.

Updated as per comments

Jun 19 2014, 3:02 AM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

Hi Nick,

Jun 19 2014, 2:56 AM
dinesh.d closed D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Closed by commit rL211261 (authored by dinesh).

Jun 19 2014, 1:37 AM
dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Thanks for review. I have updated cast<BinaryOperator>(SimplifiedInst) to use dyn_cast.

Jun 19 2014, 1:12 AM

Jun 17 2014

dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Updated patch as per comments. Thanks for review.

Jun 17 2014, 11:09 PM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Thanks for review and comments. I have replied them inline.

Jun 17 2014, 11:09 PM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

typo :(

Jun 17 2014, 1:49 PM
dinesh.d added inline comments to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).
Jun 17 2014, 1:41 PM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

gentle ping

Jun 17 2014, 7:50 AM
dinesh.d closed D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

Closed by commit rL211103 (authored by dinesh).

Jun 17 2014, 7:42 AM
dinesh.d updated the diff for D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

Thanks. Updated patch as per comments.

Jun 17 2014, 7:37 AM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Thanks for review. I ahve added comments inline.

Jun 17 2014, 7:12 AM
dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Update patch as per review comments

Jun 17 2014, 7:12 AM

Jun 16 2014

dinesh.d added a comment to D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

gentle ping

Jun 16 2014, 5:00 AM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

gentle ping

Jun 16 2014, 5:00 AM

Jun 12 2014

dinesh.d closed D4040: Added transform for ABS(NABS(X)) and NABS(ABS(X)).

Closed by commit rL210782 (authored by dinesh).

Jun 12 2014, 7:14 AM
dinesh.d added a comment to D4040: Added transform for ABS(NABS(X)) and NABS(ABS(X)).

I had submitted similar patch [http://reviews.llvm.org/D3658] with all permutations of icmp.
This was just followup patch.

Jun 12 2014, 6:06 AM
dinesh.d added a reviewer for D3733: Added instruction combine to transform few more negative values addition to subtraction: chandlerc.

It will be gr8 if you can have a look.

Jun 12 2014, 5:55 AM
dinesh.d added a comment to D4040: Added transform for ABS(NABS(X)) and NABS(ABS(X)).

gentle ping

Jun 12 2014, 5:12 AM

Jun 11 2014

dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

Thanks Philip.

Jun 11 2014, 11:14 AM

Jun 10 2014

dinesh.d updated the diff for D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

Wow, I couldn't have come up with that. I have updated code to remove
unreachable blocks at the start of pass.

Jun 10 2014, 11:10 PM
dinesh.d updated the diff for D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

updated test case

Jun 10 2014, 5:57 AM
dinesh.d added a comment to D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

Here are few observations I came across during debugging:
If any of the existing BB in the function is updated, it will be added in UpdatedBB,
if not already exist. For this new XXX.thread blocks are not considered for this
iteration.

Jun 10 2014, 4:53 AM
dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

moved dyn_castFoldableMul logic to InstructionCombining.cpp.
Now SimplifyUsingDistributiveLaws handles all relevant cases.

Jun 10 2014, 3:08 AM

Jun 9 2014

dinesh.d added a comment to D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

Each pass iterates over all BBs of the functions and all updated BBs are added to
'UpdatedBB' so if first pass adds 3 BBs and second pass adds 2, there will be
5 BBs in the list and we will still continue with next pass.

Jun 9 2014, 10:53 PM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

gentle ping

Jun 9 2014, 11:14 AM
dinesh.d added a comment to D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

gentle ping

Jun 9 2014, 11:14 AM

Jun 6 2014

dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

I agree with the idea that these cases should get handled in SimplifyUsingDistributiveLaws and
I am working on generalized approach for that.

Jun 6 2014, 3:42 AM
dinesh.d retitled D4040: Added transform for ABS(NABS(X)) and NABS(ABS(X)) from to Added transform for ABS(NABS(X)) and NABS(ABS(X)).
Jun 6 2014, 12:53 AM
dinesh.d closed D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

Closed by commit rL210312 (authored by dinesh).

Jun 6 2014, 12:02 AM

Jun 5 2014

dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

updated patch as per comments

Jun 5 2014, 12:53 PM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

Yes, now WillNotOverflowSignedAdd can handle cases where
one of LHS and RHS is power of 2 and other has known zero
after high bit in first one. I will update test accordingly or if you
think that should go as independent patch I can surely do that.

Jun 5 2014, 11:35 AM
dinesh.d added a comment to D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

Thanks for review, Philip.

Jun 5 2014, 5:16 AM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

+ if (ConstantInt *CI1 = dyn_cast<ConstantInt>(LHS))
+ if (ConstantInt *CI2 = dyn_cast<ConstantInt>(RHS)) {
+ APInt ACI1 = CI1->getValue();
+ APInt ACI2 = CI2->getValue();
+ bool IsLHSNegative = ACI1.isNegative();
+ bool IsRHSNegative = ACI2.isNegative();

If both are constants, the result should have been folded before
getting here, no?

Jun 5 2014, 5:03 AM
dinesh.d updated the diff for D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

rebased code on trunk

Jun 5 2014, 5:03 AM

Jun 4 2014

dinesh.d added a comment to D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

gentle ping

Jun 4 2014, 11:54 AM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

gentle ping

Jun 4 2014, 11:53 AM

Jun 3 2014

dinesh.d updated the diff for D3733: Added instruction combine to transform few more negative values addition to subtraction.

Updated comments

Jun 3 2014, 2:28 PM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

Is this the first one? Which patch is the second one?

Cheers,
Rafael

Jun 3 2014, 2:07 PM
dinesh.d updated the diff for D3733: Added instruction combine to transform few more negative values addition to subtraction.

Breaking patch in to parts

Jun 3 2014, 1:32 PM

Jun 2 2014

dinesh.d updated the diff for D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).

Forgot to add RUN line in test case

Jun 2 2014, 7:50 AM
dinesh.d retitled D3991: [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851) from to [Jump-Threading] Fixed jump threading hang issues (PR15386, PR15851).
Jun 2 2014, 7:45 AM
dinesh.d closed D3678: Added InstCombine for ((1 << X) & C) pattern.

Closed by commit rL210007 (authored by dinesh).

Jun 2 2014, 1:05 AM
dinesh.d closed D3777: Added inst combine transforms for single bit tests from Chris's note (updated).

Closed by commit rL210006 (authored by dinesh).

Jun 2 2014, 12:32 AM

May 31 2014

dinesh.d updated the diff for D3733: Added instruction combine to transform few more negative values addition to subtraction.

This patch creates 2 instructions to replace ADD. Updated patch to check
if atleast one of LHS or RHS to have one use to ensure benefit in transform.

May 31 2014, 1:38 PM
dinesh.d added inline comments to D3678: Added InstCombine for ((1 << X) & C) pattern.
May 31 2014, 1:11 PM
dinesh.d updated the diff for D3678: Added InstCombine for ((1 << X) & C) pattern.

Update as per comments.

May 31 2014, 1:11 PM

May 30 2014

dinesh.d updated the diff for D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

Updated patch to handle both ABS(X) and NEG(ABS(X)) and tests for all possible combinations or ABS(ABS) and NABS(NABS)
I have removed check for unsigned predicates as ABS of unsigned values are value them selves and must already handled before.
Thanks to Philip and sorry as I did not get your comment right previously.

May 30 2014, 2:11 AM

May 28 2014

dinesh.d closed D2976: [PR18861] Fix for LoopUnroll pass was breaking LCSSA form while completely removing loop .

Closed by commit rL209796 (authored by dinesh).

May 28 2014, 11:55 PM
dinesh.d added inline comments to D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

Thanks Philip. I appreciate your effort.

May 28 2014, 1:14 PM
dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

gentle ping

May 28 2014, 12:42 PM
dinesh.d updated the diff for D2976: [PR18861] Fix for LoopUnroll pass was breaking LCSSA form while completely removing loop .

I have updated patch as per your suggestions. I will commit this patch and continue
experimenting with different loop structure. I already have tried many different combinations
but none of them cause similar crash.

May 28 2014, 2:51 AM

May 27 2014

dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

Hi Philip,

May 27 2014, 11:50 PM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

This is to answer Philip's comments

Both your comment and function name here seem misleading. As far as I
can tell from your transforms, none are actual predicated on an argument
being negative. I also see no use of subtraction.

Then for this one, I'm probably missing something obvious, but where are
you initializing C1 and C2? In general, the code structure here is a
bit hard to read.

May 27 2014, 11:47 PM
dinesh.d added a comment to D3678: Added InstCombine for ((1 << X) & C) pattern.

gentle ping

May 27 2014, 11:30 AM
dinesh.d added a comment to D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

gentle ping

May 27 2014, 11:29 AM
dinesh.d added a comment to D3543: Some minor update in PassManager.h.

gentle ping

May 27 2014, 6:00 AM
dinesh.d updated the diff for D2976: [PR18861] Fix for LoopUnroll pass was breaking LCSSA form while completely removing loop .

To start with, I looked through all latches in the the loop, and check if they are
moved higher in loop nest, if so, I am trying to run formLCSSARecursively on highest
loop where any latch is landed.

May 27 2014, 5:39 AM

May 26 2014

dinesh.d closed D3837: Fix for bug in indvars/ SCEV generating infinite loop (pr18886).

Closed by commit rL209645 (authored by dinesh).

May 26 2014, 11:52 PM
dinesh.d added a comment to D3777: Added inst combine transforms for single bit tests from Chris's note (updated).

gentle ping.

May 26 2014, 4:43 AM
dinesh.d added a comment to D3733: Added instruction combine to transform few more negative values addition to subtraction.

gentle ping.

May 26 2014, 4:42 AM

May 22 2014

dinesh.d added a comment to D3799: Fixing inst-combine not to drops nsw when combining adds into mul (PR19263).

gentle ping

May 22 2014, 8:08 AM

May 21 2014

dinesh.d added a comment to D3837: Fix for bug in indvars/ SCEV generating infinite loop (pr18886).

No problem :) and thanks for explaining, even your comment in commit is very informative.
I am going thorough Loop Optimization passes to understand how they change IR and there
I came accross these bugs.

May 21 2014, 11:54 PM
dinesh.d added a comment to D3678: Added InstCombine for ((1 << X) & C) pattern.

Gentle Ping

May 21 2014, 7:45 AM
dinesh.d added a comment to D3658: Added instcombine for 'ABS(ABS(X)) -> ABS(X)'.

Gentle Ping

May 21 2014, 7:44 AM

May 20 2014

dinesh.d updated D3837: Fix for bug in indvars/ SCEV generating infinite loop (pr18886).
May 20 2014, 4:34 AM
dinesh.d retitled D3837: Fix for bug in indvars/ SCEV generating infinite loop (pr18886) from to Fix for bug in indvars/ SCEV generating infinite loop (pr18886).
May 20 2014, 4:18 AM

May 19 2014

dinesh.d closed D3785: Added inst-combine for 'MIN(MIN(A, 97), 23)' and 'MAX(MAX(A, 23), 97)'.
May 19 2014, 2:31 AM
dinesh.d updated the diff for D3733: Added instruction combine to transform few more negative values addition to subtraction.

Updated patch to use APInts and simplified few checks

May 19 2014, 1:18 AM