Commit c5ee04d0 authored by John van Groningen's avatar John van Groningen

add generic fusion project option

parent 2c254d15
...@@ -115,7 +115,7 @@ where ...@@ -115,7 +115,7 @@ where
// generic... // generic...
panesOptions = TabControl panesOptions = TabControl
( applicationPane ( applicationPane
:+: profilingPane :+: compilerPane
:+: diagnosticsPane :+: diagnosticsPane
:+: pathsPane ap pp paths False 200 lbpadId c1id r1id root_path :+: pathsPane ap pp paths False 200 lbpadId c1id r1id root_path
:+: linkerPane :+: linkerPane
...@@ -125,7 +125,7 @@ where ...@@ -125,7 +125,7 @@ where
) [ControlPos (Left,zero)] ) [ControlPos (Left,zero)]
panesDefaults = TabControl panesDefaults = TabControl
( applicationPane ( applicationPane
:+: profilingPane :+: compilerPane
:+: diagnosticsPane :+: diagnosticsPane
:+: linkerPane :+: linkerPane
) [ControlPos (Left,zero)] ) [ControlPos (Left,zero)]
...@@ -270,7 +270,7 @@ where ...@@ -270,7 +270,7 @@ where
:+: TextControl ("Executable produced as: "+++symexepath) [ControlId xpId,ControlPos (Left,zero):if actualProject [] [ControlHide]] :+: TextControl ("Executable produced as: "+++symexepath) [ControlId xpId,ControlPos (Left,zero):if actualProject [] [ControlHide]]
:+: ButtonControl "Set executable..." [ControlFunction setexe,ControlPos (Left,zero):if actualProject [] [ControlHide]] :+: ButtonControl "Set executable..." [ControlFunction setexe,ControlPos (Left,zero):if actualProject [] [ControlHide]]
) )
profilingPane = Pane "Profiling" compilerPane = Pane "Compiler"
( TextControl "Profiling Options" [] ( TextControl "Profiling Options" []
:+: RadioControl :+: RadioControl
[ ("Time Profile and Stack Trace",Nothing,noPS (\l->{l & ao = {l.ao & profiling = True, stack_traces = False}})) [ ("Time Profile and Stack Trace",Nothing,noPS (\l->{l & ao = {l.ao & profiling = True, stack_traces = False}}))
...@@ -294,6 +294,9 @@ where ...@@ -294,6 +294,9 @@ where
[("Dynamics",Nothing,toMark ao.dynamics,noPS (\l->{l & ao.dynamics = not l.ao.dynamics}))] [("Dynamics",Nothing,toMark ao.dynamics,noPS (\l->{l & ao.dynamics = not l.ao.dynamics}))]
(Columns 1) [ControlPos (Left,zero)] (Columns 1) [ControlPos (Left,zero)]
:+: TextControl "Code Generation Options" [ControlPos (Left,OffsetVector {vx=0,vy=10})] :+: TextControl "Code Generation Options" [ControlPos (Left,OffsetVector {vx=0,vy=10})]
:+: CheckControl
[("Generic Fusion",Nothing,toMark ao.generic_fusion,noPS (\l->{l & ao.generic_fusion = not l.ao.generic_fusion}))]
(Columns 1) [ControlPos (Left,zero)]
:+: CheckControl :+: CheckControl
[("Generate descriptors and export labels",Nothing,toMark ao.desc_exl,noPS (\l->{l & ao.desc_exl = not l.ao.desc_exl}))] [("Generate descriptors and export labels",Nothing,toMark ao.desc_exl,noPS (\l->{l & ao.desc_exl = not l.ao.desc_exl}))]
(Columns 1) [ControlPos (Left,zero)] (Columns 1) [ControlPos (Left,zero)]
...@@ -827,11 +830,24 @@ where ...@@ -827,11 +830,24 @@ where
, ("Reuse Unique Nodes",Nothing,toMark ini.reuseUniqueNodes,noPS (\l->{l & reuseUniqueNodes = not l.reuseUniqueNodes})) , ("Reuse Unique Nodes",Nothing,toMark ini.reuseUniqueNodes,noPS (\l->{l & reuseUniqueNodes = not l.reuseUniqueNodes}))
, ("Never Time Profile",Nothing,toMark ini.neverTimeProfile,noPS (\l->{l & neverTimeProfile = not l.neverTimeProfile})) , ("Never Time Profile",Nothing,toMark ini.neverTimeProfile,noPS (\l->{l & neverTimeProfile = not l.neverTimeProfile}))
// , ("Never Memory Profile",Nothing,toMark ini.neverMemoryProfile,noPS (\l->{l & neverMemoryProfile = not l.neverMemoryProfile})) // , ("Never Memory Profile",Nothing,toMark ini.neverMemoryProfile,noPS (\l->{l & neverMemoryProfile = not l.neverMemoryProfile}))
, ("Fusion (Experimental)",Nothing,toMark ini.fusion,noPS (\l->{l & fusion = not l.fusion}))
] ]
(Columns 1) (Columns 1)
[ ControlPos (Left,zero) [ ControlPos (Left,zero)
] ]
:+: TextControl "Fusion" [ControlPos (Left,zero)]
:+: RadioControl
[ ("Default",Nothing,noPS (\l->{l & fusion = FusionDefault}))
, ("Off",Nothing,noPS (\l->{l & fusion = FusionOff}))
, ("On",Nothing,noPS (\l->{l & fusion = FusionOn}))
]
(Rows 1)
(case ini.fusion of
FusionDefault -> 1
FusionOff -> 2
FusionOn -> 3
)
[ ControlPos (Left,zero)
]
) )
[ControlPos (Left,zero)] [ControlPos (Left,zero)]
right = LayoutControl right = LayoutControl
......
...@@ -28,6 +28,7 @@ import PmCallBack ...@@ -28,6 +28,7 @@ import PmCallBack
pco_time_profiling :: !Bool, pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool, pco_desc_exl :: !Bool,
pco_dynamics :: !Bool, pco_dynamics :: !Bool,
pco_generic_fusion :: !Bool,
pco_link_dynamic :: !Bool pco_link_dynamic :: !Bool
} }
......
...@@ -84,7 +84,7 @@ Compile ...@@ -84,7 +84,7 @@ Compile
out_file_name = out_file_path temp_dir 0 out_file_name = out_file_path temp_dir 0
errors_file_name = errors_file_path temp_dir 0 errors_file_name = errors_file_path temp_dir 0
# cocl_arguments = compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co # cocl_arguments = compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths write_module_times project_compiler_options co
cocl_arguments = add_options_string_to_args 0 options2 cocl_arguments cocl_arguments = add_options_string_to_args 0 options2 cocl_arguments
cocl_arguments = add_options_string_to_args 0 options1 cocl_arguments cocl_arguments = add_options_string_to_args 0 options1 cocl_arguments
...@@ -119,7 +119,8 @@ CompilePersistent :: ...@@ -119,7 +119,8 @@ CompilePersistent ::
!(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !*CompilingInfo !*env !(List Pathname) !ProjectCompilerOptions !CompilerOptions !Pathname !*CompilingInfo !*env
-> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg)) -> (!*CompilingInfo,!(!*env, !Pathname, !CompilerMsg))
| FileEnv env | FileEnv env
CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax mdn paths project_compiler_options co=:{CompilerOptions | listTypes} CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax mdn paths project_compiler_options
co=:{CompilerOptions | listTypes}
startupdir compiling_info env startupdir compiling_info env
# (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir # (cocl,cocl_dir,options1,options2) = get_path_name_and_options2 cocl startupdir
...@@ -129,7 +130,7 @@ CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax md ...@@ -129,7 +130,7 @@ CompilePersistent cocl write_module_times errwin typewin compileOrCheckSyntax md
out_file_name = out_file_path temp_dir 0 out_file_name = out_file_path temp_dir 0
errors_file_name = errors_file_path temp_dir 0 errors_file_name = errors_file_path temp_dir 0
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co # args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options co
# args_string = concat_args args+++ # args_string = concat_args args+++
" "+++mdn.mdn_name+++ " "+++mdn.mdn_name+++
" -P "+++"\""+++concatenate_paths paths+++"\""+++ " -P "+++"\""+++concatenate_paths paths+++"\""+++
...@@ -188,7 +189,7 @@ CompileStartCommand cocl write_module_times errwin compileOrCheckSyntax path ...@@ -188,7 +189,7 @@ CompileStartCommand cocl write_module_times errwin compileOrCheckSyntax path
out_file_name = out_file_path temp_dir slot out_file_name = out_file_path temp_dir slot
errors_file_name = errors_file_path temp_dir slot errors_file_name = errors_file_path temp_dir slot
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options.pco_memory_profiling project_compiler_options.pco_time_profiling project_compiler_options.pco_link_dynamic co # args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options co
# args_string = concat_args args+++ # args_string = concat_args args+++
" "+++path+++ " "+++path+++
" -P "+++concatenate_paths paths+++ " -P "+++concatenate_paths paths+++
...@@ -734,20 +735,21 @@ add_options_string_to_args i s args ...@@ -734,20 +735,21 @@ add_options_string_to_args i s args
= skip_to_space_or_tab (i+1) s = skip_to_space_or_tab (i+1) s
= i = i
compiler_arguments :: !String !String !CompileOrCheckSyntax !Pathname !(List Pathname) !Bool !Bool !Bool !Bool !CompilerOptions -> [String] compiler_arguments :: !String !String !CompileOrCheckSyntax !Pathname !(List Pathname) !Bool !ProjectCompilerOptions !CompilerOptions -> [String]
compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths compiler_arguments out_file_name errors_file_name compileOrCheckSyntax path paths
write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co write_module_times project_compiler_options co
# args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times projectHeapProfiling projectTimeProfiling projectEagerOrDynamic co # args = makeCompilerOptionsArguments compileOrCheckSyntax write_module_times project_compiler_options co
= args ++ [path,"-P",concatenate_paths paths,"-RE",errors_file_name,"-RO",out_file_name]; = args ++ [path,"-P",concatenate_paths paths,"-RE",errors_file_name,"-RO",out_file_name];
concat_args [] = "" concat_args [] = ""
concat_args [arg] = arg concat_args [arg] = arg
concat_args [arg:args] = arg+++" "+++concat_args args concat_args [arg:args] = arg+++" "+++concat_args args
makeCompilerOptionsArguments :: !CompileOrCheckSyntax !Bool !Bool !Bool !Bool !CompilerOptions -> [String] makeCompilerOptionsArguments :: !CompileOrCheckSyntax !Bool !ProjectCompilerOptions !CompilerOptions -> [String]
makeCompilerOptionsArguments compileOrCheckSyntax write_module_times projectMemoryProfiling projectTimeProfiling projectEagerOrDynamic makeCompilerOptionsArguments compileOrCheckSyntax write_module_times
{neverMemoryProfile,neverTimeProfile,sa,gw,gc,listTypes,attr,reuseUniqueNodes,fusion} {pco_memory_profiling,pco_time_profiling,pco_desc_exl,pco_dynamics,pco_generic_fusion,pco_link_dynamic}
= write_module_times_arg ++ checksyntax ++ timeProfileSwitch ++ memoryProfileSwitch ++ dynamicLinkSwitch {neverMemoryProfile,neverTimeProfile,sa,gw,gc,listTypes,attr,reuseUniqueNodes,fusion}
= write_module_times_arg ++ checksyntax ++ timeProfileSwitch ++ memoryProfileSwitch ++ descExlSwitch ++ dynamicsSwitch
++ strictness ++ warnings ++ comments ++ listtypes ++ show_attr ++ reuse ++ fusion_arg ++ strictness ++ warnings ++ comments ++ listtypes ++ show_attr ++ reuse ++ fusion_arg
where where
write_module_times_arg write_module_times_arg
...@@ -755,18 +757,15 @@ where ...@@ -755,18 +757,15 @@ where
= ["-wmt"] = ["-wmt"]
= [] = []
memoryProfileSwitch memoryProfileSwitch
| (not neverMemoryProfile && projectMemoryProfiling) | (not neverMemoryProfile && pco_memory_profiling) || pco_desc_exl || pco_link_dynamic
|| projectEagerOrDynamic
= ["-desc"] = ["-desc"]
= [] = []
timeProfileSwitch timeProfileSwitch
| not neverTimeProfile && projectTimeProfiling | not neverTimeProfile && pco_time_profiling
= ["-pt"] = ["-pt"]
= [] = []
dynamicLinkSwitch descExlSwitch = if (pco_desc_exl || pco_link_dynamic) ["-exl"] []
| projectEagerOrDynamic dynamicsSwitch = if (pco_dynamics || pco_link_dynamic) ["-dynamics"] []
= ["-exl","-dynamics"]
= []
strictness strictness
| sa | sa
= [] = []
...@@ -800,9 +799,7 @@ where ...@@ -800,9 +799,7 @@ where
= ["-ou"] = ["-ou"]
= [] = []
fusion_arg fusion_arg
| fusion = case fusion of FusionOn -> ["-fusion"]; FusionDefault | pco_generic_fusion -> ["-generic_fusion]"; _ -> []
= ["-fusion"]
= []
make_code_generator_arguments genAsmOrCode {ci,cs} make_code_generator_arguments genAsmOrCode {ci,cs}
= checkindex++checkstack++genasm = checkindex++checkstack++genasm
......
...@@ -17,6 +17,7 @@ from PmDirCache import :: DirCache ...@@ -17,6 +17,7 @@ from PmDirCache import :: DirCache
, abcGenerateComments :: !Bool , abcGenerateComments :: !Bool
, abcReuseUniqueNodes :: !Bool , abcReuseUniqueNodes :: !Bool
, abcFusion :: !Bool , abcFusion :: !Bool
, abcGenericFusion :: !Bool
, abc64Bits :: !Bool , abc64Bits :: !Bool
, abcDynamics :: !Bool , abcDynamics :: !Bool
} }
......
...@@ -28,6 +28,7 @@ from StdLibMisc import :: Date{..}, :: Time{..} ...@@ -28,6 +28,7 @@ from StdLibMisc import :: Date{..}, :: Time{..}
, abcGenerateComments :: !Bool , abcGenerateComments :: !Bool
, abcReuseUniqueNodes :: !Bool , abcReuseUniqueNodes :: !Bool
, abcFusion :: !Bool , abcFusion :: !Bool
, abcGenericFusion :: !Bool
, abc64Bits :: !Bool , abc64Bits :: !Bool
, abcDynamics :: !Bool , abcDynamics :: !Bool
} }
...@@ -42,6 +43,7 @@ DefaultABCOptions = ...@@ -42,6 +43,7 @@ DefaultABCOptions =
, abcGenerateComments = False , abcGenerateComments = False
, abcReuseUniqueNodes = False , abcReuseUniqueNodes = False
, abcFusion = False , abcFusion = False
, abcGenericFusion = False
, abc64Bits = False , abc64Bits = False
, abcDynamics = False , abcDynamics = False
} }
...@@ -69,9 +71,10 @@ SystemMask :== 8; ...@@ -69,9 +71,10 @@ SystemMask :== 8;
FusionOffset :== 9; FusionOffset :== 9;
Abc64BitsOffset :==10; Abc64BitsOffset :==10;
DynamicsBitsOffset :==11; DynamicsBitsOffset :==11;
GenericFusionOffset :==12;
MinimumNrOfOptions :== 9; MinimumNrOfOptions :== 9;
NrOfOptions :== 12; NrOfOptions :== 13;
ParseABCInfoAndDependencies :: !Pathname !DATE !ABCCache !Files -> (!((!Bool, !Bool, !Int, !ABCOptions),(!List Modulename, !Maybe ModuleDate, !List ModuleDate, !List LinkObjFileName, !List LinkLibraryName),!ABCCache),!Files) ParseABCInfoAndDependencies :: !Pathname !DATE !ABCCache !Files -> (!((!Bool, !Bool, !Int, !ABCOptions),(!List Modulename, !Maybe ModuleDate, !List ModuleDate, !List LinkObjFileName, !List LinkLibraryName),!ABCCache),!Files)
ParseABCInfoAndDependencies path date abccache files ParseABCInfoAndDependencies path date abccache files
...@@ -160,6 +163,7 @@ StringToCompilerOptions start end opt ...@@ -160,6 +163,7 @@ StringToCompilerOptions start end opt
abcGenerateComments = opt .[start+DebugMask] == '1', abcGenerateComments = opt .[start+DebugMask] == '1',
abcReuseUniqueNodes = not (opt.[start+DontReuseUniqueNodesMask] == '1'), abcReuseUniqueNodes = not (opt.[start+DontReuseUniqueNodesMask] == '1'),
abcFusion = start+FusionOffset<end && opt.[start+FusionOffset]=='1', abcFusion = start+FusionOffset<end && opt.[start+FusionOffset]=='1',
abcGenericFusion = start+GenericFusionOffset<end && opt.[start+GenericFusionOffset]=='1',
abc64Bits = start+Abc64BitsOffset<end && opt.[start+Abc64BitsOffset]=='1', abc64Bits = start+Abc64BitsOffset<end && opt.[start+Abc64BitsOffset]=='1',
abcDynamics = start+DynamicsBitsOffset<end && opt.[start+DynamicsBitsOffset]=='1' abcDynamics = start+DynamicsBitsOffset<end && opt.[start+DynamicsBitsOffset]=='1'
}; };
......
...@@ -19,7 +19,9 @@ instance fromString ListTypes ...@@ -19,7 +19,9 @@ instance fromString ListTypes
, bv :: !Bool // be verbose , bv :: !Bool // be verbose
, gc :: !Bool // generate commented abc-code , gc :: !Bool // generate commented abc-code
, reuseUniqueNodes :: !Bool , reuseUniqueNodes :: !Bool
, fusion :: !Bool , fusion :: !FusionOptions
} }
:: FusionOptions = FusionDefault | FusionOff | FusionOn;
DefaultCompilerOptions :: CompilerOptions DefaultCompilerOptions :: CompilerOptions
...@@ -72,9 +72,11 @@ where ...@@ -72,9 +72,11 @@ where
, bv :: !Bool // be verbose , bv :: !Bool // be verbose
, gc :: !Bool // generate comments , gc :: !Bool // generate comments
, reuseUniqueNodes :: !Bool // reuse unique nodes , reuseUniqueNodes :: !Bool // reuse unique nodes
, fusion :: !Bool , fusion :: !FusionOptions
} }
:: FusionOptions = FusionDefault | FusionOff | FusionOn;
DefaultCompilerOptions :: CompilerOptions DefaultCompilerOptions :: CompilerOptions
DefaultCompilerOptions = DefaultCompilerOptions =
{ neverMemoryProfile = False { neverMemoryProfile = False
...@@ -86,6 +88,6 @@ DefaultCompilerOptions = ...@@ -86,6 +88,6 @@ DefaultCompilerOptions =
, bv = True , bv = True
, gc = False , gc = False
, reuseUniqueNodes = True , reuseUniqueNodes = True
, fusion = False , fusion = FusionDefault
} }
...@@ -1120,6 +1120,7 @@ UpdateDependencies force mdn rest compinfo dircache ds ps` ...@@ -1120,6 +1120,7 @@ UpdateDependencies force mdn rest compinfo dircache ds ps`
pco_time_profiling=ao.profiling, pco_time_profiling=ao.profiling,
pco_desc_exl=ao.desc_exl, pco_desc_exl=ao.desc_exl,
pco_dynamics=ao.dynamics, pco_dynamics=ao.dynamics,
pco_generic_fusion=ao.generic_fusion,
pco_link_dynamic=link_dynamic} pco_link_dynamic=link_dynamic}
# (okC,whyC) = check_module_options module_name info co project_compiler_options use_64_bit_processor version # (okC,whyC) = check_module_options module_name info co project_compiler_options use_64_bit_processor version
...@@ -1280,6 +1281,7 @@ CTPMcommon module_name project ps ...@@ -1280,6 +1281,7 @@ CTPMcommon module_name project ps
pco_time_profiling=ao.profiling, pco_time_profiling=ao.profiling,
pco_desc_exl=ao.desc_exl, pco_desc_exl=ao.desc_exl,
pco_dynamics=ao.dynamics, pco_dynamics=ao.dynamics,
pco_generic_fusion=ao.generic_fusion,
pco_link_dynamic=link_dynamic} pco_link_dynamic=link_dynamic}
= (True,ccstring,write_module_times,updateErrorWindow,typewin module_name,srcpaths,project_compiler_options,co,startupdir,ps) = (True,ccstring,write_module_times,updateErrorWindow,typewin module_name,srcpaths,project_compiler_options,co,startupdir,ps)
where where
...@@ -1434,8 +1436,10 @@ check_module_options modname info=:{version,abcOptions} co project_compiler_opti ...@@ -1434,8 +1436,10 @@ check_module_options modname info=:{version,abcOptions} co project_compiler_opti
= incorrect_option modname "Generate Comments" = incorrect_option modname "Generate Comments"
| abcOptions.abcReuseUniqueNodes <> expectedReuseUniqueNodes | abcOptions.abcReuseUniqueNodes <> expectedReuseUniqueNodes
= incorrect_option modname "Reuse Unique Nodes" = incorrect_option modname "Reuse Unique Nodes"
| abcOptions.abcFusion<>co.fusion | abcOptions.abcFusion<>case co.fusion of FusionOn -> True; _ -> False
= incorrect_option modname "Fusion" = incorrect_option modname "Fusion"
| abcOptions.abcGenericFusion<>case co.fusion of FusionDefault -> project_compiler_options.pco_generic_fusion; _ -> False
= incorrect_option modname "Generic Fusion"
| abcOptions.abcDynamics <> project_compiler_options.pco_dynamics | abcOptions.abcDynamics <> project_compiler_options.pco_dynamics
= incorrect_option modname "Dynamics" = incorrect_option modname "Dynamics"
= (True,"") = (True,"")
......
...@@ -266,6 +266,18 @@ where ...@@ -266,6 +266,18 @@ where
, showsync = True , showsync = True
*/ } */ }
instance toString FusionOptions
where
toString FusionDefault = "False"
toString FusionOn = "True"
toString FusionOff = "Off"
instance fromString FusionOptions
where
fromString "True" = FusionOn
fromString "Off" = FusionOff
fromString _ = FusionDefault
CompilerOptionsTable :: OptionsTable CompilerOptions CompilerOptionsTable :: OptionsTable CompilerOptions
CompilerOptionsTable = CompilerOptionsTable =
{ {
...@@ -303,6 +315,7 @@ ApplicationProfileOptionsTable = ...@@ -303,6 +315,7 @@ ApplicationProfileOptionsTable =
SimpleOption "Time" (\a->a.profiling) (\v a->{a & profiling=v}), SimpleOption "Time" (\a->a.profiling) (\v a->{a & profiling=v}),
SimpleOption "Stack" (\a->a.stack_traces) (\v a->{a & stack_traces=v}), SimpleOption "Stack" (\a->a.stack_traces) (\v a->{a & stack_traces=v}),
SimpleOption "Dynamics" (\a->a.dynamics) (\v a->{a & dynamics=v}), SimpleOption "Dynamics" (\a->a.dynamics) (\v a->{a & dynamics=v}),
SimpleOption "GenericFusion" (\a->a.generic_fusion) (\v a->{a & generic_fusion=v}),
SimpleOption "DescExL" (\a->a.desc_exl) (\v a->{a & desc_exl=v}) SimpleOption "DescExL" (\a->a.desc_exl) (\v a->{a & desc_exl=v})
} }
......
...@@ -304,6 +304,7 @@ eqAppOpts ao1 ao2 ...@@ -304,6 +304,7 @@ eqAppOpts ao1 ao2
ao1.memoryProfilingMinimumHeapSize == ao2.memoryProfilingMinimumHeapSize && ao1.memoryProfilingMinimumHeapSize == ao2.memoryProfilingMinimumHeapSize &&
ao1.profiling == ao2.profiling && ao1.profiling == ao2.profiling &&
ao1.stack_traces == ao2.stack_traces && ao1.stack_traces == ao2.stack_traces &&
ao1.generic_fusion == ao2.generic_fusion &&
ao1.dynamics == ao2.dynamics && ao1.dynamics == ao2.dynamics &&
ao1.desc_exl == ao2.desc_exl && ao1.desc_exl == ao2.desc_exl &&
ao1.standard_rte == ao2.standard_rte ao1.standard_rte == ao2.standard_rte
......
...@@ -129,6 +129,7 @@ DefCodeGenOptions :: CodeGenOptions ...@@ -129,6 +129,7 @@ DefCodeGenOptions :: CodeGenOptions
, profiling :: !Bool // time profiling , profiling :: !Bool // time profiling
, stack_traces :: !Bool // stack traces , stack_traces :: !Bool // stack traces
, dynamics :: !Bool , dynamics :: !Bool
, generic_fusion :: !Bool
, desc_exl :: !Bool , desc_exl :: !Bool
, standard_rte :: !Bool // DvA: use standard RTE (only in IDE) , standard_rte :: !Bool // DvA: use standard RTE (only in IDE)
} }
......
...@@ -319,7 +319,8 @@ DefCodeGenOptions = ...@@ -319,7 +319,8 @@ DefCodeGenOptions =
, profiling :: !Bool , profiling :: !Bool
, stack_traces :: !Bool , stack_traces :: !Bool
, dynamics :: !Bool , dynamics :: !Bool
, desc_exl :: !Bool , generic_fusion :: !Bool
, desc_exl :: !Bool
, standard_rte :: !Bool // DvA: use standard RTE (only in IDE) , standard_rte :: !Bool // DvA: use standard RTE (only in IDE)
} }
...@@ -345,6 +346,7 @@ DefApplicationOptions = ...@@ -345,6 +346,7 @@ DefApplicationOptions =
, profiling = False , profiling = False
, stack_traces = False , stack_traces = False
, dynamics = False , dynamics = False
, generic_fusion = False
, desc_exl = False , desc_exl = False
, standard_rte = True , standard_rte = True
} }
......
...@@ -29,6 +29,7 @@ import PmCallBack ...@@ -29,6 +29,7 @@ import PmCallBack
pco_time_profiling :: !Bool, pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool, pco_desc_exl :: !Bool,
pco_dynamics :: !Bool, pco_dynamics :: !Bool,
pco_generic_fusion :: !Bool,
pco_link_dynamic :: !Bool pco_link_dynamic :: !Bool
} }
......
...@@ -312,7 +312,6 @@ start_code_generator cgen wf path slot timeprofile cgo tp startupdir ps ...@@ -312,7 +312,6 @@ start_code_generator cgen wf path slot timeprofile cgo tp startupdir ps
# (cgen,cgendir,options) = get_path_name_and_options cgen startupdir # (cgen,cgendir,options) = get_path_name_and_options cgen startupdir
# path_without_suffix = RemoveSuffix path # path_without_suffix = RemoveSuffix path
# cg_arguments = make_code_generator_arguments CodeGeneration cgo # cg_arguments = make_code_generator_arguments CodeGeneration cgo
# obj_path = ModuleDirAndNameToObjSystemPathname tp path
# temp_dir = temp_dir_path startupdir # temp_dir = temp_dir_path startupdir
errors_file_name = errors_file_path temp_dir slot errors_file_name = errors_file_path temp_dir slot
...@@ -781,8 +780,9 @@ concat_args [arg] = arg ...@@ -781,8 +780,9 @@ concat_args [arg] = arg
concat_args [arg:args] = arg+++" "+++concat_args args concat_args [arg:args] = arg+++" "+++concat_args args
makeCompilerOptionsArguments :: !CompileOrCheckSyntax !Bool !ProjectCompilerOptions !CompilerOptions -> [String] makeCompilerOptionsArguments :: !CompileOrCheckSyntax !Bool !ProjectCompilerOptions !CompilerOptions -> [String]
makeCompilerOptionsArguments compileOrCheckSyntax write_module_times {pco_memory_profiling,pco_time_profiling,pco_desc_exl,pco_dynamics,pco_link_dynamic} makeCompilerOptionsArguments compileOrCheckSyntax write_module_times
{neverMemoryProfile,neverTimeProfile,sa,gw,gc,listTypes,attr,reuseUniqueNodes,fusion} {pco_memory_profiling,pco_time_profiling,pco_desc_exl,pco_dynamics,pco_generic_fusion,pco_link_dynamic}
{neverMemoryProfile,neverTimeProfile,sa,gw,gc,listTypes,attr,reuseUniqueNodes,fusion}
= write_module_times_arg ++ checksyntax ++ timeProfileSwitch ++ memoryProfileSwitch ++ descExlSwitch ++ dynamicsSwitch = write_module_times_arg ++ checksyntax ++ timeProfileSwitch ++ memoryProfileSwitch ++ descExlSwitch ++ dynamicsSwitch
++ strictness ++ warnings ++ comments ++ listtypes ++ show_attr ++ reuse ++ fusion_arg ++ strictness ++ warnings ++ comments ++ listtypes ++ show_attr ++ reuse ++ fusion_arg
where where
...@@ -833,9 +833,7 @@ where ...@@ -833,9 +833,7 @@ where
= ["-ou"] = ["-ou"]
= [] = []
fusion_arg fusion_arg
| fusion = case fusion of FusionOn -> ["-fusion"]; FusionDefault | pco_generic_fusion -> ["-generic_fusion]"; _ -> []
= ["-fusion"]
= []
make_code_generator_arguments genAsmOrCode {ci,cs} make_code_generator_arguments genAsmOrCode {ci,cs}
= checkindex++checkstack++genasm = checkindex++checkstack++genasm
......
...@@ -44,6 +44,7 @@ instance == CompilerMsg ...@@ -44,6 +44,7 @@ instance == CompilerMsg
pco_time_profiling :: !Bool, pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool, pco_desc_exl :: !Bool,
pco_dynamics :: !Bool, pco_dynamics :: !Bool,
pco_generic_fusion :: !Bool,
pco_link_dynamic :: !Bool pco_link_dynamic :: !Bool
} }
......
...@@ -166,6 +166,7 @@ where ...@@ -166,6 +166,7 @@ where
pco_time_profiling :: !Bool, pco_time_profiling :: !Bool,
pco_desc_exl :: !Bool, pco_desc_exl :: !Bool,
pco_dynamics :: !Bool, pco_dynamics :: !Bool,
pco_generic_fusion :: !Bool,
pco_link_dynamic :: !Bool pco_link_dynamic :: !Bool
} }
...@@ -459,8 +460,9 @@ ReadErrorAndWarningMessages file ...@@ -459,8 +460,9 @@ ReadErrorAndWarningMessages file
= (if is_import_error (Patherror path) path_error,True,Strip string:!errlist,file3) = (if is_import_error (Patherror path) path_error,True,Strip string:!errlist,file3)
MakeCompilerOptionsString :: !CompileOrCheckSyntax !ProjectCompilerOptions !CompilerOptions -> String MakeCompilerOptionsString :: !CompileOrCheckSyntax !ProjectCompilerOptions !CompilerOptions -> String
MakeCompilerOptionsString compileOrCheckSyntax {pco_memory_profiling,pco_time_profiling,pco_desc_exl,pco_dynamics,pco_link_dynamic} MakeCompilerOptionsString compileOrCheckSyntax
{neverMemoryProfile, neverTimeProfile,sa,gw,gc,listTypes,attr,reuseUniqueNodes,fusion} {pco_memory_profiling,pco_time_profiling,pco_desc_exl,pco_generic_fusion,pco_dynamics,pco_link_dynamic}
{neverMemoryProfile, neverTimeProfile,sa,gw,gc,listTypes,attr,reuseUniqueNodes,fusion}
= (add_dynamics_option (add_fusion_option (add_exl_option = (add_dynamics_option (add_fusion_option (add_exl_option
(checksyntax +++ timeProfileSwitch +++ memoryProfileSwitch +++ strictness +++ warnings +++ comments +++listtypes+++show_attr+++reuse) (checksyntax +++ timeProfileSwitch +++ memoryProfileSwitch +++ strictness +++ warnings +++ comments +++listtypes+++show_attr+++reuse)
))) +++" " ))) +++" "
...@@ -506,7 +508,10 @@ where ...@@ -506,7 +508,10 @@ where
= " -ou" = " -ou"
= "" = ""
add_exl_option s = if (pco_desc_exl || pco_link_dynamic) (s+++" -exl") s add_exl_option s = if (pco_desc_exl || pco_link_dynamic) (s+++" -exl") s
add_fusion_option s = if fusion (s+++" -fusion") s
add_fusion_option s
= case fusion of FusionOn -> s+++" -fusion"; FusionDefault | pco_generic_fusion -> s+++" -generic_fusion"; _ -> s
add_dynamics_option s = if (pco_dynamics || pco_link_dynamic) (s+++" -dynamics") s add_dynamics_option s = if (pco_dynamics || pco_link_dynamic) (s+++" -dynamics") s
/* Generates code for the given file: /* Generates code for the given file:
......
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