您的位置:首页 > Web前端 > Node.js

Current content index of Study node of Gcc-3.4.6 source

2010-03-05 10:44 411 查看
>> Accessdirectory of the back end at here

Reference
Preparation before going ahead
Software architecture of GCC
The front end
1. Overview
1.1. Tree representation infront-ends
1.1.1. Tree nodedefinition
1.1.2. Identifier of tree node - tree_code
1.1.3. Tree nodeallocation
1.1.3.1. Decisionof node size
1.1.3.2. Memoryallocation
1.2. Building treenodes
1.2.1. Concept of machine mode[2]
1.2.2. Create node forinternal types
1.2.2.1. Initializetemperary nodes for size_t
1.2.2.1.1. Node for integer types
1.2.2.1.2. Create temparory node for size_t
1.2.2.1.3. Create node for integer type
1.2.2.1.4. Determine the range of value
1.2.2.1.5. Layout integer types
1.2.2.1.5.1. Informationof integer type
1.2.2.1.5.1.1.Determine the sign of type
1.2.2.1.5.1.2.Determine the machine mode
1.2.2.1.5.1.3. Determine the size of type
1.2.2.1.5.2.Finish layout
1.2.2.2. The real node for size_t
1.2.2.3. Createnode for integer constant
1.2.3. Create node forreal constant
1.2.3.1. Nodeof tree_real_cst
1.2.3.1.1. Create node fromreal_value
1.2.3.1.2. Create node from integer constant
1.2.3.1.2.1.Generate real_value from integer constant
1.2.3.1.2.2. Normalize the generated value
1.2.3.1.2.3.Convert to real mode
1.2.4. Create node foraddress concept
1.2.4.1. Createnode for pointer type
1.2.4.1.1. Node of tree_type
1.2.4.1.2. Node creation
1.2.4.1.3. Layout the type
1.2.4.2. Createnode for reference type
1.2.4.3. Create node for address
1.2.4.4. Createnode for OFFSET_TYPE
1.3.Create nodes fornon-unary expression
1.3.1. Create tree node
1.3.1.1. Typeof tree_exp
1.3.1.2. Operandpretreatment
1.3.2. Handling of CALL_EXPR
1.3.2.1. Determine function called
1.3.2.1.1. The CALL_EXPR
1.3.2.1.2. Find out functioncalled
1.3.2.1.3. Detect function attributes
1.3.2.1.3.1.Fetch data describing function called
1.3.2.1.3.2.Graph of relation between caller and callee
1.3.2.1.3.2.1. Structure of graph nodes
1.3.2.1.3.2.2.Creation of cgaph_node
1.3.2.1.3.3. Determine attributes
1.4.Create node foruniary expression - build1
1.5.Create node of declaration
1.5.1. Layout the declaration
1.6.Create node fortypes – part 1
1.6.1. Create node for function types
1.6.1.1. Createnode for function type from individual parameters
1.6.1.2. Createnode for function type from parameters list
1.6.1.3. Lay out the function type
1.6.2. Create node for index
1.6.3. Create node forarray type
1.6.3.1. Layoutthe type
1.6.3.1.1. Get array’s boundary
1.6.3.1.1.1.Operate integer constants
1.6.3.1.1.1.1.Left shift
1.6.3.1.1.1.2.Right shift
1.6.3.1.1.1.3.Rotate shift
1.6.3.1.1.1.4.Addition andminus
1.6.3.1.1.1.5.Multiplication
1.6.3.1.1.1.6.Division and round
1.6.3.1.1.2. Get the result
1.6.3.1.2. Determine size of element & array
1.7.Detail about save_expr
2. Compilerinitialization
2.1.Initialize hashtable for identifier
2.1.1. Memory Management of Obstack
2.1.1.1. Initializethe control block
2.1.1.2. Allocatefrom obstack
2.1.1.3. Freeobjects
2.1.2. The allocation function
2.1.2.1. Theway identifier node present in tree and hashtable
2.1.3. Searching in the hashtable
2.2.Initializehashtable for type
2.2.1. Definition of the hashtable
2.2.2. The element of the hashtable
2.2.3. Searching in the hashtable
2.2.3.1. Fillup type information for new types
2.2.3.1.1. Information of integer type
2.2.3.1.2. Information of real and complex type
2.2.3.1.3. Information of other simple types
2.2.3.1.4. Information of aggregate type
2.2.3.1.5. Information ofaggregate type
2.2.3.1.5.1.Overview[2]
2.2.3.1.5.2.layout of aggregate type
2.2.3.1.5.2.1.Struct to hold the information
2.2.3.1.5.2.2.Collecting information about fields
2.2.3.1.5.2.2.1.Node of tree_decl
2.2.3.1.5.2.2.2.Fill Information About Fields
2.2.3.1.5.2.2.3.Type of VAR_DECL
2.2.3.1.5.2.2.4.Type of CONST_DECL, TYPE_DECL
2.2.3.1.5.2.2.5. Layout of UNION
2.2.3.1.5.2.2.5.1. Layout FIELD_DECL
2.2.3.1.5.2.2.5.2. Treatment for Bit Field Decl
2.2.3.1.5.2.2.5.3. Treatment for Other Field Decl
2.2.3.1.5.2.2.5.4. Further Adjustment
2.2.3.1.5.2.2.5.5. Update record_layout_info
2.2.3.1.5.2.2.6. FIELD_DECL ofRECORD_TYPE
2.2.3.1.5.2.2.6.1. Find Out Alignment of FIELD_DECL
2.2.3.1.5.2.2.6.2. Alignment – unneccessary packing
2.2.3.1.5.2.2.6.3. Alignment – padding required
2.2.3.1.5.2.2.6.4. Alignment – bit field in GCC layout
2.2.3.1.5.2.2.6.5. Alignment – bit field in MS layout
2.2.3.1.5.2.2.6.6. Update record_layout_info
2.2.3.1.5.2.3.Finialize the layout
2.2.3.1.5.2.3.1. Determine Size of the Type
2.2.3.1.5.2.3.2. Determine Type Mode
2.3.InitializeRegisters sets
2.4.InitializeOptimization Parameters
3. Preparetionaccording to compiling options
3.1.Hooks for Langauges
3.2.Initialization source reader
3.2.1. Createcpp_reader (continue)
3.2.2. Prepare forswitches handling
3.3.Handlingswitches
3.3.1. Options related to optimization
3.3.2. Initializingoptions related to target
3.3.3. Handling otheroptions
3.3.3.1. Usable options (continue)
3.3.3.1.1. Options for C++ (continue1) (continue 2)
3.3.3.1.2. Handling commonoptions (continue 1) (continue 2)
3.3.4. Finish thehandling
4. Pre-source-parsing
4.1.Options aftertreatment
4.1.1. Finish the setupof search path
4.1.2. Set up flagscontrolling Lexer
4.1.3. Read in thesource file
4.1.3.1.Find and read in the file
4.1.3.1.1. Validate PCHfile
4.1.3.2. Read in file
4.1.3.2.1.Case of PCH file
4.1.3.2.1.1.#pragma directive in preprocessing
4.1.3.2.1.2. Read in PCHcontent in intermediate form
4.1.3.2.1.2.1.Content of scalar variables
4.1.3.2.1.2.2.Content of global arrays
4.1.3.2.1.2.3.hashtables
4.1.3.2.1.2.4. Map intermeidate form content in VM
4.1.3.2.1.2.4.1. Restore identifiers
4.1.3.2.1.3. Restore cached macros and#pragma
4.1.3.2.1.4. Read in macrodefinitions
4.1.3.2.1.4.1. Prepare buffer
4.1.3.2.1.4.2. Fetch line number of definition
4.1.3.2.1.4.3. Traditional mode
4.1.3.2.1.4.4. Create macro definition - ISO mode
4.1.3.2.1.4.4.1. Fetch token
4.1.3.2.1.4.4.2. Parse parameters
4.1.3.2.1.4.4.3. The expansionbody
4.1.3.2.1.4.4.4. Finsh
4.1.3.2.1.4.5. Finish read in
4.1.3.2.2. Read in common file
4.1.3.2.3. Stack the file (exclude PCHfile)
4.1.3.2.3.1. Do filechange
4.1.3.2.3.1.1. #pragma interface and #pragmaimplementation
4.1.4. Adjust optionsfor the target
4.1.5. Settle down theparameters
4.2.Initialize theback-end
4.2.1. Create unique shared objects
4.2.1.1. Set registers' mode
4.2.1.2. Initialize hash tables
4.2.1.3. Create RTL objects
4.2.1.3.1. RTLlanguage
4.2.1.3.2. Ojbect generation
4.2.1.3.2.1. Objectsfor registers and related
4.2.1.3.2.2. Objects for real constant
4.2.2. Initialize the register sets
4.2.3. Determine register sets
4.2.3.1. Deteremine relation of subset andsuperset
4.2.3.2. Determine costof moving data between registers
4.2.3.3. Information about register supporting auto-incr/dec
4.2.4. Initialize fake stack-frame memoryreference
4.2.5. Prepare for alias analysis
4.2.6. Prepare for loopoptimization pass
4.2.6.1. Overwiew
4.2.6.2. Initialization
4.2.7. Prepare forreload pass
4.2.7.1. Overview
4.2.7.2. Initialization
4.2.8. Data forprologue, epilogue, sibcall epilogue in function invocation
4.2.9. Prepare for assemble generation
4.2.10. Evaluate cost for arithmatic operations
4.2.10.1. Create dummy function context (continue)
4.2.10.2. Collect data
4.2.11. Updateinformation about hard registers used by call
4.2.12. Clean up dummy function context
4.3.Languagedependent initialization
4.3.1. Front-end initialization
4.3.1.1. stmt_codes
4.3.1.2.Initialize reserved words for C++
4.3.1.3. Initialize hashtable for tree_list
4.3.1.4.Initialize related to C++ semantics
4.3.1.5. Initialize data for operators
4.3.1.6. Initialize data for name mangling
4.3.1.7. Initialize for declarationprocessing
4.3.1.7.1. Predefined identifiers
4.3.1.7.2. Global namespace
4.3.1.7.2.1. Datastructure
4.3.1.7.2.2. Enterglobal namespace
4.3.1.7.2.3. Returnfrom global namespace
4.3.1.7.2.4. Entity forglobal namespace
4.3.1.7.2.5. Createthe scope
4.3.1.7.3. Build Tree Nodeof Type Information
4.3.1.7.4. Create namespace“std”
4.3.1.7.4.1. Add inglobal namespace
4.3.1.7.4.2. Exit the namespacescope
4.3.1.7.5. Create nodes of builtins
4.3.1.7.5.1. Nodes of builtininteger types
4.3.1.7.5.2. Nodes of builtininteger type sizes
4.3.1.7.5.3. Nodes of other builtintypes
4.3.1.7.5.3.1. Nodes of commonly used constants
4.3.1.7.5.3.2. Node of va_list
4.3.1.7.5.3.3. Nodes of vector types
4.3.1.7.5.4. Nodes ofbuiltin function types
4.3.1.7.5.5. Nodes of attributesfor builtin functions
4.3.1.7.5.5.1. Detail about attributes of builtin functions
4.3.1.7.5.6. Create nodes of builtin functions
4.3.1.7.5.6.1. Overview
4.3.1.7.5.6.2. Create FUNCTION_DECL
4.3.1.7.5.6.3. Push the FUNCTION_DECL Intocurrent namespace
4.3.1.7.5.6.4. Create RTX object for builtin
4.3.1.7.5.6.5. Processing attributes of builtin
4.3.1.7.5.6.5.1. Install attributehandlers
4.3.1.7.5.6.5.2. Handle attribute of format
4.3.1.7.5.6.5.3. Install attributeof format
4.3.1.7.5.6.5.4. Handle attributeof nonnull
4.3.1.7.5.6.5.5. Install attributeof nonnull
4.3.1.7.5.6.5.6. Handle attributeof nothrow
4.3.1.7.5.6.5.7. Install attributeof nothrow
4.3.1.7.5.6.6. Off topic – compilingbuiltins\
4.3.1.7.6. Other C++components with C linkage
4.3.1.7.6.1. Partcomplying standard
4.3.1.7.6.2. Part of externsion
4.3.1.7.7. C++ componentswith C++ linkage
4.3.1.7.7.1. bad_alloc
4.3.1.7.7.2. Details of binfo and basetype
4.3.1.7.7.3. Operator new and delete
4.3.1.7.8. Finish initialization
4.3.1.7.8.1. Initialize class processing
4.3.1.7.8.2. Runtime type identification (RTTI)
4.3.1.7.8.2.1. Create TYPE_DECL
4.3.1.7.8.2.2. Generate nodes of type­_info definition
4.3.1.7.8.2.3. Using RTTI
4.3.1.7.8.2.3.1.Build RTTI for class
4.3.1.7.8.2.3.2.Post-processing of type_info
4.3.1.7.8.2.3.2.1.Install type_info for fundamental types
4.3.1.7.8.2.3.2.2. Constructreal type_info
4.3.1.7.8.3. Exception handler
4.3.1.7.8.4. Detect behavor of linker and other
4.3.1.8. Setuppreprocessor
4.3.1.9. Finish front-end initialization
4.3.2. Construct exceptioncontext
4.3.3. Initialize libraycalls table
4.3.4. Finish compiler’sinitialization
5. Source code parsing
5.1.Setup macros for the system
5.1.1. C++ builtin macros
5.1.2. C builtin macros
5.1.2.1. Macros of __GUNC__ family
5.1.2.2. Macros in stddef.h
5.1.2.3. Control macros for language
5.1.2.4. Macros for fundmental types characteristics
5.1.2.5. Control macros for compiler
5.1.2.6. Control macros for target
5.2.Macro, assertionin command line
5.3.Macro, assertion included by –imacros
5.3.1. Token fetching
5.3.1.1. Handle directive
5.3.1.2. Macro invocation
5.3.1.2.1. Funciton-like macro expansion –arguments collection
5.3.1.2.2. Funciton-like macro expansion –arguments replacement
5.3.1.3. Builtin macro -handle pragma directive
5.3.1.3.1. Handler of #pragma GCCdependency
5.3.1.4. Handle other builtin macros
5.4.Header file includedby –include
5.5.Prepare PCH file header
5.6.Prepare theparser
5.6.1. Create main Lexer
5.6.1.1. Get preprocessed token
5.6.1.1.1. Case of identifier
5.6.1.1.2. Number
5.6.1.1.2.1. Case of integer
5.6.1.1.2.2. Case of floatingpoint number
5.6.1.1.2.3. Case ofchar/string constant
5.6.1.2. Finish fetching preprocessed token
5.6.2. Create parsercontext
5.7.Prepare defer access list
5.8.Pass token to parser
5.9.Tentative parser
5.9.1. Overview
5.9.2. Access control
5.9.2.1. If accessiblefrom current class
5.9.2.2. If accessiblefrom friends
5.9.2.3. Determine accessibility
5.9.3. Error recovery
5.10.Useful helpers for parser
5.11.ParseTranslation-unit - entry
5.12.ParseTranslation-unit – declaration sequence
5.12.1. First example to study thecompiling procedure
5.12.2. The first statement –NAMESPACE_DECL
5.12.3. The secondstatement – TEMPLATE_DECL
5.12.3.1. Parse template parameter list
5.12.3.1.1. Parse templatetype parameter
5.12.3.1.2. Process templateparameter
5.12.3.2. Parsedecl-specifier-seq part of template declaration
5.12.3.2.1. Parse type-specifier
5.12.3.2.1.1. Case ofclass-specifier
5.12.3.2.1.1.1. Parse class-head
5.12.3.2.1.1.1.1. Sanity check before going ahead
5.12.3.2.1.1.1.2. Push tag of class SingleThreaded
5.12.3.2.1.1.1.3. CreateTEMPLATE_DECL for the class
5.12.3.2.1.1.1.4. Push TYPE_DECLfor the class
5.12.3.2.1.1.2. Begin class definition
5.12.3.2.1.1.2.1. Build selfreference
5.12.3.2.1.1.2.2. Create TEMPLATE_DECL for self reference
5.12.3.2.1.1.2.3. Insert self reference as member
5.12.3.2.1.1.3. Parse class body
5.12.3.2.1.1.3.1. Push tag for nested class
5.12.3.2.1.1.3.2. Create TEMPLATE_DECL for nested class
5.12.3.2.1.1.3.3. Begin nested class defintion
5.12.3.2.1.1.3.4. Parse default constructor
5.12.3.2.1.1.3.4.1. Parse declarator
5.12.3.2.1.1.3.4.2. Build nodes formethod (continue)
5.12.3.2.1.1.3.4.3. Cache body forinline function
5.12.3.2.1.1.3.4.4. Exit from the binding scope of the method
5.12.3.2.1.1.3.4.5. Insert constructor into the class
5.12.3.2.1.1.3.5. Parse other constructors
5.12.3.2.1.1.3.5.1. Parse parameters
5.12.3.2.1.1.3.5.2. Create DECLnodes for parameter
5.12.3.2.1.1.3.5.3. Finish
5.12.3.2.1.1.3.6. Finishparsing
5.12.3.2.1.1.3.6.1. Exit nestedclass
5.12.3.2.1.1.3.6.2. Finish parsing as member
5.12.3.2.1.1.4. Parse class body – typedef declaration
5.12.3.2.1.1.4.1. Find out decl-specifier-spec and declarator
5.12.3.2.1.1.4.2. Create nodes for the field
5.12.3.2.1.1.4.3. Insert nodes for the field
5.12.3.2.1.2. Finish parsing
5.12.3.2.1.2.1. Late parse inline methods
5.12.3.2.1.2.1.1. Start function handling
5.12.3.2.1.2.1.1.1. Prepare databefore function handling
5.12.3.2.1.2.1.1.2. Push function scope
5.12.3.2.1.2.1.2. Parse functionbody
5.12.3.2.1.2.1.2.1. Preparation
5.12.3.2.1.2.1.2.2. At finish
5.12.3.2.1.2.1.3. Finish functionhandling
5.12.3.2.1.2.1.4. Prepare for codegeneration
5.12.3.2.1.2.1.4.1. Update call-graph
5.12.3.2.1.2.2. Close the class definition
5.12.4. The secondexample
5.12.4.1. Parse template parameter list
5.12.4.1.1. Template template parameter
5.12.4.1.1.1. The parameter
5.12.4.1.1.2. The defaultargument
5.12.4.1.1.2.1. Detail of name lookup
5.12.4.1.1.2.1.1. Lookup in specified scope
5.12.4.1.1.2.1.1.1. Lookup in specified namespace
5.12.4.1.1.2.1.1.2. Lookup inspecified class
5.12.4.1.1.2.1.2. Lookup in specified object
5.12.4.1.1.2.1.3. Lookup incurrent scope
5.12.4.1.1.2.1.3.1. Conversion operator
5.12.4.1.1.2.1.3.2. Other names
5.12.4.1.1.2.2. The result of lookup
5.12.4.1.1.3. Processtemplate-template parameter
5.12.4.1.2. Non-typeparameter
5.12.4.1.2.1. Process non-typeparameter
5.12.4.2. Parse class-head
5.12.4.2.1. Evaluate type dependency
5.12.4.2.1.1. Overview
5.12.4.2.1.2. Type dependent
5.12.4.2.1.3. Value dependent
5.12.4.2.2. Lookup classname
5.12.4.2.2.1. Non-template-id
5.12.4.2.2.2. template-id
5.12.4.2.2.2.1. Parse template name
5.12.4.2.2.2.1.1. Case of operator-function-id
5.12.4.2.2.2.1.2. Case of identifier
5.12.4.2.2.2.2. Parse argument list
5.12.4.2.2.2.2.1. Parse argument
5.12.4.2.2.2.2.1.1. Case of type-id
5.12.4.2.2.2.2.1.2. Case of id-expression
5.12.4.2.2.2.2.1.3. Case of assignment-expression
5.12.4.2.2.2.3. Finish template-id
5.12.4.2.2.3. Finish lookup class name
5.12.4.2.3. Process baseclass
5.12.4.2.3.1. Parse base-clause
5.12.4.2.3.1.1. The inner template-id
5.12.4.2.3.1.1.1. The template-template argument
5.12.4.2.3.1.1.2. The non-type argument
5.12.4.2.3.1.1.3. Generatetemplate-id
5.12.4.2.3.1.2. The outer template-id
5.12.4.2.3.2. Build nodes forbase-clause
5.12.4.2.3.2.1. Fill up binfo
5.12.4.3. Parseclass-definition
5.12.5. The thirdexample
5.12.5.1. The using directive
5.12.5.2. Main()definition
5.12.5.2.1. Function-definition – declaractorpart
5.12.5.2.2. Function-definition– body part (continue)
5.12.5.2.2.1. Prepare for body parsing
5.12.5.2.2.2. Handling thebody
5.12.5.2.2.2.1. Template instantation
5.12.5.2.2.2.1.1. The template-id
5.12.5.2.2.2.1.1.1. Replace the first default arguments
5.12.5.2.2.2.1.1.2.Replace restdefault arguments
5.12.5.2.2.2.1.1.3.Generate the nodes
5.12.5.2.2.2.1.2.Create theVAR_DECL
5.12.5.2.2.2.1.3.GenerateRECORD_TYPE for the instantiation
5.12.5.2.2.2.1.3.1.Instantiate baseclass – substituting parameter
5.12.5.2.2.2.1.3.2.Instantiate baseclass – finish
5.12.5.2.2.2.1.3.3.Derived RECORD_TYPE–members subsititution
5.12.5.2.2.2.1.3.4.Derived RECORD_TYPE – fixup inline methods
5.12.5.2.2.2.1.3.5.Derived RECORD_TYPE – verify base classes
5.12.5.2.2.2.1.3.6.Derived RECORD_TYPE– verify members
5.12.5.2.2.2.1.3.7.DerivedRECORD_TYPE – verify methods
5.12.5.2.2.2.1.3.8.Derived RECORD_TYPE– fill up missing methods
5.12.5.2.2.2.1.3.9.DerivedRECORD_TYPE – layout the class
(cont 1)(cont 2)
5.12.5.2.2.2.1.3.10.Derived RECORD_TYPE– build vtable
(continue)
5.12.5.2.2.2.1.3.11.Derived RECORD_TYPE– finish vtable
(cont1) (cont2)
5.12.5.2.2.2.1.3.12.Derived RECORD_TYPE– generate VTT
(continue)
5.12.5.2.2.2.1.4.Finishinstantiation
5.12.5.2.2.2.1.5.Finish VAR_DECL
5.12.5.2.2.2.2. The returnexpression
5.12.5.2.2.3. Finishfunction body handling
5.12.5.2.3. Function-definition – finish
5.13. Stage afterparsing
5.13.1. Preliminaries - detail of conversion
5.13.1.1. Determineappropriate conversion
5.13.1.1.1. Case of standard conversion sequence
5.13.1.1.2. Case of userdefined conversion sequence
5.13.1.1.2.1. Collect candidates
5.13.1.1.2.1.1. Add normalfunction
5.13.1.1.2.1.2. Add template
5.13.1.1.2.1.2.1.Deduce template argument (cont1)(cont2)
5.13.1.1.2.2. Determine thebest
5.13.1.1.2.2.1. Pick outviable
5.13.1.1.2.2.2. Select outthe best (continue)
5.13.1.1.3. Case ofconversion for reference type
5.13.1.1.3.1. Resolving reference of overload
5.13.1.1.3.2. Reference toknown type
5.13.1.2. The realconversion
5.13.1.2.1. Case of bad standard conversion supported by extension
5.13.1.2.2. Case ofuser-defined conversion
5.13.1.2.2.1. Converting the implicit thisargument
5.13.1.2.2.2. Convertingother arguments
5.13.1.2.2.2.1. Normal arguments
5.13.1.2.2.2.2. Defaultarguments
5.13.1.2.2.2.3. Ellipsis arguments
5.13.1.2.2.3. Invoking theinitializing method
5.13.1.2.3. Case of standardconversion
5.13.1.2.3.1. Case study: topointer conversion
5.13.1.2.3.1.1. From class to pointer
5.13.1.2.3.1.2. To void* or functionpointer
5.13.1.2.3.1.3. Between pointers of class
5.13.1.2.3.1.4. Between pointers-to-member
5.13.1.2.3.1.5. From pointers-to-method to other pointer type
5.13.2. Output PCH file
5.13.3. Generate tinfofor fundamental types
5.13.4. Stable down immediate tree
5.13.4.1. Iterate - emittingvtable
5.13.4.2. Iterate -emitting tinfo
5.13.4.3. Iterate –emitting code for ctor/dtor of global aggregate
5.13.4.3.1. Prune variableneeding initializatoin
5.13.4.3.2. Generate code forinitialization
5.13.4.4. Iterate –emitting code for deferred function
5.13.4.5. Iterate –handling globals in namespaces
5.13.4.6. Iterate – handlingstatic member without initializers in classes
5.13.4.7. Generate codefor invoking initializer function according to priority
5.13.4.7.1. Generating codefor function invocation
5.13.4.7.1.1. Buildexpression to take function’s address (continue)
5.13.4.7.1.2. Do appropriateconversion for arguments
5.13.4.7.1.3. Build nodes forthe function call
5.13.4.7.2. Finish theinvocation of initialization function
5.13.5. Code analysisand optimization
5.13.5.1. Preliminaries-alias set analysis
5.13.5.1.1. Concept of aliasset
5.13.5.1.2. The datastructure
5.13.5.1.3. Prepare aliasset
5.13.5.2. Output assemblefor pending variables
5.13.5.2.1. Allocate memory
5.13.5.2.2. Memoryconfiguration
5.13.5.2.2.1. The initializer
5.13.5.2.2.1.1.Output constant referred
5.13.5.2.2.1.1.1. Set memoryattributions
5.13.5.2.2.1.1.2.Select outputsection
5.13.5.2.2.1.1.3.Emit assemblercode
5.13.5.2.2.1.1.3.1Content of 0
5.13.5.2.2.1.1.3.2.Integer
5.13.5.2.2.1.1.3.3.Floating point
5.13.5.2.2.1.1.3.4.Literal string
5.13.5.2.2.1.1.3.5.For aggregate type
5.13.5.2.2.2.The variable
5.13.5.2.2.2.1. Output assemble – variable without initializer
5.13.5.2.2.2.2. Output assemble – variable with initializer
5.13.5.3. Analyzetranslation-unit
5.13.5.3.1. Analyze functions
5.13.5.3.1.1.Build cgraph for caller-callee
5.13.5.3.1.2.Analyze functionin inlinability
5.13.5.3.2. Optimizationbased on cgraph
5.13.5.3.2.1.Mark local function
5.13.5.3.2.2.Determine inlinability
5.13.5.3.2.2.1.Sort byinvocation order
5.13.5.3.2.2.2.Function demandsinline
5.13.5.3.2.2.3.Inline normal function
5.13.5.3.2.3.Set cgraph_global_info_ready
5.13.5.3.2.4.Emit assemblebasing on cgraph
5.13.5.3.2.4.1.Mark functions need assemble emitted
5.13.5.3.2.4.2.Expand inline function basing on cgraph
5.13.5.3.2.4.2.1.Find out inlinable calling
5.13.5.3.2.4.2.2.Generate codefor initializing function parameters
5.13.5.3.2.4.2.3.Expand inline function
5.13.5.3.2.4.2.3.1.Prepare ret_label
5.13.5.3.2.4.2.3.2.Replace parameters
5.13.5.3.2.4.2.3.3.Constructvariable for return value
5.13.5.3.2.4.2.3.4.Copy function body
5.13.5.3.2.4.2.4.Conclusion andadvance notice
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: