The 'optnone' attribute was forcing FastISel on. For debugging 'optnone' issues, it would be useful to be able to disable this from the command line, so now the -fast-isel option will factor into the decision to enable FastISel for 'optnone' functions.
Details
Diff Detail
Event Timeline
I'm not entirely sure it's kosher to describe backend command-line options in the IR LangRef, but Eric had asked for this feature to be documented and I'm not sure how else to do it. Advice welcome.
include/llvm/Target/TargetMachine.h | ||
---|---|---|
105 | This is where LLVMTargetMachine records the state of the -fast-isel command-line option, which SelectionDAGISel needs. SelectionDAGISel does not have direct access to the EnableFastISelOption flag. Unless you're now saying 'optnone' must always use FastISel? That wasn't the conclusion in the llvm-dev thread. |
Just make it an enum ala FloatABI with a Default, SelectionDAG, FastISel
and use that everywhere?
-eric
"Everywhere" is exactly two places, hardly seems worth the trouble. Maybe rename the flag to "O0UsesFastISel" instead? which then can be used directly in both LLVMTargetMachine and OptLevelChanger with obviously consistent semantics.
Given the current choice of SelectionDAG vs FastISel, I agree with Paul that this isn't worth the trouble. I think Eric is accounting for the addition of Global ISel in the near future which would presumably add a third choice to the enum he's requesting. If that is the reason, then I'd suggest leaving that for Global ISel since it's going to have to replace the -fast-isel option with an enum based option anyway.
I also agree with the renaming. FWIW, I was going to suggest 'CanUseFastISel' but I think 'O0UsesFastISel' or maybe 'O0WantsFastISel' is better.
include/llvm/Target/TargetMachine.h | ||
---|---|---|
105 | Renamed to 'O0WantsFastISel' as suggested by dsanders. |
You can remove everything after the semicolon and replace it with a period.