Skip to main content
Kent Academic Repository

Understanding GCC Builtins to Develop Better Tools

Rigger, Manuel, Marr, Stefan, Adams, Bram, Mössenböck, Hanspeter (2019) Understanding GCC Builtins to Develop Better Tools. In: ESEC/FSE 2019 Proceedings of the 2019 27th ACM. Proceedings of the 27th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. ESEC/FSE . pp. 74-85. ACM ISBN 978-1-4503-5572-8. (doi:10.1145/3338906.3338907) (KAR id:75258)

Abstract

C programs can use compiler builtins to provide functionality that the C language lacks. On Linux, GCC provides several thousands of builtins that are also supported by other mature compilers, such as Clang and ICC. Maintainers of other tools lack guidance on whether and which builtins should be implemented to support popular projects. To assist tool developers who want to support GCC builtins, we analyzed builtin use in 4,913 C projects from GitHub. We found that 37% of these projects relied on at least one builtin. Supporting an increasing proportion of projects requires support of an exponentially increasing number of builtins; however, implementing only 10 builtins already covers over 30% of the projects. Since we found that many builtins in our corpus remained unused, the effort needed to support 90% of the projects is moderate, requiring about 110 builtins to be implemented. For each project, we analyzed the evolution of builtin use over time and found that the majority of projects mostly added builtins. This suggests that builtins are not a legacy feature and must be supported in future tools. Systematic testing of builtin support in existing tools revealed that many lacked support for builtins either partially or completely; we also discovered incorrect implementations in various tools, including the formally verified CompCert compiler.

Item Type: Conference or workshop item (Paper)
DOI/Identification number: 10.1145/3338906.3338907
Uncontrolled keywords: GCC builtins, compiler intrinsics, C, GitHub projects
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Stefan Marr
Date Deposited: 08 Jul 2019 13:42 UTC
Last Modified: 05 Nov 2024 12:38 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/75258 (The current URI for this page, for reference purposes)

University of Kent Author Information

  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.