[llvm] [TableGen] Integrate TableGen-based macro fusion (PR #73115)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 17 01:06:46 PST 2024
================
@@ -323,6 +324,12 @@ class TargetSubtargetInfo : public MCSubtargetInfo {
/// helps removing redundant copies generated by register allocator when
/// handling complex eviction chains.
virtual bool enableSpillageCopyElimination() const { return false; }
+
+ /// Enable macro fusion for this subtarget.
+ virtual bool enableMacroFusion() const { return false; }
----------------
arsenm wrote:
But you're just avoiding the creation of an empty vector, which doesn't matter. I would just do
vector Mutations = ST.getMacroFusions()
if (!Mutations.empty())
DAG->addMutation(createMacroFusion(std::move(Mutations))
https://github.com/llvm/llvm-project/pull/73115
More information about the llvm-commits
mailing list