On 21/10/16 09:55, Andre Vieira (lists) wrote:
> On 06/10/16 14:57, Andre Vieira (lists) wrote:
>> Hello,
>>
>> This patch tackles the issue reported in PR71607. This patch takes a
>> different approach for disabling the creation of literal pools. Instead
>> of disabling the patterns that would normally transform the rtl into
>> actual literal pools, it disables the creation of this literal pool rtl
>> by making the target hook TARGET_CANNOT_FORCE_CONST_MEM return true if
>> arm_disable_literal_pool is true. I added patterns to split floating
>> point constants for both SF and DFmode. A pattern to handle the
>> addressing of label_refs had to be included as well since all
>> "memory_operand" patterns are disabled when
>> TARGET_CANNOT_FORCE_CONST_MEM returns true. Also the pattern for
>> splitting 32-bit immediates had to be changed, it was not accepting
>> unsigned 32-bit unsigned integers with the MSB set. I believe
>> const_int_operand expects the mode of the operand to be set to VOIDmode
>> and not SImode. I have only changed it in the patterns that were
>> affecting this code, though I suggest looking into changing it in the
>> rest of the ARM backend.
>>
>> I added more test cases. No regressions for arm-none-eabi with
>> Cortex-M0, Cortex-M3 and Cortex-M7.
>>
>> Is this OK for trunk?
>>
>> Cheers,
>> Andre
>>
>> gcc/ChangeLog:
>>
>> 2016-10-06 Andre Vieira <andre.simoesdiasvie...@arm.com>
>>
>> PR target/71607
>> * config/arm/arm.md (use_literal_pool): Remove.
>> (64-bit immediate split): No longer take cost into consideration
>> if 'arm_disable_literal_pool' is enabled.
>> (32-bit const split): Remove SImode from constant, which was
>> not allowing large unsigned integers to be split.
>> * config/arm/arm.c (thumb2_legitimate_address_p): Remove handling
>> of 'arm_disable_literal_pool' here.
>> (arm_max_const_double_inline_cost): Likewise.
>> (arm_cannot_force_const_mem): Return false for
>> 'arm_disable_literal_pool'.
>> (thumb2_legitimate_address_p): Remove check involving
>> 'arm_disable_literal_pool'
>> that is no longer relevant.
>> (arm_legitimate_constant_p): Ignore the outcome of
>> 'arm_cannot_force_const_mem'
>> if 'arm_disable_literal_pool' is enabled.
>> * config/arm/vfp.md (no_literal_pool_df_immediate): New.
>> (no_literal_pool_sf_immediate): New.
>> * config/arm/thumb2.md (*thumb2_movsi_labelref_insn): New.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2016-10-06 Andre Vieira <andre.simoesdiasvie...@arm.com>
>> Thomas Preud'homme <thomas.preudho...@arm.com>
>>
>> PR target/71607
>> * gcc.target/arm/thumb2-slow-flash-data.c: Rename to ...
>> * gcc.target/arm/thumb2-slow-flash-data-1.c: ... this.
>> * gcc.target/arm/thumb2-slow-flash-data-2.c: New.
>> * gcc.target/arm/thumb2-slow-flash-data-3.c: New.
>>
>>
> Ping.
>
Ping.