Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
17
Issues
17
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
clean-compiler-and-rts
compiler
Commits
e5b6ff65
Commit
e5b6ff65
authored
Oct 28, 2005
by
John van Groningen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add -fusion flag
parent
17a55edb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
31 deletions
+19
-31
backendC/CleanCompilerSources/cocl.c
backendC/CleanCompilerSources/cocl.c
+3
-0
backendC/CleanCompilerSources/instructions.c
backendC/CleanCompilerSources/instructions.c
+13
-10
backendC/CleanCompilerSources/settings.c
backendC/CleanCompilerSources/settings.c
+1
-0
backendC/CleanCompilerSources/settings.h
backendC/CleanCompilerSources/settings.h
+1
-0
backendC/CleanCompilerSources/system.h
backendC/CleanCompilerSources/system.h
+0
-1
backendC/CleanCompilerSources/types.t
backendC/CleanCompilerSources/types.t
+1
-20
No files found.
backendC/CleanCompilerSources/cocl.c
View file @
e5b6ff65
...
...
@@ -151,6 +151,7 @@ Bool CallCompiler (int argc, char **argv)
DoProfiling
=
False
;
DoTimeProfiling
=
False
;
DoReuseUniqueNodes
=
False
;
DoFusion
=
False
;
DoDescriptors
=
False
;
ExportLocalLabels
=
False
;
...
...
@@ -221,6 +222,8 @@ Bool CallCompiler (int argc, char **argv)
DoDescriptors
=
True
;
else
if
(
strcmp
(
argv_i
,
"-exl"
)
==
0
)
ExportLocalLabels
=
True
;
else
if
(
strcmp
(
argv_i
,
"-fusion"
)
==
0
)
DoFusion
=
True
;
else
if
(
strncmp
(
argv_i
,
"-sa"
,
3
)
==
0
){
if
(
!
SetStrictOption
(
argv
[
i
]
+
3
)){
CmdError
(
"unknown flag %s"
,
argv
[
i
]);
...
...
backendC/CleanCompilerSources/instructions.c
View file @
e5b6ff65
...
...
@@ -54,8 +54,12 @@ static void error_in_function (char *m)
*/
#define N_DoWarning 7
#define N_System 8
#define N_DoFusion 9
static
void
ConvertOptionsToString
(
CompilerOptions
options
,
char
*
optstring
)
#define MINIMUM_N_OPTIONS 9
#define N_OPTIONS 10
static
void
ConvertOptionsToString
(
char
*
optstring
)
{
optstring
[
N_DoDebug
]
=
DoDebug
?
'1'
:
'0'
;
optstring
[
N_DoReuseUniqueNodes
]
=
!
DoReuseUniqueNodes
?
'1'
:
'0'
;
...
...
@@ -74,7 +78,11 @@ static void ConvertOptionsToString (CompilerOptions options,char *optstring)
*/
optstring
[
N_DoWarning
]
=
DoWarning
?
'1'
:
'0'
;
optstring
[
N_System
]
=
'0'
;
optstring
[
NR_OPTIONS
]
=
'\0'
;
if
(
DoFusion
){
optstring
[
N_DoFusion
]
=
'1'
;
optstring
[
N_OPTIONS
]
=
'\0'
;
}
else
optstring
[
MINIMUM_N_OPTIONS
]
=
'\0'
;
}
#define D_PREFIX "d"
...
...
@@ -681,7 +689,6 @@ static void put_instruction_code (int instruction_code)
#define Dmodule "module"
#define Ddepend "depend"
#define Dcomp "comp"
#define Dcode "code"
#define Dstart "start"
#define Dstring "string"
#define Dcaf "caf"
...
...
@@ -763,7 +770,7 @@ void FillBasicFromB (ObjectKind kind, int boffs, int aoffs, FillKind fkind)
put_arguments_nn_b
(
boffs
,
aoffs
);
TreatWaitListAfterFill
(
aoffs
,
fkind
);
}
void
BuildBasic
(
ObjectKind
obj
,
SymbValue
val
)
{
switch
(
obj
){
...
...
@@ -3364,22 +3371,18 @@ void GenSelectorDescriptor (Label sellab,char *g_pref)
void
InitFileInfo
(
ImpMod
imod
)
{
char
option_string
[
NR_OPTIONS
+
1
];
CompilerOptions
opts
;
char
option_string
[
N_OPTIONS
+
1
];
SymbDef
start_sdef
;
start_sdef
=
imod
->
im_start
;
ConvertOptionsToString
(
opt
s
,
opt
ion_string
);
ConvertOptionsToString
(
option_string
);
if
(
imod
->
im_def_module
!=
NULL
&&
imod
->
im_def_module
->
dm_system_module
)
option_string
[
N_System
]
=
'1'
;
put_first_directive_
(
Dcomp
);
FPrintF
(
OutFile
,
"%d %s"
,
VERSION
,
option_string
);
put_directive_
(
Dcode
);
FPrintF
(
OutFile
,
"%7ld %7ld %7ld"
,
(
long
)
0
,
(
long
)
0
,
(
long
)
0
);
put_directive_
(
Dstart
);
if
(
start_sdef
!=
NULL
){
...
...
backendC/CleanCompilerSources/settings.c
View file @
e5b6ff65
...
...
@@ -28,6 +28,7 @@ Bool DoProfiling=False; /* no longer used by memory profiler */
Bool
DoTimeProfiling
=
False
;
Bool
DoReuseUniqueNodes
=
False
;
Bool
DoFusion
=
False
;
Bool
OptimizeLazyTupleRecursion
=
False
;
Bool
OptimizeTailCallModuloCons
=
True
;
...
...
backendC/CleanCompilerSources/settings.h
View file @
e5b6ff65
...
...
@@ -27,6 +27,7 @@ extern Bool DoProfiling;
extern
Bool
DoTimeProfiling
;
extern
Bool
DoReuseUniqueNodes
;
extern
Bool
DoFusion
;
extern
Bool
OptimizeLazyTupleRecursion
;
extern
Bool
OptimizeTailCallModuloCons
;
extern
Bool
WriteModificationTimes
;
...
...
backendC/CleanCompilerSources/system.h
View file @
e5b6ff65
...
...
@@ -70,7 +70,6 @@ extern FileTime FGetFileTime (char *fname, FileKind kind);
#if defined(WRITE_DCL_MODIFICATION_TIME) && WRITE_DCL_MODIFICATION_TIME
extern
void
FWriteFileTime
(
FileTime
file_time
,
File
f
);
#endif
extern
Bool
GetOptionsFromIclFile
(
char
*
fname
,
CompilerOptions
*
opts
);
#ifdef _VARARGS_
extern
void
DoError
(
char
*
fmt
,...);
...
...
backendC/CleanCompilerSources/types.t
View file @
e5b6ff65
...
...
@@ -13,7 +13,7 @@
#define NIL 0L
#define Null 0L
#define REALSIZE 2
#define REALSIZE 2
/*1*/
#define FILESIZE 2
#define KBYTE 1024L
...
...
@@ -45,25 +45,6 @@ typedef enum
typedef
unsigned
long
SysTime
;
#define NR_OPTIONS 9
typedef
struct
{
unsigned
opt_code:1
,
opt_debug:1
,
opt_inline:1
,
opt_listalltypes:1
,
opt_listtypes:1
,
opt_parallel:1
,
opt_stacklayout:1
,
opt_strictnessanalysis:1
,
opt_typecheck:1
,
opt_verbose:1
,
opt_warning:1
,
opt_system:1
,
opt_liststricttypes:1
;
}
CompilerOptions
;
#ifdef _WINDOWS_
# include <stdarg.h>
# define FileTime FILETIME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment