This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: one more version of the patch for PR61360


On 2014-10-02 7:31 AM, Markus Trippelsdorf wrote:
On 2014.10.02 at 09:17 +0200, Markus Trippelsdorf wrote:
On 2014.09.26 at 16:31 -0400, Vladimir Makarov wrote:
I guess we achieved the consensus about the following patch to fix PR61360

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61360

The patch was successfully bootstrapped and tested (w/wo
-march=amdfam10) on x86/x86-64.

Is it ok to commit to trunk?

I've tested your patch and unfortunately it doesn't work:

In file included from /var/tmp/moz-build-dir/js/src/shell/Unified_cpp_js_src_shell0.cpp:15:0:
/var/tmp/mozilla-central/js/src/shell/js.cpp: In function ‘void Process(JSContext*, JSObject*, const char*, bool)’:
/var/tmp/mozilla-central/js/src/shell/js.cpp:592:1: internal compiler error: in lra_update_insn_recog_data, at lra.c:1221
  }
  ^
0xa9d9ec lra_update_insn_recog_data(rtx_insn*)
         ../../gcc/gcc/lra.c:1220
0xab450f eliminate_regs_in_insn
         ../../gcc/gcc/lra-eliminations.c:1077
0xab450f process_insn_for_elimination
         ../../gcc/gcc/lra-eliminations.c:1344
0xab450f lra_eliminate(bool, bool)
         ../../gcc/gcc/lra-eliminations.c:1408
0xa9f2da lra(_IO_FILE*)
         ../../gcc/gcc/lra.c:2270
0xa5d659 do_reload
         ../../gcc/gcc/ira.c:5311
0xa5d659 execute
         ../../gcc/gcc/ira.c:5470

Testcase is attached:

  % g++ -c -march=amdfam10 -w -O2 js.ii
js.ii: In function ‘void RunFile(C)’:
js.ii:64:1: internal compiler error: in lra_update_insn_recog_data, at lra.c:1221


Thanks for reporting this, Marcus. The problem now is in optimize_function_for_size_p. It is false, when we define and cache enable attributes at early stages (instantation of virtual regs) and true later.

It is returning us to the same problem. I believe that we should not have enable attributes depending on optimization options or on the current running pass if we don't want the current solution in the trunk (with recog_init). Setting right value for optimize_function_for_size_p does not solve the problem as we can have different options for different functions in the same compilation file.

So minimal solution would be removing optimize_function_for_size_p from the attribute definition. But I guess we could remove all condition. Unfortunately, Ganesh did not post is it really beneficial to switch off this alternative for AMD CPUs even if AMD optimization guide recommends it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]