lib/HLSL/HLSignatureLower.cpp
// Generate DXIL stream output operation.
Generate DXIL stream output operation.
Generate DXIL stream output operation .
void HLSignatureLower::GenerateStreamOutputOperation(Value *streamVal, unsigned ID) {
  OP * hlslOP = HLM.GetOP();
  for (auto U = streamVal->user_begin(); U != streamVal->user_end();) {
    Value *user = *(U++);
    CallInst *CI = cast<CallInst>(user);
    HLOpcodeGroup group = GetHLOpcodeGroupByName(CI->getCalledFunction());
    unsigned opcode = GetHLOpcode(CI);
    DXASSERT_LOCALVAR(group, group == HLOpcodeGroup::HLIntrinsic, "");
    IntrinsicOp IOP = static_cast<IntrinsicOp>(opcode);
    switch (IOP) {
    case IntrinsicOp::MOP_Append:
      TranslateStreamAppend(CI, ID, hlslOP);
    break;
    case IntrinsicOp::MOP_RestartStrip:
      TranslateStreamCut(CI, ID, hlslOP);
      break;
    default:
      DXASSERT(0, "invalid operation on stream");
    }
    CI->eraseFromParent();
  }
}
void HLSignatureLower :: GenerateStreamOutputOperation ( Value * streamVal , unsigned ID ) { OP * hlslOP = HLM . GetOP ( ) ; for ( auto U = streamVal -> user_begin ( ) ; U != streamVal -> user_end ( ) ; ) { Value * user = * ( U ++ ) ; CallInst * CI = cast < CallInst > ( user ) ; HLOpcodeGroup group = GetHLOpcodeGroupByName ( CI -> getCalledFunction ( ) ) ; unsigned opcode = GetHLOpcode ( CI ) ; DXASSERT_LOCALVAR ( group , group == HLOpcodeGroup :: HLIntrinsic , " " ) ; IntrinsicOp IOP = static_cast < IntrinsicOp > ( opcode ) ; switch ( IOP ) { case IntrinsicOp :: MOP_Append : TranslateStreamAppend ( CI , ID , hlslOP ) ; break ; case IntrinsicOp :: MOP_RestartStrip : TranslateStreamCut ( CI , ID , hlslOP ) ; break ; default : DXASSERT ( 0 , " " ) ; } CI -> eraseFromParent ( ) ; } }
Generate DXIL stream output operation.
Generate DXIL stream output operation .
// Should only used by append, restartStrip .