[PATCH] D34144: [CodeGen] Add generic MacroFusion pass.

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 17:41:15 PDT 2017


evandro added inline comments.


================
Comment at: include/llvm/CodeGen/MacroFusion.h:29-34
+/// \brief Create a DAG scheduling mutation to pair instructions back to back
+/// for instructions that benefit according to the target-specific
+/// shouldScheduleAdjacent predicate function.
+std::unique_ptr<ScheduleDAGMutation>
+createMacroFusionDAGMutation(ShouldSchedulePredTy shouldScheduleAdjacent,
+                             bool FuseBlock, bool FuseExit);
----------------
MatzeB wrote:
> How about splitting this into two functions
> `createBranchMacroFusionDAGMutation()` and `createMacroFusionDAGMutation()` (or similar names) instead of the two bool parameters to make the calling code easier to read?
As a matter of fact, I can only imagine 2 scenarios: one when the whole BB, including its exit, should be examined and another when only the exit should be examined. If so, then a single flag should suffice. 


https://reviews.llvm.org/D34144





More information about the llvm-commits mailing list