University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price...

15
University of Colorado at Boulde Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi Vinjamuri

Transcript of University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price...

Page 1: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research Lab

ZDDs for Dynamic Trace Analysis

Graham Price Manish VachharajaniJohn GiacomoniJohn MichalakesSreyasi Vinjamuri

Page 2: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Motivation

• Chip Multiprocessor (CMP) solutions are becoming more prevalent

• Dynamic program analysis can aid location of parallelism in sequential programs

• BDDs are useful

But they take days to create!

Page 3: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

DIN vs. Ready Time

li r1, &fibarr

mov r2, 8

mov r4, 1

mov r3, 1

add r5,r3,r4

st 0(r1),r5

mov r3,r4

mov r4,r5

addi r2,r2,-1

addi r1,r1,4

bnz r2, loop

add r5,r3,r4

st 0(r1),r5

mov r3,r4

0xbee0

0xbee4

Instruction Mem Addr

1

2

3

4

5

6

7

8

9

10

11

12

13

14

DIN

1

2

3

4

5

6

7

8

9

10

11

12

13

14

DIN Ready Time

1 2 3 4 5 6 7 8 9 10 11 12 13 14

1

2

3

4

13

5

7

9

10

6

8

11

14

12

Page 4: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Video

Details: Price, Giacomoni, and Vachharajani PACT 2008

http://www.youtube.com/watch?v=KdeRtDrPEY4

Page 5: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

The BDD Data StructureFalse ArcInvertingFalse ArcTrue Arc

F(X,Y,Z) = x’y + xy’ + z

1

X

Y

Z

Y

ZZ Z

1 10 01 11

X

Y

Z

Y

1

Page 6: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Trace BDD Construction

It = (X’ * Y’ * Z’ * W’)

1

X

Y

W

Z

It = (X * Y * Z * W)

= +

1

X

Y

W

Z

1

X

Y

W

Z

Y

W

Itrace = (X * Y * Z * W) + (X’ * Y’ * Z’ * W’)

0

Itrace = 0

0

1

X

Y

W

Z

Itrace = (X * Y * Z * W)

Page 7: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Trace BDD Construction

It = (X’ * Y’ * Z’ * W’)

1

X

Y

W

Z

It = (X * Y * Z * W)

= +

1

X

Y

W

Z

1

X

Y

W

Z

Y

W

Itrace = (X * Y * Z * W) + (X’ * Y’ * Z’ * W’)

Page 8: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Trace BDD Construction Cont..• Garbage Problem

1

X

Y

W

Z

1

X

Y

W

Z

Y

W

1

X

Y

W

Z

Page 9: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

ZDDsBDDs

1. Remove isomorpic graphs2. Skip and remove nodes whose pointers

point to the same child

ZDDs1. Remove isomorpic graphs2. Remove “1” nodes whose pointers

point to “0”

64641100 ... yxyxyx

Page 10: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

ZDD vs. BDD SizeIt = (X’ * Y’ * Z’ * W’) It = (X * Y * Z * W) + (X’ * Y * Z * W)

~ 20% Reduction

Page 11: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

DD Creation Time

DIN x RDY Tuples

Over 9 times faster!

Page 12: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

ZDD Construction

It = (X’ * Y’ * Z’ * W’)

1

X

Y

W

Z

It = (X * Y * Z * W)

= +

1

Itrace = (X * Y * Z * W) + (X’ * Y’ * Z’ * W’)

0

Itrace = 0

0

1

X

Y

W

Z

Itrace = (X * Y * Z * W)

1

Z

X

Y

W

Page 13: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Where BDDs Compress

1

X

Y

W

Z

1

X

Y

W

Z

Y

W

1

X

Y

W

Z

No Compression No CompressionCompression

= +

Page 14: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Where ZDDs Compress

1

X

Y

W

Z

Compression CompressionLittle/No Compression

= +

1

Z

X

Y

W

1

Details: Price and Vachharajani, to appear CGO 2010

Page 15: University of Colorado at Boulder Core Research Lab ZDDs for Dynamic Trace Analysis Graham Price Manish Vachharajani John Giacomoni John Michalakes Sreyasi.

University of Colorado at Boulder

Core Research LabUniversity of Colorado at Boulder

Core Research Lab

Questions?