AstNodePtr LoopTransformInterface:: CreateDynamicFusionConfig( const AstNodePtr& groupNum, AstInterface::AstNodeList& args, int &id) { assert(fa != 0); std::string name = "DynamicFusionConfig"; ++configIndex; args.push_front( fa->CreateConstInt( args.size() ) ); args.push_front( fa->CreateConstInt(configIndex) ); AstNodePtr invoc = fa->CreateFunctionCall( "DynamicFusionConfig", args); return fa->CreateAssignment ( groupNum, invoc) ; }
AstNodePtr ArrayUseAccessFunction:: CreateArrayAccess( AstInterface& fa, const AstNodePtr& arr, AstInterface::AstNodeList& index) { if (prev != 0) return prev->CreateArrayAccess(fa, arr, index); if (index.size() > 1) { AstInterface::AstNodeList tmp = index; tmp.push_front(arr); return fa.CreateFunctionCall(funcname, tmp); } else return fa.CreateArrayAccess(arr, index); }