[llvm] r257875 - [InstCombine] Rewrite bswap/bitreverse handling completely.

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 09:33:46 PST 2016


This should have baked on the buildbots for a while now.

David, OK to merge?

On Fri, Jan 15, 2016 at 10:25 AM, James Molloy <James.Molloy at arm.com> wrote:
> Hi Hans,
>
> Yes, as long as David is happy please merge this, along with the followup that fixes msan.
>
> I was waiting for it to soak through the stage2 bots before suggesting it myself.
>
> James
>
>
>
>> On 15 Jan 2016, at 17:59, Hans Wennborg <hans at chromium.org> wrote:
>>
>> It was suggested that this be merged to 3.8. David, I think you're the
>> code owner here; OK for merge?
>>
>> On Fri, Jan 15, 2016 at 1:20 AM, James Molloy via llvm-commits
>> <llvm-commits at lists.llvm.org> wrote:
>>> Author: jamesm
>>> Date: Fri Jan 15 03:20:19 2016
>>> New Revision: 257875
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=257875&view=rev
>>> Log:
>>> [InstCombine] Rewrite bswap/bitreverse handling completely.
>>>
>>> There are several requirements that ended up with this design;
>>>  1. Matching bitreversals is too heavyweight for InstCombine and doesn't really need to be done so early.
>>>  2. Bitreversals and byteswaps are very related in their matching logic.
>>>  3. We want to implement support for matching more advanced bswap/bitreverse patterns like partial bswaps/bitreverses.
>>>  4. Bswaps are best matched early in InstCombine.
>>>
>>> The result of these is that a new utility function is created in Transforms/Utils/Local.h that can be configured to search for bswaps, bitreverses or both. InstCombine uses it to find only bswaps, CGP uses it to find only bitreversals.
>>>
>>> We can then extend the matching logic in one place only.
>>
> IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
>


More information about the llvm-commits mailing list