41
Many of the slides in this lecture are either from or adapted from slides provided by the authors of the textbook “Computer Systems: A Programmer’s Perspective,” 2 nd Edition and are provided from the website of Carnegie-Mellon University, course 15-213, taught by Randy Bryant and David O’Hallaron in Fall 2010. These slides are indicated “Supplied by CMU” in the notes section of the slides.

Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Many of the slides in this lecture are either from or adapted from slides provided by the authors of the textbook “Computer Systems: A Programmer’s Perspective,” 2nd Edition and are provided from the website of Carnegie-Mellon University, course 15-213, taught by Randy Bryant and David O’Hallaron in Fall 2010. These slides are indicated “Supplied by CMU” in the notes section of the slides.

Page 2: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 3: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 4: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 5: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 6: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 7: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 8: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 9: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 10: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 11: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Adapted from slide supplied by CMU.

Page 12: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 13: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 14: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 15: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 16: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU, updated for current gcc.

Page 17: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 18: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 19: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 20: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 21: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 22: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 23: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 24: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 25: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 26: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 27: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU, updated for current gcc.

Note that a is passed as a 1-D array, but interpreted as a 2-D array. This isn’t terribly good programming style (gcc, fortunately, refrains from commenting on one’s style), but it is definitely the sort of program that gcc must be prepared to deal with.

Page 28: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU, updated for current gcc.

Page 29: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 30: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 31: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from
Page 32: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Note: we must give gcc the flag “-std=gnu99” for this to be compiled.

Page 33: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 34: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 35: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 36: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 37: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 38: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 39: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 40: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from

Supplied by CMU.

Page 41: Many of the slides in this lecture are either from or ...cs.brown.edu/courses/csci0330/lecture/14archopt1.pdf · Many of the slides in this lecture are either from or adapted from