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: [PATCH: PR target/41705] Enable if conversion for thumb1 by new HAVE_conditional_execution definition


On Sat, Oct 17, 2009 at 9:21 AM, Ian Lance Taylor <iant@google.com> wrote:
> Carrot Wei <carrot@google.com> writes:
>
>> Index: ifcvt.c
>> ===================================================================
>> --- ifcvt.c ? ? (revision 152888)
>> +++ ifcvt.c ? ? (working copy)
>> @@ -21,13 +21,13 @@
>> ?#include "config.h"
>> ?#include "system.h"
>> ?#include "coretypes.h"
>> +#include "insn-config.h"
>> ?#include "tm.h"
>>
>> ?#include "rtl.h"
>> ?#include "regs.h"
>> ?#include "function.h"
>> ?#include "flags.h"
>> -#include "insn-config.h"
>> ?#include "recog.h"
>> ?#include "except.h"
>> ?#include "hard-reg-set.h"
>
>
> No. ?The order of the main #includes is fairly canonical across gcc
> source files. ?Requiring one file to do things differently is certain
> to break over time.
>
> One thing you could do is have genconfig.c look for the predicate of
> define_cond_exec, and use it as the value of
> HAVE_conditional_execution. ?I don't know how well that would work.

Current method in genconfig.c is looking for COND_EXEC expression. I've
grepped several targets, there are several cases have cond_exec but no
define_cond_exec. So use define_cond_exec may change their behavior.

Can we change the output of genconfig.c to

#ifndef HAVE_conditional_execution
#define HAVE_conditional_execution 1
#endif

So we can use customized version of HAVE_conditional_execution defined
in the target specific header file if we want. Otherwise genconfig.c will
generate one according to the contents of md file.

>
> The quick solution would be to introduce a new target hook and change
> every place that checks HAVE_conditional_execution to check that.

I'm afraid simply replacing all HAVE_conditional_execution with new target hook
may break other targets have HAVE_conditional_execution enabled.


thanks
Carrot


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