[PATCH] D135133: [Sink] Allow sinking of invariant loads across critical edges

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 08:31:31 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/Sink.cpp:83
+    if (Inst->mayReadFromMemory() &&
+        !Inst->hasMetadata(LLVMContext::MD_invariant_load))
       return false;
----------------
Probably should go through the AA query for pointsToConstantMemory instead of directly checking the metadata 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135133



More information about the llvm-commits mailing list