Reduction Variable Recognition

Reduction pass performs reduction recognition for each ForLoop. It generates cetus annotation in the form of “#pragma cetus reduction(…)” Currently, it supports scalar (sum += …), ArrayAccess (A[i] += …), and AccessExpression (A->x += …) for reduction variable. If another pass wants to access reduction information for a given statement, stmt, Tools.getAnnotation(stmt, “cetus”, “reduction”) will return an object that contains a reduction map.