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...
-
Pickle Motorcycles, Inc. (PMI), manufactures three motorcycle models: a cruising bike (Route 66), a street bike (Main Street), and a starter model (Alley Cat). Because of the different materials...
-
Explain how the notions of effectiveness, efficiency and equity are related to decision-making, sustainable development and accountability.
-
Titan Networking became a public company through an IPO (initial public offering) two weeks ago. You are looking forward to the challenges of being assistant controller for a publicly owned...
-
(2) A glass tube of inside diameter 1.0 mm is dipped vertically into a container of mercury, with its lower end 1 cm below the mercury surface. (a) What must be the gauge pressure of the air in the...
-
Martha has not made any taxable gifts in her past Check and complete the excel spreadsheet of total assets. ASSUME BENNY DIES ON DECEMBER 31, 2020. Prepare a Reconciliation of Gross Estate to 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...
-
Make an appointment with a loan officer at your bank who handles small businesses. Conduct an interview to find out the following: Will the bank lend to small businesses, using receivables for...
-
Sweeten Company had no jobs in progress at the beginning of the year and no beginning inventories. It started, completed, and sold only two jobs during the year-Job P and Job Q. The company uses a...
-
You are developing an ASP.NET MVC news aggregation application that will be deployed to servers on multiple networks. The application must be compatible with multiple browsers. A user can search the...
-
1. For the graph S A 7 6 8 3 4 B 5 2 2 (a) Find the number edges and sum degrees of all vertices. Marks) (b) Explain why the graph is not complete. Marks) (c) Use Prim's Algorithm to find the minimum...
-
2. Consider scanning literals for representing carbohydrates in chemistry. Such literals consist of one or more parts, each consisting of C, H, or 0, optionally followed by a decimal integer greater...
-
On January 1, 2024, Apex Inc.'s ledger shows its long-lived asset of $79,000 (at cost) and accumulated depreciation of $28,125. When the capital asset was purchased, Apex Inc. estimated that its...
-
You're is professional, and your boss has asked you to prepare a briefing for senior staff on the comparative advantages and disadvantages of three competing secondary storage technologies: magnetic...
-
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...
-
Mrs . Page had just completed a series of dental appointments. Typically Mrs . Page is a positive and very complimentary of the dental healthcare team. However, today you notice that she is very...
-
what is my principal reduction balance if my mortgage balance is $ 1 1 7 , 0 0 0 at a mortgage rate of 6 . 2 5 % and I make my payment of 9 3 6
-
What management area has as its objective to increase the likelihood and impact of positive events and decrease the likelihood and impact of negative events in the project?
Study smarter with the SolutionInn App