[llvm] r182274 - [SystemZ] Add long branch pass
Rafael EspĂndola
rafael.espindola at gmail.com
Tue May 21 12:14:52 PDT 2013
>> Just out of curiosity, do you know why the z assembler was designed
>> like this? The assembler has to know the exact size of what it is
>> emitting, so pushing down computations that require knowledge of the
>> exact size normally don't complicate it too much and simplify the
>> compiler.
>
> I don't know, sorry. But we'd still need to do this for the reason
> given in (2).
NP. Just compatibility with the system assembler is more than enough
justification to have this. I was just curious why it was done that
way.
>> A quick comment on the algorithm, on x86 at least, I don't think what
>> you call the worst case would work in all cases:
>>
>> ....inst1...label..align..inst2...
>>
>> Relaxing inst1 will change its size. If align is just right to absorb
>> the change, label is moved closer to inst2, which might now be in
>> range. If in the end we decide to not relax inst1, we will have to
>> relax inst2.
>
> You're right of course. I'd even accounted for this in an earlier
> version, then somehow convinced myself it wasn't necessary :-(
> Will fix.
Thanks!
Cheers,
Rafael
More information about the llvm-commits
mailing list