diff options
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 1a5c42f..46f2679 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -315,7 +315,7 @@ public: SmallVector<const BinaryOperator *, 16> MCDCLogOpStack; /// Stack to track the controlled convergence tokens. - SmallVector<llvm::IntrinsicInst *, 4> ConvergenceTokenStack; + SmallVector<llvm::ConvergenceControlInst *, 4> ConvergenceTokenStack; /// Number of nested loop to be consumed by the last surrounding /// loop-associated directive. @@ -5234,29 +5234,20 @@ public: llvm::Value *emitBoolVecConversion(llvm::Value *SrcVec, unsigned NumElementsDst, const llvm::Twine &Name = ""); - // Adds a convergence_ctrl token to |Input| and emits the required parent - // convergence instructions. - template <typename CallType> - CallType *addControlledConvergenceToken(CallType *Input) { - return cast<CallType>( - addConvergenceControlToken(Input, ConvergenceTokenStack.back())); - } private: // Emits a convergence_loop instruction for the given |BB|, with |ParentToken| // as it's parent convergence instr. - llvm::IntrinsicInst *emitConvergenceLoopToken(llvm::BasicBlock *BB, - llvm::Value *ParentToken); + llvm::ConvergenceControlInst *emitConvergenceLoopToken(llvm::BasicBlock *BB); + // Adds a convergence_ctrl token with |ParentToken| as parent convergence // instr to the call |Input|. - llvm::CallBase *addConvergenceControlToken(llvm::CallBase *Input, - llvm::Value *ParentToken); + llvm::CallBase *addConvergenceControlToken(llvm::CallBase *Input); + // Find the convergence_entry instruction |F|, or emits ones if none exists. // Returns the convergence instruction. - llvm::IntrinsicInst *getOrEmitConvergenceEntryToken(llvm::Function *F); - // Find the convergence_loop instruction for the loop defined by |LI|, or - // emits one if none exists. Returns the convergence instruction. - llvm::IntrinsicInst *getOrEmitConvergenceLoopToken(const LoopInfo *LI); + llvm::ConvergenceControlInst * + getOrEmitConvergenceEntryToken(llvm::Function *F); private: llvm::MDNode *getRangeForLoadFromType(QualType Ty); |