Automatic Instruction Scheduler Retargeting by Reverse-Engineering - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Automatic Instruction Scheduler Retargeting by Reverse-Engineering

Description:

Processor Manuals. Pros: Easily Available. Standard Methodology. Cons: ... Takes several man-weeks to translate processor manual into machine description ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 17
Provided by: matthew239
Category:

less

Transcript and Presenter's Notes

Title: Automatic Instruction Scheduler Retargeting by Reverse-Engineering


1
Automatic Instruction Scheduler Retargeting by
Reverse-Engineering
  • Matthew J. Bridges, Neil Vachharajani, Guilherme
    Ottoni, David I. August
  • Liberty Research Group
  • Department of Computer Science
  • Princeton University

2
Structural Hazards
Code
Resources
Add
ALU1
ALU0
Time
Shl
ALU1
ALU0
Sub
ALU1
ALU0
Xor
3
Structural Hazards
Code
Resources
Add
ALU1
ALU0
Shl
Time
ALU1
ALU0
Sub
ALU1
ALU0
Xor
4
Encoding Structural Hazards
  • Processor Manuals
  • Pros
  • Easily Available
  • Standard Methodology
  • Cons
  • Processor manual does not describe the actual
    machine
  • Takes several man-weeks to translate processor
    manual into machine description
  • Machine description written incorrectly

Processor Manuals
Offline
Compiler
Machine Description
Hazard Detector
Scheduler
5
Processor Manuals
IA64 Instructions Set Reference Vol. 3 370
pages of ISA description
Itanium 2 Processor Reference Manual200 pages
of microarchitecural details
6
Humans arent Perfect
IMPACT Itanium 2 Machine Description
OP_SHIFT (alt(ALT_SHIFT_REG)) OP_SHIFT
(alt(ALT_SHIFT_IMM))
ALT_SHIFT_REG (format (OF_IREG_IREG
resv(RL_Itype))
ALT_SHIFT_IMM (format (OF_IREG_IMM6
resv(RL_Itype))
Itanium Instruction Set Reference Vol. 3 Page
3212
Itanium 2 Processor Reference Manual Page 27
7
Encoding Structural Hazards
  • Architecture Description LanguageLISAnML
  • Pros
  • Machine description accurately describes
    processor
  • Cons
  • ADLs are limited
  • Not used for general purpose processors
  • Often unavailable

ADL
Offline
Compiler
Machine Description
Hazard Detector
Scheduler
8
Encoding Structural Hazards
  • Query machine while scheduling
  • Baker 91Dupre 04
  • Pros
  • Avoids human errors
  • Easily available
  • Cons
  • Increase in compile time
  • Unable to cross-compile

Hazard Detector
Scheduler
Compiler
9
Encoding Structural Hazards
  • Query machine a priori
  • Pros
  • Avoids human errors
  • Easily available
  • Avoid scheduling overhead
  • Cons
  • ?

Hazard Detector
Scheduler
Machine Description
Compiler
Offline
Structural HazardDetermination Algo.
10
Limits of Querying
Goal Perfectly characterize the machine
Goal Characterize the machine
Machine A
Machine B
Finite
Finite
Infinite
Infinite
11
Identifying a Subspace to Explore
Possible Instruction Schedules
Itanium 2
Time
Assumption
General
100 Schedules/Second
12
Cost of Assumptions
13
Reverse-Engineering Algorithm
1. All Instructions in a Single Category
14
Cost of Finding Categories
15
Conclusion
  • Obtaining structural hazards for use in
    instruction scheduling is error prone
  • Processors manuals wrong or confusing
  • Manual translation is error prone
  • ADLs arent available
  • We can automatically extract structural hazards
    useful for scheduling
  • It is impossible to determine all structural
    hazards a priori
  • It is possible to find sufficient hazard
    information to produce good schedules
  • Algorithm achieves 81-100 of manual resource map
    performance
  • Greatly reduces the time needed to retarget the
    instruction scheduler of a compiler
  • Facilitates Design Space Exploration

16
Thank You
Write a Comment
User Comments (0)
About PowerShow.com