[PATCH] D135070: [TTI][Sink] Add target support for sinking more reads

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 04:44:12 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/Sink.cpp:84
     // other code paths.
-    if (Inst->mayReadFromMemory())
+    if (Inst->mayReadFromMemory() && !TTI.canAlwaysSinkRead(Inst, SuccToSinkTo))
       return false;
----------------
Why not check MD_invariant_load directly here, rather than forcing every target to check it in their own canAlwaysSinkRead hook?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135070/new/

https://reviews.llvm.org/D135070



More information about the llvm-commits mailing list