15
Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Embed Size (px)

Citation preview

Page 1: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Chuck MitchellSenior Architect, Phoenix Product UnitMicrosoft Corporation

Page 2: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Review GoalsProject OverviewProject StatusWhy use Phoenix for Research?Engagement with UIUC/IMPACT

Page 3: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Provide industry leading compilation and tools infrastructure: “VC++ and .NET compilers and tools”

Build research/development community around infrastructure: “the Phoenix Platform”

Make the infrastructure scalable, configurable, and extensible: “JIT to WPO, compilation and analysis”

Make the infrastructure quick to retarget and rehost

Page 4: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

PhoenixPhoenixInfrastructureInfrastructure

.Net CodeGen.Net CodeGenRuntime JITsPre-JITOO and .Net optimizations

Native CodeGenNative CodeGenAdvanced C++/OO OptimizationsFP optimizationsOpenMP, Concurrency

RetargetableRetargetable“Machine Models”~3 months: -Od~3 months: -O2

Chip Vendor CDKChip Vendor CDK~6 month portsSample port + docsKey ports still done at msft

Academic RDKAcademic RDKFull sources (future)Managed API’sIP as DLLsDocs

MSR & Partner ToolsMSR & Partner ToolsBuilt on Phoenix Managed API’sBoth HL and LL API’sProgram AnalysisProgram Rewrite

MSR Adv LangMSR Adv LangLanguage ResearchDirect xfer to PhoenixResearch Insulated from code generation

Analysis & ProfilingAnalysis & ProfilingStatic Analysis ToolsProfilers Defect Detection

Page 5: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Delphi Cobol

HL

Opt

s

LL O

pts

Cod

e G

en

HL

Opt

s

LL O

pts

LL O

pts

HL

Opt

s

NativeImage

C#

Phoenix Core

IR Syms Types FlowGraph RegionGraph Expressions SSA Simulation Dataflow Alias EH Readers Writers

Basic Utilities

Xlator

Formatter

Browser

Phoenix Managed APIs

Profiler

Obfuscator

VisualiVisualizerzer

SecurityChecker

Refactor

Lint

VB

C++ IL.NETassembly

C++

C++AST

PreFast

Profile

Eiffel

C++

Phx AST

Lex/Yacc

Tiger

Cod

e G

en

Page 6: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

CLR

JIT

CLR

Pre

JIT

er

VC++

VC

++

BE

The Phoenix Building Blocks

Core StructuresAnd Utilities

High Level Optimizations

Low LevelOptimizations

MachineAbstractions

Dynamic Tools

Loca

ityop

ts

Static Tools

Ana

lysi

s

Page 7: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

ProgramUnit or ModuleUnit (whole program) (single compiland)

Symbol Table

Symbol Table

Instruction Stream

Flow Graph

Alias Info

Type Table

Region Graph

Framework supports multi-threaded compilation at the function level.

DataUnit

Data Instrs

FuncUnitFuncUnit

FuncUnitFuncUnit

FuncUnitFuncUnit

FuncUnitFuncUnit

FuncUnit

DataUnitDataUnit

Exception Handling Info

Page 8: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

START

[p](1) [p](1)

ADD

t1

END

FuncUnitFuncUnit

FirstInstr

LastInstr

VarOpnd

p

VarOpnd

Handler

Exception Handler LabelInstr

MemOpndMemOpnd

LabelOpnd

t1 a

ADD

1

ImmOpndVarOpnd VarOpnd

Use/Def chaining for expression temp

Page 9: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Written in C++, usable by any .NET languageDual-Mode: Entire platform compiles to run native on top of Win32/64 or on top of .NETPhase & Plug-in model for third party extensions to:

VC++ Compiler, Binary Reader/Writer, Analysis Tools, …

Support for Multi-threaded clientsSupport for Code and Data extensibilityA single, strongly typed, explicit dataflow/control flow IR used throughout frameworkIR and Type system capable of processing native and/or managed codeStrong inter-phase consistency checkingMany diverse compilers and tools reuse the common core

Page 10: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

We have transitioned from incubation to productizationWe created the Phoenix Product Unit with 60+ peopleWe are delivering X64 build compiler for Win7 and VS10We are delivering the platform for Developer Division static analysis tools (PREfast, FxCop, security checker, …)

Page 11: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

X64 Code Quality at 93% of VS9, parity by 2H07, surpass in 1H08Multi-threaded compiler on 8 cores up to 3.5X faster than VS9 todayInterprocedural framework is coming on line nowProfile guided optimizations coming on line (still the long pole)Building and running stress on 118 million lines of Windows code every night

Page 12: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Researchers should do research, not plumbing!Leverage production quality infrastructure, stop re-inventing the wheelMicrosoft backed, we are betting our future on it, so you will be able to rely on itResearch can be proven on by processing real world code (Windows, Office, …)Internal: Transfer of technologybecomes simple and straight forward

Page 13: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Received proposal for funding late last yearOriginal proposal was centered around bridging frameworks Phoenix/IMPACTMet with Wen-Mei and his staff to present Phoenix and review their current workThe bulk of each students work was focused on supporting infrastructure, not researchConclusion: Rehost IMPACT on Phoenix

and focus IMPACT staff on new research

Page 14: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after

the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Page 15: Chuck Mitchell Senior Architect, Phoenix Product Unit Microsoft Corporation

Microsoft Research Faculty Summit 2007