Adds proper codegen for 'firstprivate' clause in for directive. Initially codegen for 'firstprivate' clause was implemented for 'parallel' directive only.
Also this patch emits sync point only after initialization of firstprivate variables, not all private variables. This sync point is not required for privates, lastprivates etc., only for initialization of firstprivate variables.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
168 ↗ | (On Diff #23594) | It's probably worth leaving a comment here describing the valid situations in which this can fail. |
lib/CodeGen/CGStmtOpenMP.cpp | ||
159 ↗ | (On Diff #23594) | This is the sort of place you should be using comments on arguments: something like /*refersToEnclosing*/ would be helpful here. |