This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Propagate correct location information from directive
ClosedPublic

Authored by clementval on Aug 11 2022, 1:34 AM.

Details

Summary

Location information was not correctly propagated when creating OpenACC
operations. This patch propagate the correct location information from
the parse tree nodes to OpenACC MLIR operations.

Diff Detail

Event Timeline

clementval created this revision.Aug 11 2022, 1:34 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
clementval requested review of this revision.Aug 11 2022, 1:34 AM

Do not check the full file path to be platform agnostic

razvanlupusoru requested changes to this revision.Aug 11 2022, 8:05 AM

Looks great!

I double-checked that you don't have any more converter.getCurrentLocation() calls. The line numbers in the test match what I expected.

One thing missing in the test is clause location testing - is it possible to add to test that an expression from an "if" clause gets correct line and offset?

This revision now requires changes to proceed.Aug 11 2022, 8:05 AM

Looks great!

I double-checked that you don't have any more converter.getCurrentLocation() calls. The line numbers in the test match what I expected.

One thing missing in the test is clause location testing - is it possible to add to test that an expression from an "if" clause gets correct line and offset?

Yeah I'll add a test in that sense.

Add test for if clause expr location

razvanlupusoru accepted this revision.Aug 11 2022, 9:39 AM

Thank you for adding the line number functionality and testing for the clause expressions. Looks great!

This revision is now accepted and ready to land.Aug 11 2022, 9:39 AM