[PATCH] Change the fast-isel-abort option from bool to int to enable "levels"

Mehdi AMINI mehdi.amini at apple.com
Fri Feb 27 09:59:02 PST 2015


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:171
@@ -170,9 +170,3 @@
                    "instruction selector"));
-static cl::opt<bool>
-EnableFastISelAbort("fast-isel-abort", cl::Hidden,
-          cl::desc("Enable abort calls when \"fast\" instruction selection "
-                   "fails to lower an instruction"));
-static cl::opt<bool>
-EnableFastISelAbortArgs("fast-isel-abort-args", cl::Hidden,
-          cl::desc("Enable abort calls when \"fast\" instruction selection "
-                   "fails to lower a formal argument"));
+static cl::opt<int> EnableFastISelAbort(
+    "fast-isel-abort", cl::Hidden,
----------------
echristo wrote:
> Can we make this default to the current default behavior? It'll mean that you don't need to update testcases too :)
The existing default value is "off". I believe it is gonna be the same here.
I had to update the tests because previously you would be able to just add -fast-isel-abort while now you need -fast-isel-abort=1
I don't know if there is a way to say that -fast-isel-abort with no argument will be like =1. 
Even if it is possible, I'm not even sure it is desirable as reading a command line with -fast-isel-abort alone makes me expect to always abort.

================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:175
@@ +174,3 @@
+             "fails to lower an instruction: 0 disable the abort, 1 will "
+             "abort but for args, calls and terminators, 1 will also "
+             "abort for argument lowering, and 3 will never fallback "
----------------
resistor wrote:
> echristo wrote:
> > Did you mean 2 on this line? :)
> This usage string looks wrong.  The effect of 2 is never defined.
Nicely spotted, it is indeed 2 on the second line.

http://reviews.llvm.org/D7941

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list