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: 55% (9 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...
-
Discuss how the FCBA, Fair Credit Billing Act, protects a credit card holder's credit rating during the time that a charge to the card is in dispute.
-
When special journals are used, they are usually used to record each of four different types of transactions. What are these four types of transactions? AppendixLO1
-
Roxi, Inc., is using a costs-of-quality approach to evaluate design engineering efforts for a new skateboard. Roxi's senior managers expect the engineering work to reduce appraisal, internal failure,...
-
MaryJane's Smoke Shoppe, Inc. has operated for the past six years without the benefit of an accountant or bookkeeper. With the legalization of marijuana, MaryJane's hires the CPA firm Earnest and...
-
Last year, at Northern Manufacturing Company, 200 people had colds during the year. One hundred fifty-five people who did no exercising had colds, and the remainders of the people with colds were...
-
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...
-
Abbot Oil Corporation, located in Houston, Texas, has been operating for four years. Abbot uses full cost accounting and excludes all possible costs from the amortization base. The following account...
-
A parent acquires all of the stock of a subsidiary for $40 million in cash. The subsidiarys books report the following account balances at the date of acquisition (in trial balance format)....
-
1. Given: The sign for the Inn of the Prancing Pony in Bree-yes, it comes in pints-is fixed on the end of a beam of length 5L. If the sigh deflects too much then Gandalf will hit his head when he...
-
Q21) Add positive and negative charges as shown in the diagram below. Use the arrows of the simulation to guide you in drawing continuous electric field lines around and in between the three charges....
-
When 10.1 g CaO is dropped into a styrofoam coffee cup containing 157 g H2O at 18.0C, the temperature rises to 35.8C. Calculate the enthalpy change of the following reaction in kJ/mol CaO. Assume...
-
4-12. Sometimes heterogeneous chemical reactions take place at the walls of tubes in which reactive mixtures are flowing. If species A is being consumed at a tube wall because of a chemical reaction,...
-
Iris Company manufactures stained glass ornaments. The product line focuses on birds and consists of three products: the owl, the cardinal, and the blue jay. The following table summarizes the...
-
A 6-lb shell moving with a velocity ?? v0k explodes at point D into three fragments which hit the vertical wall at the points indicated. Fragments A, B, and C hit the wall 0.010 s, 0.018 s, and 0.012...
-
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...
-
Al preparar el estado de resultados pro forma, cules de las siguientes partidas se deducen de las utilidades brutas para llegar a las ganancias despus de impuestos? Pregunta de seleccin mltiple....
-
Lawson Inc. is expanding its manufacturing plant, which requires an investment of $4 million in new equipment and plant modifications. Lawson's sales are expected to increase by $3 million per year...
-
20 On January 1, Year 1, X Company purchased equipment for $80,000. The company estimates that the equipment will have a useful life of 10 years and a residual value of $5,000. X Company depreciates...
Study smarter with the SolutionInn App