Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1) Determine the number of loads/stores required for each variable assuming we are following a caller-saved convention (first column) or a callee-saved convention (second column).

image text in transcribed

image text in transcribed

1) Determine the number of loads/stores required for each variable assuming we are following a caller-saved convention (first column) or a callee-saved convention (second column). Specify the number of loads/stores executed both for each time the corresponding function (e.g. foo for variable a ) is executed, as well as each time the program is executed (i.e. \# per function call * number of calls). Assume the compiler checks for liveness across calls but does not make any other optimizations. ( 9 pts) Assume there are only 2 callee and 2 caller registers. Assign variables to a caller or callee register to minimize the number of loads/stores executed according to the strategy discussed in lecture. If designating a register as either caller or callee would not affect the number of loads/stores, we will accept either answer. ( 7 pts)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

Students also viewed these Databases questions

Question

What were some of the employee's physical limitations

Answered: 1 week ago