mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
Change @ -> % in config files. @name@ might be needed for config files to
themselves be configured via autoconf so its not a good substitition syntax for llvmc. Furthermore % is more llvmish :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15957 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -212,20 +212,20 @@ CompilerDriver::Action* CompilerDriver::GetAction(ConfigData* cd,
|
|||||||
StringVector::iterator PI = pat->args.begin();
|
StringVector::iterator PI = pat->args.begin();
|
||||||
StringVector::iterator PE = pat->args.end();
|
StringVector::iterator PE = pat->args.end();
|
||||||
while (PI != PE) {
|
while (PI != PE) {
|
||||||
if ((*PI)[0] == '@') {
|
if ((*PI)[0] == '%') {
|
||||||
if (*PI == "@in@") {
|
if (*PI == "%in%") {
|
||||||
action->args.push_back(input);
|
action->args.push_back(input);
|
||||||
} else if (*PI == "@out@") {
|
} else if (*PI == "%out%") {
|
||||||
action->args.push_back(output);
|
action->args.push_back(output);
|
||||||
} else if (*PI == "@time@") {
|
} else if (*PI == "%time%") {
|
||||||
if (timePasses)
|
if (timePasses)
|
||||||
action->args.push_back("-time-passes");
|
action->args.push_back("-time-passes");
|
||||||
} else if (*PI == "@stats@") {
|
} else if (*PI == "%stats%") {
|
||||||
if (showStats)
|
if (showStats)
|
||||||
action->args.push_back("-stats");
|
action->args.push_back("-stats");
|
||||||
} else if (*PI == "@target@") {
|
} else if (*PI == "%target%") {
|
||||||
// FIXME: Ignore for now
|
// FIXME: Ignore for now
|
||||||
} else if (*PI == "@opt@") {
|
} else if (*PI == "%opt%") {
|
||||||
if (!emitRawCode) {
|
if (!emitRawCode) {
|
||||||
if (pat->isSet(GROKS_DASH_O)) {
|
if (pat->isSet(GROKS_DASH_O)) {
|
||||||
if (optLevel != OPT_NONE) {
|
if (optLevel != OPT_NONE) {
|
||||||
|
@@ -76,7 +76,7 @@ inline llvm::ConfigLexerTokens handleBoolean(llvm::ConfigLexerTokens token) {
|
|||||||
%}
|
%}
|
||||||
|
|
||||||
ASSEMBLER assembler|Assembler|ASSEMBLER
|
ASSEMBLER assembler|Assembler|ASSEMBLER
|
||||||
BadSubst \@[^iots][a-zA-Z]\@
|
BadSubst \%[^iots][a-zA-Z]\%
|
||||||
COMMAND command|Command|COMMAND
|
COMMAND command|Command|COMMAND
|
||||||
Comment \#[^\n]*\n
|
Comment \#[^\n]*\n
|
||||||
NewLine \n
|
NewLine \n
|
||||||
@@ -93,7 +93,7 @@ OPT4 opt4|Opt4|OPT4
|
|||||||
OPT5 opt5|Opt5|OPT5
|
OPT5 opt5|Opt5|OPT5
|
||||||
OPTIMIZER optimizer|Optimizer|OPTIMIZER
|
OPTIMIZER optimizer|Optimizer|OPTIMIZER
|
||||||
OPTIMIZES optimizes|Optimizes|OPTIMIZES
|
OPTIMIZES optimizes|Optimizes|OPTIMIZES
|
||||||
Option [-A-Za-z0-9_:%+/\\|,][-A-Za-z0-9_:%+/\\|,@]*
|
Option [-A-Za-z0-9_:%+/\\|,][-A-Za-z0-9_:+/\\|,@]*
|
||||||
OUTPUT_IS_ASM output_is_asm|Output_Is_Asm|OUTPUT_IS_ASM
|
OUTPUT_IS_ASM output_is_asm|Output_Is_Asm|OUTPUT_IS_ASM
|
||||||
PREPROCESSES preprocesses|PreProcesses|PREPROCESSES
|
PREPROCESSES preprocesses|PreProcesses|PREPROCESSES
|
||||||
PREPROCESSOR preprocessor|PreProcessor|PREPROCESSOR
|
PREPROCESSOR preprocessor|PreProcessor|PREPROCESSOR
|
||||||
@@ -154,12 +154,12 @@ No no|No|NO
|
|||||||
{OPT4} { return handleContext("opt4",OPT4); }
|
{OPT4} { return handleContext("opt4",OPT4); }
|
||||||
{OPT5} { return handleContext("opt5",OPT5); }
|
{OPT5} { return handleContext("opt5",OPT5); }
|
||||||
|
|
||||||
@in@ { return handleSubstitution(IN_SUBST); }
|
%in% { return handleSubstitution(IN_SUBST); }
|
||||||
@out@ { return handleSubstitution(OUT_SUBST); }
|
%out% { return handleSubstitution(OUT_SUBST); }
|
||||||
@time@ { return handleSubstitution(TIME_SUBST); }
|
%time% { return handleSubstitution(TIME_SUBST); }
|
||||||
@stats@ { return handleSubstitution(STATS_SUBST); }
|
%stats% { return handleSubstitution(STATS_SUBST); }
|
||||||
@opt@ { return handleSubstitution(OPT_SUBST); }
|
%opt% { return handleSubstitution(OPT_SUBST); }
|
||||||
@target@ { return handleSubstitution(TARGET_SUBST); }
|
%target% { return handleSubstitution(TARGET_SUBST); }
|
||||||
{BadSubst} { YY_FATAL_ERROR("Invalid substitution token"); }
|
{BadSubst} { YY_FATAL_ERROR("Invalid substitution token"); }
|
||||||
{True} { return handleBoolean(TRUETOK); }
|
{True} { return handleBoolean(TRUETOK); }
|
||||||
{On} { return handleBoolean(TRUETOK); }
|
{On} { return handleBoolean(TRUETOK); }
|
||||||
|
@@ -155,12 +155,12 @@ namespace {
|
|||||||
|
|
||||||
bool parseSubstitution(CompilerDriver::StringVector& optList) {
|
bool parseSubstitution(CompilerDriver::StringVector& optList) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case IN_SUBST: optList.push_back("@in@"); break;
|
case IN_SUBST: optList.push_back("%in%"); break;
|
||||||
case OUT_SUBST: optList.push_back("@out@"); break;
|
case OUT_SUBST: optList.push_back("%out%"); break;
|
||||||
case TIME_SUBST: optList.push_back("@time@"); break;
|
case TIME_SUBST: optList.push_back("%time%"); break;
|
||||||
case STATS_SUBST: optList.push_back("@stats@"); break;
|
case STATS_SUBST: optList.push_back("%stats%"); break;
|
||||||
case OPT_SUBST: optList.push_back("@opt@"); break;
|
case OPT_SUBST: optList.push_back("%opt%"); break;
|
||||||
case TARGET_SUBST: optList.push_back("@target@"); break;
|
case TARGET_SUBST: optList.push_back("%target%"); break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -2,13 +2,13 @@
|
|||||||
lang.name=LLVM Assembly
|
lang.name=LLVM Assembly
|
||||||
preprocessor.command=
|
preprocessor.command=
|
||||||
preprocessor.required=false
|
preprocessor.required=false
|
||||||
translator.command=llvm-as @in@ -o @out@
|
translator.command=llvm-as %in% -o %out%
|
||||||
translator.groks_dash_O=no
|
translator.groks_dash_O=no
|
||||||
translator.optimizes=no
|
translator.optimizes=no
|
||||||
translator.preprocesses=true
|
translator.preprocesses=true
|
||||||
translator.required=TRUE
|
translator.required=TRUE
|
||||||
optimizer.command=opt @in@ -o @out@
|
optimizer.command=opt %in% -o %out%
|
||||||
optimizer.groks_dash_O=no
|
optimizer.groks_dash_O=no
|
||||||
optimizer.groks_optimization=yes
|
optimizer.groks_optimization=yes
|
||||||
assembler.command=llc @in@ -o @out@
|
assembler.command=llc %in% -o %out%
|
||||||
linker.command=llvm-link @in@ -o @out@
|
linker.command=llvm-link %in% -o %out%
|
||||||
|
@@ -5,12 +5,12 @@
|
|||||||
##########################################################
|
##########################################################
|
||||||
lang.name=Stacker
|
lang.name=Stacker
|
||||||
lang.opt1=-simplifycfg -instcombine -mem2reg
|
lang.opt1=-simplifycfg -instcombine -mem2reg
|
||||||
lang.opt2=-simplifycfg -instcombine -mem2reg -scalarrepl -sccp
|
lang.opt2=-simplifycfg -instcombine -mem2reg -load-vn -gcse -dse -scalarrepl -sccp
|
||||||
lang.opt3=-simplifycfg -instcombine -mem2reg -scalarrepl -sccp \
|
lang.opt3=-simplifycfg -instcombine -mem2reg -load-vn -gcse -dse -scalarrepl -sccp \
|
||||||
-branch-combine -adce -globaldce -inline -licm -pre
|
-branch-combine -adce -globaldce -inline -licm -pre
|
||||||
lang.opt4=-simplifycfg -instcombine -mem2reg -scalarrepl -sccp \
|
lang.opt4=-simplifycfg -instcombine -mem2reg -load-vn -gcse -dse -scalarrepl -sccp \
|
||||||
-ipconstprop -branch-combine -adce -globaldce -inline -licm -pre
|
-ipconstprop -branch-combine -adce -globaldce -inline -licm -pre
|
||||||
lang.opt5=-simplifycfg -instcombine -mem2reg -scalarrepl -sccp \
|
lang.opt5=-simplifycfg -instcombine -mem2reg --load-vn -gcse -dse scalarrepl -sccp \
|
||||||
-ipconstprop -branch-combine -adce -globaldce -inline -licm -pre \
|
-ipconstprop -branch-combine -adce -globaldce -inline -licm -pre \
|
||||||
-block-placement
|
-block-placement
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
# Stacker doesn't have a preprocessor but the following
|
# Stacker doesn't have a preprocessor but the following
|
||||||
# allows the -E option to be supported
|
# allows the -E option to be supported
|
||||||
preprocessor.command=cp @in@ @out@
|
preprocessor.command=cp %in% %out%
|
||||||
preprocessor.required=false
|
preprocessor.required=false
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
# To compile stacker source, we just run the stacker
|
# To compile stacker source, we just run the stacker
|
||||||
# compiler with a default stack size of 2048 entries.
|
# compiler with a default stack size of 2048 entries.
|
||||||
translator.command=stkrc -s 2048 @in@ -o @out@ @time@ @stats@
|
translator.command=stkrc -s 2048 %in% -o %out% %time% %stats%
|
||||||
|
|
||||||
# stkrc doesn't preprocess but we set this to true so
|
# stkrc doesn't preprocess but we set this to true so
|
||||||
# that we don't run the cp command by default.
|
# that we don't run the cp command by default.
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
# For optimization, we use the LLVM "opt" program
|
# For optimization, we use the LLVM "opt" program
|
||||||
optimizer.command=opt @in@ -o @out@ @opt@ @time@ @stats@
|
optimizer.command=opt %in% -o %out% %opt% %time% %stats%
|
||||||
|
|
||||||
# opt doesn't (yet) grok -On
|
# opt doesn't (yet) grok -On
|
||||||
optimizer.groks_dash_O=no
|
optimizer.groks_dash_O=no
|
||||||
@@ -63,10 +63,11 @@
|
|||||||
##########################################################
|
##########################################################
|
||||||
# Assembler definitions
|
# Assembler definitions
|
||||||
##########################################################
|
##########################################################
|
||||||
assembler.command=llc @in@ -o @out@ @target@ "-regalloc=linearscan" \
|
assembler.command=llc %in% -o %out% %target% "-regalloc=linearscan" \
|
||||||
@time@ @stats@
|
%time% %stats%
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
# Linker definitions
|
# Linker definitions
|
||||||
##########################################################
|
##########################################################
|
||||||
linker.command=gccld @in@ -o @out@ -lstkr_runtime
|
linker.libs=stkr_runtime
|
||||||
|
linker.paths=
|
||||||
|
Reference in New Issue
Block a user