资源描述:
《Code Selection through Object Code》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、CodeSelectionthroughObjectCodeOptimizationJACKW.DAVIDSONUniversityofVirginiaandCHRISTOPHERW.FRASERUniversityofArizonaThispapershowshowthoroughobjectcodeoptimizationhassimplifiedacompilerandmadeiteasytoretarget.Thecodegeneratorforgoescaseanalysisandemitsnaivecodethatisimproved
2、byaretargetableobjectcodeoptimizer.Withthistechnique,cross-compilershavebeenbuiltforsevenmachines,someinasfewasthreepersondays.Thesecross-compilersemitcodecomparabletohost-specificcompilers.CategoriesandSubjectDescriptors:D.3.4[ProgrammingLanguages]:Processors--codegenera-tio
3、n;compilers;optimizationGeneralTerms:LanguagesAdditionalKeywordsandPhrases:Codegeneration,compilation,optimization,peepholeoptimiza-tion,portability1.INTRODUCTIONMostcompilersperformlexical,syntactic,andsemanticanalysis,codeoptimi-zation,andcodegeneration,inthisorder[1].Codeo
4、ptimizationincludescommonsubexpressionelimination,constantfolding,codemotion,andstrengthreduction[1,37].Codegenerationincludesregisterallocation,codeselection,andperhapssomepeepholeoptimization[1].Mostoptimizerstreatahigh-levelintermediatecodetoavoidmachinedependencies.Mostpe
5、epholeoptimizersaremachinespecificandadhoc,sotheyarenormallyconfinedtocorrectingahandfulofpatternsthatcannotbemoreeasilycorrectedbeforecodegeneration[4,23,24,37].Thispaperdescribesacompilerthatoptimizesaftercodegeneration[8].Anaivecodegeneratoremits"worstcase"codethatissubseq
6、uentlyimprovedbyanobjectcodeoptimizer.TheobjectcodeoptimizerismachineindependentandThisworkwassupportedinpartbytheNationalScienceFoundationunderGrantMCS-7802545.Authors'addresses:J.W.Davidson,Dept.ofAppliedMathematicsandComputerScience,Univ.ofVirginia,Charlottesville,VA22901;
7、C.W.Fraser,Dept.ofComputerScience,Univ.ofArizona,Tucson,AZ85721.Permissiontocopywithoutfeeallorpartofthismaterialisgrantedprovidedthatthecopiesarenotmadeordistributedfordirectcommercialadvantage,theACMcopyrightnoticeandthetitleofthepublicationanditsdateappear,andnoticeisgiven
8、thatcopyingisbypermissionoftheAssociationforComputingMachinery.Tocop