mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 22:28:06 +02:00
+ do do_consttovar on RiscV
This commit is contained in:
parent
fbf20eee31
commit
0a88683310
@ -608,9 +608,9 @@ unit optcse;
|
||||
Result:=(n.nodetype=loadn) and (tloadnode(n).symtableentry.typ=staticvarsym)
|
||||
and ((vo_is_thread_var in tstaticvarsym(tloadnode(n).symtableentry).varoptions) or
|
||||
(cs_create_pic in current_settings.moduleswitches)
|
||||
{$if defined(aarch64) or defined(sparc) or defined(sparc64)}
|
||||
{$if defined(aarch64) or defined(sparc) or defined(sparc64) or defined(riscv)}
|
||||
or (not(tabstractvarsym(tloadnode(n).symtableentry).is_regvar(false)))
|
||||
{$endif defined(aarch64) or defined(sparc) or defined(sparc64)}
|
||||
{$endif defined(aarch64) or defined(sparc) or defined(sparc64) or defined(riscv)}
|
||||
);
|
||||
end;
|
||||
|
||||
|
@ -189,7 +189,7 @@ Const
|
||||
cs_opt_stackframe];
|
||||
|
||||
level1optimizerswitches = genericlevel1optimizerswitches;
|
||||
level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_nodecse,cs_opt_tailrecursion];
|
||||
level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + [{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_nodecse,cs_opt_tailrecursion,cs_opt_consts];
|
||||
level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches;
|
||||
level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [cs_opt_stackframe];
|
||||
|
||||
|
@ -112,7 +112,7 @@ Const
|
||||
|
||||
level1optimizerswitches = genericlevel1optimizerswitches;
|
||||
level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches +
|
||||
[{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_stackframe,cs_opt_nodecse,cs_opt_tailrecursion];
|
||||
[{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_stackframe,cs_opt_nodecse,cs_opt_tailrecursion,cs_opt_consts];
|
||||
level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches;
|
||||
level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [cs_opt_stackframe];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user