This is the mail archive of the gcc@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]

Re: rtl generation & predicates


> 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.




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