exploiting branch constraints without exhaustive path
play

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


  1. Exploiting Branch Constraints without Exhaustive Path Enumeration Ting Chen, Tulika Mitra, Abhik Roychoudhury, Vivy Suhendra National University of Singapore

  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

  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

  4. Longest Path Search � Enumerate all possible paths and select the one with the maximum execution time � 6.55 x 10 16 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?

  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

  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

  7. Illustration: Infeasible Path B1 x > 3 T B3 B2 z+ + x = argv[ 1 ] y = = 4 B4 T B5 y+ + x = 1 B6 x < 2 B7 B9 T z = z/ 2 z -- B8 B1 0

  8. Illustration: Infeasible Path B1 x > 3 T B3 B2 z+ + x = argv[ 1 ] Conflicting pairs: y = = 4 B4 B1 � B2 & B7 � B8 T B5 y+ + x = 1 B6 x < 2 B7 B9 T z = z/ 2 z -- B8 B1 0

  9. Illustration: Infeasible Path B1 x > 3 T B3 B2 z+ + x = argv[ 1 ] Conflicting pairs: y = = 4 B4 B1 � B2 & B7 � B8 T B5 y+ + x = 1 B6 B6 � B7 & B7 � B9 x < 2 B7 B9 T z = z/ 2 z -- B8 B1 0

  10. Illustration: WCET Estimation B1 Conflicting pairs: x > 3 B1 � B2 & B7 � B8 B6 � B7 & B7 � B9 B2 B3 T z+ + x = argv[ 1 ] B4 B1 0 : B1 0 y = = 4 B9 : B9 ,B1 0 B6 B8 : B8 ,B1 0 B5 T y+ + x = 1 B7 :B7 ,B8 ,B1 0 [ B7 � B8 ] :B7 ,B9 ,B1 0 [ B7 � B9 ] B7 x < 2 B6 :B6 ,B7 ,B8 ,B1 0 [ B7 � B8 ] B8 B9 :B6 ,B7 ,B9 ,B1 0 [ B7 � B9 ] T z = z/ 2 z -- B1 0

  11. Illustration: WCET Estimation B1 Conflicting pairs: x > 3 B1 � B2 & B7 � B8 B6 � B7 & B7 � B9 B2 B3 T z+ + x = argv[ 1 ] B4 B7 :B7 ,B8 ,B1 0 [ B7 � B8 ] y = = 4 :B7 ,B9 ,B1 0 [ B7 � B9 ] B6 B5 T B6 :B6 ,B7 ,B8 ,B1 0 y+ + x = 1 B5 :B5 ,B7 ,B8 ,B1 0 [ B7 � B8 ] B7 :B5 ,B7 ,B9 ,B1 0 [ B7 � B9 ] x < 2 B8 B9 T z = z/ 2 z -- B1 0

  12. Illustration: WCET Estimation B1 Conflicting pairs: x > 3 B1 � B2 & B7 � B8 B6 � B7 & B7 � B9 B2 B3 T z+ + x = argv[ 1 ] B4 y = = 4 B6 B5 T B6 :B6 ,B7 ,B8 ,B1 0 y+ + x = 1 B5 :B5 ,B7 ,B9 ,B1 0 B7 x < 2 B8 B9 T z = z/ 2 z -- B1 0

  13. Illustration: WCET Estimation B1 Conflicting pairs: x > 3 B1 � B2 & B7 � B8 B6 � B7 & B7 � B9 B2 B3 T z+ + x = argv[ 1 ] B4 B7 :B7 ,B8 ,B1 0 [ B7 � B8 ] y = = 4 :B7 ,B9 ,B1 0 [ B7 � B9 ] B6 B5 T B6 :B6 ,B7 ,B8 ,B1 0 y+ + x = 1 B5 :B5 ,B7 ,B8 ,B1 0 [ B7 � B8 ] B7 :B5 ,B7 ,B9 ,B1 0 [ B7 � B9 ] x < 2 B8 B9 T z = z/ 2 z -- B1 0

  14. Illustration: WCET Estimation B1 Conflicting pairs: x > 3 B1 � B2 & B7 � B8 B6 � B7 & B7 � B9 B2 B3 T z+ + x = argv[ 1 ] B4 y = = 4 B6 B5 T B6 :B6 ,B7 ,B8 ,B1 0 y+ + x = 1 B5 :B5 ,B7 ,B8 ,B1 0 [ B7 � B8 ] B7 x < 2 :B5 ,B7 ,B9 ,B1 0 B8 B9 T z = z/ 2 z -- B1 0

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

  16. Discussion � Infeasible path patterns of arbitrary length � Discovering more infeasibility information � Infeasible paths spanning loop iterations

Recommend


More recommend