Exploiting Branch Constraints without Exhaustive Path Enumeration - - PowerPoint PPT Presentation

exploiting branch constraints without exhaustive path
SMART_READER_LITE
LIVE PREVIEW

Exploiting Branch Constraints without Exhaustive Path Enumeration - - PowerPoint PPT Presentation

Exploiting Branch Constraints without Exhaustive Path Enumeration Ting Chen, Tulika Mitra, Abhik Roychoudhury, Vivy Suhendra National University of Singapore Static WCET Analysis Flow analysis Loop bounds and infeasible paths


slide-1
SLIDE 1

Exploiting Branch Constraints without Exhaustive Path Enumeration

Ting Chen, Tulika Mitra, Abhik Roychoudhury, Vivy Suhendra National University of Singapore

slide-2
SLIDE 2

Static WCET Analysis

Flow analysis

Loop bounds and infeasible paths

Micro-architectural modeling

Effects of micro-architecture on execution time

Estimation

Find an upper bound on WCET given the

results of flow analysis and micro-architectural modeling

slide-3
SLIDE 3

WCET Estimation

Tree-based: Timing schema

Simple and efficient Difficult to handle infeasible path information

Implicit path enumeration (IPET)

Program flows expressed as linear equations Generally difficult to express infeasible path

consisting of a sequence of basic blocks

Path-based

Search for the longest path in the program Naturally handles various flow information

slide-4
SLIDE 4

Longest Path Search

Enumerate all possible paths and select the one

with the maximum execution time

6.55 x 1016 paths in a single iteration of a loop Fails to produce results after 60 hours

Stappert’s technique

Find the longest path π If π is infeasible remove π from the CFG and search for

the next longest path

Inefficient if large fraction paths are infeasible

99.9% infeasible paths

How to avoid exhaustive path enumeration?

slide-5
SLIDE 5

Overall approach

WCET of each basic block is known Focus on the loops Construct DAG corresponding to loop body Acyclic path from source to sink in DAG Find the longest acyclic path in the DAG

slide-6
SLIDE 6

Avoiding exhaustive path enumeration

Compute the “conflicting’’ branch-branch or

assignment-branch pairs a-priori

x > 3 and x < 2 are conflicting x = 1 and x > 2 are conflicting

Traverse the DAG from sink to source Remembering the longest path so far is not

enough during traversal

If it is infeasible, then we need to backtrack

Maintain only those partial paths which when

extended can potentially become the longest path

slide-7
SLIDE 7

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B3 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: Infeasible Path

T T T

slide-8
SLIDE 8

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B3 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: Infeasible Path

T T T Conflicting pairs: B1 B2 & B7 B8

slide-9
SLIDE 9

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B3 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: Infeasible Path

T T T Conflicting pairs: B1 B2 & B7 B8 B6 B7 & B7 B9

slide-10
SLIDE 10

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: WCET Estimation

T T T Conflicting pairs: B1 B2 & B7 B8 B6 B7 & B7 B9 B1 0 : B1 0 B9 : B9 ,B1 0 B8 : B8 ,B1 0 B7 :B7 ,B8 ,B1 0 [ B7 B8 ] :B7 ,B9 ,B1 0 [ B7 B9 ] B3 B6 :B6 ,B7 ,B8 ,B1 0 [ B7 B8 ] :B6 ,B7 ,B9 ,B1 0 [ B7 B9 ]

slide-11
SLIDE 11

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: WCET Estimation

T T T Conflicting pairs: B1 B2 & B7 B8 B6 B7 & B7 B9 B7 :B7 ,B8 ,B1 0 [ B7 B8 ] :B7 ,B9 ,B1 0 [ B7 B9 ] B3 B6 :B6 ,B7 ,B8 ,B1 0 B5 :B5 ,B7 ,B8 ,B1 0 [ B7 B8 ] :B5 ,B7 ,B9 ,B1 0 [ B7 B9 ]

slide-12
SLIDE 12

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: WCET Estimation

T T T Conflicting pairs: B1 B2 & B7 B8 B6 B7 & B7 B9 B3 B6 :B6 ,B7 ,B8 ,B1 0 B5 :B5 ,B7 ,B9 ,B1 0

slide-13
SLIDE 13

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: WCET Estimation

T T T Conflicting pairs: B1 B2 & B7 B8 B6 B7 & B7 B9 B7 :B7 ,B8 ,B1 0 [ B7 B8 ] :B7 ,B9 ,B1 0 [ B7 B9 ] B3 B6 :B6 ,B7 ,B8 ,B1 0 B5 :B5 ,B7 ,B8 ,B1 0 [ B7 B8 ] :B5 ,B7 ,B9 ,B1 0 [ B7 B9 ]

slide-14
SLIDE 14

x > 3 z+ + y+ + x = 1 x < 2 z = z/ 2 z -- y = = 4 B1 B2 B4 B5 B6 B7 B8 B9 B1 0 x = argv[ 1 ]

Illustration: WCET Estimation

T T T Conflicting pairs: B1 B2 & B7 B8 B6 B7 & B7 B9 B3 B6 :B6 ,B7 ,B8 ,B1 0 B5 :B5 ,B7 ,B8 ,B1 0 [ B7 B8 ] :B5 ,B7 ,B9 ,B1 0

slide-15
SLIDE 15

Experimental Evaluation

4 58 256 statemate5 1 10 10 statemate4 40 69,867 1,459,364 statemate3 14 36 902 statemate2 15 7,440 19,440 statemate1 121,831 1.09 x 1013 6.55 x 1016 statemate Enumerated Paths Feasible Paths Total Paths Function

slide-16
SLIDE 16

Discussion

Infeasible path patterns of arbitrary length Discovering more infeasibility information Infeasible paths spanning loop iterations