An LLVM based Loop Profiler Shalini Jain * , Kamlesh Kumar + , Suresh - - PowerPoint PPT Presentation

an llvm based loop profiler
SMART_READER_LITE
LIVE PREVIEW

An LLVM based Loop Profiler Shalini Jain * , Kamlesh Kumar + , Suresh - - PowerPoint PPT Presentation

An LLVM based Loop Profiler Shalini Jain * , Kamlesh Kumar + , Suresh Purini $ , Dibyendu Das , Ramakrishna Upadrasta * Indian Institute of Technology, Hyderabad * National Institute of Technology, Manipur + International Institute of Information


slide-1
SLIDE 1

An LLVM based Loop Profiler

Shalini Jain*, Kamlesh Kumar+, Suresh Purini$, Dibyendu Das£, Ramakrishna Upadrasta* Indian Institute of Technology, Hyderabad* National Institute of Technology, Manipur+ International Institute of Information Technology, Hyderabad$ AMD India Pvt. Ltd£

slide-2
SLIDE 2

Profiling

Profiling: A way to calculate run-time information

○ Execution-time, Cache-misses, Iteration Count, etc … ○ Helps to analyze the code to fix performance related issues ○ Need to do instrumentation to calculate profile information

Currently: No Loop Profiler in LLVM

○ For analyzing run time metrics

Our Contribution: Implemented an Loop based Profiler

○ Calculates clock ticks ○ Calculates iteration count

2

slide-3
SLIDE 3

An LLVM based Loop Profiler: Flow Graph

3

slide-4
SLIDE 4

Implementation

  • Instrumentation For Each Loop

○ At end of pre-header block ■ Appended Instructions for first Call Instruction to clock function

4

Loop Pre-Header

slide-5
SLIDE 5

Implementation

  • Instrumentation For Each Loop

○ Before First Non ɸ Node of All Possible Exit Blocks ■ Append instructions for

  • Second Call Instruction to clock function
  • Store Difference of Two calls
  • Add current difference with previous value and Store it

5

slide-6
SLIDE 6

6

slide-7
SLIDE 7

Results: SPEC CPU 2006 (Inner Loop)

7

slide-8
SLIDE 8

Results: SPEC CPU 2006 (Outer Loop)

8

slide-9
SLIDE 9

Results: SPEC CPU 2006 (All Loops)

9

slide-10
SLIDE 10

Result Analysis: SPEC CPU 2006 (INT)

hmmer (SPEC 2006 INT) xalancbmk (SPEC 2006 INT)

10

slide-11
SLIDE 11

Result Analysis: SPEC CPU 2006 (FP)

Povray (SPEC 2006 FP) namd (SPEC 2006 FP)

11

slide-12
SLIDE 12

Results: SPEC CPU 2017 (Inner Loop)

12

slide-13
SLIDE 13

Results: SPEC CPU 2017 (Outer Loop)

13

slide-14
SLIDE 14

Results: SPEC CPU 2017 (All Loops)

14

slide-15
SLIDE 15

Result Analysis: SPEC CPU 2017 (INT)

  • mnetpp (SPEC CPU

2017 INT) xalancbmk (SPEC CPU 2017 INT)

15

slide-16
SLIDE 16

Result Analysis: SPEC CPU 2017 (FP)

partst (SPEC CPU 2017 FP) imagick(SPEC CPU 2017 FP)

16

slide-17
SLIDE 17

Thank You!

17