[ 
https://issues.apache.org/jira/browse/HADOOP-9707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13702563#comment-13702563
 ] 

Kihwal Lee commented on HADOOP-9707:
------------------------------------

The clobber lists are actually okay. Your change is to the templates. It 
affects register allocation, but not in this case because of the nature of the 
instruction. I don't think it has anything to do with correctness.  At the 
RTL-level and in the binary, I see the two pieces of generated code are 
identical, but there are extra information in RTL.  If code was written in a 
way that the link between source and assembly code is confusing, this can be 
helpful. But it still does not affect the actual code being executed.

Without turning the compiler optimization on, the input and output variables 
are copied in and out inside the loop, which starves the pipeline. Even in this 
case, all outputs are copied out because the template specifies all of them.

The patch is okay. I am curious whether you have seen any cases in which it 
breaks.
                
> Fix register lists for crc32c inline assembly
> ---------------------------------------------
>
>                 Key: HADOOP-9707
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9707
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: util
>    Affects Versions: 3.0.0, 2.1.0-beta
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Minor
>         Attachments: hadoop-9707.txt
>
>
> The inline assembly used for the crc32 instructions has an incorrect clobber 
> list: the computed CRC values are "in-out" variables and thus need to use the 
> "matching constraint" syntax in the clobber list.
> This doesn't seem to cause a problem now in Hadoop, but may break in a 
> different compiler version which allocates registers differently, or may 
> break when the same code is used in another context.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to