9#ifndef LLVM_CLANG_LIB_CODEGEN_CGBUILTIN_H
10#define LLVM_CLANG_LIB_CODEGEN_CGBUILTIN_H
21 llvm::StringRef Name =
"") {
22 static_assert(N,
"expect non-empty argument");
24 for (
unsigned I = 0; I < N; ++I)
27 return CGF.
Builder.CreateCall(F, Args, Name);
38 unsigned ConstrainedIntrinsicID);
52 llvm::AtomicOrdering Ordering =
53 llvm::AtomicOrdering::SequentiallyConsistent,
54 llvm::SyncScope::ID SSID = llvm::SyncScope::System);
57 const llvm::Intrinsic::ID IntrinsicID,
65 llvm::AtomicOrdering SuccessOrdering,
66 llvm::AtomicOrdering FailureOrdering,
67 llvm::SyncScope::ID SSID = llvm::SyncScope::System);
llvm::Value * emitBuiltinWithOneOverloadedType(clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E, unsigned IntrinsicID, llvm::StringRef Name="")
llvm::Value * MakeBinaryAtomicValue(clang::CodeGen::CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const clang::CallExpr *E, llvm::AtomicOrdering Ordering=llvm::AtomicOrdering::SequentiallyConsistent, llvm::SyncScope::ID SSID=llvm::SyncScope::System)
clang::CodeGen::Address CheckAtomicAlignment(clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E)
llvm::Value * MakeAtomicCmpXchgValue(clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E, bool ReturnBool, llvm::AtomicOrdering SuccessOrdering, llvm::AtomicOrdering FailureOrdering, llvm::SyncScope::ID SSID=llvm::SyncScope::System)
Utility to insert an atomic cmpxchg instruction.
llvm::Value * EmitToInt(clang::CodeGen::CodeGenFunction &CGF, llvm::Value *V, clang::QualType T, llvm::IntegerType *IntType)
Emit the conversions required to turn the given value into an integer of the given size.
llvm::Value * EmitOverflowIntrinsic(clang::CodeGen::CodeGenFunction &CGF, const llvm::Intrinsic::ID IntrinsicID, llvm::Value *X, llvm::Value *Y, llvm::Value *&Carry)
llvm::Value * EmitFromInt(clang::CodeGen::CodeGenFunction &CGF, llvm::Value *V, clang::QualType T, llvm::Type *ResultType)
llvm::Value * emitUnaryMaybeConstrainedFPBuiltin(clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID)
void appendDefaultIntrinsicArgs(llvm::SmallVectorImpl< llvm::Value * > &Args, llvm::Function *F)
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Expr * getArg(unsigned Arg)
getArg - Return the specified argument.
Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...
llvm::Value * EmitScalarExpr(const Expr *E, bool IgnoreResultAssign=false)
EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type,...
llvm::Function * getIntrinsic(unsigned IID, ArrayRef< llvm::Type * > Tys={})
A (possibly-)qualified type.