This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: rtl generation & predicates
- To: Soubhik Bhattacharya <soubhik at cse dot iitk dot ac dot in>
- Subject: Re: rtl generation & predicates
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Fri, 23 Feb 2001 10:17:45 +0000
- cc: GCC Mailing List <gcc at gcc dot gnu dot org>, Richard dot Earnshaw at arm dot com
- Organization: ARM Ltd.
- Reply-To: Richard dot Earnshaw at arm dot com
> hi,
> can anybody give me an insight into the following matter?
> does GCC (version 2.8.1) check the predicate (given in a
> match_operand) when it constructs an insn at RTL Generation pass?
GCC 2.8.1 is now *very* old, if you are developing a new back-end, it
would be well worth considering using a newer version (or even working on
a snapshot of the development code (see http://gcc.gnu.org/)
>
> as far as my understanding goes, the document "Using and Porting GNU
> CC" (section: Machine Descriptions, subsection: RTL Template) says that
> predicates play no role in 'insn' construction. but...... with this i'm
> not able to explain the following experience of porting GCC to an
> arbitrary machine:
You've confused predicate with constraint. GCC does check the operands
against the predicates during RTL generation, it doesn't check the
operands against the constraints. As far as I can see, this is what the
documentation says:
People are often unclear on the difference between the constraint and the
predicate. The predicate helps decide whether a given insn matches the
pattern. The constraint plays no role in this decision; instead, it
controls various decisions in the case of an insn which does match.
R.