[PATCH] D94645: [AMDGPU] Fix llvm.amdgcn.init.exec and frame materialization

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 16:09:18 PST 2021


critson added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:1887-1893
+    // Usually InputReg is a function live in, so there will not be one.
+    for (MachineBasicBlock::iterator I = MBB.begin(), E = MI.getIterator();
+         I != E && !FirstMI; ++I) {
+      isInputRead = isInputRead || I->readsRegister(InputReg);
+      if (I->definesRegister(InputReg))
+        FirstMI = &*(std::next(I));
+    }
----------------
arsenm wrote:
> We shouldn't need to do ad-hoc use/def searches. Can you do this pre-RA, post-SSA like SILowerControlFlow?
We definitely could do.
Do you have an opinion about what pass it should go in?
It looks to me that we would need to add one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94645



More information about the llvm-commits mailing list