CStar Optimizing a C Compiler Group Hellim GROUP
- Slides: 23
CStar Optimizing a C Compiler Group Hellim
GROUP MEMBERS - Halit Emre Sayılır - Anıl Koyuncu - Kutay Yıldırıcı - Tayfun Çakıcıer 2
OUTLINE • Problem Definition • Framework Information • Modules 1 Optimizations 2 Optimization Manager 3 Test Case Generator • Screenshots 3
PROBLEM DEFINITION Why • Performance and Efficiency - Reduce Execution Time - Decrease Space of Code - Reduce Memory Space • Must be Reliable 4
FRAMEWORK INFO • • Object Oriented Software Library Own intermediate representation Design by Contract Modular 5
OPTIMIZATIONS Dead Code Elemination if(0) a=1; else a=2; Evaluation of if statement in run time avoided Space of code reduced will be replaced by a=2; 6
OPTIMIZATIONS(cont. ) Constant Folding return 100*40 return 4000 7
OPTIMIZATIONS(cont. ) Local Copy Propagation a=b; c=a+d; c=b+d; also after dead code elimination 8
OPTIMIZATIONS (%35) - Constant Folding (+) - Basic Block Ordering - Dead Code Elimination - Local/Global Forward Substitution - Local/Global Copy Propagation(+) - Strength Reduction (+) - Local/Global Common Sub. Expression Elimination (+) - If Simplifications - Algebraic Simplifications (+) 9
OPTIMIZATIONS(cont. ) • • Dead Object Elimination Jump Optimizations Tail Merging Tail Recursion Procedure Cloning and Specilization Partial Redundancy Elimination Unreachable Code Elimination (+) 10
OPTIMIZATION MANAGER (%40) • A tool for managing the optimizations which will be used during compilation • An assistant for advanced users 11
OPTIMIZATION MANAGER • Two modes: 1 - File mode: § There is an external file. The optimizations which will be used , are configured in the file § When the file is read , rules will be managed and then chosen optimizations will be executed 12
Optimization Manager Configuration File 13
OPTIMIZATION MANAGER 2 - Interactive mode: § It is a mode which interacts with user. § The user will enter input via keyboard. § Optimizations will be done in an interactive manner. 14
TEST CASE GENERATOR (%30) Aim: Automating the process of test case generation * Reduce and prevent human errors * Flexibility for generation of different test cases 15
TEST CASE GENERATOR How Option File Inspection 16
OPTION FILE 17
TEST CASE GENERATOR How Option File Inspection Parse Option File Generated Test File IR Dump Generate Options IR Code Generation 18
Screenshots • Some result screenshots of the optimizations 19
Constant Folding 20
Algebraic Simplifications 21
Local Common Subexpression Elimination 22
QUESTIONS ? ? ? 23
- The fortran optimizing compiler
- Cross compiler in compiler design
- Lex yacc example
- Optimizing patient flow
- How is economizing different from optimizing?
- Mark harris nvidia
- What is parallel reduction?
- If the lexical analyzer finds a token invalid then?
- Rose compiler
- Explain multi pass assembler
- The designer expresses the ideas in terms related to the
- Applications of sdd in compiler design
- L
- C compiler
- Python history and features
- Compiler
- Ssrange in cobol example
- Join point
- Sub division of run time memory
- Language
- Scanner tokens
- Gnu gcc is a: cross compiler assembler linker loader
- Constant propagation in compiler design
- Borland c compiler