コード例 #1
0
ファイル: InOutDeshadowing.cpp プロジェクト: Ben-G/swift
 /// Get the single stack slot we can deshadow, or null if no such slot was
 /// found.
 AllocStackInst *getDeshadowableSlot() {
   if (Failed)
     return nullptr;
   
   // We must have seen both a store to and a load from the slot to deshadow
   // on every exit BB.
   if (!HaveEntrySlot) {
     DEBUG(llvm::dbgs() << "*** Rejecting deshadow: no store to stack slot\n");
     return nullptr;
   }
   
   if (!ExitBBs.empty()) {
     DEBUG(llvm::dbgs() << "*** Rejecting deshadow: no load from stack slot "
                           "on some paths\n");
     return nullptr;
   }
   
   return TheSlot;
 }