Lines Matching full:llvm
21 #include <llvm/IR/Attributes.h>
22 #include <llvm/IR/DerivedTypes.h>
23 #include <llvm/IR/Function.h>
24 #include <llvm/IR/IRBuilder.h>
25 #include <llvm/IR/Intrinsics.h>
28 namespace llvm {
40 static ::llvm::Type* GetLLVMTypeOfIntrinsicValType(IRBuilder& irb,
86 LOG(FATAL) << "Invalid intrinsic type " << type << "to get LLVM type!";
93 IntrinsicHelper::IntrinsicHelper(::llvm::LLVMContext& context,
94 ::llvm::Module& module) {
109 ::llvm::Type* arg_type[kIntrinsicMaxArgc];
127 ::llvm::Type* ret_type =
130 ::llvm::FunctionType* type =
131 ::llvm::FunctionType::get(ret_type,
132 ::llvm::ArrayRef< ::llvm::Type*>(arg_type, num_args),
136 ::llvm::Function *fn = ::llvm::Function::Create(type,
137 ::llvm::Function::ExternalLinkage,
151 DCHECK_NE(fn, static_cast< ::llvm::Function*>(NULL)) << "Intrinsic `"
155 for (::llvm::Function::arg_iterator arg_iter = fn->arg_begin(),
158 std::vector< ::llvm::Attribute::AttrKind> attributes;
159 attributes.push_back(::llvm::Attribute::NoCapture);
160 attributes.push_back(::llvm::Attribute::NoAlias);
161 ::llvm::AttributeSet attribute_set = ::llvm::AttributeSet::get(fn->getContext(),
177 } // namespace llvm