Question

Using either a register lifetime graph or colored graph, determine the minimum number of registers needed for the basic block

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The answer is 3.

The variable i can be stored in r1 as, r1<- i. Similarly, r2<-t, r3<-c.

Now we can write the first line of code as,

r2=r1 *r2 + r3.

Now the register r3 is free and we can use it for future. So r3<-o;

The second line of code can be written as,

r3= r3 * r1. The value of b is now stored in register r3.

The third line can be now written as,

r3 = r3/r1; where r1, r2 and r3 are register variables.

Add a comment
Know the answer?
Add Answer to:
Using either a register lifetime graph or colored graph, determine the minimum number of registers needed...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1) Assume the registers are initialized to the indicated values: Se al A c and code...

    1) Assume the registers are initialized to the indicated values: Se al A c and code frogments MUST use 32 ぁ ar movennes (anor be "nedfra-ne ibrary function or procedural calls ino- Pe Peue c for ll codr ond code frogments only othu ey document your code with Comments unless the code size is Drow Fow Chort for any flow of control involving branches and loops Use PoCedures as modules to organize most of the code and code fragments. In...

  • Pick a minimum of 20 observations on any subject. This will include a dependent variable plus...

    Pick a minimum of 20 observations on any subject. This will include a dependent variable plus two independent variables that you may think are either negatively or positively correlated with the dependent variable. List the observed data (include the source). Then do the following: a. State before doing any calculations whether you think they are positively or negatively correlated. What is your rationale? Example: I test for a correlation between the quantity of coffee that people buy (Y) with the...

  • PROGRAM DESCRIPTION Using the given class definitions for either C++, create a minimum heap that stores...

    PROGRAM DESCRIPTION Using the given class definitions for either C++, create a minimum heap that stores integers and and implements a minimum priority queue. (Your program can be "hard coded" for integers - it does not need to use templates, generics, or polymorphism.) Your data structure must always store its internal data as a heap. Your toString function should return a string with the heap values as a comma separated list, also including the size of the heap as well....

  • *Write a parallel program pie.c in C or C++ (pie.cc) for Linux that computes an approximation of the number π using a se...

    *Write a parallel program pie.c in C or C++ (pie.cc) for Linux that computes an approximation of the number π using a series with N+1 terms.* --The series sum is partitioned in T non-overlapping partial sums, each computed by T separate child processes created with the fork() library function.* --This program demonstrates data parallelism and interprocess communication using pipes. Each child process could perform a (potentially) long computation on a separate CPU (or core). Depending on the computer architecture, the...

  • 1. Evaluate the following expressions if p = 8, 9 = 3, and the value of...

    1. Evaluate the following expressions if p = 8, 9 = 3, and the value of the variable found is False. Show your work. . q <= p . not (p == 4-5) . q != p % 5 . found or p > 5 and q == p + 5 2. Are you able to draw the truth tables for AND, OR, and NOT logical expressions? - Translate the following problem descriptions into Python. 3. If score is greater...

  • ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate)...

    ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate) Employees(EmpID, FirstName, LastName, JobTitle) ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) The CRID is the primary key, it is unique, and it is an positive integer The CRType may be one of two values: "Deficiency" or "Enhancement" CRTitle is a variable length string that may be up to 2048 characters CROriginDate is a date CRPriority is an integer that may assume a value of...

  • Lab 4: Java Fundamentals, Part IV In this assignment, you solve a conversion problem similar to...

    Lab 4: Java Fundamentals, Part IV In this assignment, you solve a conversion problem similar to Programming Challenge 1 of Chapter 3 of your text, page 184 (187 in Edition 5). Given one of the Roman numerals I, II, III, IV, V, VI, VII, VIII, IX, X, XI, XII, XIII, XIV, XV as an input your program must determine and display the corresponding decimal digit 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15....

  • Select the graph that matches the numbered manufacturing cost data. Indicate by letter which of the...

    Select the graph that matches the numbered manufacturing cost data. Indicate by letter which of the graphs best fits each of the situations or items described. (Click to view the graphs.) The vertical axes of the graphs represent total dollars of cost and the horizontal axes represent production output during a calendar year. In each case, the zero point of dollars and production is at the intersection of the two axes. The graphs may be used more than once. к...

  • Resettable Detonator - Project Design - Resettable Detonator Resistorized Resettable Detonator- Needed Reset...

    Resettable Detonator - Project Design - Resettable Detonator Resistorized Resettable Detonator- Needed Resettable Rig Environment Detonator (RED)- Wanted Drawing Paragraph ont Resettable Detonator - Resistorized Desizn x circuit (Test i) that can be used to simulate the R and downhole. . It need to comply with the following conditions: .Condition 1: . Size-See Pictures-Figure 1 and 3 .Condition 2: anidrdess hanato ches tor buad. t. lf ire at 800mA with a staticresistance measurement of .See Table 1 Condition 3: ....

  • Required information Chapter 17 Case: Reducing Ambiguity in Business Requirements The number one reason projects fail...

    Required information Chapter 17 Case: Reducing Ambiguity in Business Requirements The number one reason projects fail is bad business requirements. Business requirements are considered “bad” because of ambiguity or insufficient involvement of end users during analysis and design.     A requirement is unambiguous if it has the same interpretation for all parties. Different interpretations by different participants will usually result in unmet expectations. Here is an example of an ambiguous requirement and an example of an unambiguous requirement: • Ambiguous requirement:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT