1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lyrx [107]
3 years ago
10

Computers spend most of their time in loops, so multiple loop itera- tions are great places to speculatively find more work to k

eep CPU resources busy. Nothing is ever easy, though: the compiler emitted only one copy of that loop's code, so even though multiple iterations are handling distinct data, they will appear to use the same registers. To keep multiple iterations' register usages from colliding, we rename their registers. Figure 3.49 shows example code that we would like our hardware to rename. A compiler could have simply unrolled the loop and used different registers to avoid conflicts, but if we expect our hard- ware to unroll the loop, it must also do the register renaming. How? Assume your hardware has a pool of temporary registers (call them T registers, and assume that there are 64 of them, TO through T63) that it can substitute for those registers des- ignated by the compiler. This rename hardware is indexed by the src (source) register designation, and the value in the table is the T register of the last destina- tion that targeted that register. (Think of these table values as producers, and the src registers are the consumers; it doesn't much matter where the producer puts its result as long as its consumers can find it.) Consider the code sequence in Fig ure 3.49. Every time you see a destination register in the code, substitute the next available T, beginning with T9. Then update all the src registers accordingly, so that true data dependences are maintained. Show the resulting code. (Hint: See Figure 3.50.)
Computers and Technology
1 answer:
fredd [130]3 years ago
7 0

Answer / Explanation:

From the provided Hint in Figure 3.50 and also The baseline performance ( in cycles, per loop iteration) of the code sequence in Figure 2.35 shows that  if no new instruction’s execution could be initiated until the previous instruction’s execution had completed, is 40.

Now, you might ask that how did I come up with that number?

Each instruction requires one clock cycle of execution (a clock cycle in which that instruction, and only that instruction, is occupying the execution units; since every instruction must execute, the loop will take at least that many clock cycles). To that base number, we add the extra latency cycles. Don’t forget the branch shadow cycle.

Therefore, the resulting code would be:

Loop:      LD F2,0(Rx) 1 + 4

               DIVD F8,F2,F01 + 12

               MULTD F2,F6,F2 1 + 5

               LDF4,0(Ry) 1 + 4

               ADDD F4,F0,F4 1 + 1

              ADDD F10,F8,F2 1 + 1

              ADDI Rx,Rx,#8 1

              ADDIRy,Ry,#81

              SDF4,0(Ry) 1 + 1

              SUB R20,R4,Rx 1

              BNZ R20,Loop 1 + 1

Cycle per loop iter 40

You might be interested in
A ____ is a synonym for a virtualization application.
forsale [732]

hypervisor is the answer

3 0
4 years ago
You have just changed the system time within your computer's BIOS. You choose to save the settings upon exit. What happens next?
ozzi
When you were to choose the setting when exiting, the next step that would appear to happen would be the fact that the drive or the chip it's self would just stop. It would continue to work,but the main focus would be that it would not be functional.
4 0
3 years ago
Which of the following statements is false? Question 16 options: A) With non-static interface methods, helper methods can now be
Delicious77 [7]

Answer:

The best answer is "A"

Explanation:

With non-static interface methods, helper methods can now be declared directly in interfaces rather than in separate classes.

5 0
3 years ago
Read 2 more answers
What is the first computer company​
katovenus [111]

Answer:

Electronic controls company founded in 1949

3 0
3 years ago
Read 2 more answers
You plan to use the Fill Down feature on a formula and you need to keep a cell reference the same. Which one of the following fo
viva [34]
You have to use this format for example $A$2
The format for absolute reference is designated with a dollar sign ($). If both column and, put a dollar sign before and in between the row and column. By doing this, column and row do not change when copied.
3 0
3 years ago
Other questions:
  • What OS is most commonly used by businesses? Linux Macintosh Microsoft Windows
    11·1 answer
  • In the case below, the original source material is given along with a sample of student work. Determine the type of plagiarism b
    7·1 answer
  • Cpu coolers are typically made using what two different types of materials?
    6·1 answer
  • Write a routine to interchange the mth and nth elements of a singly-linked list. You may assume that the ranks m and n are passe
    10·1 answer
  • What are the disadvantages of using photo editing software in photography?
    14·1 answer
  • If an electric circuit has 30ohms and 10amps. How many volts the battery voltmeter should read?
    10·1 answer
  • PLEASE I NEED HELP, WILL MARK BRAINLYEST!!! 50 POINTS!!!
    14·1 answer
  • Write a definition in your own words for GUI. Do not copy and paste please.
    8·2 answers
  • Does anyone else have edge and think its not the awful?
    12·2 answers
  • What makes a source credible?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!