Run module level LLVM optimization passes before calling finalizeObject

This commit is contained in:
Magnus Norddahl 2016-10-08 04:59:24 +02:00
parent a2551ce95e
commit 606b7f5a00

View file

@ -143,8 +143,8 @@ LLVMDrawersImpl::LLVMDrawersImpl()
CodegenDrawWall("tmvline1_revsubclamp", DrawWallVariant::RevSubClamp, 1);
CodegenDrawWall("tmvline4_revsubclamp", DrawWallVariant::RevSubClamp, 4);
mProgram.engine()->finalizeObject();
mProgram.modulePassManager()->run(*mProgram.module());
mProgram.engine()->finalizeObject();
FillColumn = mProgram.GetProcAddress<void(const DrawColumnArgs *, const WorkerThreadData *)>("FillColumn");
FillColumnAdd = mProgram.GetProcAddress<void(const DrawColumnArgs *, const WorkerThreadData *)>("FillColumnAdd");