On Thu, Jan 29, 2015 at 11:20 PM, Tom de Vries <tom_devr...@mentor.com> wrote:
> On 29-01-15 18:25, Jakub Jelinek wrote:
>>
>> The stdarg pass can't grok too heavy optimizations, so if at all possible,
>> don't schedule such passes early, and if you for some reason do, avoid
>> optimizing in there the va_list related accesses.
>
>
> This patch work for the example.
>
> In pass_lim1, I get:
> ...
> ;; Function gen_rtvec (gen_rtvec, funcdef_no=1, decl_uid=1841, cgraph_uid=1,
> symbol_order=1)
>
> va_list_related_stmt_p: no simple_mem_ref
> _15 = p.gp_offset;
> va_list_related_stmt_p: no simple_mem_ref
> _16 = p.reg_save_area;
> va_list_related_stmt_p: no simple_mem_ref
> p.gp_offset = _21;
> va_list_related_stmt_p: no simple_mem_ref
> _23 = p.overflow_arg_area;
> va_list_related_stmt_p: no simple_mem_ref
> p.overflow_arg_area = _25;
> va_list_related_stmt_p: MOVE_IMPOSSIBLE
> _15 = p.gp_offset;
> va_list_related_stmt_p: MOVE_IMPOSSIBLE
> _16 = p.reg_save_area;
> va_list_related_stmt_p: MOVE_IMPOSSIBLE
> _23 = p.overflow_arg_area;
> gen_rtvec (int n)
> ...

I don't like adding more hacks to aid the stdarg pass.  It's not required
for GCC 5 anyway and for GCC 6 we should push the lowering change.
Maybe you want to pick up the work?

Thanks,
Richard.

> Thanks,
> - Tom

Reply via email to