void ConvertPredicationToSelectPass::runOnKernel( ir::Kernel& k )
	{
		assertM( k.ISA == ir::Instruction::PTX, 
			"This pass is valid for PTX kernels only." );
		_kernel = static_cast< ir::PTXKernel* >( &k );
		k.dfg()->compute();
		
		for( DataflowGraph::iterator block = k.dfg()->begin(); 
			block != k.dfg()->end(); ++block )
		{
			_runOnBlock( block );
		}
	}
Esempio n. 2
0
void RemoveBarrierPass::runOnKernel( ir::IRKernel& k )
{
	report( "Removing barriers from kernel " << k.name );
	assertM( k.ISA == ir::Instruction::PTX, 
		"This pass is valid for PTX kernels only." );
	_reentryPoint = 1;
	_spillBytes = 1;
	_kernel = static_cast< ir::PTXKernel* >( &k );
	
	for( analysis::DataflowGraph::iterator block = _dfg().begin(); 
		block != _dfg().end(); ++block )
	{
		_runOnBlock( block );
	}
	
	_addLocalVariables();
}