[llvm-commits] [PATCH] Teach IRBuilder about simplifying BinOp(Value, Constant)
Dan Gohman
gohman at apple.com
Sun Jan 4 16:41:37 PST 2009
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.
Thanks for your patience, and thanks for working on this!
Dan
More information about the llvm-commits
mailing list