P4 to Git Change 1222955 by smekhano@stas-rampitec-hsa on 2015/12/22 13:06:59
SWDEV-80173 - remove the opt level adjustment based on the function size Since it only limits the llvm backend, but not optimizer or SC it really hurts the compile time. A huge unoptimized hsail after inlining and no backend optimizations goes to the SC with overwhelming results. A proper way of addressing these issues is to keep inlining reasonable. Testing: smoke, precheckin Reviewed by Evgeny Mankov Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/codegen.cpp#65 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/IPO/AMDInline.cpp#3 edit
Cette révision appartient à :
@@ -42,24 +42,6 @@
|
||||
using namespace amdcl;
|
||||
using namespace llvm;
|
||||
|
||||
/*! Function that modifies the code gen level based on the
|
||||
* function size threshhold.
|
||||
*/
|
||||
static CodeGenOpt::Level
|
||||
AdjustCGOptLevel(Module& M, CodeGenOpt::Level OrigOLvl)
|
||||
{
|
||||
const unsigned int FuncSizeThreshold = 10000;
|
||||
if (OrigOLvl == CodeGenOpt::None)
|
||||
return OrigOLvl;
|
||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
|
||||
Function *F = (Function *)I;
|
||||
if (F->size() > FuncSizeThreshold) {
|
||||
return CodeGenOpt::None;
|
||||
}
|
||||
}
|
||||
return OrigOLvl;
|
||||
}
|
||||
|
||||
//!--------------------------------------------------------------------------!//
|
||||
// JIT Memory manager
|
||||
//!--------------------------------------------------------------------------!//
|
||||
@@ -506,9 +488,6 @@ llvmCodeGen(
|
||||
break;
|
||||
};
|
||||
|
||||
// If there is a very big function, lower the optimization level.
|
||||
OLvl = AdjustCGOptLevel(mod, OLvl);
|
||||
|
||||
// Adjust the triple to match (if known), otherwise stick with the
|
||||
// module/host triple.
|
||||
Triple::ArchType Type = Triple::getArchTypeForLLVMName(MArch);
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur