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:20260522T150115Z
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:Gábor Dániel Balogh (Pázmány Péter Catholic University, Hungar
 y); Gihan Ravideva Mudalige (University of Warwick); Istvan Z. Reguly (Páz
 mány Péter Catholic University, Hungary); and Samuel Antao and Carlo Berto
 lli (IBM)\n\nDomain Specific Languages or Active Library frameworks have r
 ecently emerged as an important method for gaining performance portability
 , where an application can be efficiently executed on a wide range of HPC 
 architectures without significant manual modifications. Embedded DSLs such
  as OP2, provides an API embedded in general purpose languages such as C/C
 ++/Fortran. They rely on source-to-source translation and code refactoriza
 tion to translate the higher-level API calls to platform specific parallel
  implementations. OP2 targets the solution of unstructured-mesh computatio
 ns, where it can generate a variety of parallel implementations for execut
 ion on architectures such as CPUs, GPUs, distributed memory clusters and h
 eterogeneous processors making use of a wide range of platform specific op
 timizations. Compiler tool-chains supporting source-to-source translation 
 of code written in mainstream languages currently lack the capabilities to
  carry out such wide-ranging code transformations. Clang/LLVM’s Tooling li
 brary (LibTooling) has long been touted as having such capabilities but ha
 ve only demonstrated its use in simple source refactoring tasks. \n\nIn th
 is paper, we introduce OP2-Clang, a source-to-source translator based on L
 ibTooling, for OP2’s C/C++ API, capable of generating target parallel code
  based on SIMD, OpenMP, CUDA and their combinations with MPI. OP2-Clang is
  designed to significantly reduce maintenance, particularly making it easy
  to be extended to generate new parallelizations and optimizations for har
 dware platforms. In this research, we demonstrate its capabilities includi
 ng (1) the use of LibTooling’s AST matchers together with a simple strateg
 y that use parallelization templates or skeletons to significantly reduce 
 the complexity of generating radically different and transformed target co
 de and (2) chart the challenges and solution to generating optimized paral
 lelizations for OpenMP, SIMD and CUDA. Results indicate that OP2-Clang pro
 duces near-identical parallel code to that of OP2’s current source-to-sour
 ce translator. We believe that the lessons learned in OP2-Clang can be rea
 dily applied to developing other similar source-to-source translators, par
 ticularly for DSLs.\n\nTag: Program Transformation, Programming Systems\n\
 nRegistration Category: Workshop Reg Pass\n\n
END:VEVENT
END:VCALENDAR
