Page MenuHomePhabricator

[OPENMP] ‘linear’ clause codegen
ClosedPublic

Authored by amusman on Mar 17 2015, 3:47 AM.

Details

Summary

Please review CodeGen of the 'linear' clause for the 'omp simd' directive.
The linear variable is privatized (similar to 'private') and its value on current iteration is calculated, similar to the loop counter variables.

Diff Detail

Repository
rL LLVM

Event Timeline

amusman updated this revision to Diff 22084.Mar 17 2015, 3:47 AM
amusman retitled this revision from to [OPENMP] ‘linear’ clause codegen .
amusman updated this object.
amusman edited the test plan for this revision. (Show Details)
amusman added a subscriber: Unknown Object (MLST).
rjmccall edited edge metadata.Mar 17 2015, 1:14 PM

Mostly looks good.

include/clang/AST/OpenMPClause.h
1388 ↗(On Diff #22084)

Please add a comment describing the memory layout of the extra fields here.

1421 ↗(On Diff #22084)

It looks like these 'clear' methods are called from one place; just inline them there. If you'd rather not, please at least avoid calling them 'clear', which has different implications for C++ data structures.

lib/AST/Stmt.cpp
1343 ↗(On Diff #22084)

Please document the contributors to these magic numbers.

Also, if I'm understanding correctly, the calculation should be (4 * NumVars + 2) * sizeof(Expr*).

amusman updated this revision to Diff 22193.Mar 18 2015, 9:23 AM
amusman edited edge metadata.

John, thank you, I've fixed all the issues.

Thanks, LGTM.

This revision was automatically updated to reflect the committed changes.