mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-24 08:33:39 +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:
parent
b65eadb7f5
commit
53aa793721
@ -212,20 +212,20 @@ CompilerDriver::Action* CompilerDriver::GetAction(ConfigData* cd,
|
||||
StringVector::iterator PI = pat->args.begin();
|
||||
StringVector::iterator PE = pat->args.end();
|
||||
while (PI != PE) {
|
||||
if ((*PI)[0] == '@') {
|
||||
if (*PI == "@in@") {
|
||||
if ((*PI)[0] == '%') {
|
||||
if (*PI == "%in%") {
|
||||
action->args.push_back(input);
|
||||
} else if (*PI == "@out@") {
|
||||
} else if (*PI == "%out%") {
|
||||
action->args.push_back(output);
|
||||
} else if (*PI == "@time@") {
|
||||
} else if (*PI == "%time%") {
|
||||
if (timePasses)
|
||||
action->args.push_back("-time-passes");
|
||||
} else if (*PI == "@stats@") {
|
||||
} else if (*PI == "%stats%") {
|
||||
if (showStats)
|
||||
action->args.push_back("-stats");
|
||||
} else if (*PI == "@target@") {
|
||||
} else if (*PI == "%target%") {
|
||||
// FIXME: Ignore for now
|
||||
} else if (*PI == "@opt@") {
|
||||
} else if (*PI == "%opt%") {
|
||||
if (!emitRawCode) {
|
||||
if (pat->isSet(GROKS_DASH_O)) {
|
||||
if (optLevel != OPT_NONE) {
|
||||
|
@ -76,7 +76,7 @@ inline llvm::ConfigLexerTokens handleBoolean(llvm::ConfigLexerTokens token) {
|
||||
%}
|
||||
|
||||
ASSEMBLER assembler|Assembler|ASSEMBLER
|
||||
BadSubst \@[^iots][a-zA-Z]\@
|
||||
BadSubst \%[^iots][a-zA-Z]\%
|
||||
COMMAND command|Command|COMMAND
|
||||
Comment \#[^\n]*\n
|
||||
NewLine \n
|
||||
@ -93,7 +93,7 @@ OPT4 opt4|Opt4|OPT4
|
||||
OPT5 opt5|Opt5|OPT5
|
||||
OPTIMIZER optimizer|Optimizer|OPTIMIZER
|
||||
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
|
||||
PREPROCESSES preprocesses|PreProcesses|PREPROCESSES
|
||||
PREPROCESSOR preprocessor|PreProcessor|PREPROCESSOR
|
||||
@ -154,12 +154,12 @@ No no|No|NO
|
||||
{OPT4} { return handleContext("opt4",OPT4); }
|
||||
{OPT5} { return handleContext("opt5",OPT5); }
|
||||
|
||||
@in@ { return handleSubstitution(IN_SUBST); }
|
||||
@out@ { return handleSubstitution(OUT_SUBST); }
|
||||
@time@ { return handleSubstitution(TIME_SUBST); }
|
||||
@stats@ { return handleSubstitution(STATS_SUBST); }
|
||||
@opt@ { return handleSubstitution(OPT_SUBST); }
|
||||
@target@ { return handleSubstitution(TARGET_SUBST); }
|
||||
%in% { return handleSubstitution(IN_SUBST); }
|
||||
%out% { return handleSubstitution(OUT_SUBST); }
|
||||
%time% { return handleSubstitution(TIME_SUBST); }
|
||||
%stats% { return handleSubstitution(STATS_SUBST); }
|
||||
%opt% { return handleSubstitution(OPT_SUBST); }
|
||||
%target% { return handleSubstitution(TARGET_SUBST); }
|
||||
{BadSubst} { YY_FATAL_ERROR("Invalid substitution token"); }
|
||||
{True} { return handleBoolean(TRUETOK); }
|
||||
{On} { return handleBoolean(TRUETOK); }
|
||||
|
@ -155,12 +155,12 @@ namespace {
|
||||
|
||||
bool parseSubstitution(CompilerDriver::StringVector& optList) {
|
||||
switch (token) {
|
||||
case IN_SUBST: optList.push_back("@in@"); break;
|
||||
case OUT_SUBST: optList.push_back("@out@"); break;
|
||||
case TIME_SUBST: optList.push_back("@time@"); break;
|
||||
case STATS_SUBST: optList.push_back("@stats@"); break;
|
||||
case OPT_SUBST: optList.push_back("@opt@"); break;
|
||||
case TARGET_SUBST: optList.push_back("@target@"); break;
|
||||
case IN_SUBST: optList.push_back("%in%"); break;
|
||||
case OUT_SUBST: optList.push_back("%out%"); break;
|
||||
case TIME_SUBST: optList.push_back("%time%"); break;
|
||||
case STATS_SUBST: optList.push_back("%stats%"); break;
|
||||
case OPT_SUBST: optList.push_back("%opt%"); break;
|
||||
case TARGET_SUBST: optList.push_back("%target%"); break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
@ -2,13 +2,13 @@
|
||||
lang.name=LLVM Assembly
|
||||
preprocessor.command=
|
||||
preprocessor.required=false
|
||||
translator.command=llvm-as @in@ -o @out@
|
||||
translator.command=llvm-as %in% -o %out%
|
||||
translator.groks_dash_O=no
|
||||
translator.optimizes=no
|
||||
translator.preprocesses=true
|
||||
translator.required=TRUE
|
||||
optimizer.command=opt @in@ -o @out@
|
||||
optimizer.command=opt %in% -o %out%
|
||||
optimizer.groks_dash_O=no
|
||||
optimizer.groks_optimization=yes
|
||||
assembler.command=llc @in@ -o @out@
|
||||
linker.command=llvm-link @in@ -o @out@
|
||||
assembler.command=llc %in% -o %out%
|
||||
linker.command=llvm-link %in% -o %out%
|
||||
|
@ -5,12 +5,12 @@
|
||||
##########################################################
|
||||
lang.name=Stacker
|
||||
lang.opt1=-simplifycfg -instcombine -mem2reg
|
||||
lang.opt2=-simplifycfg -instcombine -mem2reg -scalarrepl -sccp
|
||||
lang.opt3=-simplifycfg -instcombine -mem2reg -scalarrepl -sccp \
|
||||
lang.opt2=-simplifycfg -instcombine -mem2reg -load-vn -gcse -dse -scalarrepl -sccp
|
||||
lang.opt3=-simplifycfg -instcombine -mem2reg -load-vn -gcse -dse -scalarrepl -sccp \
|
||||
-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
|
||||
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 \
|
||||
-block-placement
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
# Stacker doesn't have a preprocessor but the following
|
||||
# allows the -E option to be supported
|
||||
preprocessor.command=cp @in@ @out@
|
||||
preprocessor.command=cp %in% %out%
|
||||
preprocessor.required=false
|
||||
|
||||
##########################################################
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
# To compile stacker source, we just run the stacker
|
||||
# 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
|
||||
# that we don't run the cp command by default.
|
||||
@ -49,7 +49,7 @@
|
||||
##########################################################
|
||||
|
||||
# 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
|
||||
optimizer.groks_dash_O=no
|
||||
@ -63,10 +63,11 @@
|
||||
##########################################################
|
||||
# Assembler definitions
|
||||
##########################################################
|
||||
assembler.command=llc @in@ -o @out@ @target@ "-regalloc=linearscan" \
|
||||
@time@ @stats@
|
||||
assembler.command=llc %in% -o %out% %target% "-regalloc=linearscan" \
|
||||
%time% %stats%
|
||||
|
||||
##########################################################
|
||||
# Linker definitions
|
||||
##########################################################
|
||||
linker.command=gccld @in@ -o @out@ -lstkr_runtime
|
||||
linker.libs=stkr_runtime
|
||||
linker.paths=
|
||||
|
Loading…
x
Reference in New Issue
Block a user