This patch allows the SelectionDAGISel pass to be put into CodeGenOpt::None mode in response to the opt-bisect-limit command line option in addition to the OptimizeNone function attribute (the skipFunction() call checks both of these conditions).
See D19172 for details on the opt-bisect implementation.
I am checking to see if the optimization level is already CodeGenOpt::None before calling the skipFunction() method in order to avoid introducing test failures in two lit tests which verify that no pass is "skipped" by the optnone or opt-bisect options that is otherwise run at -O0. Calling skipFunction at -O0 wouldn't actually change this pass' behavior, but it would generate a debugging message indicating that the pass was being skipped.