pesquisa em compiladores na ufmgevcomp.dcc.ufmg.br/wp-content/uploads/compiladores.pdf · porque...

Post on 19-Apr-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

PesquisaemCompiladoresnaUFMG

FernandoPereirafernando@dcc.ufmg.br

fernando@dcc.ufmg.br

Comotornarseusistemadeinformáticamais

eficienteemaisseguro?

fernando@dcc.ufmg.br

Semcomprarnovohardware?

Semre-escreverseucódigo?

Comotornarseusistemadeinformáticamais

eficienteemaisseguro?

fernando@dcc.ufmg.br

Melhoreseucompilador!

software

traduz

um

que

LinguagensdeProgramação

emCódigoBinário

fernando@dcc.ufmg.br

Eporquefazerpesquisaemcompiladores?

fernando@dcc.ufmg.br

História

Umpunhadodegenteespertajátrabalhoucomcompiladores.

1)  Conhecealguémaqui?

2)  Conhecealguémfamosodaáreadecompiladores?

fernando@dcc.ufmg.br

Entrevista

RobertHundtéengenheirosênionaGoogle

•  "Atthescaleofdatacenters,everysingleperformancepercentmatters!JusttakealookatGoogle's(andother's)publiclyavailablenumbersonexpendituresondatacenters.Wearetalkingaboutbillionsofdollars.Asinglepercentimprovementcanmeanmillionsofdollarsfrommoreprogramfeaturesorimprovedutilization."

•  "InordertodeploysoftwareatGooglescale,engineerswilltouchagooddozenofprogrammingandconfigurationlanguages,allwiththeirowninterestingoptimizationproblems(fromacompilerwriter'spointofview).Fundamentalknowledgeinlanguage,compiler,andruntimeimplementationwillhelpmakebetterengineeringdecisions,everywhere."

•  "Didyouknowthatmanyofourfirsttoday'smostcelebratedengineershavecompilerbackgrounds?JeffDean,SanjayGhemawat,UrsHoelzle,andmanyothers.It'snotacoincidence.Compileroptimizationtrainsinbig-fiddlingaswellasalgorithmicthinking,whichareessentialtosuccessintoday'sworld."

fernando@dcc.ufmg.br

Importância

Linguagens

Hardware

fernando@dcc.ufmg.br

PorqueAprenderCompiladores?

•  Paraconhecermelhoraciênciadacomputação– Princípios–  Interdisciplinaridade– Novidade

•  Paraencontrarumbomemprego– "Wedonotneedthatmanycompilerguys,butthosethatweneed,weneedthembadly."♤

♤:FrançoisBodin,professornauniversidadedeRennes1.EngenheirochefedaCAPS

fernando@dcc.ufmg.br

ProgramarMelhor

Oquefazemasotimizaçõesquegccusa?

fauto-inc-dec fcompare-elim fcprop-registers fdce fdefer-pop fdelayed-branch fdse fguess-branch-probability fif-conversion2 fif-conversion fipa-pure-const fipa-profile fipa-reference fmerge-constantsfsplit-wide-types ftree-bit-ccp ftree-builtin-call-dce ftree-ccp ftree-ch ftree-copyrename ftree-dce ftree-dominator-opts ftree-dse ftree-forwprop ftree-fre ftree-phiprop ftree-slsr ftree-sra ftree-pta funit-at-a-time

Dáparausá-lasemseparado:

$> gcc -fdefer-pop -o test test.c

Dáparaabilitaralgumas,edesligaroutras:

$> gcc -O1 -fno-defer-pop -o test test.c

fernando@dcc.ufmg.br

Entendimento

Reusaronomedasvariáveiseconomizamemória?

int i = read();if (i != EOF) i = read(); printf("%d", i);

Herançaémenoseficiente?

#define MAX(X, Y) (X) > (Y) ? (X) : (Y)

int max(int i, int j) { return i > j ? i : j; }

Macrossãomaiseficientes?

fernando@dcc.ufmg.br

Empregos

Intel=>icc

Mozilla=>JaegerMonkey,IonMonkey,TraceMonkey

NVIDIA=>nvcc

Google=>ART,V8

Apple=>LLVM

Microsoft=>visualstudio,.NETVM

STMicroelectronics=>open64

fernando@dcc.ufmg.br

Start-ups

•  Coverity:segurança•  Cyral:segurança•  ShiftLeft:segurança•  ACE:embarcados

•  PathScale:desempenho•  PGI:desempenho•  GreenHills:C/C++

fernando@dcc.ufmg.br

Enofinaldascontas...

HiProfPereira,

Longtimedon'tsee.Itrustyouarewell.

HereatApple,weareinvestingheavilyinourcompilertechnologies.Iwaswonderingifyoumighthaverecommendationsforstudentswhoareinterestedinpursuingacareerinindustrialcompilerwork.I'dbeinterestedintalkingtothemaboutopportunitieshere.

Regards,

EvanChengSrManager,CompilerTechnologies,Apple(Março'13)

fernando@dcc.ufmg.br

Emaisnofinaldascontasainda...

DearFernando,

IhavereadyourpaperinJITspecializationinJavaScriptandparticularlyyourworkinthecontextofIonMonkeyhascaughtmyeye.IamworkingasaResearchScientistatIntelLabsontheRiverTrailproject.WearecollaboratingwithMozillaonaFirefoximplementation.GivenyourrecentworkonIonMonkey,maybeoneofyourstudentswouldbeinterestedtojoinusinSantaClaratoworkonthistopic?

Regards,

Stephan(May'13)

fernando@dcc.ufmg.br

Egressos

•  DiogoSampaio-ARMUK

•  VictorSperle-ARMUK

•  RaphaelErnani-MicrosoftUS

•  PériclesAlves-MicrosoftUS

•  RubensMoreira-MicrosoftUS

•  LeandroTerra-ShiftLeftUS/BR

•  CaioLima-JavaScriptCoreEU/BR

•  GuilhermeLeobas-CyralUS/BR

•  MarceloMorais-AppleUS/BR

•  BrunoMorais-GoogleBR

•  IzabelaKarenina-GoogleBR

•  TarsilaBessa-GoogleBR

•  HenriqueNazaré-GoogleBR

•  CarinaCapelão-GoogleBR

•  JunioRibeiro-CyralUS/BR

•  HugoSouza-CyralUS/BR

fernando@dcc.ufmg.br

Eporquetrabalharconosco?

fernando@dcc.ufmg.br

JáUsouoFirefox?

•  EspecializaçãodecódigoJavaScript.– https://bugzilla.mozilla.org/show_bug.cgi?id=536641

Parasabermais:•  IgorRafaeldeAssisCosta,PériclesRafaelOliveiraAlves,HenriqueNazaréSantos,FernandoMagno

QuintãoPereira:Just-in-timevaluespecialization.CGO2013:29:1-29:11•  IgorRafaeldeAssisCosta,HenriqueNazaréSantos,PériclesRafaelOliveiraAlves,FernandoMagno

QuintãoPereira:Just-in-timevaluespecialization.ComputerLanguages,Systems&Structures40(2):37-52(2014)

fernando@dcc.ufmg.br

JogaVideo-Games?

•  AnálisedeDivergênciaparaGPUs:– http://gpuocelot.gatech.edu/(Nvidia&MentorGraphics)

– http://reviews.llvm.org/D8576(Apple,ARM,Google&Cray)

Parasabermais:•  DiogoSampaio,RafaelMartinsdeSouza,SylvainCollange,FernandoMagnoQuintãoPereira:

Divergenceanalysis.ACMTrans.Program.Lang.Syst.35(4):13(2013)

fernando@dcc.ufmg.br

ProgramaEmPHP?

•  Análisedefluxocontaminado– Falhasdesegurançaencontradasemprogramasreais.

Parasabermais:•  AndreiRimsa,Marcelod'Amorim,FernandoMagnoQuintãoPereira:Efficientstaticchecker

fortaintedvariableattacks.Sci.Comput.Program.80:91-105(2014)•  AndreiRimsa,Marcelod'Amorim,FernandoMagnoQuintãoPereira:TaintedFlowAnalysison

e-SSA-FormPrograms.CC2011:124-143

fernando@dcc.ufmg.br

MexecomCriptografia?

•  FlowTrackeréumaferramentaquevalidaalgoritmosdecriptografia.

•  AtualmenteelaédesenvolvidapelaProdemge,CompanhiadeDadosdeMinasGerais

Parasabermais:•  BrunoRodrigues,FernandoMagnoQuintãoPereira,DiegoF.Aranha:Sparserepresentation

ofimplicitflowswithapplicationstoside-channeldetection.CC2016:110-120

fernando@dcc.ufmg.br

Prêmios(Últimos5Anos)

•  MelhorartigoSBLP2010“RemovingOverflowTestsviaRun-TimePartialEvaluation”.•  MelhorartigoSBAC-PAD2010“PerformanceDebuggingofGPGPUApplicationswiththe

DivergenceMap”.•  MelhorartigodoSBQS2011“SoftwareEvolutionCharacterization-AComplexNetwork

Approach”•  MelhorartigoSBLP2012"SpillCodePlacementforSIMDMachines".•  Melhortrabalhodeiniciaçãocientífica,SICUFMG2012,CiênciasExatasedaTerra:Péricles

Alves,"RuntimeValueSpecialization".2013•  SegundamelhordissertaçãodemestradodaSociedadeBrasileiradeComputação:

"DivergenceAnalysiswithAffineConstraints".2014•  MelhorartigodoXIXSimpósioBrasileirodeLinguagensdeProgramação:"Restritificação",

SociedadeBrasileiradeComputação.2015•  TerceiromelhorartigodoXIXSimpósioBrasileirodeLinguagensdeProgramação:"Automatic

InferenceofLoopComplexitythroughPolynomialInterpolation",SociedadeBrasileiradeComputação.2015

•  MelhorFerramentadoCongressoBrasileirodeSoftware,TeoriaePrática(CBSoft):"Restrictifier:atooltodisambiguatepointersatfunctioncallsites",SociedadeBrasileiradeComputação.2015

•  SegundaMelhorFerramentadoCongressoBrasileirodeSoftware,TeoriaePrática(CBSoft):"FlowTracker-DetecçãodeCódigoNãoIsócronoviaAnáliseEstáticadeFluxo",SociedadeBrasileiradeComputação.2015

•  Melhorartigo"InspectorJ:umaferramentadeanáliseestáticaparadetectarcódigonãoisócronoemprogramasJava".CBSoftTools2017,SociedadeBrasileiradeComputação.

fernando@dcc.ufmg.br

Infra-Estrutura

Novolaboratórioinauguradonodia18deDezembrode2015,construídocomrecursosdaInteledaLGElectronics

Processodemediçãodeconsumoenergéticoem

hardwareembarcado

fernando@dcc.ufmg.br

Energia

fernando@dcc.ufmg.br

ColaboraçõescomaIndústria

•  Intel:compilaçãoseguradeprogramasescritosemC/C++paradispositivosembarcados.

•  Maxtrack:testeautomáticodesoftwareimplementadoemmicro-controladores.

•  LGElectronics:paralelizaçãoautomáticadecódigoparasmartphones.

•  Nvidia:análisededivergências.•  Prodemge:análisedefluxodeinformação

•  Google:reduçãodeconsumoenergéticoemdispositivosmóveis(+seissummerofcode).

fernando@dcc.ufmg.br

Missão

Contatos:ICEx/DCC,sala7315,+55(31)3409-5587E-mail:fernando@dcc.ufmg.brWeb:http://www.dcc.ufmg.br/~fernandoLaboratóriodeCompiladores: http://lac.dcc.ufmg.br/

"CanProgrammingBeLiberatedFromtheVonNeumannStyle?"

1977TuringAwardLecture-JohnBackus(1924-2007)

top related