From 43e42482a7c4b96e38d5f0594cbce3925bc26fb3 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 25 Oct 2016 02:14:56 +0100 Subject: LLL: document optimise flag --- lllc/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lllc/main.cpp b/lllc/main.cpp index 06611af0..380a0ba2 100644 --- a/lllc/main.cpp +++ b/lllc/main.cpp @@ -41,6 +41,7 @@ void help() << " -x,--hex Parse, compile and assemble; output byte code in hex." << endl << " -a,--assembly Only parse and compile; show assembly." << endl << " -t,--parse-tree Only parse; show parse tree." << endl + << " -o,--optimise Turn on/off the optimiser; on by default." << endl << " -h,--help Show this help message and exit." << endl << " -V,--version Show the version and exit." << endl; exit(0); -- cgit v1.2.3 From 3a6ac6226cae21c3c00fae1acf4481d8101f5371 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 25 Oct 2016 02:15:21 +0100 Subject: LLL: turn off optimiser by default --- lllc/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lllc/main.cpp b/lllc/main.cpp index 380a0ba2..3821d6a3 100644 --- a/lllc/main.cpp +++ b/lllc/main.cpp @@ -41,7 +41,7 @@ void help() << " -x,--hex Parse, compile and assemble; output byte code in hex." << endl << " -a,--assembly Only parse and compile; show assembly." << endl << " -t,--parse-tree Only parse; show parse tree." << endl - << " -o,--optimise Turn on/off the optimiser; on by default." << endl + << " -o,--optimise Turn on/off the optimiser; off by default." << endl << " -h,--help Show this help message and exit." << endl << " -V,--version Show the version and exit." << endl; exit(0); @@ -82,7 +82,7 @@ enum Mode { Binary, Hex, Assembly, ParseTree, Disassemble }; int main(int argc, char** argv) { setDefaultOrCLocale(); - unsigned optimise = 1; + unsigned optimise = 0; string infile; Mode mode = Hex; -- cgit v1.2.3 From 0da309d460c77277135cffcaa8b2bf75976d3869 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 25 Oct 2016 12:43:12 +0100 Subject: LLL: change -o to be a flag --- lllc/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lllc/main.cpp b/lllc/main.cpp index 3821d6a3..f8677be0 100644 --- a/lllc/main.cpp +++ b/lllc/main.cpp @@ -99,8 +99,8 @@ int main(int argc, char** argv) mode = Assembly; else if (arg == "-t" || arg == "--parse-tree") mode = ParseTree; - else if ((arg == "-o" || arg == "--optimise") && argc > i + 1) - optimise = atoi(argv[++i]); + else if (arg == "-o" || arg == "--optimise") + optimise = 1; else if (arg == "-d" || arg == "--disassemble") mode = Disassemble; else if (arg == "-V" || arg == "--version") -- cgit v1.2.3