This is the mail archive of the 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: [PATCH, ira] Miss checks in split_live_ranges_for_shrink_wrap

On 08/13/14 20:55, Zhenqiang Chen wrote:

Function split_live_ranges_for_shrink_wrap has code

   if (!flag_shrink_wrap)
     return false;

But flag_shrink_wrap is TRUE by default when optimize > 0 even if the
port does not support shrink-wrap. To make sure shrink-wrap is
enabled, "HAVE_simple_return" must be defined and "HAVE_simple_return"
must be TRUE.

Please refer function.c and shrink-wrap.c on how shrink-wrap is
enabled in thread_prologue_and_epilogue_insns.

To make the check easy, the patch defines a MICRO:
SUPPORT_SHRINK_WRAP_P and replace the uses in ira.c and ifcvt.c

Bootstrap and no make check regression on X86-64.

OK for trunk?


2014-08-14  Zhenqiang Chen  <>

         * shrink-wrap.h: #define SUPPORT_SHRINK_WRAP_P.
         * ira.c: #include "shrink-wrap.h"
         (split_live_ranges_for_shrink_wrap): Use SUPPORT_SHRINK_WRAP_P.
         * ifcvt.c: #include "shrink-wrap.h"
         (dead_or_predicable): Use SUPPORT_SHRINK_WRAP_P.
So what's the motivation behind this patch? I can probably guess the motivation, but I might guess wrong. Since you know the motivation, it's best if you just tell everyone what it is.

2014-08-14  Zhenqiang Chen  <>

         * New test.
Testcase wasn't included in the patchkit.

From a pure bikeshedding standpoint "SUPPORT_SHRINK_WRAP_P" seems poorly named. SHRINK_WRAPPING_ENABLED seems like a better name to me.

Can you repost with the testcase included, name change and basic rationale behind why you want to make this change. I'm pretty sure it'll be OK at that point.


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