[PATCH] D49671: [SchedModel] Propagate read advance cycles to implicit operands outside instruction descriptor

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 27 08:09:32 PDT 2018


jonpa updated this revision to Diff 162680.
jonpa added a comment.

Thanks for review!

> Given that the actual instruction only writes to r1d I would argue that the latencies on r0q and r0d are "fake". Hence my proposal to ignore the extra operands during schedule dag construction or force their latency to zero.

I tried ignoring the operands during DAG construction, but that caused a lot of machine verifier errors, since those extra operands themselves have def-use chains that of course get corrupted if ignored by the scheduler.

I updated the patch to instead follow your second suggestion - setting the latency to zero in these cases. This gives ~25 test failures across targets, which I hope will be fairly simple to update if you think this patch is acceptable. This approach seems to also fix the issue I was seeing with the read advances.

Since this is a post-RA problem, I still wonder if it would perhaps be possible to instead remove these operands at some point before the post-RA scheduler (Still don't know what they are really for)? This would be even more simple, I think.


https://reviews.llvm.org/D49671

Files:
  lib/CodeGen/ScheduleDAGInstrs.cpp
  test/CodeGen/SystemZ/misched-readadvances.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49671.162680.patch
Type: text/x-patch
Size: 13635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180827/de7ac30d/attachment.bin>


More information about the llvm-commits mailing list