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]

Re: [RFC] Contributing tree-ssa to mainline

On Sat, 17 Jan 2004, Daniel Berlin wrote:

> As Diego stated when SRA was committed, the following limitation exists:
> /* Maximum number of fields that a structure should have to be 
> scalarized.
>     FIXME  This limit has been arbitrarily set to 5.  Experiment to find 
> a
>      sensible setting.  */

Before the merge to mainline, please at least change hardcoded parameters
like this to use --param (which does make experimenting with different
values easier).  I've understood ever since Mark added that option
<> that using it
was the convention, it just hasn't been documented as such.  OK to commit
the following web page patch?  (The beginner.html patch is because it
seems no-one ever took up my suggestion in that thread to add converting
existing parameters to the projects list, and I don't think they've all
been done.  Adding comments to parameters that for whatever reason
shouldn't be converted to --param, saying so, would be useful.)

Index: codingconventions.html
RCS file: /cvs/gcc/wwwdocs/htdocs/codingconventions.html,v
retrieving revision 1.30
diff -u -r1.30 codingconventions.html
--- codingconventions.html	11 Oct 2003 14:02:53 -0000	1.30
+++ codingconventions.html	17 Jan 2004 17:00:49 -0000
@@ -23,7 +23,8 @@
-  <li>All command-line options must be documented in the GCC manual.</li>
+  <li>All command-line options (including all <code>--param</code>
+  arguments) must be documented in the GCC manual.</li>
   <li>Any change to documented behavior (for example, the behavior of
   a command-line option or a GNU language extension) must include the
@@ -184,6 +185,9 @@
 against <code>error_mark_node</code> rather than by comparing the
 <code>TREE_CODE</code> against <code>ERROR_MARK</code>; see <a
+<p>Internal numeric parameters that may affect generated code should
+be controlled by <code>--param</code> rather than being hardcoded.</p>
 <h2>Spelling, terminology and markup</h2>
Index: projects/beginner.html
RCS file: /cvs/gcc/wwwdocs/htdocs/projects/beginner.html,v
retrieving revision 1.43
diff -u -r1.43 beginner.html
--- projects/beginner.html	3 Jan 2004 19:15:42 -0000	1.43
+++ projects/beginner.html	17 Jan 2004 17:00:49 -0000
@@ -414,6 +414,10 @@
 href="../codingconventions.html">GCC coding conventions</a>
+<li>Change code to follow the coding conventions in other ways.  For
+example, change arbitrary hardcoded parameters to use the
+<code>--param</code> mechanism.</li>
 <h2>Port cleanliness</h2>

Joseph S. Myers

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