ocelot/ocelot/analysis/implementation/AffineAnalysis.cpp
void AffineAnalysis::analyze(ir::IRKernel &k) {
	_kernel = &k;
	AffineTransferFunction::_isFunct = _kernel->function();
	auto dfg = static_cast<DataflowGraph*>(getAnalysis("DataflowGraphAnalysis"));

	dfg->convertToSSAType(DataflowGraph::Gated);

	_sm = new AffineTransferFunction::StateMap;
	_aft = new AffineTransferFunction(*_sm, dfg);
	
	_sa = new SparseAnalysis(dfg, _aft);
	_sa->iterateToFixPoint();
}
/*! \brief Analyze the control and data flow graphs searching for divergent
 *		variables and blocks
 */
\brief Analyze the control and data flow graphs searching for divergent
variables and blocks
\ brief Analyze the control and data flow graphs searching for divergent variables and blocks
void AffineAnalysis::analyze(ir::IRKernel &k) {
	_kernel = &k;
	AffineTransferFunction::_isFunct = _kernel->function();
	auto dfg = static_cast<DataflowGraph*>(getAnalysis("DataflowGraphAnalysis"));
	dfg->convertToSSAType(DataflowGraph::Gated);
	_sm = new AffineTransferFunction::StateMap;
	_aft = new AffineTransferFunction(*_sm, dfg);
	_sa = new SparseAnalysis(dfg, _aft);
	_sa->iterateToFixPoint();
}
void AffineAnalysis :: analyze ( ir :: IRKernel & k ) { _kernel = & k ; AffineTransferFunction :: _isFunct = _kernel -> function ( ) ; auto dfg = static_cast < DataflowGraph * > ( getAnalysis ( " " ) ) ; dfg -> convertToSSAType ( DataflowGraph :: Gated ) ; _sm = new AffineTransferFunction :: StateMap ; _aft = new AffineTransferFunction ( * _sm , dfg ) ; _sa = new SparseAnalysis ( dfg , _aft ) ; _sa -> iterateToFixPoint ( ) ; }
\brief Analyze the control and data flow graphs searching for divergent
              variables and blocks
\ brief Analyze the control and data flow graphs searching for divergent variables and blocks