[PATCH] D94645: [AMDGPU] Fix llvm.amdgcn.init.exec and frame materialization
    Ruiling, Song via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Jan 18 16:44:07 PST 2021
    
    
  
ruiling 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));
+    }
----------------
critson wrote:
> 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.
> 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.
Can we just implement this in SILowerControlFlow?
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