[MachineOutliner][NFC] Refactoring + comments in runOnModule
authorJessica Paquette <jpaquette@apple.com>
Thu, 22 Mar 2018 21:07:09 +0000 (21:07 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 22 Mar 2018 21:07:09 +0000 (21:07 +0000)
commitdf82274f3c6f44b589fc206b67f807c0a0c13ea9
treef687a522a3cbf17c462c89f8decf20212540abff
parent022a82cb15cafa4fb80b96865e240373a0fbae65
[MachineOutliner][NFC] Refactoring + comments in runOnModule

Split up some of the if/else branches in runOnModule. Elaborate on some
comments. Replace a call to getOrCreateMachineFunction with getMachineFunction.

This makes it clearer what's happening in runOnModule, and ensures that the
outliner doesn't create any MachineFunctions which will never be used by the
outliner (or anything else, really).

llvm-svn: 328240
llvm/lib/CodeGen/MachineOutliner.cpp