SlideShare a Scribd company logo
1 of 15
PARTIAL
REDUNDANCY
ELIMINATION
BY
M.LAVANYA,M.SC(CS)
NADAR SARASWATHI COLLEGE
OF ARTS AND SCIENCE ,THENI.
PARTIAL REDUNDANCY ELIMINATION
Partial-Redundancy Elimination Minimize the number of
expression evaluations By moving around the places where
an expression.
Global code motion optimization
• Remove partially redundant expressions
• Loop invariant code motion
• Can be extended to do Strength Reduction
• No loop analysis needed
• Bidirectional flow problem C
PARTIAL REDUNDANCY ELIMINATION
 Global code motion optimization
• Remove partially redundant expressions
• Loop invariant code motion
• Can be extended to do Strength Reduction
 No loop analysis needed
 Bidirectional flow problem C
REDUNDANCY
• A Common Sub expression is a Redundant Computation
t1= a + b t2= a + b
t3 =a + b
REDUNDANCY
• Occurrence of expression E at P is redundant if E is
available there: – E is evaluated along every path to P, with
no operands redefined since.
• Redundant expression can be eliminated
PARTIAL REDUNDANCY
 Partially Redundant Computation:
t1 = a + b
t2 = a + b
PARTIAL REDUNDANCY
 Occurrence of expression E at P is partially redundant if E
is partially available there:
• E is evaluated along atleast one path t P to P, with no operands
redefined since.
 Partially redundant expression can be eliminated if we
can insert computations to make it fully redundant .
LOOP INVARIANTS ARE PARTIAL
REDUNDANCIES
 Loop invariant expression is partially redundant:
A = …
t1 = a + b
LOOP INVARIANTS ARE PARTIAL
REDUNDANCIES
 As before, partially redundant computation can be
eliminated if we insert computations to make it fully
redundant.
 Remaining copies can be eliminated through copy
propagation or more complex analysis of partially
redundant assignments.
PARTIAL REDUNDANCY METHODS
1. Insert Computations to make partially redundant
expression(s) fully redundant.
2. Eliminate redundant expression(s).
PARTIAL REDUNDANCY ISSUES
1. What expression occurrences are candidates for
elimination?
2. Where can we safely insert computations?
3. Where do we want to insert them?
• For this lecture, we assume one expression of interest, a
+ b. – In practice, with some restrictions, can do many
expressions in parallel.
WHICH OCCURANCE MIGHT BE
ELIMINATED
 In CSE,
• E is available at P if it is previously evaluate along every path
to P, with no subsequent re definitions of operands.
• If so, we can eliminate computation at P.
 In PRE,
• E is partially available at P if it is previously evaluated along at
least one path to P, with no subsequent redefinitions of operands.
WHICH OCCURANCE MIGHT BE
ELIMINATED
• If so, we might be able to eliminate computation at P, if we can
insert computations to make it fully redundant.
 Occurrences of E where E is partially available are
candidates for elimination.
FINDING PARTIALLY AVAILABLE
EXPRESSIONS
 Forward flow problem
• Lattice = { 0, 1 }, meet is union ( ), Top = 0 (not PAVAIL), entry = 0
• PAVOUT[i] = (PAVIN[i] – KILL[i]) AVLOC[i]
•PAVIN[i] = 0 i = entry PAVOUT[p] otherwise
 For a block,
• Expression is locally available (AVLOC) if downwards exposed.
• Expression is killed (KILL) if any assignments to operands.
FINDING PARTIALLY AVAILABLE
EXPRESSIONS
A = …
… = a + b
… = a + b
a = …

More Related Content

What's hot

Counter propagation Network
Counter propagation NetworkCounter propagation Network
Counter propagation NetworkAkshay Dhole
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMvikas dhakane
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler designAnul Chaudhary
 
Directed Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocksDirected Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocksMohammad Vaseem Akaram
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignmentKarthi Keyan
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignKuppusamy P
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependencyJismy .K.Jose
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}FellowBuddy.com
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSARASWATHI S
 
Principal source of optimization in compiler design
Principal source of optimization in compiler designPrincipal source of optimization in compiler design
Principal source of optimization in compiler designRajkumar R
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine LearningPavithra Thippanaik
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code GeneratorDarshan sai Reddy
 
Learning set of rules
Learning set of rulesLearning set of rules
Learning set of rulesswapnac12
 
Optimization of basic blocks
Optimization of basic blocksOptimization of basic blocks
Optimization of basic blocksishwarya516
 

What's hot (20)

Counter propagation Network
Counter propagation NetworkCounter propagation Network
Counter propagation Network
 
I. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHMI. AO* SEARCH ALGORITHM
I. AO* SEARCH ALGORITHM
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
 
Directed Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocksDirected Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocks
 
Register allocation and assignment
Register allocation and assignmentRegister allocation and assignment
Register allocation and assignment
 
Intermediate code generation in Compiler Design
Intermediate code generation in Compiler DesignIntermediate code generation in Compiler Design
Intermediate code generation in Compiler Design
 
Conceptual dependency
Conceptual dependencyConceptual dependency
Conceptual dependency
 
Code Optimization
Code OptimizationCode Optimization
Code Optimization
 
Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}Heuristic Search Techniques {Artificial Intelligence}
Heuristic Search Techniques {Artificial Intelligence}
 
PAC Learning
PAC LearningPAC Learning
PAC Learning
 
System software - macro expansion,nested macro calls
System software - macro expansion,nested macro callsSystem software - macro expansion,nested macro calls
System software - macro expansion,nested macro calls
 
Loop invariant computation
Loop invariant computationLoop invariant computation
Loop invariant computation
 
Input-Buffering
Input-BufferingInput-Buffering
Input-Buffering
 
Principal source of optimization in compiler design
Principal source of optimization in compiler designPrincipal source of optimization in compiler design
Principal source of optimization in compiler design
 
1.Role lexical Analyzer
1.Role lexical Analyzer1.Role lexical Analyzer
1.Role lexical Analyzer
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
 
Learning set of rules
Learning set of rulesLearning set of rules
Learning set of rules
 
Code generation
Code generationCode generation
Code generation
 
Optimization of basic blocks
Optimization of basic blocksOptimization of basic blocks
Optimization of basic blocks
 

Similar to PARTIAL REDUNDANCY ELIMINATION OPTIMIZATION

CounterFactual Explanations.pdf
CounterFactual Explanations.pdfCounterFactual Explanations.pdf
CounterFactual Explanations.pdfBong-Ho Lee
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019Emmanuel Zarpas
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019Emmanuel Zarpas
 
Cs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesCs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesYasir Khan
 
Backdoors to Satisfiability
Backdoors to SatisfiabilityBackdoors to Satisfiability
Backdoors to Satisfiabilitymsramanujan
 
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et alPaper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et alMin-Yih Hsu
 
Syntactic analysis in NLP
Syntactic analysis in NLPSyntactic analysis in NLP
Syntactic analysis in NLPkartikaVashisht
 
CSP UNIT 2 AIML.ppt
CSP UNIT 2 AIML.pptCSP UNIT 2 AIML.ppt
CSP UNIT 2 AIML.pptssuser6e2b26
 
CS415 - Lecture 11 - CSPs I.pptx
CS415 - Lecture 11 - CSPs I.pptxCS415 - Lecture 11 - CSPs I.pptx
CS415 - Lecture 11 - CSPs I.pptxHina Jamil
 
Bp150513(compiler)
Bp150513(compiler)Bp150513(compiler)
Bp150513(compiler)indhu mathi
 

Similar to PARTIAL REDUNDANCY ELIMINATION OPTIMIZATION (20)

CounterFactual Explanations.pdf
CounterFactual Explanations.pdfCounterFactual Explanations.pdf
CounterFactual Explanations.pdf
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019
 
Theorem proving 2018 2019
Theorem proving 2018 2019Theorem proving 2018 2019
Theorem proving 2018 2019
 
m7-logic.ppt
m7-logic.pptm7-logic.ppt
m7-logic.ppt
 
Cs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategiesCs ps, sat, fol resolution strategies
Cs ps, sat, fol resolution strategies
 
Backdoors to Satisfiability
Backdoors to SatisfiabilityBackdoors to Satisfiability
Backdoors to Satisfiability
 
Logic agent
Logic agentLogic agent
Logic agent
 
P J020
P J020P J020
P J020
 
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et alPaper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
Paper Study - Incremental Data-Flow Analysis Algorithms by Ryder et al
 
autocorrelation.pptx
autocorrelation.pptxautocorrelation.pptx
autocorrelation.pptx
 
Syntactic analysis in NLP
Syntactic analysis in NLPSyntactic analysis in NLP
Syntactic analysis in NLP
 
Polish
PolishPolish
Polish
 
Complier Design
Complier DesignComplier Design
Complier Design
 
AI Lesson 12
AI Lesson 12AI Lesson 12
AI Lesson 12
 
CSP UNIT 2 AIML.ppt
CSP UNIT 2 AIML.pptCSP UNIT 2 AIML.ppt
CSP UNIT 2 AIML.ppt
 
CS415 - Lecture 11 - CSPs I.pptx
CS415 - Lecture 11 - CSPs I.pptxCS415 - Lecture 11 - CSPs I.pptx
CS415 - Lecture 11 - CSPs I.pptx
 
Linearization
LinearizationLinearization
Linearization
 
Lect6 csp
Lect6 cspLect6 csp
Lect6 csp
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Bp150513(compiler)
Bp150513(compiler)Bp150513(compiler)
Bp150513(compiler)
 

More from Ishucs

Renuga
RenugaRenuga
RenugaIshucs
 
Thresholding
ThresholdingThresholding
ThresholdingIshucs
 
Ishwariya
IshwariyaIshwariya
IshwariyaIshucs
 
Image compression
Image compressionImage compression
Image compressionIshucs
 
Deepika
DeepikaDeepika
DeepikaIshucs
 
Renuga
RenugaRenuga
RenugaIshucs
 
Soundharya
SoundharyaSoundharya
SoundharyaIshucs
 
Lavanya
LavanyaLavanya
LavanyaIshucs
 
M.srinandhini
M.srinandhiniM.srinandhini
M.srinandhiniIshucs
 
Deepika t
Deepika tDeepika t
Deepika tIshucs
 
Sragavi (1)
Sragavi (1)Sragavi (1)
Sragavi (1)Ishucs
 
Ishwariya
IshwariyaIshwariya
IshwariyaIshucs
 
Software enginnering
Software enginneringSoftware enginnering
Software enginneringIshucs
 
Software engineering
Software engineeringSoftware engineering
Software engineeringIshucs
 
Web programming
Web programmingWeb programming
Web programmingIshucs
 
Big data
Big dataBig data
Big dataIshucs
 
Affine array index
Affine array indexAffine array index
Affine array indexIshucs
 
Business intelligence tools to handle big data
Business intelligence tools to handle big dataBusiness intelligence tools to handle big data
Business intelligence tools to handle big dataIshucs
 

More from Ishucs (20)

Renuga
RenugaRenuga
Renuga
 
Snega
SnegaSnega
Snega
 
Thresholding
ThresholdingThresholding
Thresholding
 
Ishwariya
IshwariyaIshwariya
Ishwariya
 
Image compression
Image compressionImage compression
Image compression
 
Deepika
DeepikaDeepika
Deepika
 
Snega
SnegaSnega
Snega
 
Renuga
RenugaRenuga
Renuga
 
Soundharya
SoundharyaSoundharya
Soundharya
 
Lavanya
LavanyaLavanya
Lavanya
 
M.srinandhini
M.srinandhiniM.srinandhini
M.srinandhini
 
Deepika t
Deepika tDeepika t
Deepika t
 
Sragavi (1)
Sragavi (1)Sragavi (1)
Sragavi (1)
 
Ishwariya
IshwariyaIshwariya
Ishwariya
 
Software enginnering
Software enginneringSoftware enginnering
Software enginnering
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Web programming
Web programmingWeb programming
Web programming
 
Big data
Big dataBig data
Big data
 
Affine array index
Affine array indexAffine array index
Affine array index
 
Business intelligence tools to handle big data
Business intelligence tools to handle big dataBusiness intelligence tools to handle big data
Business intelligence tools to handle big data
 

Recently uploaded

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 

Recently uploaded (20)

UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 

PARTIAL REDUNDANCY ELIMINATION OPTIMIZATION

  • 2. PARTIAL REDUNDANCY ELIMINATION Partial-Redundancy Elimination Minimize the number of expression evaluations By moving around the places where an expression. Global code motion optimization • Remove partially redundant expressions • Loop invariant code motion • Can be extended to do Strength Reduction • No loop analysis needed • Bidirectional flow problem C
  • 3. PARTIAL REDUNDANCY ELIMINATION  Global code motion optimization • Remove partially redundant expressions • Loop invariant code motion • Can be extended to do Strength Reduction  No loop analysis needed  Bidirectional flow problem C
  • 4. REDUNDANCY • A Common Sub expression is a Redundant Computation t1= a + b t2= a + b t3 =a + b
  • 5. REDUNDANCY • Occurrence of expression E at P is redundant if E is available there: – E is evaluated along every path to P, with no operands redefined since. • Redundant expression can be eliminated
  • 6. PARTIAL REDUNDANCY  Partially Redundant Computation: t1 = a + b t2 = a + b
  • 7. PARTIAL REDUNDANCY  Occurrence of expression E at P is partially redundant if E is partially available there: • E is evaluated along atleast one path t P to P, with no operands redefined since.  Partially redundant expression can be eliminated if we can insert computations to make it fully redundant .
  • 8. LOOP INVARIANTS ARE PARTIAL REDUNDANCIES  Loop invariant expression is partially redundant: A = … t1 = a + b
  • 9. LOOP INVARIANTS ARE PARTIAL REDUNDANCIES  As before, partially redundant computation can be eliminated if we insert computations to make it fully redundant.  Remaining copies can be eliminated through copy propagation or more complex analysis of partially redundant assignments.
  • 10. PARTIAL REDUNDANCY METHODS 1. Insert Computations to make partially redundant expression(s) fully redundant. 2. Eliminate redundant expression(s).
  • 11. PARTIAL REDUNDANCY ISSUES 1. What expression occurrences are candidates for elimination? 2. Where can we safely insert computations? 3. Where do we want to insert them? • For this lecture, we assume one expression of interest, a + b. – In practice, with some restrictions, can do many expressions in parallel.
  • 12. WHICH OCCURANCE MIGHT BE ELIMINATED  In CSE, • E is available at P if it is previously evaluate along every path to P, with no subsequent re definitions of operands. • If so, we can eliminate computation at P.  In PRE, • E is partially available at P if it is previously evaluated along at least one path to P, with no subsequent redefinitions of operands.
  • 13. WHICH OCCURANCE MIGHT BE ELIMINATED • If so, we might be able to eliminate computation at P, if we can insert computations to make it fully redundant.  Occurrences of E where E is partially available are candidates for elimination.
  • 14. FINDING PARTIALLY AVAILABLE EXPRESSIONS  Forward flow problem • Lattice = { 0, 1 }, meet is union ( ), Top = 0 (not PAVAIL), entry = 0 • PAVOUT[i] = (PAVIN[i] – KILL[i]) AVLOC[i] •PAVIN[i] = 0 i = entry PAVOUT[p] otherwise  For a block, • Expression is locally available (AVLOC) if downwards exposed. • Expression is killed (KILL) if any assignments to operands.
  • 15. FINDING PARTIALLY AVAILABLE EXPRESSIONS A = … … = a + b … = a + b a = …