[llvm-commits] [PATCH] Teach IRBuilder about simplifying BinOp(Value, Constant)
Török Edwin
edwintorok at gmail.com
Mon Jan 5 01:25:07 PST 2009
On 2009-01-05 10:14, Török Edwin wrote:
> On 2009-01-05 02:41, Dan Gohman wrote:
>
>> On Jan 4, 2009, at 1:15 PM, Török Edwin wrote:
>>
>>
>>
>>> On 2009-01-04 21:35, Dan Gohman wrote:
>>>
>>>
>>>> On Jan 4, 2009, at 2:55 AM, Török Edwin wrote:
>>>>
>>>> How about having it act as if reuseOps is false when InsertPt is not
>>>> equal to BB->end()? Would that still be permissive enough for your
>>>> needs?
>>>>
>>>>
>>> Yes, that is OK. I added a private function getReuse() that will
>>> either
>>> return a BB (if reuseOps is true, and InsertPt == BB->end()), or 0
>>> otherwise.
>>>
>>>
>> Cool. This patch looks good to me. I just noticed a few comments that
>> are out of date with the code; the comment for SimplifyInstruction still
>> mentions that it might try to find an existing instruction, and the
>> comment in findBinOp still says "There should be less uses than
>> instructions in a BB ..." which is no longer relevant.
>>
>>
>
> I updated the comments.
>
>
>> Thanks for your patience, and thanks for working on this!
>>
>>
>
> Thanks to all who reviewed my patch!
>
> Can I commit the patch?
>
I added back the Constant* functions in ConstantFolder/TargetFolder,
since llvm-gcc is using them (called with constant* params, expecting
constant* return).
Best regards,
--Edwin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: simplifier7.patch
Type: text/x-diff
Size: 23867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090105/24b60fec/attachment.patch>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: interdiff.txt
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090105/24b60fec/attachment.txt>
More information about the llvm-commits
mailing list