Commit 909b0b60 authored by John van Groningen's avatar John van Groningen

allow -generic_fusion argument, add bit to .comp directive indicating whether it was passed

parent a0b1281e
...@@ -128,6 +128,7 @@ Bool CallCompiler (int argc, char **argv) ...@@ -128,6 +128,7 @@ Bool CallCompiler (int argc, char **argv)
DoTimeProfiling=False; DoTimeProfiling=False;
DoReuseUniqueNodes=False; DoReuseUniqueNodes=False;
DoFusion=False; DoFusion=False;
DoGenericFusion=False;
DoDescriptors=False; DoDescriptors=False;
ExportLocalLabels=False; ExportLocalLabels=False;
AddStrictnessToExportedFunctionTypes=False; AddStrictnessToExportedFunctionTypes=False;
...@@ -192,6 +193,8 @@ Bool CallCompiler (int argc, char **argv) ...@@ -192,6 +193,8 @@ Bool CallCompiler (int argc, char **argv)
ExportLocalLabels=True; ExportLocalLabels=True;
else if (strcmp (argv_i,"-fusion") == 0) else if (strcmp (argv_i,"-fusion") == 0)
DoFusion=True; DoFusion=True;
else if (strcmp (argv_i,"-generic_fusion") == 0)
DoGenericFusion=True;
else if (strcmp (argv_i,"-seft") == 0) else if (strcmp (argv_i,"-seft") == 0)
AddStrictnessToExportedFunctionTypes=True; AddStrictnessToExportedFunctionTypes=True;
else if (strcmp (argv_i,"-dynamics") == 0) else if (strcmp (argv_i,"-dynamics") == 0)
......
...@@ -55,9 +55,10 @@ static void error_in_function (char *m) ...@@ -55,9 +55,10 @@ static void error_in_function (char *m)
#define N_DoFusion 9 #define N_DoFusion 9
#define N_Do64BitArch 10 #define N_Do64BitArch 10
#define N_Dynamics 11 #define N_Dynamics 11
#define N_DoGenericFusion 12
#define MINIMUM_N_OPTIONS 9 #define MINIMUM_N_OPTIONS 9
#define N_OPTIONS 12 #define N_OPTIONS 13
static void ConvertOptionsToString (char *optstring) static void ConvertOptionsToString (char *optstring)
{ {
...@@ -79,10 +80,11 @@ static void ConvertOptionsToString (char *optstring) ...@@ -79,10 +80,11 @@ static void ConvertOptionsToString (char *optstring)
optstring[N_DoWarning] = DoWarning ? '1' : '0'; optstring[N_DoWarning] = DoWarning ? '1' : '0';
optstring[N_System] = '0'; optstring[N_System] = '0';
if (DoFusion || ObjectSizes[RealObj]!=2 || Dynamics){ if (DoFusion || ObjectSizes[RealObj]!=2 || Dynamics || DoGenericFusion){
optstring[N_DoFusion] = DoFusion ? '1' : '0'; optstring[N_DoFusion] = DoFusion ? '1' : '0';
optstring[N_Do64BitArch] = ObjectSizes[RealObj]!=2 ? '1' : '0'; optstring[N_Do64BitArch] = ObjectSizes[RealObj]!=2 ? '1' : '0';
optstring[N_Dynamics] = Dynamics ? '1' : '0'; optstring[N_Dynamics] = Dynamics ? '1' : '0';
optstring[N_DoGenericFusion] = DoGenericFusion ? '1' : '0';
optstring[N_OPTIONS]='\0'; optstring[N_OPTIONS]='\0';
} else } else
optstring[MINIMUM_N_OPTIONS]='\0'; optstring[MINIMUM_N_OPTIONS]='\0';
......
...@@ -31,6 +31,7 @@ Bool DoTimeProfiling=False; ...@@ -31,6 +31,7 @@ Bool DoTimeProfiling=False;
Bool DoReuseUniqueNodes = False; Bool DoReuseUniqueNodes = False;
Bool DoFusion = False; Bool DoFusion = False;
Bool DoGenericFusion = False;
Bool OptimizeLazyTupleRecursion=False; Bool OptimizeLazyTupleRecursion=False;
Bool OptimizeTailCallModuloCons=True; Bool OptimizeTailCallModuloCons=True;
......
...@@ -29,6 +29,7 @@ extern Bool DoTimeProfiling; ...@@ -29,6 +29,7 @@ extern Bool DoTimeProfiling;
extern Bool DoReuseUniqueNodes; extern Bool DoReuseUniqueNodes;
extern Bool DoFusion; extern Bool DoFusion;
extern Bool DoGenericFusion;
extern Bool OptimizeLazyTupleRecursion; extern Bool OptimizeLazyTupleRecursion;
extern Bool OptimizeTailCallModuloCons; extern Bool OptimizeTailCallModuloCons;
extern Bool WriteModificationTimes; extern Bool WriteModificationTimes;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment