This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[wwwdocs] Add beginners project
- From: Steven Bosscher <stevenb at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Jun 2004 13:25:49 +0200
- Subject: [wwwdocs] Add beginners project
- Organization: SUSE Labs
Hi,
This adds a project to use predicates where possible, as discussed
last month on gcc@. OK?
Gr.
Steven
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>
+ <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="http://gcc.gnu.org/ml/gcc/2004-05/msg00447.html">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