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

@@ -187,6 +187,10 @@ Optimize(llvm::Module *module, int optLevel) {
optPM.add(targetLibraryInfo);
optPM.add(new llvm::TargetData(module));
#if defined(LLVM_3_0) || defined(LLVM_3_0svn)
optPM.add(llvm::createIndVarSimplifyPass());
#endif
if (optLevel == 0) {
// This is more or less the minimum set of optimizations that we
// need to do to generate code that will actually run. (We can't