This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
ClosedPublic

Authored by ABataev on Mar 10 2015, 6:59 AM.

Details

Summary

This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct

Diff Detail

Repository
rL LLVM

Event Timeline

ABataev updated this revision to Diff 21574.Mar 10 2015, 6:59 AM
ABataev retitled this revision from to [OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs..
ABataev updated this object.
ABataev edited the test plan for this revision. (Show Details)
ABataev added a subscriber: Unknown Object (MLST).
rjmccall edited edge metadata.Mar 10 2015, 1:27 PM

You should generally not ignore surrounding expressions and statement in IRGen, and you *definitely* shouldn't IgnoreImplicit. If you want to strip off ExprWithCleanups, you should check specifically for that.

John, you're right, I'll rework the patch. Actually, all other surrounding expressions are not allowed in atomics and would be filtered later, during deeper expression analysis. But generally you're right, IgnoreImplicit() is too rough.

ABataev updated this revision to Diff 21674.Mar 10 2015, 9:19 PM
ABataev edited edge metadata.

Removed a call to IgnoreImplicit() method.

Looks great, thanks.

This revision was automatically updated to reflect the committed changes.