From: dtrg Date: Sat, 22 Jul 2006 12:31:19 +0000 (+0000) Subject: Added support for the top target peephole optimiser. X-Git-Tag: release-6-0-pre-1~96 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=304c0e21a018543923d9badd19faacdd619dd203;p=ack.git Added support for the top target peephole optimiser. --- diff --git a/mach/arm/pmfile b/mach/arm/pmfile index bb32e0905..a7dbafc16 100644 --- a/mach/arm/pmfile +++ b/mach/arm/pmfile @@ -10,6 +10,7 @@ mach_arm = group { proto_as, proto_ncg { ARCHDIR = "arm" }, + proto_top, tool_arm_cv, install = pm.install("%ROOTDIR%/lib/%ARCH%/descr", "%BINDIR%%PLATIND%/%ARCH%/descr") @@ -17,6 +18,9 @@ mach_arm = group { -- Revision history -- $Log$ --- Revision 1.1 2006-07-20 23:18:18 dtrg +-- Revision 1.2 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.1 2006/07/20 23:18:18 dtrg -- First version in CVS. -- diff --git a/mach/m68020/pmfile b/mach/m68020/pmfile index d4c7d099c..62bfbb856 100644 --- a/mach/m68020/pmfile +++ b/mach/m68020/pmfile @@ -8,6 +8,7 @@ mach_m68020 = group { proto_as, proto_ncg { ARCHDIR = "m68020" }, + proto_top, ego_descr, install = { @@ -17,7 +18,10 @@ mach_m68020 = group { -- Revision history -- $Log$ --- Revision 1.2 2006-07-22 00:52:01 dtrg +-- Revision 1.3 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.2 2006/07/22 00:52:01 dtrg -- Added support for the ego global optimisation suite. -- -- Revision 1.1 2006/07/20 23:18:18 dtrg diff --git a/mach/m68k2/pmfile b/mach/m68k2/pmfile index 9d3183571..30c0e5545 100644 --- a/mach/m68k2/pmfile +++ b/mach/m68k2/pmfile @@ -8,6 +8,7 @@ mach_m68k2 = group { proto_as, proto_ncg { ARCHDIR = "m68020" }, + proto_top, ego_descr, install = { @@ -18,7 +19,10 @@ mach_m68k2 = group { -- Revision history -- $Log$ --- Revision 1.2 2006-07-22 00:52:01 dtrg +-- Revision 1.3 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.2 2006/07/22 00:52:01 dtrg -- Added support for the ego global optimisation suite. -- -- Revision 1.1 2006/07/20 23:18:18 dtrg diff --git a/mach/pdp/pmfile b/mach/pdp/pmfile index 55adba72e..65cfc62f7 100644 --- a/mach/pdp/pmfile +++ b/mach/pdp/pmfile @@ -9,6 +9,7 @@ mach_pdp = group { proto_as, proto_cg, proto_ncg { ARCHDIR = "pdp" }, + proto_top, ego_descr, install = { @@ -18,7 +19,10 @@ mach_pdp = group { -- Revision history -- $Log$ --- Revision 1.2 2006-07-22 00:52:01 dtrg +-- Revision 1.3 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.2 2006/07/22 00:52:01 dtrg -- Added support for the ego global optimisation suite. -- -- Revision 1.1 2006/07/20 23:18:19 dtrg diff --git a/mach/proto/pmfile b/mach/proto/pmfile index ba5ef9624..9ae89d391 100644 --- a/mach/proto/pmfile +++ b/mach/proto/pmfile @@ -6,9 +6,13 @@ local d = ROOTDIR.."mach/proto/" include (d.."as/pmfile") include (d.."cg/pmfile") include (d.."ncg/pmfile") +include (d.."top/pmfile") -- Revision history -- $Log$ --- Revision 1.1 2006-07-20 23:18:18 dtrg +-- Revision 1.2 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.1 2006/07/20 23:18:18 dtrg -- First version in CVS. -- diff --git a/mach/proto/top/pmfile b/mach/proto/top/pmfile new file mode 100644 index 000000000..1fe0405a5 --- /dev/null +++ b/mach/proto/top/pmfile @@ -0,0 +1,41 @@ +-- $Source$ +-- $State$ + +local d = ROOTDIR.."mach/proto/top/" + +local make_tables = topgen { + file (ROOTDIR.."mach/%ARCH%/top/table") +} + +local cfile_with_tables = cfile { + class = "cfile_with_tables", + dynamicheaders = { + make_tables, + } +} + +proto_top = cprogram { + CINCLUDES = { + PARENT, + "-Imach/%ARCH%/ncg", + "-Imach", + "-I"..d + }, + + cfile_with_tables (d.."queue.c"), + cfile_with_tables (d.."top.c"), + + lib_string, + + outputs = {"%U%/%ARCH%-top"}, + install = pm.install("%BINDIR%%PLATDEP%/%ARCH%/top") +} + +-- Revision history +-- $Log$ +-- Revision 1.1 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.1 2006/07/20 23:18:18 dtrg +-- First version in CVS. +-- diff --git a/mach/vax4/pmfile b/mach/vax4/pmfile index 24ff9824c..55ac2a34f 100644 --- a/mach/vax4/pmfile +++ b/mach/vax4/pmfile @@ -8,6 +8,7 @@ mach_vax4 = group { proto_as, proto_cg, + proto_top, ego_descr, install = { @@ -17,7 +18,10 @@ mach_vax4 = group { -- Revision history -- $Log$ --- Revision 1.2 2006-07-22 00:52:01 dtrg +-- Revision 1.3 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.2 2006/07/22 00:52:01 dtrg -- Added support for the ego global optimisation suite. -- -- Revision 1.1 2006/07/20 23:18:18 dtrg diff --git a/pmfile b/pmfile index 88c7bdce1..e8cdad566 100644 --- a/pmfile +++ b/pmfile @@ -43,6 +43,7 @@ include "util/ceg/pmfile" include "util/misc/pmfile" include "util/opt/pmfile" include "util/ego/pmfile" +include "util/topgen/pmfile" include "lang/cem/cemcom/pmfile" include "lang/cem/cemcom.ansi/pmfile" @@ -99,6 +100,7 @@ default = group { tool_em_encode, tool_opt, tool_ego, + tool_topgen, lang_cem_cemcom, lang_cem_cemcom_ansi, @@ -154,7 +156,10 @@ configure = simple { -- Revision history -- $Log$ --- Revision 1.3 2006-07-22 00:52:01 dtrg +-- Revision 1.4 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.3 2006/07/22 00:52:01 dtrg -- Added support for the ego global optimisation suite. -- -- Revision 1.2 2006/07/20 23:24:42 dtrg diff --git a/util/topgen/pmfile b/util/topgen/pmfile new file mode 100644 index 000000000..e48383e4d --- /dev/null +++ b/util/topgen/pmfile @@ -0,0 +1,56 @@ +-- $Source$ +-- $State$ + +local d = ROOTDIR.."util/topgen/" + +local lpars = LLgen { + file (d.."topgen.g") +} + +local cfile_with_headers = cfile { + class = "cfile_with_headers", + dynamicheaders = { + file (d), + lpars + } +} + +tool_topgen = cprogram { + cfile_with_headers (d.."LLlex.c"), + cfile_with_headers (d.."hash.c"), + cfile_with_headers (d.."main.c"), + cfile_with_headers (d.."pattern.c"), + cfile_with_headers (d.."symtab.c"), + + foreach { + rule = cfile_with_headers, + ith { lpars, from=2 } + }, + + lib_assert, + lib_print, + lib_alloc, + lib_system, + lib_string, + + outputs = {"%U%/topgen"}, + install = pm.install("%TOOLDIR%topgen") +} + +topgen = simple { + class = "topgen", + + outputs = {"%U%/gen.c"}, + command = { + "mkdir -p %out[1]:dirname%", + "cd %out[1]:dirname% && %TOOLDIR%topgen %in[1]%" + }, +} + +-- Revision history +-- $Log$ +-- Revision 1.1 2006-07-22 12:31:19 dtrg +-- Added support for the top target peephole optimiser. +-- +-- Revision 1.1 2006/07/20 23:24:28 dtrg +-- First version in CVS.