[PATCH] D121277: [MachineSink] Check block prologue does not clobber uses

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 15 14:34:01 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:1812-1827
+    if (InsertPos != SuccBB->begin()) {
+      bool UsesClobbered = false;
+      for (MachineBasicBlock::iterator PI = SuccBB->begin();
+           PI != InsertPos && !UsesClobbered; ++PI) {
+        for (auto U : UsedOpsInCopy) {
+          Register SrcReg = MI.getOperand(U).getReg();
+          if (PI->modifiesRegister(SrcReg, TRI)) {
----------------
Is there not a helper for this somewhere?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121277



More information about the llvm-commits mailing list