It depends entirely on the patent and the allegations of infringement. Section 101 is something that can be invoked early in a case, so for a software patent that's usually something you want to do. The other two are generally invoked at trial, or possibly at summary judgment before trial (if the evidence is so strong that there is no reason to have a trial).