2007/4/18, J.C. Pizarro <[EMAIL PROTECTED]> wrote:
Hello,

i've an idea to improve the report of -fdump-tree-XXXX using the HTML
format for its output.

I recommend XHTML-1.0 (26-Jan-2000) from http://www.w3.org/TR/xhtml1/

Note: HTML-4.01 (24-Dec-1999) from http://www.w3.org/TR/html401/
is very popular but very old and it's not XML-1.0 (16-Aug-2006) format
from http://www.w3.org/TR/xml/ implying that HTML-4.01 is hardful for
some parsers.

The proposal is instead of

gcc $CFLAGS -fdump-tree-ssa file.c
gcc $CFLAGS -fdump-tree-gimple file.c

to use the -html option for -fdump-tree-XXXX like so

gcc $CFLAGS -html -fdump-tree-ssa file.c
gcc $CFLAGS -html -fdump-tree-gimple file.c

and they will generate the files

file.c.tXX.ssa.html and file.c.tXX.gimple.html

instead of

file.c.tXX.ssa and file.c.tXX.gimple

Why? There are a good reason for ".ssa" principally.

1. To use "charset=utf-8" or &#number; from HTML for greek symbols.
2. Is better to use subscripted numbers than numbers.
3. There is a greek symbol for PHI-function
    ( e.g. # X_1 = PHI <X_4(0), X_15(1)>; )
4. Underlining or middlelining the instructions, operands or labels
    marked like dead by example.
5. Etc.

The visual representation in HTML is more effective for humans than
in text.

Sincerely, J.C. Pizarro :)


I've used
ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-20070416/gcc-core-4.1-20070416.tar.bz2
ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-20070416/gcc-g++-4.1-20070416.tar.bz2

In the attachment there is a quick&dirty alpha patch that i don't known
why the gcc compiler says "gcc: unrecognized option '-html'". ???
I don't known where to modify the gcc code to add an option.

The XHTML format to fputs is a little bad.

There are examples to test too.

The idea is to filter the output stream.

Bye, i'm not an expert, i'm a novice, i've not much time :s i'm busy

J.C. Pizarro

Attachment: gcc-4.1-20070416_pphtml_alpha.patch
Description: Binary data

Attachment: factorial.c
Description: Binary data

Attachment: run.sh
Description: Bourne shell script

Attachment: factorial.c.t26.ssa
Description: Binary data

Reply via email to