Font Size: a A A

Research On Intermediate Code Optimization In GCC

Posted on:2009-03-14Degree:MasterType:Thesis
Country:ChinaCandidate:D ZhangFull Text:PDF
GTID:2178360245486578Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Presently, programming languages emerge in endlessly; computer is various every day, which cause the varieties of programming language and computer pattern, bring heavy burden to the complier structure. The appearance of intermediate code is exerting the optimization on the intermediate language as much as possible rather than on high-level language or low-level language. The process of intermediate code optimizing encompasses nonloop and loop optimizing. Data flow analysis is the required model of nonloop optimizing technology; however, current data flow analysis model is unable to modify data flow information incrementally. This way, building incremental data flow analysis model becomes the studying point of nonloop optimizing technology; on the other side, loop optimizing is able to increase the program locality, and however, accessing to multiple arrays require obtaining transform matrix which is corresponded to the suitable step-size vector respectively, computing complexity of conflict solving will be dramatically high if these transform matrix is variable.This article introduces control block flow graph to construct the control flow tree by studying the data flow analysis technology thoroughly, determine the back edge in the flow graph and nodes of the loop path, eliminate these back edges from original flow graph to construct acyclic flow graph, which simplify data flow analysis of the flow graph. Control block transfer the controlling relationship of the flow graph to the novel built internal controlling nodes. In the process of employing control block decomposition algorithm convert flow graph into control flow tree, the number of created nodes is no more than n, the time complexity which adopt control flow tree to solve path expression and determine back edge is less than O(nlogn).Besides, this paper adds up every element in one column to obtain a new vector by using weighed system matrix; ensure the accessing order is in consistent with the storage order of most arrays in nested loop, increase the nested loop locality on a coarse-grained level. This paper performs further study about mechanism for high-level loop transform implementation of GCC,the main factor having impact on high-level loop transform of GCC is the deficiency of matrix transform mechanism about GCC, set up the loop hierarchical structure by adopting the whole nested loop unified analysis frame , which solve the problem in high-level loop optimizing.For the last part, perform test on the original and improved GCC complier using performance evaluated data procedure on the basic platform of complier. The test results show: the ability of loop transform of the improved GCC complier is prior to the original one, has a great improvement.
Keywords/Search Tags:Code optimization, GCC, Data flow analysis, Control flow tree, Loop transformation
PDF Full Text Request
Related items