Add codegen for one of the triangle variants

This commit is contained in:
Magnus Norddahl 2016-11-12 00:50:21 +01:00
commit c852b6c5e9
18 changed files with 739 additions and 38 deletions

View file

@ -56,7 +56,7 @@ llvm::IRBuilder<> &SSAScope::builder()
llvm::Function *SSAScope::intrinsic(llvm::Intrinsic::ID id, llvm::ArrayRef<llvm::Type *> parameter_types)
{
llvm::Function *func = module()->getFunction(llvm::Intrinsic::getName(id));
llvm::Function *func = module()->getFunction(llvm::Intrinsic::getName(id, parameter_types));
if (func == 0)
func = llvm::Function::Create(llvm::Intrinsic::getType(context(), id, parameter_types), llvm::Function::ExternalLinkage, llvm::Intrinsic::getName(id, parameter_types), module());
return func;