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]

[wwwdocs] Add beginners project


This adds a project to use predicates where possible, as discussed
last month on gcc@.  OK?


Index: projects/beginner.html
RCS file: /cvs/gcc/wwwdocs/htdocs/projects/beginner.html,v
retrieving revision 1.46
diff -c -3 -p -r1.46 beginner.html
*** projects/beginner.html	4 Feb 2004 07:40:30 -0000	1.46
--- projects/beginner.html	10 Jun 2004 11:24:14 -0000
*************** the last millennium, and investigate.  A
*** 310,315 ****
--- 310,333 ----
  and patch them.</p>
+ <li>Use predicates for RTL objects more
+ <p>GCC has simple predicates to see if a given <code>rtx</code> is of some
+ specific class.  These predicates simply look at the <code>rtx_code</code>
+ of the given RTL object and return nonzero if the predicate is true.  For
+ For example, if an <code>rtx</code> represents a register, then
+ <code>REG_P (rtx)</code> is nonzero.</p>
+ <p>Unfortunately, lots of code in the middle end and in the backends does
+ not use these predicates and instead compare the <code>rtx_code</code>
+ in place: <code>(GET_CODE (rtx) == REG)</code>.  Find all the places where
+ such comparisons can be replaced with a predicate.  Also, for many common
+ comparisons there is no predicate yet.  See which ones are worth having
+ a predicate for, and add them.  For a few examples, have a look at <a
+ href="";>this</a> message
+ in the mailing list archives.</p>
+ </li>
  <li>Disentangle the current web of header-header interdependencies.
  <p>This is a major undertaking, and you should be able to deal with

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