BEGIN:VCALENDAR
VERSION:2.0
PRODID:Linklings LLC
BEGIN:VTIMEZONE
TZID:America/Chicago
X-LIC-LOCATION:America/Chicago
BEGIN:DAYLIGHT
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
TZNAME:CDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
TZNAME:CST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20181221T160728Z
LOCATION:D175
DTSTART;TZID=America/Chicago:20181112T153000
DTEND;TZID=America/Chicago:20181112T160000
UID:submissions.supercomputing.org_SC18_sess176_ws_llvmf101@linklings.com
SUMMARY:OP2-Clang: A Source-to-Source Translator Using Clang/LLVM LibTooli
 ng
DESCRIPTION:Workshop\nProgram Transformation, Programming Systems, Worksho
 p Reg Pass\n\nOP2-Clang: A Source-to-Source Translator Using Clang/LLVM Li
 bTooling\n\nBalogh, Mudalige, Reguly, Antao, Bertolli\n\nDomain Specific L
 anguages or Active Library frameworks have recently emerged as an importan
 t method for gaining performance portability, where an application can be 
 efficiently executed on a wide range of HPC architectures without signific
 ant manual modifications. Embedded DSLs such as OP2, provides an API embed
 ded in general purpose languages such as C/C++/Fortran. They rely on sourc
 e-to-source translation and code refactorization to translate the higher-l
 evel API calls to platform specific parallel implementations. OP2 targets 
 the solution of unstructured-mesh computations, where it can generate a va
 riety of parallel implementations for execution on architectures such as C
 PUs, GPUs, distributed memory clusters and heterogeneous processors making
  use of a wide range of platform specific optimizations. Compiler tool-cha
 ins supporting source-to-source translation of code written in mainstream 
 languages currently lack the capabilities to carry out such wide-ranging c
 ode transformations. Clang/LLVM’s Tooling library (LibTooling) has long be
 en touted as having such capabilities but have only demonstrated its use i
 n simple source refactoring tasks. \n\nIn this paper, we introduce OP2-Cla
 ng, a source-to-source translator based on LibTooling, for OP2’s C/C++ API
 , capable of generating target parallel code based on SIMD, OpenMP, CUDA a
 nd their combinations with MPI. OP2-Clang is designed to significantly red
 uce maintenance, particularly making it easy to be extended to generate ne
 w parallelizations and optimizations for hardware platforms. In this resea
 rch, we demonstrate its capabilities including (1) the use of LibTooling’s
  AST matchers together with a simple strategy that use parallelization tem
 plates or skeletons to significantly reduce the complexity of generating r
 adically different and transformed target code and (2) chart the challenge
 s and solution to generating optimized parallelizations for OpenMP, SIMD a
 nd CUDA. Results indicate that OP2-Clang produces near-identical parallel 
 code to that of OP2’s current source-to-source translator. We believe that
  the lessons learned in OP2-Clang can be readily applied to developing oth
 er similar source-to-source translators, particularly for DSLs.
URL:https://sc18.supercomputing.org/presentation/?id=ws_llvmf101&sess=sess
 176
END:VEVENT
END:VCALENDAR

