CMPUT 680 - Compiler Design and Optimization1 CMPUT680 - Fall 2006 Topic 3: Intermediate Representation in the ORC José Nelson Amaral

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

1 ARM Movement Instructions u MOV Rd, ; updates N, Z, C Rd = u MVN Rd, ; Rd = 0xF..F EOR.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /15/2013 Lecture 11: MIPS-Conditional Instructions Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.
Topic 3: Flow Analysis José Nelson Amaral
1 Chapter 10 Strings and Pointers. 2 Introduction  String Constant  Example: printf(“Hello”); “Hello” : a string constant oA string constant is a series.
1 Lecture13: Other C Topics 12/17/2012. Topics Variable-length argument lists Pointers to functions Command-line arguments Suffixes for integer and floating-point.
Growing Arrays in C By: Victoria Tielebein CS 265- Spring 2011.
More Pointers Write a program that: –Calls a function to input an integer value –The above function calls another function that will double the input value.
C Programming Revision Malcolm Wilson. Variables Types int, char, double, long. NO type for string see later. unsigned above. assignment X=2 ; C=‘v’;
Determining Tree-Traversals Orientation using Feedback-Directed Analysis Stephen Curial, Kevin Andrusky and José Nelson Amaral University of Alberta Stephen.
CMPUT Compiler Design and Optimization
Command-line arguments CS 201 Fundamental Structures of Computer Science.
Tree-Traversal Orientation Analysis Stephen Curial, Kevin Andrusky and José Nelson Amaral University of Alberta Stephen Curial, Kevin Andrusky and José.
ספטמבר 04Copyright Meir Kalech1 C programming Language Chapter 10: Appendices.
What does this program do ? #include int main(int argc, char* argv[]) { int i; printf("%d arguments\n", argc); for(i = 0; i < argc; i++) printf(" %d: %s\n",
1 Functions and Structured Programming. 2 Structured Programming Structured programming is a problem-solving strategy and a programming methodology. –The.
15213 C Primer 17 September Outline Overview comparison of C and Java Good evening Preprocessor Command line arguments Arrays and structures Pointers.
Loop Induction Variable Canonicalization. Motivation Background: Open64 Compilation Scheme Loop Induction Variable Canonicalization Project Tracing and.
7/15/2015\course\cpeg621-10F\Topic-1a.ppt1 Intermediate Code Generation Reading List: Aho-Sethi-Ullman: Chapter 2.3 Chapter 6.1 ~ 6.2 Chapter 6.3 ~ 6.10.
We have seen the notation “p=&a; ” used to set the pointer “p” to the address of another variable. For arrays and strings, the technique for setting the.
Command line arguments. – main can take two arguments conventionally called argc and argv. – Information regarding command line arguments are passed to.
An Introduction to C Programming Geb Thomas. Learning Objectives Learn how to write and compile a C program Learn what C libraries are Understand the.
Binary numbers and arithmetic. ADDITION Addition (decimal)
CS470/570 Lecture 5 Introduction to OpenMP Compute Pi example OpenMP directives and options.
The char Data Type A char is a one byte integer type typically used for storing characters. Example: char oneLetter = ’D’; We enclose the character in.
Computer programming Lecture 5. Lecture 5: Outline Arrays [chap 7 – Kochan] –The concept of array –Defining arrays –Initializing arrays –Character arrays.
Extending Open64 with Transactional Memory features Jiaqi Zhang Tsinghua University.
Command Line Arguments plus Variable-Length Arrays Systems Programming.
(language, compilation and debugging) David 09/16/2011.
CSE 232: C++ memory management Overview of Arrays Arrays are the simplest kind of data structure –One item right after another in memory (“contiguous range”
Functions & Pointers in C Jordan Erenrich
Computer programming Outline Arrays [chap 7 – Kochan] –The concept of array –Defining arrays –Initializing arrays –Character.
Computer And Programming Array and Pointer. Array provides a means to allocating and accessing memory. Pointers, on the other hand, provides a way to.
CCSA 221 Programming in C CHAPTER 7 WORKING WITH ARRAYS 1.
What we will cover A crash course in the basics of C “Teach yourself C in 21 days”
Introduction to Computer Organization & Systems Topics: Command Line Bitwise operators COMP Spring 2014 C Part V.
Announcements The sample C code from these slides is available in the same place as these class notes. It can compile with both C and C++ compilers. You.
Multi-dimensional Arrays and other Array Oddities Rudra Dutta CSC Spring 2007, Section 001.
Arrays. Outline 1.(Introduction) Arrays An array is a contiguous block of list of data in memory. Each element of the list must be the same type and use.
Lecture 7: Arrays BJ Furman 06OCT2012. The Plan for Today Announcements Review of variables and memory Arrays  What is an array?  How do you declare.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2003 Topic4: Procedures José Nelson Amaral.
C Programming Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/LA07/003 Version No. 1.0 Union –mechanism to create user defined data types.
1 Homework Continue with K&R Chapter 5 –Skipping sections for now –Not covering section 5.12 Continue on HW5.
Chapter 5 Pointers and Arrays Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Week 4 – Functions Coding Functions. Purpose of Coding Functions A function is written to perform a well-defined task; rather than having all logic in.
Using System Calls (Unix) Have to tell compiler (if C/C++) where to find the headers, etc. – i.e., the “include” files May have to tell compiler where.
“Success consists of going from failure to failure without loss of enthusiasm.” Winston Churchill.
MULTI-DIMENSION ARRAY STRING Computer Programming Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Stack and Heap Memory Stack resident variables include:
C Primer.
A bit of C programming Lecture 3 Uli Raich.
ECE Application Programming
Command Line Arguments
Functions and Structured Programming
Day 02 Introduction to C.
Programmazione I a.a. 2017/2018.
Command-line Arguments
Command Line Arguments
REALIZING C++11 LAMBDA EXPRESSIONS in open64
Command Line Arguments
Chapter 14 - Advanced C Topics
Intermediate Code Generation
Java Lesson 36 Mr. Kalmes.
Command Line Parameters
Outline Defining and using Pointers Operations on pointers
Lecture 2 SCOPE – Local and Global variables
Arrays.
Building Blocks of C Programming Language
Arrays, Pointers, and Strings
15213 C Primer 17 September 2002.
Presentation transcript:

CMPUT Compiler Design and Optimization1 CMPUT680 - Fall 2006 Topic 3: Intermediate Representation in the ORC José Nelson Amaral

CMPUT Compiler Design and Optimization2 WHIRL The Open Research Compiler (ORC) uses a tree-based intermediate representation called WHIRL, which stands for Winning Hierarchical Intermediate Representation Language.

CMPUT Compiler Design and Optimization3 Compilation Example #include #define COUNTINIT 1.0 void InitializeMatrix(double *A, int dimension); void InitializeVector(double *B, int dimension); void MatrixVectorMultiply(double *C, double *A, double *B, int dimension); void OutputVector(double *C, int dimension); int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; }

CMPUT Compiler Design and Optimization4 Compilation Example (cont.) void InitializeVector(double *B, int dimension) { int i; double count = 1.0; for(i=0 ; i<dimension ; i++) B[i] = count++; } void InitializeMatrix(double *A, int dimension) { int i,j; double count = 1.0; for(i=0 ; i<dimension ; i++) for(j=0 ; j<dimension ; j++) A[i][I] = count++; } void MatrixVectorMultiply(double *C, double *A, double *B, int dimension) { int i, j; for(i=0 ; i<dimension ; i++) { C[i] = 0.0; for(j=0 ; j<dimension ; j++) C[i] = C[i] + A[i*dimension+j]*B[j]; } void OutputVector(double *C, int dimension) { int i; printf("C = [ "); for(i=0 ; i<dimension ; i++) printf("%g ",C[i]); printf("]\n"); }

CMPUT Compiler Design and Optimization5 Highest WHIRL Representation FUNC_ENTRY [0x0x2b1c91d8],MID=0 IDNAME O_0 [0x0x2b1c9200],MID=0 IDNAME O_0 [0x0x2b1c921c],MID=1 BODY BLOCK [0x0x2b1c9248],MID=0 END_BLOCK [0x0x2b1c9248] BLOCK [0x0x2b1c9274],MID=1 END_BLOCK [0x0x2b1c9274] BLOCK [0x0x80ed668],MID=2 PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 I4I4LDID O_0: A direct load of a 4 byte integer into a 4 byte integer register with ofset of 0.

CMPUT Compiler Design and Optimization6 Highest WHIRL Representation FUNC_ENTRY [0x0x2b1c91d8],MID=0 IDNAME O_0 [0x0x2b1c9200],MID=0 IDNAME O_0 [0x0x2b1c921c],MID=1 BODY BLOCK [0x0x2b1c9248],MID=0 END_BLOCK [0x0x2b1c9248] BLOCK [0x0x2b1c9274],MID=1 END_BLOCK [0x0x2b1c9274] BLOCK [0x0x80ed668],MID=2 PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 I4INTCONST: Access a 4 byte integer constant. CV(2): The value of the constant is 2.

CMPUT Compiler Design and Optimization7 Highest WHIRL Representation FUNC_ENTRY [0x0x2b1c91d8],MID=0 IDNAME O_0 [0x0x2b1c9200],MID=0 IDNAME O_0 [0x0x2b1c921c],MID=1 BODY BLOCK [0x0x2b1c9248],MID=0 END_BLOCK [0x0x2b1c9248] BLOCK [0x0x2b1c9274],MID=1 END_BLOCK [0x0x2b1c9274] BLOCK [0x0x80ed668],MID=2 PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 I4I4NE: Tests if two four byte values are not equal.

CMPUT Compiler Design and Optimization8 Highest WHIRL Representation FUNC_ENTRY [0x0x2b1c91d8],MID=0 IDNAME O_0 [0x0x2b1c9200],MID=0 IDNAME O_0 [0x0x2b1c921c],MID=1 BODY BLOCK [0x0x2b1c9248],MID=0 END_BLOCK [0x0x2b1c9248] BLOCK [0x0x2b1c9274],MID=1 END_BLOCK [0x0x2b1c9274] BLOCK [0x0x80ed668],MID=2 PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 VCALL: A call to a function that returns an item of type void. U8PARM: An 8-byte unsigned parameter for the function. U8LDA: Accesses the address, in bytes, of the string. 0_0: Add offset of zero to the address.

CMPUT Compiler Design and Optimization9 Highest WHIRL Representation FUNC_ENTRY [0x0x2b1c91d8],MID=0 IDNAME O_0 [0x0x2b1c9200],MID=0 IDNAME O_0 [0x0x2b1c921c],MID=1 BODY BLOCK [0x0x2b1c9248],MID=0 END_BLOCK [0x0x2b1c9248] BLOCK [0x0x2b1c9274],MID=1 END_BLOCK [0x0x2b1c9274] BLOCK [0x0x80ed668],MID=2 PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } FUNC_ENTRY (main) IDNAME (argc) IDNAME (argv) BLOCK

CMPUT Compiler Design and Optimization10 Highest WHIRL Representation PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 LOC 1 21 exit(1); I4INTCONST CV(1) (0x1) [0x0x2b1c947c],MID=8 I4PARM Flg(2) T # by_value [0x0x2b1c9460],MID=7 VCALL Flg(126) # flags 0x7e [0x0x2b1c9444],MID=1 END_BLOCK [0x0x80ed698] ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } FUNC_ENTRY (main) IDNAME (argc) IDNAME (argv) BLOCK IF NE CV(2) LDID (argc) int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; }

CMPUT Compiler Design and Optimization11 Highest WHIRL Representation PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 LOC 1 21 exit(1); I4INTCONST CV(1) (0x1) [0x0x2b1c947c],MID=8 I4PARM Flg(2) T # by_value [0x0x2b1c9460],MID=7 VCALL Flg(126) # flags 0x7e [0x0x2b1c9444],MID=1 END_BLOCK [0x0x80ed698] ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } NC_ENTRY (main) BLOCK IF NE CV(2) LDID (argc) BLOCK (THEN) int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } VCALL (printf) VCALL (exit) PARM LDID (stderr) LDA PARM CV(1)

CMPUT Compiler Design and Optimization12 Highest WHIRL Representation PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1c92cc],MID=0 LOC 1 14 double *A; LOC 1 15 double *B; LOC 1 16 double *C; LOC 1 17 LOC 1 18 if(argc != 2) IF [0x0x2b1c92f8],MID=3 I4I4LDID O_0 T [0x0x2b1c9334],MID=0 I4INTCONST CV(2) (0x2) [0x0x2b1c9350],MID=3 I4I4NE [0x0x2b1c9318],MID=2 THEN BLOCK [0x0x80ed698],MID=4 LOC 1 19 { LOC 1 20 fprintf(stderr,"Syntax: linear \n"); U8U8LDID O_0 T [0x0x2b1c93e0],MID=1 U8PARM Flg(2) T # by_value [0x0x2b1c93c4],MID=4 U8LDA O_0 \n\000"> T [0x0x2b1c9418],MID=6 U8PARM Flg(2) T # by_value [0x0x2b1c93fc],MID=5 VCALL Flg(126) # flags 0x7e [0x0x2b1c93a8],MID=0 LOC 1 21 exit(1); I4INTCONST CV(1) (0x1) [0x0x2b1c947c],MID=8 I4PARM Flg(2) T # by_value [0x0x2b1c9460],MID=7 VCALL Flg(126) # flags 0x7e [0x0x2b1c9444],MID=1 END_BLOCK [0x0x80ed698] ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } NC_ENTRY (main) BLOCK IF NE CV(2) LDID (argc) BLOCK (THEN) int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } VCALL (printf) VCALL (exit) PARM LDID (stderr) LDA PARM CV(1) BLOCK (ELSE)

CMPUT Compiler Design and Optimization13 Highest WHIRL Representation ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } LOC 1 23 dimension = atoi(argv[1]); U8U8LDID O_0 T [0x0x2b1c959c],MID=3 U8U8ILOAD O_8 T T [0x0x2b1c9580],MID=2 U8PARM Flg(2) T # by_value [0x0x2b1c9564],MID=9 I4CALL Flg(126) # flags 0x7e [0x0x2b1c9548],MID=2 I4I4LDID O_-1 T [0x0x2b1c95b8],MID=5 I4STID O_264 T # __comma [0x0x80ed788],MID=4 I4I4LDID O_264 T # __comma [0x0x80ed7a8],MID=7 I4STID O_0 T [0x0x2b1c94d4],MID=6 LOC 1 24 LOC 1 25 A = (double *)malloc(dimension*dimension*sizeof(double)); I4I4LDID O_0 T [0x0x2b1c96e4],MID=8 I4I4LDID O_0 T [0x0x2b1c9700],MID=9 I4MPY [0x0x2b1c96c8],MID=13 U8I4CVT [0x0x2b1c96ac],MID=12 U8INTCONST CV(8) (0x8) [0x0x2b1c971c],MID=14 U8MPY [0x0x2b1c9690],MID=11 U8PARM Flg(2) T # by_value [0x0x2b1c9674],MID=10 U8CALL Flg(126) # flags 0x7e [0x0x2b1c9658],MID=3 U8U8LDID O_-1 T [0x0x2b1c9738],MID=11 U8STID O_265 T # __comma [0x0x80ed838],MID=10 U8U8LDID O_265 T # __comma [0x0x80ed858],MID=13 U8STID O_0 T [0x0x2b1c95e4],MID=12 int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } BLOCK IF BLOCK (THEN) VCALL (printf) VCALL (exit) PARM LDID (stderr) LDA PARM CV(1) BLOCK (ELSE) I4CALL (atoi) PARM ILOAD LDID (argv)

CMPUT Compiler Design and Optimization14 Highest WHIRL Representation ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } LOC 1 23 dimension = atoi(argv[1]); U8U8LDID O_0 T [0x0x2b1c959c],MID=3 U8U8ILOAD O_8 T T [0x0x2b1c9580],MID=2 U8PARM Flg(2) T # by_value [0x0x2b1c9564],MID=9 I4CALL Flg(126) # flags 0x7e [0x0x2b1c9548],MID=2 I4I4LDID O_-1 T [0x0x2b1c95b8],MID=5 I4STID O_264 T # __comma [0x0x80ed788],MID=4 I4I4LDID O_264 T # __comma [0x0x80ed7a8],MID=7 I4STID O_0 T [0x0x2b1c94d4],MID=6 LOC 1 24 LOC 1 25 A = (double *)malloc(dimension*dimension*sizeof(double)); I4I4LDID O_0 T [0x0x2b1c96e4],MID=8 I4I4LDID O_0 T [0x0x2b1c9700],MID=9 I4MPY [0x0x2b1c96c8],MID=13 U8I4CVT [0x0x2b1c96ac],MID=12 U8INTCONST CV(8) (0x8) [0x0x2b1c971c],MID=14 U8MPY [0x0x2b1c9690],MID=11 U8PARM Flg(2) T # by_value [0x0x2b1c9674],MID=10 U8CALL Flg(126) # flags 0x7e [0x0x2b1c9658],MID=3 U8U8LDID O_-1 T [0x0x2b1c9738],MID=11 U8STID O_265 T # __comma [0x0x80ed838],MID=10 U8U8LDID O_265 T # __comma [0x0x80ed858],MID=13 U8STID O_0 T [0x0x2b1c95e4],MID=12 int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } BLOCK IF BLOCK (THEN) VCALL (printf) VCALL (exit) PARM LDID (stderr) LDA PARM CV(1) BLOCK (ELSE) I4CALL (atoi) PARM ILOAD LDID (argv) STID (preg) LDID (ret_val.)

CMPUT Compiler Design and Optimization15 Highest WHIRL Representation ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } LOC 1 23 dimension = atoi(argv[1]); U8U8LDID O_0 T [0x0x2b1c959c],MID=3 U8U8ILOAD O_8 T T [0x0x2b1c9580],MID=2 U8PARM Flg(2) T # by_value [0x0x2b1c9564],MID=9 I4CALL Flg(126) # flags 0x7e [0x0x2b1c9548],MID=2 I4I4LDID O_-1 T [0x0x2b1c95b8],MID=5 I4STID O_264 T # __comma [0x0x80ed788],MID=4 I4I4LDID O_264 T # __comma [0x0x80ed7a8],MID=7 I4STID O_0 T [0x0x2b1c94d4],MID=6 LOC 1 24 LOC 1 25 A = (double *)malloc(dimension*dimension*sizeof(double)); I4I4LDID O_0 T [0x0x2b1c96e4],MID=8 I4I4LDID O_0 T [0x0x2b1c9700],MID=9 I4MPY [0x0x2b1c96c8],MID=13 U8I4CVT [0x0x2b1c96ac],MID=12 U8INTCONST CV(8) (0x8) [0x0x2b1c971c],MID=14 U8MPY [0x0x2b1c9690],MID=11 U8PARM Flg(2) T # by_value [0x0x2b1c9674],MID=10 U8CALL Flg(126) # flags 0x7e [0x0x2b1c9658],MID=3 U8U8LDID O_-1 T [0x0x2b1c9738],MID=11 U8STID O_265 T # __comma [0x0x80ed838],MID=10 U8U8LDID O_265 T # __comma [0x0x80ed858],MID=13 U8STID O_0 T [0x0x2b1c95e4],MID=12 int main(int argc, char *argv[]) { int dimension; double *A; double *B; double *C; if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } BLOCK (ELSE) I4CALL (atoi) PARM ILOAD LDID (argv) STID (preg) LDID (ret_val.) STID (dimension) LDID (preg)

CMPUT Compiler Design and Optimization16 Highest WHIRL Representation ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } LOC 1 23 dimension = atoi(argv[1]); U8U8LDID O_0 T [0x0x2b1c959c],MID=3 U8U8ILOAD O_8 T T [0x0x2b1c9580],MID=2 U8PARM Flg(2) T # by_value [0x0x2b1c9564],MID=9 I4CALL Flg(126) # flags 0x7e [0x0x2b1c9548],MID=2 I4I4LDID O_-1 T [0x0x2b1c95b8],MID=5 I4STID O_264 T # __comma [0x0x80ed788],MID=4 I4I4LDID O_264 T # __comma [0x0x80ed7a8],MID=7 I4STID O_0 T [0x0x2b1c94d4],MID=6 LOC 1 24 LOC 1 25 A = (double *)malloc(dimension*dimension*sizeof(double)); I4I4LDID O_0 T [0x0x2b1c96e4],MID=8 I4I4LDID O_0 T [0x0x2b1c9700],MID=9 I4MPY [0x0x2b1c96c8],MID=13 U8I4CVT [0x0x2b1c96ac],MID=12 U8INTCONST CV(8) (0x8) [0x0x2b1c971c],MID=14 U8MPY [0x0x2b1c9690],MID=11 U8PARM Flg(2) T # by_value [0x0x2b1c9674],MID=10 U8CALL Flg(126) # flags 0x7e [0x0x2b1c9658],MID=3 U8U8LDID O_-1 T [0x0x2b1c9738],MID=11 U8STID O_265 T # __comma [0x0x80ed838],MID=10 U8U8LDID O_265 T # __comma [0x0x80ed858],MID=13 U8STID O_0 T [0x0x2b1c95e4],MID=12 int main(int argc, char *argv[]) { ….. if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } STID (dimension) LDID (preg) U8CALL (malloc) PARM U8MPY CV(8)U8I4CVT I4MPY I4I4LDID (dimension) I4I4LDID (dimension)

CMPUT Compiler Design and Optimization17 Highest WHIRL Representation ELSE BLOCK [0x0x80ed6c8],MID=5 END_BLOCK [0x0x80ed6c8] END_IF LOC 1 22 } LOC 1 23 dimension = atoi(argv[1]); U8U8LDID O_0 T [0x0x2b1c959c],MID=3 U8U8ILOAD O_8 T T [0x0x2b1c9580],MID=2 U8PARM Flg(2) T # by_value [0x0x2b1c9564],MID=9 I4CALL Flg(126) # flags 0x7e [0x0x2b1c9548],MID=2 I4I4LDID O_-1 T [0x0x2b1c95b8],MID=5 I4STID O_264 T # __comma [0x0x80ed788],MID=4 I4I4LDID O_264 T # __comma [0x0x80ed7a8],MID=7 I4STID O_0 T [0x0x2b1c94d4],MID=6 LOC 1 24 LOC 1 25 A = (double *)malloc(dimension*dimension*sizeof(double)); I4I4LDID O_0 T [0x0x2b1c96e4],MID=8 I4I4LDID O_0 T [0x0x2b1c9700],MID=9 I4MPY [0x0x2b1c96c8],MID=13 U8I4CVT [0x0x2b1c96ac],MID=12 U8INTCONST CV(8) (0x8) [0x0x2b1c971c],MID=14 U8MPY [0x0x2b1c9690],MID=11 U8PARM Flg(2) T # by_value [0x0x2b1c9674],MID=10 U8CALL Flg(126) # flags 0x7e [0x0x2b1c9658],MID=3 U8U8LDID O_-1 T [0x0x2b1c9738],MID=11 U8STID O_265 T # __comma [0x0x80ed838],MID=10 U8U8LDID O_265 T # __comma [0x0x80ed858],MID=13 U8STID O_0 T [0x0x2b1c95e4],MID=12 int main(int argc, char *argv[]) { ….. if(argc != 2) { fprintf(stderr,"Syntax: linear \n"); exit(1); } dimension = atoi(argv[1]); A = (double *)malloc(dimension*dimension*sizeof(double)); B = (double *)malloc(dimension*sizeof(double)); C = (double *)malloc(dimension*sizeof(double)); InitializeMatrix(A, dimension); InitializeVector(B, dimension); MatrixVectorMultiply(C,A,B,dimension); OutputVector(C,dimension); return 0; } STID (dimension) LDID (preg) U8CALL (malloc) PARM U8MPY CV(8)U8I4CVT I4MPY I4I4LDID (dimension) I4I4LDID (dimension) STID (preg) LDID (ret_val.) STID (A) LDID (preg)

CMPUT Compiler Design and Optimization18 Highest WHIRL Representation LOC 1 52 void MatrixVectorMultiply(double *C, double *A, double *B, int dimension) LOC 1 53 { FUNC_ENTRY [0x0x2b1cad60],MID=0 IDNAME O_0 [0x0x2b1cad90],MID=0 IDNAME O_0 [0x0x2b1cadac],MID=1 IDNAME O_0 [0x0x2b1cadc8],MID=2 IDNAME O_0 [0x0x2b1cade4],MID=3 BODY BLOCK [0x0x2b1cae10],MID=0 END_BLOCK [0x0x2b1cae10] BLOCK [0x0x2b1cae3c],MID=1 END_BLOCK [0x0x2b1cae3c] BLOCK [0x0x2b1cae68],MID=2 PRAGMA ~0 !120 CV(0) (0x0) # PREAMBLE_END [0x0x2b1cae94],MID=0 LOC 1 54 int i, j; LOC 1 55 for(i=0 ; i<dimension ; i++) FUNC_ENTRY (MatrixVectorMultiply) IDNAME (C) IDNAME (A) IDNAME (B) IDNAME (dimension) BLOCK void MatrixVectorMultiply(double *C, double *A, double *B, int dimension) { int i, j; for(i=0 ; i<dimension ; i++) { C[i] = 0.0; for(j=0 ; j<dimension ; j++) C[i] = C[i] + A[i*dimension+j]*B[j]; } BLOCK

CMPUT Compiler Design and Optimization19 Highest WHIRL Representation FUNC_ENTRY (MatrixVectorMultiply) IDNAME (C) IDNAME (A) IDNAME (B) IDNAME (dimension) BLOCK WHILE GT LDID (i) LDID (dimension) STID (i) CV(0) BLOCK LOC 1 54 int i, j; LOC 1 55 for(i=0 ; i<dimension ; i++) I4INTCONST CV(0) (0x0) [0x0x2b1caedc],MID=4 I4STID O_0 T [0x0x2b1caec0],MID=0 WHILE_DO [0x0x2b1caf08],MID=3 I4I4LDID O_0 T [0x0x2b1caf40],MID=1 I4I4LDID O_0 T [0x0x2b1caf5c],MID=2 I4I4GT [0x0x2b1caf24],MID=5 BODY BLOCK [0x0x2b1caf88],MID=4 LOC 1 56 { LOC 1 57 C[i] = 0.0; F8CONST [0x0x2b1cafd0],MID=6 U8U8LDID O_0 T [0x0x2b1cb008],MID=4 I8I4LDID O_0 T [0x0x2b1cb05c],MID=5 U8I8CVT [0x0x2b1cb040],MID=9 U8INTCONST CV(8) (0x8) [0x0x2b1cb078],MID=10 U8MPY [0x0x2b1cb024],MID=8 U8ADD [0x0x2b1cafec],MID=7 F8ISTORE O_0 T [0x0x2b1cafb4],MID=3 void MatrixVectorMultiply(double *C, double *A, double *B, int dimension) { int i, j; for(i=0 ; i<dimension ; i++) { C[i] = 0.0; for(j=0 ; j<dimension ; j++) C[i] = C[i] + A[i*dimension+j]*B[j]; }

CMPUT Compiler Design and Optimization20 LOC 1 54 int i, j; LOC 1 55 for(i=0 ; i<dimension ; i++) I4INTCONST CV(0) (0x0) [0x0x2b1caedc],MID=4 I4STID O_0 T [0x0x2b1caec0],MID=0 WHILE_DO [0x0x2b1caf08],MID=3 I4I4LDID O_0 T [0x0x2b1caf40],MID=1 I4I4LDID O_0 T [0x0x2b1caf5c],MID=2 I4I4GT [0x0x2b1caf24],MID=5 BODY BLOCK [0x0x2b1caf88],MID=4 LOC 1 56 { LOC 1 57 C[i] = 0.0; F8CONST [0x0x2b1cafd0],MID=6 U8U8LDID O_0 T [0x0x2b1cb008],MID=4 I8I4LDID O_0 T [0x0x2b1cb05c],MID=5 U8I8CVT [0x0x2b1cb040],MID=9 U8INTCONST CV(8) (0x8) [0x0x2b1cb078],MID=10 U8MPY [0x0x2b1cb024],MID=8 U8ADD [0x0x2b1cafec],MID=7 F8ISTORE O_0 T [0x0x2b1cafb4],MID=3 void MatrixVectorMultiply(double *C, double *A, double *B, int dimension) { int i, j; for(i=0 ; i<dimension ; i++) { C[i] = 0.0; for(j=0 ; j<dimension ; j++) C[i] = C[i] + A[i*dimension+j]*B[j]; } Highest WHIRL Representation FUNC_ENTRY (MatrixVectorMultiply) IDNAME (C) IDNAME (A) IDNAME (B) IDNAME (dimension) BLOCK WHILE GT LDID (i) LDID (dimension) STID (i) CV(0) BLOCK F8ISTORE U8ADD U8MPY LDID (C) U8I8CVT LDID (i) CV(8) F8CONST(0.0) BLOCK

CMPUT Compiler Design and Optimization21 LOC 1 58 for(j=0 ; j<dimension ; j++) I4INTCONST CV(0) (0x0) [0x0x2b1cb0c0],MID=11 I4STID O_0 T [0x0x2b1cb0a4],MID=6 WHILE_DO [0x0x2b1cb0ec],MID=5 I4I4LDID O_0 T [0x0x2b1cb124],MID=7 I4I4LDID O_0 T [0x0x2b1cb140],MID=8 I4I4GT [0x0x2b1cb108],MID=12 BODY BLOCK [0x0x2b1cb16c],MID=6 void MatrixVectorMultiply(double *C, double *A, double *B, int dimension) { int i, j; for(i=0 ; i<dimension ; i++) { C[i] = 0.0; for(j=0 ; j<dimension ; j++) C[i] = C[i] + A[i*dimension+j]*B[j]; } Highest WHIRL Representation FUNC_ENTRY (MatrixVectorMultiply) IDNAME (C) IDNAME (A) IDNAME (B) IDNAME (dimension) BLOCK WHILE GT LDID (i) LDID (dimension) STID (i) CV(0) BLOCK F8ISTORE U8ADD U8MPY LDID (C) U8I8CVT LDID (i) CV(8) F8CONST(0.0) BLOCK STID (j) CV(0) WHILE GT LDID (j) LDID (dimension) BLOCK

CMPUT Compiler Design and Optimization22 LOC 1 59 C[i] = C[i] + A[i*dimension+j]*B[j]; U8U8LDID O_0 T [0x0x2b1cb208],MID=11 I8I4LDID O_0 T [0x0x2b1cb25c],MID=12 U8I8CVT [0x0x2b1cb240],MID=16 U8INTCONST CV(8) (0x8) [0x0x2b1cb278],MID=17 U8MPY [0x0x2b1cb224],MID=15 U8ADD [0x0x2b1cb1ec],MID=14 F8F8ILOAD O_0 T T [0x0x2b1cb1d0],MID=10 U8U8LDID O_0 T [0x0x2b1cb2e8],MID=14 I4I4LDID O_0 T [0x0x2b1cb358],MID=15 I4I4LDID O_0 T [0x0x2b1cb390],MID=16 I4I4LDID O_0 T [0x0x2b1cb3ac],MID=17 I4MPY [0x0x2b1cb374],MID=23 I4ADD [0x0x2b1cb33c],MID=22 U8I4CVT [0x0x2b1cb320],MID=21 U8INTCONST CV(8) (0x8) [0x0x2b1cb3c8],MID=24 U8MPY [0x0x2b1cb304],MID=20 U8ADD [0x0x2b1cb2cc],MID=19 F8F8ILOAD O_0 T T [0x0x2b1cb2b0],MID=13 U8U8LDID O_0 T [0x0x2b1cb41c],MID=19 I8I4LDID O_0 T [0x0x2b1cb470],MID=20 U8I8CVT [0x0x2b1cb454],MID=27 U8INTCONST CV(8) (0x8) [0x0x2b1cb48c],MID=28 U8MPY [0x0x2b1cb438],MID=26 U8ADD [0x0x2b1cb400],MID=25 F8F8ILOAD O_0 T T [0x0x2b1cb3e4],MID=18 F8MPY [0x0x2b1cb294],MID=18 F8ADD [0x0x2b1cb1b4],MID=13 U8U8LDID O_0 T [0x0x2b1cb4c4],MID=21 I8I4LDID O_0 T [0x0x2b1cb518],MID=22 U8I8CVT [0x0x2b1cb4fc],MID=31 U8INTCONST CV(8) (0x8) [0x0x2b1cb534],MID=32 U8MPY [0x0x2b1cb4e0],MID=30 U8ADD [0x0x2b1cb4a8],MID=29 F8ISTORE O_0 T [0x0x2b1cb198],MID=9 LABEL L2 Flg(0) [0x0x2b1cb560],MID=0 I4I4LDID O_0 T [0x0x2b1cb5c4],MID=24 LABEL L2 Flg(0) [0x0x2b1cb560],MID=0 I4I4LDID O_0 T [0x0x2b1cb5c4],MID=24 I4INTCONST CV(1) (0x1) [0x0x2b1cb5e0],MID=34 I4ADD [0x0x2b1cb5a8],MID=33 I4STID O_0 T [0x0x2b1cb58c],MID=23 END_BLOCK [0x0x2b1cb16c]

F8F8ILOAD U8ADD U8MPY LDID ( B ) U8I8CVT LDID ( j ) CV(8) F8F8ILOAD U8ADD U8MPY LDID ( A ) U8I4CVT I4ADD CV(8) I4MPY LDID ( i ) LDID (dimension) LDID ( j ) F8MPYF8F8ILOAD U8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ADDU8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ISTORE ADD LDID ( j ) CV(1) I4STID ( j ) BLOCK LOC 1 59 C[i] = C[i] + A[i*dimension+j]*B[j];

F8F8ILOAD U8ADD U8MPY LDID ( B ) U8I8CVT LDID ( j ) CV(8) F8F8ILOAD U8ADD U8MPY LDID ( A ) U8I4CVT I4ADD CV(8) I4MPY LDID ( i ) LDID (dimension) LDID ( j ) F8MPYF8F8ILOAD U8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ADDU8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ISTORE ADD LDID ( j ) CV(1) I4STID ( j ) BLOCK LOC 1 59 C[i] = C[i] + A[i*dimension+j]*B[j]; load B[j]

F8F8ILOAD U8ADD U8MPY LDID ( B ) U8I8CVT LDID ( j ) CV(8) F8F8ILOAD U8ADD U8MPY LDID ( A ) U8I4CVT I4ADD CV(8) I4MPY LDID ( i ) LDID (dimension) LDID ( j ) F8MPYF8F8ILOAD U8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ADDU8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ISTORE ADD LDID ( j ) CV(1) I4STID ( j ) BLOCK LOC 1 59 C[i] = C[i] + A[i*dimension+j]*B[j]; load A[i*dimesion+j]

F8F8ILOAD U8ADD U8MPY LDID ( B ) U8I8CVT LDID ( j ) CV(8) F8F8ILOAD U8ADD U8MPY LDID ( A ) U8I4CVT I4ADD CV(8) I4MPY LDID ( i ) LDID (dimension) LDID ( j ) F8MPYF8F8ILOAD U8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ADDU8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ISTORE ADD LDID ( j ) CV(1) I4STID ( j ) BLOCK LOC 1 59 C[i] = C[i] + A[i*dimension+j]*B[j]; load C[i]

F8F8ILOAD U8ADD U8MPY LDID ( B ) U8I8CVT LDID ( j ) CV(8) F8F8ILOAD U8ADD U8MPY LDID ( A ) U8I4CVT I4ADD CV(8) I4MPY LDID ( i ) LDID (dimension) LDID ( j ) F8MPYF8F8ILOAD U8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ADDU8ADD U8MPY LDID ( C ) U8I8CVT LDID ( i ) CV(8) F8ISTORE ADD LDID ( j ) CV(1) I4STID ( j ) BLOCK LOC 1 59 C[i] = C[i] + A[i*dimension+j]*B[j]; j++

F8ISTORE U8ADD U8MPY LDID (C) U8I8CVT LDID (i) CV(8) F8CONST(0.0) BLOCK WHILE GT LDID (I) LDID (dimension) BLOCK IDNAME (C) STID (j) CV(0) FUNC_ENTRY (MatrixVectorMultiply) IDNAME (A) IDNAME (B) IDNAME (dimension) BLOCK WHILE GT LDID (I) LDID (dimension) STID (i) CV(0) BLOCK Highest WHIRL Representation.

GT LDID (I) LDID (dimension) IDNAME (C) STID (j) CV(0) FUNC_ENTRY (MatrixVectorMultiply) IDNAME (A) IDNAME (B) IDNAME (dimension) BLOCK FALSEBR L4 GT LDID (I) LDID (dimension) STID (i) CV(0) BLOCK STID (C) LDID ($r32) STID (A) LDID ($r33) STID (B) LDID ($r34) STID (dimension) LDID ($r35) U8I8CVT U8ADD U8MPY LDID (C) LDID (i) CV(8) F8CONST(0.0) LABEL L3 F8ISTORE FALSEBR L5 After five lowering steps.