This is an archive of the discontinued LLVM Phabricator instance.

[flang] Allow compiler directives in the specification part of a module
ClosedPublic

Authored by vdonaldson on Feb 1 2023, 1:00 PM.

Details

Summary

Lowering code currently allows for directives inside a program or
subprogram, or outside any program unit. Directives may also appear
in the specification part of a module, as in:

module mm
  interface
     subroutine ss(aa)
       !dir$ ignore_tkr(tkr) aa
       integer :: aa(*)
     end subroutine ss
  end interface
end module

With some exceptions such as OpenMP directives, most directives are
currently ignored, so this code should generate an "ignoring all compiler
directives" message.

Diff Detail

Event Timeline

vdonaldson created this revision.Feb 1 2023, 1:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2023, 1:00 PM
vdonaldson requested review of this revision.Feb 1 2023, 1:00 PM
clementval accepted this revision.Feb 1 2023, 1:01 PM
clementval added a subscriber: clementval.

LGTM

This revision is now accepted and ready to land.Feb 1 2023, 1:01 PM
vdonaldson edited reviewers, added: jeanPerier, vzakhari; removed: jdoerfert.Feb 1 2023, 1:01 PM