LLVM on IBM POWER processors A progress report



Similar documents
RISC-V Software Ecosystem. Andrew Waterman UC Berkeley

LLVMLinux: Embracing the Dragon

Linux, Open Source, and IBM: The Next Decade

SUSE Manager. A Comprehensive Linux Server Management the Linux Way. Name. Title

Cloud Orchestration. Mario Cho. Open Frontier Lab.

Instruction Set Architecture (ISA)

Part V Applications. What is cloud computing? SaaS has been around for awhile. Cloud Computing: General concepts

How To Get The Most Out Of Redhat.Com

Cloud Computing with Red Hat Solutions. Sivaram Shunmugam Red Hat Asia Pacific Pte Ltd.

IT Infrastructure and Emerging Technologies

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

Frysk The Systems Monitoring and Debugging Tool. Andrew Cagney

Satish Mohan. Head Engineering. AMD Developer Conference, Bangalore

Red Hat Enterprise Linux 6 Server:

Cloud Courses Description

EMSCRIPTEN - COMPILING LLVM BITCODE TO JAVASCRIPT (?!)

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

Red Hat Enterprise Linux 6. Stanislav Polášek ELOS Technologies

Build & Manage Clouds with Red Hat Cloud Infrastructure Products. TONI WILLBERG Solution Architect Red Hat toni@redhat.com

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

Android Development: a System Perspective. Javier Orensanz

System i Architecture Part 1. Module 2

Virtualization and Other Tricks.

<Insert Picture Here> Oracle Database Support for Server Virtualization Updated December 7, 2009

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

Hard Partitioning and Virtualization with Oracle Virtual Machine. An approach toward cost saving with Oracle Database licenses

Development With ARM DS-5. Mervyn Liu FAE Aug. 2015

Running Oracle Databases in a z Systems Cloud environment

Easing embedded Linux software development for SBCs

OpenPOWER Outlook AXEL KOEHLER SR. SOLUTION ARCHITECT HPC

Red Hat Enterprprise Linux - New Offerings SYSTEM OPTIONS

Compilers and Tools for Software Stack Optimisation

The XenServer Product Family:

Use Cases for Docker in Enterprise Linux Environment CloudOpen North America, 2014 Linda Wang Sr. Software Engineering Manager Red Hat, Inc.

Cloud Courses Description

Private Cloud for WebSphere Virtual Enterprise Application Hosting

IBM Software Group. Lotus Domino 6.5 Server Enablement

Intel Cloud Builder Guide: Cloud Design and Deployment on Intel Platforms

RED HAT CONTAINER STRATEGY

APPENDIX 1 SUBSCRIPTION SERVICES

Beyond the Hypervisor

Anh Quach, Matthew Rajman, Bienvenido Rodriguez, Brian Rodriguez, Michael Roefs, Ahmed Shaikh

SOLUTION BRIEF. Advanced ODBC and JDBC Access to Salesforce Data.

Migration Scenario: Migrating Batch Processes to the AWS Cloud

evm Virtualization Platform for Windows

RED HAT ENTERPRISE VIRTUALIZATION FOR SERVERS: COMPETITIVE FEATURES

HP Service Manager Compatibility Matrix

RED HAT ENTERPRISE VIRTUALIZATION

Fall Lecture 1. Operating Systems: Configuration & Use CIS345. Introduction to Operating Systems. Mostafa Z. Ali. mzali@just.edu.

Developing a dynamic, real-time IT infrastructure with Red Hat integrated virtualization

Platform Support Guide

IBM Spectrum Scale vs EMC Isilon for IBM Spectrum Protect Workloads

Kristin Donceel June IBM Corporation

Virtualizare sub Linux: avantaje si pericole. Dragos Manac

Introducing the IBM Software Development Kit for PowerLinux

KVM, OpenStack, and the Open Cloud

APPLICATION REPLATFORMING : MIGRATION AND MODERNIZATION

ivos Technical Requirements V For Current Clients as of June 2014

With Red Hat Enterprise Virtualization, you can: Take advantage of existing people skills and investments

RED HAT ENTERPRISE VIRTUALIZATION & CLOUD COMPUTING

KVM, OpenStack, and the Open Cloud

Virtualization and the U2 Databases

Star System Deitel & Associates, Inc. All rights reserved.

APPENDIX 1 SUBSCRIPTION SERVICES

WIND RIVER DIAB COMPILER

Oracle Products on SUSE Linux Enterprise Server 11

Eddy Integrated Development Environment, LemonIDE for Embedded Software System Development

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

<Insert Picture Here> Introducing Oracle VM: Oracle s Virtualization Product Strategy

Chapter 5: System Software: Operating Systems and Utility Programs

IBM Endpoint Manager Product Introduction and Overview

Simplifying Storage Operations By David Strom (published 3.15 by VMware) Introduction

Red Hat Enterprise Linux for zseries, S/390: Extending Linux throughout the Datacenter

Towards OpenMP Support in LLVM

IBM Platform Computing Cloud Service Ready to use Platform LSF & Symphony clusters in the SoftLayer cloud

Take Your Rocket U2 Apps Mobile with Rocket LegaSuite. Greg Mummah, Product Manager Rocket Software

VMware Server 2.0 Essentials. Virtualization Deployment and Management

PassGuide.C Questions

Virtualization and Cloud Management Using Capacity Planning

7.x Upgrade Instructions Software Pursuits, Inc.

APPENDIX 1 SUBSCRIPTION SERVICES

The path to the cloud training

Server Virtualization with VMWare

Red Hat Developer Toolset 1.1

<Insert Picture Here> Application Testing Suite Overview

New Features in XE8. Marco Cantù RAD Studio Product Manager

Cutting Costs with Red Hat Enterprise Virtualization. Chuck Dubuque Product Marketing Manager, Red Hat June 24, 2010

Introduction to Cloud Computing DLT Solutions LL DL C T Solutions LL May 2011

Transcription:

LLVM on IBM POWER processors A progress report Dr. Ulrich Weigand Senior Technical Staff Member GNU/Linux Compilers & Toolchain Date: Apr 29, 2013 2013 IBM Corporation

and System z LLVM on IBM POWER processors A progress report Dr. Ulrich Weigand Senior Technical Staff Member GNU/Linux Compilers & Toolchain Date: Apr 29, 2013 2013 IBM Corporation

Agenda LLVM on IBM server processors Contributions to PowerPC back end New SystemZ back end Some observations on LLVM vs. GCC from a back-end developer's perspective 3 2013 IBM Corporation

My background IBM Linux Technology Center 2000: Toolchain for IBM mainframe (S/390 / System z) 2005: Toolchain for Cell Broadband Engine 2009: Debugger for IBM OpenCL SDK 2010: Linaro: Toolchain for ARM 2012: LLVM for POWER and System z GNU Compiler & Toolchain GCC back-end maintainer for s390 and spu GDB global maintainer 4 2013 IBM Corporation

LLVM on IBM server processors 5 2013 IBM Corporation

IBM's Linux Technology Center Enhancing Linux capabilities, driving Linux adoption IBM contributes to the community IBM supports Linux as a Tier 1 OS IBM developers contributing to 100+ Linux and Open Source projects Develop closely with Red Hat and Novell Developers sharing technical knowledge on http://planet-ltc.org Make Linux Better All IBM Systems, SW, and Middleware run on and are certified for Linux Driving performance toward parity with IBM's own operating systems Making contributions in security, RAS, scalability, performance, management Software appliances Enable IBM Products Customer Collaboration Expand Linux Reach IBM collaborates with customers Specialized and very detailed knowledge of IBM Systems and Software The LTC works with customers on unique proof of concept projects Scale Out File Services (SOFS) Real time Linux and Java IBM enables Linux for new markets Working with groups such as the Linux Foundation to address new workloads Expanding and providing capabilities for: Blue Cloud Computing SOA / Web 2.0 / SaaS Distributed computing and HPC IBM Smart Analytics System 6 2013 IBM Corporation

Linux on IBM Systems: Leveraging common strengths and differentiated capabilities Intrinsic Differentiated System x Virtualization and consolidation through KVM and Xen Real Time Linux: Latency matters Extremely broad range of ISVs Innovations such as Power Executive and the rear door heat exchanger Security CAPP/EAL 4+ Common Criteria SELinux, AppArmor Very rapid time to fix if vulnerabilities are discovered Power Systems Advanced RAS features Live partition migration Performance generally comparable to AIX x86 consolidation platform Extensive ISV support via the Chiphopper TM program Efficiency Dynamic, tickless kernel Fastest revisions (and newest features) of any mainstream OS kernel System z Run natively or in an IFL Consolidate hundreds or thousands of workloads Extensive ISV support via the Chiphopper TM program Scalability Wristwatches to mainframes Considerable effort in community to support scaling up and out 7 2013 IBM Corporation

Linux on IBM server platforms One of the primary tasks of the LTC First-class support for Enterprise Linux distributions across IBM server platforms: System x, Power Systems, System z Work with/in the community to enable critical software components (e.g. Linux kernel, GNU toolchain,...) LTC contributions to GNU toolchain Significant contributions to POWER and System z platform support across the toolchain Contributions to common code, e.g. GCC autovectorization, GDB multi-architecture support What about LLVM? 8 2013 IBM Corporation

IBM and LLVM What about LLVM? Until recently, LLVM was not seen as critical for enterprise Linux platforms LTC did not want to commit the necessary resources to fully support a second toolchain This perception changed due to increased usage of LLVM in both open-source and proprietary apps Current status (as of mid-2012) Decision to support LLVM across IBM server platforms Fix PowerPC back-end for 64-bit POWER servers Create new SystemZ back-end So what changed? 9 2013 IBM Corporation

Important LLVM use cases Use of LLVM as JIT 3D graphics: llvmpipe mesa/gallium driver Current GNOME now requires 3D graphics This means llvmpipe will be required for (remote) desktop support in upcoming enterprise distros Certain proprietary database applications LLVM JIT to compile SQL stored procedures Use of LLVM to help software development Specific requirement by certain (potential) customers Address sanitizer, thread sanitizer,... Clang error messages Overall: LLVM support seen as critical now 10 2013 IBM Corporation

Contributions to PowerPC back end 11 2013 IBM Corporation

Contributions to PowerPC back end Verify & fix correctness issues Internal regression suite & projects/test-suite Team: Bill Schmidt Will Schmidt Adhemerval Zanella Ulrich Weigand Test suite issues Platform assumptions (endian / bitsize / signed-char) Apple GCC assumptions in Altivec tests Math accuracy issues Still issues with matching reference outputs Proper support for PPC64 TOC Exception handling (and DWARF) fixes MachineCSE: insn that uses/defs the same physreg Big-endian codegen bug in ExpandRes_BITCAST Fix post-ra scheduler anti-dependencies breaking Fix invalid pre-inc transformation in the DAG combiner Set up build bots 12 2013 IBM Corporation

Contributions to PowerPC back end Verify & fix correctness issues (cont.) GCC's mixed-compiler ABI compatibility test suite Placement of small struct arguments Proper alignment for certain argument types Support empty aggregate types Implicit sign/zero extension of arguments / return values Save/restore nonvolatile condition code fields Complex argument passing Fix complex float / 128-bit integer return value types Traceback tables Still mismatches for certain special cases e.g. attribute ((aligned)) 13 2013 IBM Corporation

Contributions to PowerPC back end Verify & fix correctness issues (cont.) Bootstrap compiler Various instances of non-deterministic code generation TOC ordering TLS dynamic models Stack slot ordering No integrated Makefile support for bootstrap? Build tests with integrated assembler forced on Uncovered various wrong instruction encodings Other differences, e.g data & DWARF/EH sections Still some differences in generated object files as compared to GAS output e.g. symbol table ordering Is it feasible to make output fully identical? 14 2013 IBM Corporation

Contributions to PowerPC back end New features Code generation Compile-time PowerPC long double support Fully implement TLS support Implement medium/large code model support Some Altivec enhancements JIT support Implement MCJIT support (64-bit only) Assembler parser support In progress, patches pending review Common code support patches now all accepted Disassembler support t.b.d. 15 2013 IBM Corporation

Contributions to PowerPC back end Future work Improved ISA support Support current processors (power5... power7+) In particular: VSX vector instruction support Performance tuning In particular: instruction scheduling Benchmark analysis (LLVM about 7% worse than GCC) Maybe: 32-bit support Verify 32-bit Linux ABI & codegen correctness Implement 32-bit MCJIT support 16 2013 IBM Corporation

New SystemZ back end 17 2013 IBM Corporation

Contributions to SystemZ back end Team: Richard Sandiford Ulrich Weigand History of LLVM support on SystemZ Initial support added in 2009 by Anton Korobeynikov Back-end was removed again in 2011 New back end to be contributed by IBM Loosely based on old back end, significant reimplementation Feature set 64-bit z/architecture only Support for z10 (and newer) processor only Linux operating system support only Focus on features and correctness, not performance 18 2013 IBM Corporation

Contributions to SystemZ back end Current status Working C/C++ compiler Passes testsuite and projects/test-suite with no failures Passes bootstrap with identical stage2/stage3 results Runs SPECcpu2006 benchmarks successfully Passes the ABI compatibility test suite against GCC 4.8 Working integrated assembler Passes testsuites with integrated assembler forced on Working assembler parser Passes testsuites when using clang assembler Working MCJIT (no support for old JIT) Passes JIT testsuite 19 2013 IBM Corporation

Contributions to SystemZ back end Next steps Get back end accepted & integrated Reviews currently in progress Goal: Make LLVM 3.3 release (?) Performance optimization LLVM about 15% worse than GCC Improved condition code handling Exploit more System z instructions (memory-tomemory, string, branch on count,...) Improved ISA support (z196, zec12) Instruction scheduling & tuning Maybe: 31-bit support 20 2013 IBM Corporation

Working on LLVM vs. GCC Some observations from a back-end developer's perspective 21 2013 IBM Corporation

LLVM vs. GCC back end Many things look similar Sequence of passes.td files vs.md files Differences LLVM seems to provide more flexibility in adding targetspecific passes / overriding common passes Had some difficulties with.td syntax/semantics Ran into a couple of issues/problems Complex address operands, pre-inc addresses Trying to track down encoding bugs Had to read TableGen source code to understand what's going on... Reference documentation? 22 2013 IBM Corporation

LLVM vs. GCC Back-end passes GCC expand & combine early split Early RTL opt passes sched ira / reload n/a thread_prologue_and_epilogue Late RTL opt passes late split sched2 reorder_blocks machine_dependent_reorg final LLVM SelectionDAGISel EmitInstrWithCustomInserter MachineSSAOptimization EmitSchedule RegAllocPass addpreregalloc / addpostregalloc PrologEpilogCodeInserter MachineLateOptimization ExpandPostRAPseudos PostRAScheduler MachineBlockPlacements addpreemitpass EmitFile / EmitObjectCode 23 2013 IBM Corporation

LLVM vs. GCC Machine definition GCC.md file (define_insn "ashrsi3" [(set (match_operand:si 0 "gpc_reg_operand" "=r,r") (ashiftrt:si (match_operand:si 1 "gpc_reg_operand" "r,r") (match_operand:si 2 "reg_or_cint_operand" "r,i")))] "" "@ sraw %0,%1,%2 srawi %0,%1,%h2" [(set_attr "type" "var_shift_rotate,shift")]) LLVM.td file defm SRAW : XForm_6rc<31, 792, (outs gprc:$ra), (ins gprc:$rs, gprc:$rb), "sraw", "$ra, $rs, $rb", IntShift, [(set i32:$ra, (PPCsra i32:$rs, i32:$rb))]>; defm SRAWI: XForm_10rc<31, 824, (outs gprc:$ra), (ins gprc:$rs, u5imm:$sh), "srawi", "$ra, $rs, $SH", IntShift, [(set i32:$ra, (sra i32:$rs, (i32 imm:$sh)))]>; 24 2013 IBM Corporation

Summary LLVM usage getting more and more wide spread Now critical to enterprise Linux applications IBM wants to ensure good LLVM support across our server platforms Started contributing to PowerPC and SystemZ Ongoing investment going forward LLVM code base Experienced GCC back-end developers should be able to work on LLVM back end with little difficulties Some more.td documentation could be helpful 25 2013 IBM Corporation

Questions? 26 2013 IBM Corporation