+ do do_consttovar on RiscV

This commit is contained in:
florian 2024-05-25 20:09:02 +02:00
parent fbf20eee31
commit 0a88683310
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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];

View File

@ -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];