ebook img

Compiler Optimizations for a Time-constrained Environment PDF

93 Pages·2008·0.54 MB·English
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Compiler Optimizations for a Time-constrained Environment

Compiler Optimizations for a Time-constrained Environment Owen C. Anderson Prof. Susan Fox, First reader Prof. Libby Shoop, Second reader Prof. Andrew Beveridge, Third reader April,2008 DepartmentofMathematicsandComputerScience Copyright c 2008OwenC.Anderson. ! TheauthorgrantsMacalesterCollegethenonexclusiverighttomakethisworkavailablefornoncommer- cial,educationalpurposes,providedthatthiscopyrightstatementappearsonthereproducedmaterialsand notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requireswrittenpermissionfromtheauthor. Abstract Overthelastseveraldecades,twoimportantshiftshavetakenplaceinthecomputingworld: first, thespeedofprocessorshasvastlyoutstrippedthespeedofmemory,makingmemoryaccessesby farthemostexpensiveoperationsthatatypicalsymbolicprogramperforms. Second,dynamically compiledlanguagessuchasJavaandC#havebecomepopular,placingnewpressuresoncompiler writerstocreateeffectivesystemsforrun-timecodegeneration. Thispaperaddressestheneedcreatedbythelaggingspeedsofmemoryaccessesinthecontext of dynamically compiled systems. In such systems memory access optimization is important for resultant program performance, but the compilation time required by most traditional memory access optimizations is prohibitively high for use in such contexts. In this paper, we present a newanalysis,memorydependenceanalysis,whichamortizesthecostofperformingmemoryaccess analysistoalevelthatisacceptablefordynamiccompilation. Inaddition,wepresenttwomemory access optimizations based on this new analysis, and present empirical evidence that using this approachresultsinsignificantlyimprovedcompilationtimeswithoutsignificantlossinresultant codequality. Contents Abstract iii Contents v ListofFigures vii ListofTables ix Acknowledgments xi 1 Introduction 1 1.1 ModernStaticOptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 EvolutionofJust-in-TimeCompilation . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 PreviousWork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Implementation: LLVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 AliasAnalysis 7 2.1 ClassicalAliasAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 BasicAliasAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 MemoryDependenceAnalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3 DeadStoreElimination 13 3.1 ClassicalDeadStoreElimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2 FastDeadStoreElimination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 RedundantLoadElimination 19 4.1 GlobalCommonSubexpressionElimination. . . . . . . . . . . . . . . . . . . . . . . . 19 4.2 GlobalValueNumbering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 4.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 vi Contents 5 Conclusions 25 5.1 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.2 FutureWork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Bibliography 29 CodeListing 31 List of Figures 1.1 Anexamplecontrol-flowgraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 AsimpleexampleinCandLLVMIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1 Anexampleofmemorydependenceanalysis . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Adiagramaticexampleoftheinternalsofmemorydependenceanalysis . . . . . . . 10 3.1 Anexamplewherethefirststoreispotentiallynecessary . . . . . . . . . . . . . . . . 13 3.2 Anexampleinwhichthefirststoreisdead . . . . . . . . . . . . . . . . . . . . . . . . 14 4.1 Anexamplewheretheloadisnotredundant . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 Anexamplewheretheloadisredundant . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.3 Theresultofeliminatingaredundantload . . . . . . . . . . . . . . . . . . . . . . . . 21 5.1 Totaltimetoexecutetheoptimizationsinsecondsofthefourlargesttestcasesfrom SPEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.2 NormalizedexecutiontimeofthefourlargesttestcasesfromSPEC . . . . . . . . . . 26 List of Tables 2.1 ThenumberofaliasqueriesevaluatedontheSPECbenchmarks . . . . . . . . . . . . 11 3.1 ThenumberofstoresremovedontheSPECbenchmarks . . . . . . . . . . . . . . . . 16 4.1 ThenumberofloadsremovedontheSPECbenchmarks . . . . . . . . . . . . . . . . 23

Description:
He would also like to thank the entire LLVM community for their . of Java as a teaching and research platform, and the realization that its initial .. by most of the same issues that afflict dead store elimination, in that, in the face.
See more

The list of books you might like

book image

Haunting Adeline

H. D. Carlton
·2021
·3.65 MB

book image

The Subtle Art of Not Giving a F*ck

Mark Manson
·224 Pages
·2016
·1.26 MB

book image

The Silent Patient

Alex Michaelides
·0.52 MB

book image

The sign & its masters

Thomas Albert Sebeok
·357 Pages
·1989
·10.629 MB

book image

Ram Accelerators: Proceedings of the Third International Workshop on Ram Accelerators Held in Sendai, Japan, 16–18 July 1997

A. P. Bruckner (auth.), Professor K. Takayama, Associate Professor A. Sasoh (eds.)
·337 Pages
·1998
·15.86 MB

book image

Mass Appeal Magazine 38

Mass Appeal Magazine
·2006
·765.4 MB

book image

RIHS Watchtower 2006

Rock Island Public High School, Rock Island, Illinois
·2006
·218.5 MB

book image

Maryville College Catalog 2006-2008

Maryville College
·2006
·6.5 MB

book image

California Garden, Vol. 97, No.3, May-June 2006

San Diego Floral Association
·2006
·4.3 MB

book image

Knowledge and employability : social studies grades 8 and 9

Alberta. Alberta Education
·2006
·1.9 MB

book image

Meet the Masters

Max Euwe
·151 Pages
·1945
·29.056 MB

book image

Economics: A Primer for India

G. Omkarnath
·286 Pages
·2016
·65.136 MB

book image

Greek Government Gazette: Part 4, 2006 no. 465

The Government of the Hellenic Republic
·2006
·0.72 MB

book image

Delmar's Comprehensive Medical Assisting: Administrative and Clinical Competencies, 4th Edition

Wilburta Q. Lindh, Marilyn Pooler, Carol D. Tamparo, Barbara M. Dahl
·1543 Pages
·2009
·126.149 MB