[llvm] r222897 - Commit back the correct bits of r222760 (was r222538).

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Nov 27 13:44:31 PST 2014


On 27 November 2014 at 16:27, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Thu, Nov 27, 2014 at 03:53:08PM -0500, Rafael EspĂ­ndola wrote:
>> >> Allow FDE references outside the +/-2GB range supported by PC relative
>> >> offsets for code models other than small/medium. For JIT application,
>> >> memory layout is less controlled and can result in truncations
>> >> otherwise.
>> >
>> > Except that this is wrong again. E.g. for llvm-mc, CodeModel::Default is
>> > always used. The original part of checking Small||Medium is correct --
>>
>> Not it wasn't, because:
>>
>> > those are the only code models that provide the 31bit/32bit limitation.
>> > The architectural issue here is that CodeModel::Default and
>> > CodeModel::JITDefault are only overwritten during codegen creation.
>> > Should they be attributes of the Target? Can they change with the ABI?
>>
>> As you point out, Default and JITDefault make it this far. I agree it
>> would be nice to map them to Small, Medium, Large or Kernel before
>> getting here and then this code can just assert that it has one of the
>> 4 known values.
>>
>> Before that mapping is implemented however, we cannot simply produce
>> the wrong result and change the tests.
>
> But your change reverts JIT to the old broken status.

It is common practice to revert a patch when they broke something.

Your patch broke mc and changed the tests. I have reverted it added
back the fix for when using the large code model. You are more than
welcome to debug why Default and JITDefault get this far, as that is
probably the correct way to fix the JIT issue you were seeing.

Cheers,
Rafael




More information about the llvm-commits mailing list