Consider this high-level code sequence of three statements: A = B + C; B = A +
Question:
A = B + C;
B = A + C;
D = A B;
Use the technique of copy propagation (see Figure A.20) to transform the code sequence to the point where no operand is a computed value. Note the instances in which the transformation has reduced the computational work of a statement and those cases where the work has increased. What does this suggest about the technical challenge faced in trying to satisfy the desire for optimizing compilers?
Figure A.20
Transcribed Image Text:
Percentage of the total number of optimizing transforms Optimization name Explanation At or near the source level; processor- independent High-level Procedure integration Replace procedure call by procedure body Within straight-line code N.M. Local Common subexpression elimination Replace two instances of the same computation by single copy 18% Constant propagation Replace all instances of a variable that is assigned a constant with the constant 22% Stack height reduction Rearrange expression tree to minimize resources needed for expression evaluation N.M. Across a branch Global Global common subexpression elimination Same as local, but this version crosses branches 13% Replace all instances of a variable A that has been assigned X (i.e., A = X) with X Copy propagation 11% Code motion Remove code from a loop that computes same value each iteration of the loop 16% Simplify/eliminate array addressing calculations within loops 2% Induction variable elimination Processor-dependent Depends on processor knowledge Many examples, such as replace multiply by a constant with adds and shifts Strength reduction N.M. Reorder instructions to improve pipeline performance N.M. Pipeline scheduling Branch offset optimization N.M. Choose the shortest branch displacement that reaches target
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (8 reviews)
Take the code sequence one line at a time Copy propagation has increased the w...View the full answer
Answered By
Ashington Waweru
I am a lecturer, research writer and also a qualified financial analyst and accountant. I am qualified and articulate in many disciplines including English, Accounting, Finance, Quantitative spreadsheet analysis, Economics, and Statistics. I am an expert with sixteen years of experience in online industry-related work. I have a master's in business administration and a bachelor’s degree in education, accounting, and economics options.
I am a writer and proofreading expert with sixteen years of experience in online writing, proofreading, and text editing. I have vast knowledge and experience in writing techniques and styles such as APA, ASA, MLA, Chicago, Turabian, IEEE, and many others.
I am also an online blogger and research writer with sixteen years of writing and proofreading articles and reports. I have written many scripts and articles for blogs, and I also specialize in search engine
I have sixteen years of experience in Excel data entry, Excel data analysis, R-studio quantitative analysis, SPSS quantitative analysis, research writing, and proofreading articles and reports. I will deliver the highest quality online and offline Excel, R, SPSS, and other spreadsheet solutions within your operational deadlines. I have also compiled many original Excel quantitative and text spreadsheets which solve client’s problems in my research writing career.
I have extensive enterprise resource planning accounting, financial modeling, financial reporting, and company analysis: customer relationship management, enterprise resource planning, financial accounting projects, and corporate finance.
I am articulate in psychology, engineering, nursing, counseling, project management, accounting, finance, quantitative spreadsheet analysis, statistical and economic analysis, among many other industry fields and academic disciplines. I work to solve problems and provide accurate and credible solutions and research reports in all industries in the global economy.
I have taught and conducted masters and Ph.D. thesis research for specialists in Quantitative finance, Financial Accounting, Actuarial science, Macroeconomics, Microeconomics, Risk Management, Managerial Economics, Engineering Economics, Financial economics, Taxation and many other disciplines including water engineering, psychology, e-commerce, mechanical engineering, leadership and many others.
I have developed many courses on online websites like Teachable and Thinkific. I also developed an accounting reporting automation software project for Utafiti sacco located at ILRI Uthiru Kenya when I was working there in year 2001.
I am a mature, self-motivated worker who delivers high-quality, on-time reports which solve client’s problems accurately.
I have written many academic and professional industry research papers and tutored many clients from college to university undergraduate, master's and Ph.D. students, and corporate professionals. I anticipate your hiring me.
I know I will deliver the highest quality work you will find anywhere to award me your project work. Please note that I am looking for a long-term work relationship with you. I look forward to you delivering the best service to you.
3.00+
2+ Reviews
10+ Question Solved
Related Book For
Computer Architecture A Quantitative Approach
ISBN: 978-8178672663
5th edition
Authors: John L. Hennessy, David A. Patterson
Question Posted:
Students also viewed these Computer science questions
-
Let's consider what dynamic scheduling might achieve here. Assume a microarchitecture as shown in Figure 2.42. Assume that the ALUs can do all arithmetic ops (MULTD, DIVD, ADDD, ADDI, SUB) and...
-
This exercise examines the impact of different cache designs, specifically comparing associative caches to the direct-mapped caches from Section 5.4. For these exercises, refer to the address stream...
-
Consider the following program: Note that the scheduler in a uniprocessor system would implement pseudo parallel execution of these two concurrent processes by interleaving their instructions,...
-
What is the output of the following application? A. Painting: 00FF00 B. One line of code does not compile. C. Two lines of code do not compile. D. Three lines of code do not compile. E. The code...
-
Gloria's Gift Shop uses a perpetual inventory system and the FIFO cost formula for valuing inventory. The company is now in the process of comparing the cost of its inventory with its net realizable...
-
What must the focal length of a thin negative lens be for it to form a virtual image 50 cm away (measured from the lens) of an ant located 100 cm away (measured from the lens)? Given (just as a...
-
A neurosurgery resident wants to double her money in the time it takes her to complete a residency program (7 years) so she can buy a new car with cash upon graduation. What interest rate is needed...
-
Let us consider again the investment data from Hauck Financial Services used in Section 10.4 to illustrate the Markowitz portfolio model. The data follows, along with the return of the S&P 500 Index....
-
what cognitive alchemy does the visionary transmute the leaden constraints of the present into the gilded opportunities of tomorrow, orchestrating symphonies of innovation amidst the cacophony of...
-
On December 31, 20X0, Toms River Rafting, Inc. (TRR), has a deferred tax asset related to a $250,000 net operating loss carryforward. The enacted tax rate (and substantively enacted tax rate) at the...
-
Because of the massive scale of WSCs, it is very important to properly allocate network resources based on the workloads that are expected to be run. Different allocations can have significant...
-
The design of MIPS provides for 32 general-purpose registers and 32 floating-point registers. If registers are good, are more registers better? List and discuss as many trade-offs as you can that...
-
Show that the curve x = cos t, y = sin t cos t has two tangents at(0, 0) and find their equations. Sketch the curve
-
The following selected court cases have helped to shape the tax law in regard to travel expense deductions. Read the following cases and prepare a brief written abstract for each case. a. Burns v....
-
Andy and Marcia Tufts, both age 35, are married with two children and file a joint return. Assume the children do not qualify for the child tax credit (Ch. 9), and the mortgage is not over $750,000....
-
Elmore Eisner made the following contributions during the current tax year: a. Assuming Elmores adjusted gross income is $80,000, what is his charitable contribution deduction for the year and...
-
Norma, a single taxpayer, had 2019 taxable income before the qualified business income deduction of $650,000, of which $500,000 was qualified business income earned through her sole proprietorship....
-
What are customers asked to do at project closing?
-
Determine the moments at and ¢. Assume ¡ is a roller and and ¢ are fixed. EI is constant. 5 25 kN/m 3. 2 3. 6 m 4 m
-
A copper sphere of 10-mm diameter, initially at a prescribed elevated temperature T;, is quenched in a saturated (1 atm) water bath. Using the lumped capacitance method, estimate the time for the...
-
How well do you expect this code to perform on a GPU? Explain your answer. 22 21 18 19 20 12 13 14 15 16 17 10 11 2 3 4 5
-
Assume a GPU architecture that contains 10 SIMD processors. Each SIMD instruction has a width of 32 and each SIMD processor contains 8 lanes for single-precision arithmetic and load/store...
-
List and describe at least four factors that influence the performance of GPU kernels. In other words, which runtime behaviors that are caused by the kernel code cause a reduction in resource...
-
2. Consider a helicopter rotor in a wind tunnel. The rotor is spinning and the wind is turned on. The equation for the rotor flapping was derived in class for this situation. Note that = - +C/2 =...
-
In this problem, you are asked to go through the steps of a finite element analysis. The key features include the use of isoparametric element formulation and Gauss numerical integration. (A) Problem...
-
A wheel rolls without slipping on a surface with a constant radius of curvature R. The centre of curvature is located at point O. R 20 9 G m Assume the wheel can be approximated as a uniform disk...
Study smarter with the SolutionInn App