Use malloc() to get space for task arguments when compiling to AVX.

This is to work around the LLVM bug/limitation discused in LLVM bug
10841 (http://llvm.org/bugs/show_bug.cgi?id=10841).
This commit is contained in:
Matt Pharr
2011-09-17 13:36:38 -07:00
parent 3607f3e045
commit 2405dae8e6
7 changed files with 166 additions and 10 deletions

View File

@@ -659,6 +659,11 @@ lEmitFunctionCode(FunctionEmitContext *ctx, llvm::Function *function,
// the code to free that memory, now that we've copied the
// parameter values out of the structure.
ctx->EmitFree(structParamPtr);
#else
// We also do this for AVX... (See discussion in
// FunctionEmitContext::LaunchInst().)
if (g->target.isa == Target::AVX)
ctx->EmitFree(structParamPtr);
#endif // ISPC_IS_WINDOWS
}
else {