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] [tuples] some aux functions


>  I see.  So in theory we could just add two new predicate codes
>  'TRUE' and 'FALSE', which regardless of LHS or RHS evaluate
>  to true or false.
>
>  Of course using 0 == 0 and 1 == 0 (or similar) would do also, though
>  that raises the question of what is the canonical form.  Is there
>  a gimple_set_cond_predicate() that accepts a tree (thus a result
>  from fold) that might be a simple 1 or 0?

My personal preference would be to not add these predicates. We would
have to check everywhere that they are being used instead of 1 == 1
for example.

Down the road we could declare one form as being canonical (1 == 1 for
example), and add checks to make sure it is the only one used. For now
I think it is best to just accept all "trivial" ones.


>  Richard.
>


Cheers,
-- 
Rafael Avila de Espindola

Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland

Registered in Dublin, Ireland
Registration Number: 368047


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