Title
Understanding GCC builtins to develop better tools.
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.
Year
DOI
Venue
2019
10.1145/3338906.3338907
ESEC/SIGSOFT FSE
Keywords
Field
DocType
GCC builtins,compiler intrinsics,C GitHub projects
Data science,Computer science,Theoretical computer science
Conference
ISBN
Citations 
PageRank 
978-1-4503-5572-8
0
0.34
References 
Authors
0
4
Name
Order
Citations
PageRank
Manuel Rigger1265.86
Stefan Marr212421.54
Bram Adams379832.26
Hanspeter Mössenböck478188.17