Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Issue Instruction Code-Advance Computer Architecture-Lecture Slides, Slides of Advanced Computer Architecture

This course focuses on quantitative principle of computer design, instruction set architectures, datapath and control, memory hierarchy design, main memory, cache, hard drives, multiprocessor architectures, storage and I/O systems, computer clusters. This lecture includes: Issue, Speculative, transformations, Branch, Code, Instruction, Slot, Load, Compiler, Penalty

Typology: Slides

2011/2012

Uploaded on 08/06/2012

amrusha
amrusha 🇮🇳

4.4

(32)

149 documents

1 / 16

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
2-Issue Instruction Code
How the code can be improved using
a predicated form LW? And
We can say that the transformation is
speculative
Here, the second LW after the branch
LW R9, 0(R8), depends on the prior
load LW R8, 0(R10)
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Issue Instruction Code-Advance Computer Architecture-Lecture Slides and more Slides Advanced Computer Architecture in PDF only on Docsity!

2-Issue Instruction Code

  • How the code can be improved using a predicated form LW? And
  • We can say that the transformation is speculative

Here, the second LW after the branch LW R9, 0(R8), depends on the prior load LW R8, 0(R10)

2-Issue Instruction Code

Therefore, this sequence wastes a

memory operation slot in second

cycle; and

will incur a data dependence stall

if the branch (BEQZ R10, L) is not

taken.

2-Issue Instruction Code

First instruction slot Second instruction slot

LW R1,40(R2) ADD R3,R4,R

LWC R8,0(R10),R10 ADD R6,R3,R

BEQZ R10,L

LW R9,0(R8)

2-Issue Instruction Code

Note that it improves the execution

time by:

– eliminating the one instruction

issue slot; and

– reducing the pipeline stall for last

instruction in the sequence

Advantages of predicated Code

Predicated or conditional instructions are extremely useful:

  • for implementing short alternative control flows
  • for eliminating some unpredictable branches; and
  • for reducing the overhead of global code scheduling

Limitations on the conditional

Instructions

To move an instruction across a branch and making it conditional will:

slow the program whenever the move instruction would not have been normally executed

Limitations on the conditional

Instructions

Conditional instruction results in a stall for data hazard, if the condition evaluation and predicated instructions are not separated

Conditional instruction may have some speed penalty compared to unconditional instructions

Limitations on the conditional

Instructions

The use of Conditional instruction is limited when the control flow involves more than a simple alternative sequence

For example, moving an instruction across multiple branches requires making it conditional on both the branches

Thus, it requires to specify additional instructions to compute the controlling predicate

Introduction to Compiler Speculation

In our earlier discussion, we have

noticed that:

where the programs have

branches, which may be predicted

at the compile time, either from the

program structure or from program

profile

Introduction to Compiler Speculation

Here, the compiler speculates to: either improve the scheduling and/or to increase the issue rate However, the predicated instructions may help to speculate These instructions are more useful when they can eliminate control dependence by if-conversion

Compiler speculation with hardware support

  1. The ability to find instruction can be speculatively moved and not affect the program data flow

  2. The ability to ignore exceptions in speculated instructions, until we know such exception would really occur

  3. The ability to speculatively interchange loads and stores, or stores and stores, which may have address conflicts.