in C++ with concepts Intro Optimizing compiler Transformations - - PowerPoint PPT Presentation

in c with concepts
SMART_READER_LITE
LIVE PREVIEW

in C++ with concepts Intro Optimizing compiler Transformations - - PowerPoint PPT Presentation

Axioms as generic rewrite rules in C++ with concepts Intro Optimizing compiler Transformations i+0 i s + string "" s Rewrite on built in types User-defined types Generic Concepts Rewrite rules


slide-1
SLIDE 1

Axioms as generic rewrite rules in C++ with concepts

slide-2
SLIDE 2

Intro

  • Optimizing compiler
  • Transformations
  • i+0 → i
  • s + string"" → s
  • Rewrite on built in types
  • User-defined types
slide-3
SLIDE 3

Generic Concepts

slide-4
SLIDE 4

Rewrite rules

  • Rewrite rules
  • Conditional rewrite rules
slide-5
SLIDE 5

Generating rewrite rules

Instantiate axioms Extract rewrite rules from axiom and divide a rule into two functions: LHS and RHS

slide-6
SLIDE 6

Generating rewrite rules

Translate a rule function into an intermediate representation

slide-7
SLIDE 7

Generating rewrite rules

Eliminate function abstractions

slide-8
SLIDE 8

Generating rewrite rules

Construct the rule patterns and put them in the rule repository

slide-9
SLIDE 9

Applying rewrite rules

  • For a) and b) match rule pattern with AST of each statement
  • For c) first inline then match
  • Abstraction index
slide-10
SLIDE 10

Processing pipeline

slide-11
SLIDE 11

Evaluation

  • Abstraction penalty: ratio of the execution time of an abstracted

implementation over a direct implementation

  • Wraps a varying number of double values into user-defined classes
  • A is with optimizations, B without
  • Compilation time increased by a factor of 1.0035