LLVM in the Freebsd Toolchain

Total Page:16

File Type:pdf, Size:1020Kb

LLVM in the Freebsd Toolchain LLVM in the FreeBSD Toolchain David Chisnall 1 Introduction vacky and Pawel Worach begin trying to build FreeBSD with Clang and quickly got a working FreeBSD 10 shipped with Clang, based on kernel, as long as optimisations were disabled. By LLVM [5], as the system compiler for x86 and May 2011, Clang was able to build the entire base ARMv6+ platforms. This was the first FreeBSD system on both 32-bit and 64-bit x86 and so be- release not to include the GNU compiler since the came a viable migration target. A large number of project's beginning. Although the replacement of LLVM Clang bugs were found and fixed as a result the C compiler is the most obvious user-visible of FreeBSD testing the compilation of a large body change, the inclusion of LLVM provides opportu- of code. nities for other improvements. 3 Rebuilding the C++ stack 2 Rationale for migration The compiler itself was not the only thing that The most obvious incentive for the FreeBSD project the FreeBSD project adopted from GCC. The en- to switch from GCC to Clang was the decision by tire C++ stack was developed as part of the GCC the Free Software Foundation to switch the license project and underwent the same license switch. of GCC to version 3 of the GPL. This license is This stack comprised the C++ compiler (g++), the unacceptable to a number of large FreeBSD con- C++ language runtime (libsupc++) and the C++ sumers. Given this constraint, the project had a Standard Template Library (STL) implementation choice of either maintaining a fork of GCC 4.2.1 (libstdc++). (the last GPLv2 release), staying with GCC 4.2.1 All of these components required upgrading to forever, or switching to another compiler. The first support the new C++11 standard. The runtime option might have been feasible if other GCC users library, for example, required support for depen- had desired the same and the cost could have been dent exceptions, where an exception can be boxed shared. The second was an adequate stopgap, but and rethrown in another thread (or the same thread the release of the C11 and C++11 specifications— later). both unsupported by GCC 4.2.1|made this an im- The FreeBSD and NetBSD Foundations jointly possible approach for the longer term. The remain- paid PathScale to open source their C++ runtime ing alternative, to find a different compiler to re- library (libcxxrt), which was then integrated into place GCC, was the only viable option. the FreeBSD base system, replacing libsupc++. The OpenBSD project had previously investi- The LLVM project provided an STL implementa- gated PCC, which performed an adequate job with tion (libc++), with full C++11 and now C++14 C code (although generating less optimised code support, which was duly integrated. than even our old GCC), but had no support for Using libcxxrt under libstdc++ allowed C++ C++. The TENDRA compiler had also been con- libraries that exposed C interfaces, or C++ inter- sidered, but development had largely stopped by faces that didn't use STL types, to be mixed in the 2007. same binary as those that used libc++. This in- The remaining alternative was Clang, which was cludes throwing exceptions between such libraries. still a very young compiler in 2008, but had some Implementing this in a backwards-compatible significant commercial backing from companies in- way required some linker tricks. Tradition- cluding Apple and Google. In 2009, Roman Di- ally, libsupc++ had been statically linked into libstdc++, so from the perspective of all linked to be switched to using Clang once the programs the libsupc++ symbols appeared to come from libstdc++. In later versions in the 9.x se- ries, and in the 9-COMPAT libraries shipped for 4.2 The default dialect 10, became a filter library, dynamically libstdc++ One of the simplest, but most common, things to fix linked to . This allows symbol resolu- libsupc++ was the assumption by a lot of ports that they could tion to work correctly and allows libsupc++ or invoke the cc, program and get a C89 compiler. libcxxrt to be used as the filtee, which actually POSIX97 deprecated the cc utility, because it ac- provides the implementation of these symbols. cepts an unspecified dialect of C, which at the time might have been K&R or C89. Over a decade later, 4 Problems with ports some code is still trying to use it. Today, it may require K&R C (very rare), C89 (very common), The FreeBSD ports tree is a collection of infrastruc- C99 (less common), or C11 (not yet common), and ture for building around 24,000 third-party pro- so should be explicitly specifying a dialect. This grams and libraries. Most ports are very thin was a problem, because gcc, when invoked as cc wrappers around the upstream distribution's build defaults to C89, whereas clang defaulted to C99 system, running autoconf or CMake configurations and now to C11. and then building the resulting make files or equiv- This is not usually an issue, as the new versions of alent. For well-written programs, the switch to the C standard are intended to be backwards com- Clang was painless. Unfortunately, well-written patible. Unfortunately, although valid C89 code is programs make up the minority of the ports tree. usually valid C99 or C11 code, very little code is ac- To get the ports tree working with Clang required tually written in C89. Most C ports are written in a number of bug fixes. C plus GNU extensions. In particular, C99 intro- duced the inline keyword, with a different meaning to the inline keyword available as a GNU extension 4.1 Give up, use GCC to C89. This change causes linker failures when C89 code with GNU-flavoured inline functions is The first stopgap measure was to add a flag to the compiled as C99. For most ports, this was fixed by ports tree allowing ports to select that they require adding -fgnu89-inline to the port's CFLAGS. GCC. At the coarsest granularity is the USE GCC flag knob, which allows a port to specify that it re- quires either a specific version of GCC, or a specific 4.3 C++ templates minimum version. This is a better-than-nothing approach to get- Another common issue in C++ code relates to two- ting ports building again, but is not ideal. There is phase lookup in C++ templates. This is a par- little advantage in switching to a new base system ticularly tricky part of the C++ stack and both compiler if we are then going to use a different one GCC and Microsoft's C++ compiler implemented for a large number of ports. We also encounter it in different, mutually incompatible, wrong ways. problems due to GCC's current inability to use Clang implements it correctly, as do new versions libc++, meaning that it is hard to compile C++ of other compilers. Unlike other compilers, Clang ports with GCC if they depend on libraries that are does not provide a fallback mode, accepting code built with Clang, and vice versa. Currently around with GNU or Microsoft-compatible errors. 1% of the ports tree requires this. Quite a few more The most common manifestation of this differ- use the flags exposed in the compiler namespace ence is template instantiations failing with an un- for the port's USES flags. In particular, specify- known identifier error. Often these can be fixed ing USES=compiler:openmp will currently force a by simply specifying this−> in front of the vari- port to use GCC, as our Clang does not yet include able named in the error message. In some more OpenMP support. complex programs, working out exactly what was This framework allows ports to specify the exact intended is a problem and so fixing it is impossible features of GCC that they require, allowing them for the port maintainer. This is currently the largest cause of programs re- behaviour. This is particularly prevalent in con- quiring GCC. In particular, some big C++ projects figure scripts. For example, Mono checks whether such as the Sphinx speech recognition engine have isnan(1) works, which checks whether there is a ver- not had new releases for over five years and so are sion of isnan() that accepts an integer argument. unlikely to be fixed upstream. Several of these If it doesn't find one, then it provides an imple- ports will only build with specific version of GCC mentation of isnan() that accepts a double as the as well and so are still built with GCC in the ports argument, which causes linker failures. tree. Fortunately, many these (for example, some Fixing these was relatively easy, but time con- of the KDE libraries) are now tested upstream with suming. Most of the errors were in configure Clang for Mac OS X compatibility and so simply scripts, but we did find a small number of real bugs updating the port to a newer version fixed incom- in code. patibilities. 4.6 OpenMP 4.4 Goodbye tr1 One of the current limitations of Clang as a C/C++ C++ Technical Report 1 (TR1) is a set of experi- compiler is its lack of OpenMP support. OpenMP mental additions to C++ that were standardised in is a pragma-based standard for compiler-assisted between C++03 and C++11. It provided a number parallelism and so is increasingly important in an of extensions that were in headers in the tr1/ di- era when even mobile devices have multiple cores.
Recommended publications
  • What Is LLVM? and a Status Update
    What is LLVM? And a Status Update. Approved for public release Hal Finkel Leadership Computing Facility Argonne National Laboratory Clang, LLVM, etc. ✔ LLVM is a liberally-licensed(*) infrastructure for creating compilers, other toolchain components, and JIT compilation engines. ✔ Clang is a modern C++ frontend for LLVM ✔ LLVM and Clang will play significant roles in exascale computing systems! (*) Now under the Apache 2 license with the LLVM Exception LLVM/Clang is both a research platform and a production-quality compiler. 2 A role in exascale? Current/Future HPC vendors are already involved (plus many others)... Apple + Google Intel (Many millions invested annually) + many others (Qualcomm, Sony, Microsoft, Facebook, Ericcson, etc.) ARM LLVM IBM Cray NVIDIA (and PGI) Academia, Labs, etc. AMD 3 What is LLVM: LLVM is a multi-architecture infrastructure for constructing compilers and other toolchain components. LLVM is not a “low-level virtual machine”! LLVM IR Architecture-independent simplification Architecture-aware optimization (e.g. vectorization) Assembly printing, binary generation, or JIT execution Backends (Type legalization, instruction selection, register allocation, etc.) 4 What is Clang: LLVM IR Clang is a C++ frontend for LLVM... Code generation Parsing and C++ Source semantic analysis (C++14, C11, etc.) Static analysis ● For basic compilation, Clang works just like gcc – using clang instead of gcc, or clang++ instead of g++, in your makefile will likely “just work.” ● Clang has a scalable LTO, check out: https://clang.llvm.org/docs/ThinLTO.html 5 The core LLVM compiler-infrastructure components are one of the subprojects in the LLVM project. These components are also referred to as “LLVM.” 6 What About Flang? ● Started as a collaboration between DOE and NVIDIA/PGI.
    [Show full text]
  • A DSL for Resource Checking Using Finite State Automaton-Driven Symbolic Execution Code
    Open Comput. Sci. 2021; 11:107–115 Research Article Endre Fülöp and Norbert Pataki* A DSL for Resource Checking Using Finite State Automaton-Driven Symbolic Execution https://doi.org/10.1515/comp-2020-0120 code. Compilers validate the syntactic elements, referred Received Mar 31, 2020; accepted May 28, 2020 variables, called functions to name a few. However, many problems may remain undiscovered. Abstract: Static analysis is an essential way to find code Static analysis is a widely-used method which is by smells and bugs. It checks the source code without exe- definition the act of uncovering properties and reasoning cution and no test cases are required, therefore its cost is about software without observing its runtime behaviour, lower than testing. Moreover, static analysis can help in restricting the scope of tools to those which operate on the software engineering comprehensively, since static anal- source representation, the code written in a single or mul- ysis can be used for the validation of code conventions, tiple programming languages. While most static analysis for measuring software complexity and for executing code methods are designed to detect anomalies (called bugs) in refactorings as well. Symbolic execution is a static analy- software code, the methods they employ are varied [1]. One sis method where the variables (e.g. input data) are inter- major difference is the level of abstraction at which the preted with symbolic values. code is represented [2]. Because static analysis is closely Clang Static Analyzer is a powerful symbolic execution related to the compilation of the code, the formats used engine based on the Clang compiler infrastructure that to represent the different abstractions are not unique to can be used with C, C++ and Objective-C.
    [Show full text]
  • Challenges in Debugging Dynamically Compiled Languages As Exemplified by C# Debugger for Tizen
    Samsung R&D Institute Russia Center of System Software Challenges in debugging dynamically compiled languages as exemplified by C# debugger for Tizen Dmitri Botcharnikov 1 Agenda Dynamically compiled languages Tizen .NET Debugging Challenges Tizen .NET Debugger internals Future plans 2 Dynamically compiled languages Dynamically (Just-In-Time) compiled languages VM manages low-level details: memory allocation, exception handling But for debuggers… 3 Tizen .NET Visual Studio Tools for Tizen preview were released C# was added to Tizen Over 1,400,000 C# developers worldwide Tizen running on 50 millions Samsung devices (TV, wearables, mobile, IoT) http://developer.tizen.org 4 Technologies Tizen OS (emulator, platform-specific APIs) Xamarin.Forms .NET Core (CoreCLR, CoreFX, Roslyn) Visual Studio 2015 (Windows) 5 C# Compilation & Execution C# source MSIL Output CLR Roslyn JIT Language-specific compiler: C# => MSIL CLR JIT compiler: MSIL => native code 6 Debugging Challenges Source code to native code mapping ◦ C# compiler generates debugging information for source code to MSIL mapping Stepping in and over ◦ Stepping into not yet compiled code ◦ Managed exception handlers ◦ Lambdas, closures & iterators Local variables & arguments inspection ◦ C# compiler generates debugging information for MSIL variables 7 LLDB Subproject of LLVM (http://lldb.llvm.org) Native debugger builds on LLVM and Clang libraries Supports X86 and ARM architectures 8 SOS debugger plug-in Plug-in for LLDB (libsosplugin.so, libsos.so) Port of SOS.dll
    [Show full text]
  • SMT-Based Refutation of Spurious Bug Reports in the Clang Static Analyzer
    SMT-Based Refutation of Spurious Bug Reports in the Clang Static Analyzer Mikhail R. Gadelha∗, Enrico Steffinlongo∗, Lucas C. Cordeiroy, Bernd Fischerz, and Denis A. Nicole∗ ∗University of Southampton, UK. yUniversity of Manchester, UK. zStellenbosch University, South Africa. Abstract—We describe and evaluate a bug refutation extension bit in a is one, and (a & 1) ˆ 1 inverts the last bit in a. for the Clang Static Analyzer (CSA) that addresses the limi- The analyzer, however, produces the following (spurious) bug tations of the existing built-in constraint solver. In particular, report when analyzing the program: we complement CSA’s existing heuristics that remove spurious bug reports. We encode the path constraints produced by CSA as Satisfiability Modulo Theories (SMT) problems, use SMT main.c:4:12: warning: Dereference of null solvers to precisely check them for satisfiability, and remove pointer (loaded from variable ’z’) bug reports whose associated path constraints are unsatisfi- return *z; able. Our refutation extension refutes spurious bug reports in ˆ˜ 8 out of 12 widely used open-source applications; on aver- age, it refutes ca. 7% of all bug reports, and never refutes 1 warning generated. any true bug report. It incurs only negligible performance overheads, and on average adds 1.2% to the runtime of the The null pointer dereference reported here means that CSA full Clang/LLVM toolchain. A demonstration is available at claims to nevertheless have found a path where the dereference https://www.youtube.com/watch?v=ylW5iRYNsGA. of z is reachable. Such spurious bug reports are in practice common; in our I.
    [Show full text]
  • LLDB Tutorial: Adding Debugger Support for Your Target LLVM 2016 Tutorial
    LLDB Tutorial: Adding debugger support for your target LLVM 2016 tutorial Deepak Panickal Andrzej Warzyński Codeplay Soware @codeplayso March 18, 2016 Outline • LLDB architecture crash course I Overview of LLDB I User scenarios such as breakpoints, stack-walking etc. I Debugging ps • Both generic and specialized architectures are covered I MSP430 lldb debugging, which we have implemented for this tutorial I github.com/codeplaysoftware/lldb-msp430 I ARM architecture is also referred to for the generic cases • Focusing on debugging ELF executables on Linux EuroLLVM 2016 Outline 2 / 54 Overview Part 1: The Basics Part 2: ELF And Architecture Support Part 3: Registers Part 4: Memory and Breakpoints Part 5: Other Key Features Part 6: Debugging Tips Part 7: MSP430 Quick Recap EuroLLVM 2016 Outline 3 / 54 Part 1 The Basics EuroLLVM 2016 Part 1: The Basics 4 / 54 LLDB - Architecture lldb user driver TCP Socket GDB RSP . lldb-server debug API Architecture of LLDB LLDB offers mulple opons: I user drivers: command line, lldb-mi, Python I debug API: ptrace/simulator/runme/actual drivers EuroLLVM 2016 Part 1: The Basics 5 / 54 lldb/lldb-server lldb • Runs on host • Interacts with the user • Understands symbols, DWARF informaon, data formats, etc. • Plugin architecture I ProcessGDBRemote, DynamicLoaderPOSIXDYLD, ABISysV_msp430 are some... lldb-server • Runs on both remote and host, communicates to lldb via RSP over whichever medium is available • Interacts with the hardware/simulator • Deals with binary data and memory addresses • Plugin architecture I ObjectFileELF, ProcessLinux, are some... EuroLLVM 2016 Part 1: The Basics 6 / 54 GDB Remote Serial Protocol • Simple, ASCII message based protocol • Designed for debugging remote targets • Originally developed for gdb<->gdbserver communicaon • Extended for LLDB, see lldb-gdb-remote.txt Packet structure: checksum $.
    [Show full text]
  • Nateguyver Breakpoints LLDB Debug Toolchain More
    ��������������������������� ��������������������������� �������� ����������������������������������������������������������������������������������� ���������������������������������������������������������������������������������������������� ������������������������������������������������������������������������������������������� ������������������������������� ��������������������������������������������������������������������������������������� ����������������������������������������������������������������������� �������������������������������������������������������������������������������������� �������������������������������������������� ◼ Breakpoints & watchpoints ◼ Xcode's graphical debugger ◼ LLDB �������������� “ ������������������������������������������������������������������������������������ ��������������������������� ”������������������ ���������������������������� ◼ Assertions, Logging, and Debug configuration ◼ Static analysis & runtime memory tools ◼ Unit testing in xcode ���������������� ◼ Emphasis on LLDB as our debugging foundation ◼ Tips and tricks to stramline your the debuggin experience ◼ Use LLDB as an extensible investigative tool “�������������”������������ “��’���������������������������������������������������’���������������������’�������������� ��������’����������������������������������� ”������������������ ��������������������������������������������������� ���������������������������������������������������������������������������������� ����������������������������������������������������������������������������
    [Show full text]
  • Compiling and Makefiles
    Compiling C Programs Makefiles Compiling and Makefiles 2501ICT/7421ICTNathan René Hexel School of Information and Communication Technology Griffith University Semester 1, 2012 René Hexel Compiling and Makefiles Compiling C Programs Makefiles Outline 1 Compiling C Programs 2 Makefiles Using the make Utility Makefiles for Objective-C Code Makefiles for C++ Code René Hexel Compiling and Makefiles Compiling C Programs Makefiles Compiling C Programs Integrated Development Environment (IDE) Eclipse, XCode, Visual C++, Project Center, . Compiles programs at the press of a button (like BlueJ) Often difficult to customise Very rarely support multiple platforms and languages Command Line Requires manual invocation Requires knowledge of command line parameters Can be tedious for large projects Cross-platform and -language compilers (e.g. clang) Makefiles Combine the best of both worlds Recompile a complex project with a simple make command René Hexel Compiling and Makefiles Compiling C Programs Makefiles Getting a Command Line Interface Via Dwarf ssh dwarf.ict.griffith.edu.au using putty (Windows) Via a local Terminal Mac OS X: e.g. Applications / Utilities / Terminal.app Linux: e.g. through the Gnome program menu Windows: e.g. Start / Programs / Programming Tools / GNUstep / Shell ) Enter commands to compile your program Hit Return (or Enter) after every command! René Hexel Compiling and Makefiles Compiling C Programs Makefiles Compiling a C program using clang or gcc Once on the command line change to the directory (folder) your program is in cd /my/example/directory
    [Show full text]
  • ENCM 335 Fall 2018: Command-Line C Programming on Macos
    page 1 of 4 ENCM 335 Fall 2018: Command-line C programming on macOS Steve Norman Department of Electrical & Computer Engineering University of Calgary September 2018 Introduction This document is intended to help students who would like to do ENCM 335 C pro- gramming on an Apple Mac laptop or desktop computer. A note about software versions The information in this document was prepared using the latest versions of macOS Sierra version 10.12.6 and Xcode 9.2, the latest version of Xcode available for that version of macOS. Things should work for you if you have other but fairly recent versions of macOS and Xcode. If you have versions that are several years old, though you may experience difficulties that I'm not able to help with. Essential Software There are several key applications needed to do command-line C programming on a Mac. Web browser I assume you all know how to use a web browser to find course documents, so I won't say anything more about web browsers here. Finder Finder is the tool built in to macOS for browsing folders and files. It really helps if you're fluent with its features. Terminal You'll need Terminal to enter commands and look at output of commands. To start it up, look in Utilities, which is a folder within the Applications folder. It probably makes sense to drag the icon for Terminal to the macOS Dock, so that you can launch it quickly. macOS Terminal runs the same bash shell that runs in Cygwin Terminal, so commands like cd, ls, mkdir, and so on, are all available on your Mac.
    [Show full text]
  • Sun Microsystems: Sun Java Workstation W1100z
    CFP2000 Result spec Copyright 1999-2004, Standard Performance Evaluation Corporation Sun Microsystems SPECfp2000 = 1787 Sun Java Workstation W1100z SPECfp_base2000 = 1637 SPEC license #: 6 Tested by: Sun Microsystems, Santa Clara Test date: Jul-2004 Hardware Avail: Jul-2004 Software Avail: Jul-2004 Reference Base Base Benchmark Time Runtime Ratio Runtime Ratio 1000 2000 3000 4000 168.wupwise 1600 92.3 1733 71.8 2229 171.swim 3100 134 2310 123 2519 172.mgrid 1800 124 1447 103 1755 173.applu 2100 150 1402 133 1579 177.mesa 1400 76.1 1839 70.1 1998 178.galgel 2900 104 2789 94.4 3073 179.art 2600 146 1786 106 2464 183.equake 1300 93.7 1387 89.1 1460 187.facerec 1900 80.1 2373 80.1 2373 188.ammp 2200 158 1397 154 1425 189.lucas 2000 121 1649 122 1637 191.fma3d 2100 135 1552 135 1552 200.sixtrack 1100 148 742 148 742 301.apsi 2600 170 1529 168 1549 Hardware Software CPU: AMD Opteron (TM) 150 Operating System: Red Hat Enterprise Linux WS 3 (AMD64) CPU MHz: 2400 Compiler: PathScale EKO Compiler Suite, Release 1.1 FPU: Integrated Red Hat gcc 3.5 ssa (from RHEL WS 3) PGI Fortran 5.2 (build 5.2-0E) CPU(s) enabled: 1 core, 1 chip, 1 core/chip AMD Core Math Library (Version 2.0) for AMD64 CPU(s) orderable: 1 File System: Linux/ext3 Parallel: No System State: Multi-user, Run level 3 Primary Cache: 64KBI + 64KBD on chip Secondary Cache: 1024KB (I+D) on chip L3 Cache: N/A Other Cache: N/A Memory: 4x1GB, PC3200 CL3 DDR SDRAM ECC Registered Disk Subsystem: IDE, 80GB, 7200RPM Other Hardware: None Notes/Tuning Information A two-pass compilation method is
    [Show full text]
  • Cray Scientific Libraries Overview
    Cray Scientific Libraries Overview What are libraries for? ● Building blocks for writing scientific applications ● Historically – allowed the first forms of code re-use ● Later – became ways of running optimized code ● Today the complexity of the hardware is very high ● The Cray PE insulates users from this complexity • Cray module environment • CCE • Performance tools • Tuned MPI libraries (+PGAS) • Optimized Scientific libraries Cray Scientific Libraries are designed to provide the maximum possible performance from Cray systems with minimum effort. Scientific libraries on XC – functional view FFT Sparse Dense Trilinos BLAS FFTW LAPACK PETSc ScaLAPACK CRAFFT CASK IRT What makes Cray libraries special 1. Node performance ● Highly tuned routines at the low-level (ex. BLAS) 2. Network performance ● Optimized for network performance ● Overlap between communication and computation ● Use the best available low-level mechanism ● Use adaptive parallel algorithms 3. Highly adaptive software ● Use auto-tuning and adaptation to give the user the known best (or very good) codes at runtime 4. Productivity features ● Simple interfaces into complex software LibSci usage ● LibSci ● The drivers should do it all for you – no need to explicitly link ● For threads, set OMP_NUM_THREADS ● Threading is used within LibSci ● If you call within a parallel region, single thread used ● FFTW ● module load fftw (there are also wisdom files available) ● PETSc ● module load petsc (or module load petsc-complex) ● Use as you would your normal PETSc build ● Trilinos ●
    [Show full text]
  • Compiling Linux with LLVM
    Open Source Open Possibilities Compiling Linux with LLVM Presented by: Mark Charlebois Presentation Date: 06/07/2012 PAGE 1 Open Source Open Possibilities Agenda Why would I want to use Clang to compile Linux? Status updates: cross compiling for ARM with Clang building Linux kernel with Clang running Linux compiled with Clang To do list PAGE 2 Open Source Open Possibilities Open Source Open Possibilities Why Would I Want to Use Clang to Compile Linux? PAGE 3 Open Source Open Possibilities Better Diagnostics $ gcc-4.2 -fsyntax-only t.c t.c:7: error: invalid operands to binary + (have 'int' and 'struct A') $ clang -fsyntax-only t.c t.c:7:39: error: invalid operands to binary expression ('int' and 'struct A') return y + func(y ? ((SomeA.X + 40) + SomeA) / 42 + SomeA.X : SomeA.X); ~~~~~~~~~~~~~~ ^ ~~~~~ See http://clang.llvm.org/diagnostics.html for more examples GCC extensions: all extensions are explicitly recognized as such and marked with extension diagnostics, which can be mapped to warnings, errors, or just ignored. Google builds their products also with Clang just for the better debug output Rich diagnostic output enables auto-generation of patches PAGE 4 Open Source Open Possibilities Fix-it Hints "Fix-it" hints provide advice for fixing small, localized problems in source code. $ clang t.c t.c:5:28: warning: use of GNU old-style field designator extension struct point origin = { x: 0.0, y: 0.0 }; ~~ ^ .x = t.c:5:36: warning: use of GNU old-style field designator extension struct point origin = { x: 0.0, y: 0.0 }; ~~ ^ .y = PAGE 5
    [Show full text]
  • Introduchon to Arm for Network Stack Developers
    Introducon to Arm for network stack developers Pavel Shamis/Pasha Principal Research Engineer Mvapich User Group 2017 © 2017 Arm Limited Columbus, OH Outline • Arm Overview • HPC SoLware Stack • Porng on Arm • Evaluaon 2 © 2017 Arm Limited Arm Overview © 2017 Arm Limited An introduc1on to Arm Arm is the world's leading semiconductor intellectual property supplier. We license to over 350 partners, are present in 95% of smart phones, 80% of digital cameras, 35% of all electronic devices, and a total of 60 billion Arm cores have been shipped since 1990. Our CPU business model: License technology to partners, who use it to create their own system-on-chip (SoC) products. We may license an instrucBon set architecture (ISA) such as “ARMv8-A”) or a specific implementaon, such as “Cortex-A72”. …and our IP extends beyond the CPU Partners who license an ISA can create their own implementaon, as long as it passes the compliance tests. 4 © 2017 Arm Limited A partnership business model A business model that shares success Business Development • Everyone in the value chain benefits Arm Licenses technology to Partner • Long term sustainability SemiCo Design once and reuse is fundamental IP Partner Licence fee • Spread the cost amongst many partners Provider • Technology reused across mulBple applicaons Partners develop • Creates market for ecosystem to target chips – Re-use is also fundamental to the ecosystem Royalty Upfront license fee OEM • Covers the development cost Customer Ongoing royalBes OEM sells • Typically based on a percentage of chip price
    [Show full text]