Illustrate how compiler would unroll loop four times

Assignment Help Basic Computer Science
Reference no: EM1371116

Use the following code fragment:
Loop: LD R1,0(R2) ; load R1 from address 0+R2
DADDI R1,R1,#1 ; R1=R1+1
SD 0(R2),R1 ; store R1 at address 0+R2
DADDI R2,R2,#4 ; R2=R2+4
DSUB R4,R3,R2 ; R4=R3-R2
BNEZ R4,Loop ; branch to Loop if R4!=0

Assume that the initial value of R3 is R2+396.

(a) Show how a compiler would unroll the loop 4 times. Be sure to include the code that compute all of the pointers required for the operation within each iteration. Assume that the processor has as many registers as required.

(b) Show how a compiler would schedule the unrolled version of the loop from (a) for execution on a 4-wide VLIW processor that can execute an instruction on any execution unit. Assume latencies of 1 cycle for LD operation, and 0 cycle for DADDI and DSUB.

Reference no: EM1371116

Questions Cloud

Illustrate what is area of employment : Illustrate what is area of employment why has this shift occurred in illustrate what direction would shift in labour supply and demand go. Illustrate what would be its effect on equilibrium of labour market.
Explain the cognitive and non-cognitive abilities relating : Explain the cognitive and non-cognitive abilities relating to Emotional Intelligence and Provide an example of how you might use EQ in your daily life
What is the net force in the x-direction on charge : A 13g rifle bullet traveling 150m/s buries itself in a 3.7 kg pendulum hanging on a 2.9 m long string, which makes the pendulum swing upward in an arc. Resolve the horizontal component of the pendulum's maximum displacement.
Illustrate what is expected interest rate that will charge : Illustrate what is expected interest rate that will be charged by a bank that cannot exactly distinguish between two types but knows probabilities of each type.
Illustrate how compiler would unroll loop four times : Illustrate how compiler would unroll loop 4 times. Make sure to include code which compute all the pointers required for operation within each iteration. suppose that processor has as many registers as required.
What is an oligopoly : What is an "oligopoly" and why do they exist? Mention three or four oligopolies whose products you own or regularly purchase.
Find out the magnitude of the normal force : A ski starts from rest and slides down a 22° incline 75 m long. If the coefficient of friction is 0.09, what is the ski's speed at the base of the incline? If there is snow level at foot of the incline and it has the same coefficient of friction, ..
Find the change in the reserve requirement needed : Suppose that the banking system has no excess reserves. Calculate the maximum amount of check-writing deposits when bank reserves total $10,000 and the reserve requirement;
Illustrate what is average variable cost : Suppose that a firm's only variable input is labour. When 50 workers are used, average product of labour is 50 and marginal product of labour is 75. Wage rate is $80 and total cost of fixed input is $500. Illustrate what is average variable cost. ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd