mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-27 07:45:35 +00:00
[NFC][MacroFusion] Adding the assertion if someone want to fuse more than 2 instructions
As discussed in https://reviews.llvm.org/D69998, we miss to create some dependency edges if chained more than 2 instructions. Adding an assertion here if someone want to chain more than 2 instructions. Differential Revision: https://reviews.llvm.org/D71180
This commit is contained in:
parent
cd83f7265d
commit
cdb4d04a0a
@ -71,6 +71,14 @@ static bool fuseInstructionPair(ScheduleDAGInstrs &DAG, SUnit &FirstSU,
|
|||||||
if (!DAG.addEdge(&SecondSU, SDep(&FirstSU, SDep::Cluster)))
|
if (!DAG.addEdge(&SecondSU, SDep(&FirstSU, SDep::Cluster)))
|
||||||
return false;
|
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.
|
// Adjust the latency between both instrs.
|
||||||
for (SDep &SI : FirstSU.Succs)
|
for (SDep &SI : FirstSU.Succs)
|
||||||
if (SI.getSUnit() == &SecondSU)
|
if (SI.getSUnit() == &SecondSU)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user