您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > Robinson-PS4Toolchain
1DeveloperToolchainforPaulT.RobinsonSonyComputerEntertainmentLLVMDevMeeting,7Nov20132AgendaPlayStation®4–InfoforgameteamsWhyClang?SpecialConsiderationsHackingonClang/LLVMNowandtheFuture3PlayStation®4“NextGen”PlayStation®consolePowerfulgamemachineModerngraphicsfeaturesPCbasedarchitectureLightningfastmemoryNewnetworkingandinterfacefeatures4CPUAMDx86-64JaguarLowpowerconsumption,lowheat8cores,8HWthreads2MiBL2cacheper4coregroup32KiBL1I-cacheandD-cachepercoreAtomics,threads,fibers,ULTs(user-levelthreads)5GPUDX11.1+featuresetwithSCEcustomfeaturesFine-grainedcachecontrolPerformancecountersExtradebuggingsupportAsynchronouscomputearchitectureCarefullybalancedformaximumgraphicspowerpluscomputetasks800MHzclock,1.843TFLOPSGreatlyexpandedshaderpipelinecomparedtoPS3™GeometryandtessellationshadersMoredirectexposuretoshaderstagesthanDirectX6RAM8GB256bitGDDR5GDDR5isveryhighendgraphicsmemoryonlyfoundonPCgraphicscardsFullyunifiedaddressspace176GB/stotalbandwidth7ToolchainataGlanceWindows7(andlater),64-bitToolsarefullyintegratedintoVisualStudio®2010,2012,andlaterSimplewizard-basedprojectcreationCPUcompiler,shadercompiler,linker,debuggerSN-DBS(distributedbuildsystem)CPUandGPUperformanceanalyzersRealtimeandstaticanalysisVarioussupportingbinaryutilities8CPUCompilerCompiler–LLVMwiththeClangfrontendHighlyconformantCandC++frontendGreatC++11supportExcellentdiagnosticmessagesFastcompilationExcellentcodegenerationUpdatestonewerversionswillberegularDrivenbySCEandtheopensourcecommunityComprehensivesetofintrinsics9CPUCompilerCompatibilityMicrosoftSomeattributesandpragmashavedifferentsyntaxGCCLargelycompatiblebydefaultMany,butnotallattributesaresupportedPS3™andPSVitaSomecompatibilityduetoGCCcompatibilityBewareofrelyingonundefinedbehaviorinothercompilers!10LinkerFast,maturelinkerComparabletoGNUgoldFine-graineddead-stripping/de-duplicationFragmentsbasedonsymbolrelocationsOperatesoncodeanddataDoesnotneedseparatesectionperfunction/variableLTOsupport“onthelist”Positiveresultsfromevaluation,seeourlightningtalk11DebuggerDebugyourPS4™codeasyouwouldyourPCcodeMirrorstheVisualStudio®multi-threadeddebuggingfeaturesetAdvancedfeaturesupportCoredumpdebuggingParallelcallstacksandwatchesThread-specificbreakpointsandtracepoints12AgendaPlayStation®4–InfoforgameteamsWhyClang?SpecialConsiderationsHackingonClang/LLVMNowandtheFuture13WhySwitchtoClang?SCEtraditionallyprovidedcustomizedGCC-basedtoolchainsSNSystems(BristolUK)hadapopulartoolchainCompiler(SNC)camefromApogeeEDGfrontend,proprietaryoptimizer/backendSpecificallydesignedforRISC(MIPS,PPC,ARM)SCEboughtSN;nowwehavetwoPS3™toolchainsPS4™iscomingup;SNCcan’ttargetx86…14WhySwitchtoClang?SCEWorldwideStudiosworkingwithLLVMsince2008Fourchoicestoevaluate(circa2010):StraightgccHybridllvm-gccEDGfrontend(fromSNC)+LLVMClang/LLVM(2.8)Technicalevaluationnotconclusive15WhySwitchtoClang?EDGhadacouplestrikesagainstitHome-brew“glue”–EDGdidn’twantitARMexperience(LLVMDevMtg2010)similarDebuginfoproblematicNon-technicalconsiderationsmatteredalotClangnotaclearwinner,butonatrajectoryLLVMcommunityconsideredmore“nimble”thanGCCClang+LLVM“joinedatthehip”solessefforttostaycurrentSubsequentexperiencevalidatedthisdecision16AgendaPlayStation®4–InfoforgameteamsWhyClang?SpecialConsiderationsHackingonClang/LLVMNowandtheFuture17WhatWeProvideToolchain,SDK,samplesDeveloperServicesorganizationFront-linesupportinmultipletimezonesEnd-userdocumentationCompilerReference;TransitionGuide;ABIOverview;IntrinsicsReferenceTestingConformance,regression,functional18OurLicenseesManystudios,withlargedevelopmentteamsSCEWorldwideStudios(“firstparty”)Non-SCE(“thirdparty”)Massivereal-timegraphics-intensive3DsimulationsAndtheycallthemgames…Vectors(LOTSofvectors)andnotjustGPUstuffPilesofshaders(GPUkernels)Databuild(assets)muchbiggerthancode19HowTheyBuildOptimizationisalwayson(-O2minimum)Hardreal-timeframeratedeadlinesareunforgivingAssets(data)typicallyconsumelotsofmemoryUsing-O0/-O1,gamewillnotworkGuesshowwelldebugginggoesUnitybuilds(#include*.cpp)Improveoptimization/inliningReducedataanddebug-infosizeLTOmightreplacethis20Anditlookslikethis…ShortclipfrominFAMOUS:SecondSonSamplegameplayshowsCPUmanaginglotsofobjects(sparks,debrisetc)Completetrailer:http://www.youtube.com/watch?v=o-B40rzJHOYLongersectionofgameplay:http://www.youtube.com/watch?v=Uibnf_Q_51s21AgendaPlayStation®4–InfoforgameteamsWhyClang?SpecialConsiderationsHackingonClang/LLVMNowandtheFuture22DistributedCompiler/RTLTeamsSCETechnologyPlatformSNSystems(BristolUK)–overalltoolchainU.S.R&D(SanMateoCA)–Clang/LLVMSNSystems(CampbellCA)–SNCSCEI(Tokyo)–RTLSCEWorldwideStudiosTools&Technology(everywhere)23DriverChangesChangedvariousdefaults,including:-targetand-mcpu(it’sacross-compiler)-std=gnu++11(onlyoneC++dialect,sofar)-fno-exceptions-fno-rtti-fPIC-fstack-protector-strong-fno-omit-frame-pointer-momit-leaf-frame-pointerCustomizedtargetHeader/libsearchpathsRunourproprietarylinker24ClangChangesPragmasforcompatibilityorcustomfeaturesBeefedupWindowshostingWindowsbackslashseparatorsNon-ASCIIcharactersinpath/filenamesIntr
本文标题:Robinson-PS4Toolchain
链接地址:https://www.777doc.com/doc-975 .html