Instruction Set Architecture (Contd)

Similar documents
Instruction Set Architecture. "Speaking with the computer"

Chapter 2A Instructions: Language of the Computer

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Lectures 3-4: MIPS instructions

ECE 486/586. Computer Architecture. Lecture # 7

ECE468 Computer Organization & Architecture. MIPS Instruction Set Architecture

Do-While Example. In C++ In assembly language. do { z--; while (a == b); z = b; loop: addi $s2, $s2, -1 beq $s0, $s1, loop or $s2, $s1, $zero

CS/COE1541: Introduction to Computer Architecture

Control Instructions. Computer Organization Architectures for Embedded Computing. Thursday, 26 September Summary

Control Instructions

COMPUTER ORGANIZATION AND DESIGN

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

CENG3420 Lecture 03 Review

MIPS R-format Instructions. Representing Instructions. Hexadecimal. R-format Example. MIPS I-format Example. MIPS I-format Instructions

Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:

Branch Addressing. Jump Addressing. Target Addressing Example. The University of Adelaide, School of Computer Science 28 September 2015

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Chapter 2. Instructions: Language of the Computer. Adapted by Paulo Lopes

Computer Architecture

Course Administration

Lecture 2. Instructions: Language of the Computer (Chapter 2 of the textbook)

COMP 303 Computer Architecture Lecture 3. Comp 303 Computer Architecture

Communicating with People (2.8)

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

MODULE 4 INSTRUCTIONS: LANGUAGE OF THE MACHINE

EE 361 University of Hawaii Fall

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

Introduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

Chapter 2. Computer Abstractions and Technology. Lesson 4: MIPS (cont )

CS 110 Computer Architecture Lecture 6: More MIPS, MIPS Functions

101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

EEC 581 Computer Architecture Lecture 1 Review MIPS

comp 180 Lecture 10 Outline of Lecture Procedure calls Saving and restoring registers Summary of MIPS instructions

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

CS 61C: Great Ideas in Computer Architecture More MIPS, MIPS Functions

Prof. Kavita Bala and Prof. Hakim Weatherspoon CS 3410, Spring 2014 Computer Science Cornell University. See P&H 2.8 and 2.12, and A.

Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

CSCE 5610: Computer Architecture

Instructions: Assembly Language

ISA and RISCV. CASS 2018 Lavanya Ramapantulu

ECE 486/586. Computer Architecture. Lecture # 8

CS222: MIPS Instruction Set

Chapter 2. Instruction Set Architecture (ISA)

Thomas Polzer Institut für Technische Informatik

CS 61C: Great Ideas in Computer Architecture. MIPS Instruction Formats

Chapter 2. lw $s1,100($s2) $s1 = Memory[$s2+100] sw $s1,100($s2) Memory[$s2+100] = $s1

Lecture Topics. Branch Condition Options. Branch Conditions ECE 486/586. Computer Architecture. Lecture # 8. Instruction Set Principles.

ECE 30 Introduction to Computer Engineering

5/17/2012. Recap from Last Time. CSE 2021: Computer Organization. The RISC Philosophy. Levels of Programming. Stored Program Computers

Recap from Last Time. CSE 2021: Computer Organization. Levels of Programming. The RISC Philosophy 5/19/2011

Today s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA.

Computer Architecture

Lecture 4: MIPS Instruction Set

MIPS Instruction Set

Computer Architecture. Chapter 2-2. Instructions: Language of the Computer

ECE369. Chapter 2 ECE369

1 5. Addressing Modes COMP2611 Fall 2015 Instruction: Language of the Computer

COE608: Computer Organization and Architecture

CS 61c: Great Ideas in Computer Architecture

CS 61C: Great Ideas in Computer Architecture More RISC-V Instructions and How to Implement Functions

Instruction Set Architecture

Chapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1

CSCI 402: Computer Architectures. Instructions: Language of the Computer (3) Fengguang Song Department of Computer & Information Science IUPUI.

CENG3420 L03: Instruction Set Architecture

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: MIPS Programming

Lecture 5: Procedure Calls

ENGN1640: Design of Computing Systems Topic 03: Instruction Set Architecture Design

CS 61c: Great Ideas in Computer Architecture

Compiler Architecture

MIPS Functions and Instruction Formats

MIPS Functions and the Runtime Stack

Chapter 2. Instructions: Language of the Computer. HW#1: 1.3 all, 1.4 all, 1.6.1, , , , , and Due date: one week.

CS31001 COMPUTER ORGANIZATION AND ARCHITECTURE. Debdeep Mukhopadhyay, CSE, IIT Kharagpur. Instructions and Addressing

CS3350B Computer Architecture MIPS Introduction

CS 110 Computer Architecture MIPS Instruction Formats

PHBREAK: RISC ISP architecture the MIPS ISP. you read: text Chapter 3 CS 350

Grading: 3 pts each part. If answer is correct but uses more instructions, 1 pt off. Wrong answer 3pts off.

Architecture II. Computer Systems Laboratory Sungkyunkwan University

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

CS3350B Computer Architecture

Topic Notes: MIPS Instruction Set Architecture

All instructions have 3 operands Operand order is fixed (destination first)

ECE232: Hardware Organization and Design. Computer Organization - Previously covered

Reduced Instruction Set Computer (RISC)

Instruction Set Architectures

ECE232: Hardware Organization and Design

Computer Organization MIPS ISA

Reduced Instruction Set Computer (RISC)

LECTURE 2: INSTRUCTIONS


CSE 378 Final Exam 3/14/11 Sample Solution

More C functions and Big Picture [MIPSc Notes]

Assembly Language Programming. CPSC 252 Computer Organization Ellen Walker, Hiram College

CSE Lecture In Class Example Handout

MIPS ISA and MIPS Assembly. CS301 Prof. Szajda

CSEE 3827: Fundamentals of Computer Systems

Computer Organization MIPS Architecture. Department of Computer Science Missouri University of Science & Technology

CS3350B Computer Architecture MIPS Procedures and Compilation

Transcription:

Instruction Set Architecture (Contd) Lecture 3 (Chapter 2) EEC170 FQ 2005 Review: MIPS Architecture Good example of RISC processor: Reduced Instruction-Set Computer RISC really a misnomer: architecture goal is speed not small instruction set. However, certain simplicities result in short clock cycle Intel 80486 1989 1200K Transistors Size: 163mm 2 50MHz MIPS R3000 1988 110K Transistors 72mm 2 20MHz 4watts Alternate RISC definition: Relegate the Interesting Stuff to the Avoid runtime overhead if complexity can be resolved at compile time Old school view: software is hard, keep compiler simple RISC view: complier writers are sharp, have good modern development tools MIPS company spun off from Hennessy s s MIPS processor project at Stanford MIPS: Microprocessor without Interlocking Pipeline Stages Designed for efficient pipelining (see Chapter 6) source: Prof. Kent Wilken 1 2 Review: MIPS General Architecture Characteristics 32-bit integer registers 32-bit architecture 32-bit integer arithmetic Higher precision must be done in software Memory addresses up to 2 32 = 4GBytes MIPS-64 extends architecture to 64 bits 32-bit fixed-length instructions (for simplicity) More complex operations done as a sequence of instructions Very few instruction formats (for simplicity) General Principle: Small/simple Fast Review: MIPS Arithmetic Operations Uses only 3 specifier arithmetic instructions: Operation result, source1, source2 E.g.,: ADD a, b, c a = b + c Other architectures (e.g., x86) use 2 specifier instructions One specifier is used as both a destination and source: Operation destination/source1, source2 E.g.,: ADD a, b a = a + b 3 4 Review: 3 Specifier Instructions 3 specifier is the most general form, reduces instruction count vs. two specifier,, e.g.: a = b + c; ADD a, b, c for 3 specifier move a,b for 2 specifier ADD a,c Why do you suppose two-specifier was ever used? Jump Register (jr( jr) Unconditional jump to address contained in specified register, R-type R format: op Rs 6 5 Wasted bits a non-issue: memory is cheap Allows branches to any of 2 30 word addresses (Bits 0-10 1 must be zero) (not used) jr 6 Also used to implemented Case/Switch statements lw $t1,0($t0) # load address from jump table jr $t1 5 6

Subroutine Calls/Returns Nested Subroutine Calls Some method needed for saving return address MIPS (other RISCs) ) use Jump and Link (jal) jal unconditionally jumps to specified address, Saves return address in $31 = $ra$ ra, Link Register Return address in register is faster than memory J-type format jal 6 Subroutine return achieved using jr: jr $ra target address 26 7 Need to handle nested subroutine calls A calls B, B calls C, C calls D... Recursive subroutine calls (A conditionally calls A) Must avoid overwriting return address in $31 = $ra$ General solution: Store return address on stack MIPS (other RISCs) ) does not have architected stack pointer Any general purpose register could be used as stack pointer Software convention uses $29 = $sp Save return address, push add $sp,$sp,-4 #expand stack by one word sw $ra,0($sp) #save ret. addr.. on top of stack Restore return address, pop lw $ra,0($sp) #get ret. addr.. from top of stack add $sp,$sp,4 #shrink stack by one word 8 Saving Return Address in Register can analyze call graph and register usage, possibly save return address in a free register rather than on stack (much faster!) main sub. A sub. B E.g., assume $t7 is free in subroutines A and B: In A, before call to B: mov $t7,$ra # save return address in $t7 To return from A: jr $t7 # return address is in $t7, go for it Saves 3 instructions vs. stack: one for call, two for return main A B 9 Synthesizing Large Constants RISC fixed-length instructions do not allow large immediate constants (e.g., 32 bits) MIPS uses special instruction in two-instruction sequence to create constants > 16 bits (uncommon case) Load Upper Immediate (lui( lui): lui N/A Rd immediate data 6 5 5 16 Sets Rd upper 16 bits to immediate data, lower 16 bits to 0s 32 bit constant: lui $t0,1234 hex # $t0 has 12340000 hex addi $t0,$t0,5678 hex # $t0 has 12345678 hex 10 Register 0 Register 0 is special purpose Read from $0 always produces value 0 used to synthesize instructions beyond base set without added complexity move $7, $20 = add $7, $0, $20 load $7, immediate = addi $7, $0, immediate Pseudo Instructions Write to $0 does nothing add $0, $12, $20 = NOP Various other examples of exploiting $0 as we review instruction set Instruction Set Design As seen, some operations can be synthesized with short sequence, e.g.: Can also create 32-bit constant w/o lui: addi $t0,$0,1234 hex # $t0 has 00001234 hex sll $t0,$t0,16 # $t0 has 12340000 hex addi $t0,$t0,5678 hex # $t0 has 12345678 hex How to decide if specific instruction (e.g., lui) is worthwhile? Experimentation/Quantitative Analysis 11 12

Evaluating Instruction Sets? Design-time metrics: Can it be implemented, in how long, at what cost? Can it be programmed? Ease of compilation? Static Metrics: How many bytes does the program occupy in memory? Dynamic Metrics: How many instructions are executed? How many bytes does the processor fetch to execute the program? How many clocks are required per instruction? How "lean" a clock is practical? Best Metric: Time to execute the program! CPI Aspects of CPU Performance CPU CPU time time = Seconds = Instructions x Cycles Cycles x Seconds Program Program Instruction Cycle Cycle instr count CPI Program X X X Instr.. Set X X Organization X X Technology X clock rate Inst. Count Cycle Time NOTE: this depends on instructions set, processor organization, and compilation techniques. 13 14 Architecture Development Benchmark Programs Prototype Machine Code Simulator Example Tradeoff: Auto Increment (Decrement) Some architectures (not( most RISCs) ) include instruction that auto increments base/index register MIPS: lw $t1,0($t0) # $t0 is index addi $t0,$t0,4 # increment index New Instruction Instruction Set Hardware Simulator Cycles Per Instruction Instruction Count Clock Cycle Time Auto Inc: lw+ + $t1,0($t0) # load and inc index Auto Inc (dec( dec) ) may be useful for incrementing through arrays, but not always increment by same value (e.g., 4) instruction complicates hardware because produces two results (two register writes): Value from memory Updated index 15 16 Example Tradeoff: Memory Operations Some architectures (not( RISC) allow arithmetic operands from memory e.g., ADDM $s0,$s1,offset($t0) Problems: Limited offset field (e.g., 11 bits) requires 3 operations, hence very slow: 1. compute address (r_base( + offset) 2. load data (memory is slow) 3. ALU operation significantly complicates pipeline design slower clock cycle Example Tradeoff: Dedicated Loop Counter A special loop-counter register is automatically decremented based on branch opcode Branch if Loop-Counter = 0 Bcond addr offset + Allows larger branch offset (lower instruction count, but small) ++ does not require separate increment instruction (lower instruction count) - requires more work within branch instruction, may increase clock cycle time 17 18

Example Tradeoff: Variable-Length Instructions + Allows more compact code by using as many bits as needed Move R1,R2 opcode jump label opcode Rs offset Rd Announcement: HW #1 Chapter 2: problems 4, 5, 6, 9, 15, 28, 30, 31, 37, 38, 54, 55 Some are quick and easy questions. Due on Friday 10/21 at 5pm EEC 170 homework box opcode offset - Must decode the instruction before knowing how long, where operator specifiers can be found higher CPI 19 20 Optimization Chapter 2.11-2.12 2.12 EEC170 FQ 2005 MIPS Code: Example: HLL MIPS Assembly C Code: swap(int v[ ], int k) { int temp; temp = v[k]; v[k] = v[k+1]; v[k+1] = temp; } 21 swap: addi $sp, $sp, -12 # make room on stack for 3 regs sw $t0, 0($sp) # save $t0 on stack sw $s0,4($sp) # save $s0 on stack sw $s1, 8($sp) # save $s1 on stack muli $t0, $a0, 4 # $t0 = k * 4 add $t0,$a1, $t0 # $t0 = v + k*4 = the addr. of v[k] lw $s0, 0($t0) # $s0 = temp = v[k] lw $s1, 4($t0) # $s1 = v[k+1] = next element of v sw $s1, 0($t0) # v[k] = v[k+1] sw $s0, 4($t0) # v[k+1] = temp lw $t0, 0($sp) # restore $t0 from stack lw $s0, 4($sp) # restore $s0 from stack lw $s1, 8($sp) # restore $s1 from stack addi $sp, $sp, 12 # restore stack pointer jr $ra # return to calling routine 22 Compiling Translating a high level language program to a machine language program for (i=0; i<j; i++) a[i]= ]=b[i]+c[i];]; s have two major parts: Compiling (cont.) Frontend interacts with programmer/language Backend interacts with architecture/processor for (i=0; i<j; i++) a[i]= ]=b[i]+c[i];]; Frontend ECS 142 add i,i,1 slt t1,i,j bne t1,r0 for_loop 01001010101010101110100111000101 11001010001011101010101101010100 11111010101010100010100101010101 00001010111010101010001101010111 23 Frontend/Backend communicate using a generic language (intermediate code, intermediate representation) Backend EEC 175 01001010101010101110100111000101 11001010001011101010101101010100 01010101010100010101111010010110 24

Retargeting Frontend/backend models allow easily retargeting of HLLs to different architectures HLL 1 HLL 2 HLL 3 phases s decompose the translation problem into smaller steps to manage the large complexity Front End Front End 1 Front End 2 Front End 3 Source Code Lexical Analysis Syntax Analysis Semantic Analysis Intermediate Representation Back End Intermediate Representation Backend Architecture A Backend Architecture B Backend Architecture C Array Optimizations Machine Independent Optimizations Machine Dependent Optimizations Machine code A Machine code B Machine code C Object Code 25 26 Lexical Analysis Syntax Analysis (Parsing) Translates character string to string of tokens Tokens are the basic lexical units in the HLL, e.g.: A keyword: Then A constant: 17 An identifier: newdata An operator: >= Groups tokens into syntactic structure, in the form of a syntax tree (parse tree) to identify statements sum := Y + Z x 12 ; statement Punctuation: ; etc. sum := expr ; Token type and value are identified IF (New > MaxNum) )... => token string: (Keyword, IF) (Identifier, New ) (Operator, >) (Identifier, MaxNum ) 27 (Recall high school English) Y + expr Z x 12 28 Semantic Analysis Performs static error checking Uses symbol table to check that variables are defined, declared Checks Operand/Result variables for type compatibility Optimization Basics Usually optimizations only occur in the backend, frontend produces simple translation Generates intermediate representation used by compiler backend May resemble generic assembly code, assumes unlimited registers Statement: S = A + B x C Becomes: move R101,A move R102,B move R103,C mult R104,R102,R103 add R105, R101,R104 move S,R105 29 Backend attempts to improve code quality,, some combination of code speed, size and possibly power consumption 30

General Optimization Framework Backend is a series of optimization phases Each phase lowers the intermediate representation toward the machine code and/or tries to improve the code quality General Optimization Phase Structure Each optimization phase is generally structured as an analysis algorithm followed by a code-improving transformation algorithm Analysis is specific to the transformation Analysis Transformation 31 32 Control Flow Analysis Instruction Scheduling divides program into basic blocks (BB) Straight-line code with no branch in except at start, no branch out except at end Optimizations within BB are local, across BB are global B2 B1 B3 33 The compiler can reorder (schedule( schedule) instructions to minimize delays from pipelining (see Chapter 6) New schedule must produce same program output LW r 101, 0(r 102 ) <stall> <stall> ADD r 104, r 103,r 101 LW r 105, 0(r 101 ) <stall> <stall> SUB r 106, r 105, r 104 LW r 107, 4(r 102 ) <stall> SW r 107, 0(r 104 ) LW r 101, 0(r 102 ) LW r 107, 4(r 102 ) <stall> LW r 105, 0(r 101 ) ADD r 104, r 103,r 101 SW r 107, 0(r 104 ) SUB r 106, r 105, r 104 34 Loop Invariant Code Motion Loop Invariant Code Motion If instruction J s J operands don t t change during loop execution, J produces same result each loop iteration If J is also only instruction to modify its destination register, can move J outside the loop, only executed once per loop entry addi r107,r107,1 mult r106,r107,r105 move r101,1 add r102,r103,r104 lw r105,0(r102) mult r106,r105, 3 add r101,r101,r106 addi r108,r108,1 If instruction J s J operands don t t change during loop execution, J produces same result each loop iteration If J is also only instruction to modify its destination register, can move J outside the loop, only executed once addi r107,r107,1 mult r106,r107,r105 move r101,1 add r102,r103,r104 lw r105,0(r102) mult r106,r105, 3 add r101,r101,r106 addi r108,r108,1 sw r101,0(r108) sw r101,0(r108) 35 36

Partial Deadcode Elimination Partial Deadcode Elimination If instruction s s result is not used along a path, the instruction can be pushed down the path it is used reduces instruction s execution count addi r107,r107,1 mult r106,r107,r105 move r101,1 add r102,r103,r104 lw r105,0(r102) mult r106,r105, 3 addi r108,r108,1 If instruction s s result is not used along a path, the instruction can be pushed down the path it is used reduces instruction s execution count move r101,1 add r102,r103,r104 lw r105,0(r102) mult r106,r105, 3 addi r107,r107,1 addi r108,r108,1 mult r106,r107,r105 add r101,r101,r106 r106 add r101,r101,r106 r106 sw r101,0(r108) sw r101,0(r108) 37 38 Common Sub-expression Eliminate recomputed sub-expressions by storing expression result in a register: HLL: IR: A = B + C + D + E F = G + H + D + E T 1 = B + C T 2 = D + E A= T 1 + T 2 T 3 = G + H T 4 = D + E F = T 3 + T 4 T 1 = B + C T 2 = D + E A= T 1 + T 2 T 3 = G + H T 4 = D + E F= T 3 + T 2 39 Eliminating Jumps in Loops Jumps can generally be eliminated from inside loops (e.g., For & While) by duplicating test outside loop Source: WHILE (i < 14) <body> Naive compile: move r101, i test: slti r102,r101,14 beq r102,r0,out_of_loop <body> j test Optimized compile: move r101,i slti r102,r101,14 beq r102,r0,out_of_loop loop: <body> slti r102,r101,14 bne r102,r0,loop 40 Register Allocation Until toward end of optimization phases compiler assumes unlimited number of symbolic registers Register allocation assigns symbolic registers to real registers Traditional allocation algorithms use graph coloring 41 Graph Coloring 1. Identify live range of all variables: r101 =... r102 =... r103 =... = r103 r104 =...... =... r104... =... r102... =... r101 2. Construct an interference graph r101 r102 r104 Symbolic are nodes, connection edge if both symbolic registers live at some point 3. Color nodes so neighbors have different colors: colors correspond to registers r103 42

Intermediate code is rewritten with assigned real register numbers r1 =... r2 =... r3 =... = r3 r3 =...... =... r3... =... r2... =... r1 Graph Coloring r101 r102 r104 r103 Register Spilling Program may have more live variables in a region than architecture has registers Can spill a register to memory to make room in register file for another variable: store $4, 40($20) # store register 4 at location 40 in area # pointed to by $20 load $4,32($20) # get new variable from location 32... load $7,40($20) # restore variable that was spilled use special algorithms to keep most active variables in registers, minimize spilling 43 44 Register Spilling Register Spilling 3 3 When more symbolic registers live than real registers, some symbolic register must spill to memory Assume two real registers r101 =... r102 =... r103 =... = r103 r104 =...... =... r104... =... r102... =... r101 2 2 To spill compiler inserts store/load instructions to store/restore symbolic to/from memory Live ranges now shorter, graph may be colorable r101 =... sw r101,48($sp) r102 =... r103 =... = r103 r104 =...... =... r104... =... r102... =... r101 lw r101,48($sp) r101 r102 r104 r101 r103 45 46 Loop Unrolling Can increase loop performance in exchange code size increase HLL Code: FOR (j = 0, j<1000, j++) sum = sum + a[j]; Intermediate code for loop: loop: lw r102,0(r101) # r101 is address of j add r103,r103,r102 # sum is r103, sum = sum + a[j] addi r101,r101,1 #j++ slti r104,r101,1000 # (j<1000) bne r104,r0,loop Three instructions of loop overhead per iteration Unrolled Loop Replicate the loop body to reduce per iternation loop overhead HLL code FOR (j = 0; j<1000; j=j+2) sum = sum + a[j]; sum = sum + a[j+1]; Intermediate code loop: lw r102,0(r101) add r103,r103,r102 lw r105,4(r101) add r103,r103,r105 addi r101,r101,2 slti r104,r101,1000 bne r104,r0,loop # load a[j] # sum a[j] # load a[j+1] # sum a[j+1] #j=j+2 # (j<1000) Loop Overhead is now 1.5 instructions per iteration 47 48

Subroutine In-Line Expansion Insert the body of a subroutine rather than a call Eliminates overhead of call/return Simplifies program structure, allowing better instruction scheduling, register allocation Original code: Load Add Call A <next> Optimized Code Load Add <body of A> <next> EEC 175 Complete course on compiler optimization Explores the software side of the hardware/software interface Project course/design elective Spring Quarter, 5 units 49 50 EEC175 Topics Basic blocks Control flow graph Loops Call graph Program profiling Instruction Scheduling Loop-Invariant Code Motion Procedure In-Lining Branch Optimization Branch Alignment Unreachable Code Elimination Data-Flow Analysis Data Dependence Aliasing Reaching Definitions Def-Use Chains Bit-Vector Iterative Analysis Live-Range Analysis Symbolic-Register Renumbering Symbolic-Register Interference Available Expressions Dead-Code Elimination Code Hoisting/Sinking Common Sub-Expression Elimination Partial Deadcode Elimination Strength Reduction Constant Propagation 51