From 2e9c6f35ae2bdab709fb1ce8a492ac66b8619994 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sun, 4 Dec 2016 11:15:12 +0000 Subject: [PATCH] - disable -Ooregvar for the LLVM-based x86-64 code generator, as it causes internalerrors there and fixing it doesn't make sense since LLVM will take care of that anywaya git-svn-id: trunk@35058 - --- compiler/dirparse.pas | 4 ++++ compiler/x86_64/cpuinfo.pas | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/dirparse.pas b/compiler/dirparse.pas index 7c84a416b6..46d99f6564 100644 --- a/compiler/dirparse.pas +++ b/compiler/dirparse.pas @@ -137,6 +137,10 @@ implementation end; if found then begin +{$ifdef llvm} + { -Ooregvar is not supported, llvm will take care of that } + if opt<>cs_opt_regvar then +{$endif llvm} if doset then include(a,opt) else diff --git a/compiler/x86_64/cpuinfo.pas b/compiler/x86_64/cpuinfo.pas index 97fee409db..b0104a4e56 100644 --- a/compiler/x86_64/cpuinfo.pas +++ b/compiler/x86_64/cpuinfo.pas @@ -138,12 +138,12 @@ Const genericlevel3optimizerswitches- { no need to write info about those } [cs_opt_level1,cs_opt_level2,cs_opt_level3]+ - [cs_opt_regvar,cs_opt_loopunroll,cs_opt_stackframe,cs_userbp, + [{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_loopunroll,cs_opt_stackframe,cs_userbp, cs_opt_tailrecursion,cs_opt_nodecse,cs_opt_reorder_fields,cs_opt_fastmath]; level1optimizerswitches = genericlevel1optimizerswitches; level2optimizerswitches = genericlevel2optimizerswitches + level1optimizerswitches + - [cs_opt_regvar,cs_opt_stackframe,cs_opt_tailrecursion,cs_opt_nodecse]; + [{$ifndef llvm}cs_opt_regvar,{$endif}cs_opt_stackframe,cs_opt_tailrecursion,cs_opt_nodecse]; level3optimizerswitches = genericlevel3optimizerswitches + level2optimizerswitches + [{,cs_opt_loopunroll}]; level4optimizerswitches = genericlevel4optimizerswitches + level3optimizerswitches + [cs_userbp];