[PATCH] D71180: [NFC][MacroFusion] Adding the assertion if someone want to fuse more than 2 instructions.
qshanz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 19:17:28 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG05b0c76aa76e: [NFC][MacroFusion] Adding the assertion if someone want to fuse more than 2… (authored by steven.zhang).
Changed prior to commit:
https://reviews.llvm.org/D71180?vs=232756&id=232985#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71180/new/
https://reviews.llvm.org/D71180
Files:
llvm/lib/CodeGen/MacroFusion.cpp
Index: llvm/lib/CodeGen/MacroFusion.cpp
===================================================================
--- llvm/lib/CodeGen/MacroFusion.cpp
+++ llvm/lib/CodeGen/MacroFusion.cpp
@@ -71,6 +71,14 @@
if (!DAG.addEdge(&SecondSU, SDep(&FirstSU, SDep::Cluster)))
return false;
+ // TODO - If we want to chain more than two instructions, we need to create
+ // artifical edges to make dependencies from the FirstSU also dependent
+ // on other chained instructions, and other chained instructions also
+ // dependent on the dependencies of the SecondSU, to prevent them from being
+ // scheduled into these chained instructions.
+ assert(hasLessThanNumFused(FirstSU, 2) &&
+ "Currently we only support chaining together two instructions");
+
// Adjust the latency between both instrs.
for (SDep &SI : FirstSU.Succs)
if (SI.getSUnit() == &SecondSU)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71180.232985.patch
Type: text/x-patch
Size: 880 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/b6263bc2/attachment.bin>
More information about the llvm-commits
mailing list