SlideShare a Scribd company logo
1Samsung Open Source Group
Clang:
Much more than just a C/C++ Compiler
Tilmann Scheller
Principal Compiler Engineer
t.scheller@samsung.com
Samsung Open Source Group
Samsung Research UK
LinuxCon Europe 2016
Berlin, Germany, October 4 – 6, 2016
2Samsung Open Source Group
Overview
● Introduction
● LLVM Overview
● Clang
● Summary
3Samsung Open Source Group
Introduction
4Samsung Open Source Group
What is LLVM?
● Mature, production-quality compiler framework
● Modular architecture
● Heavily optimizing static and dynamic compiler
● Supports all major architectures (x86, ARM, MIPS,
PowerPC, …)
● Powerful link-time optimizations (LTO)
● Permissive license (BSD-like)
5Samsung Open Source Group
LLVM sub-projects
● Clang
C/C++/Objective C frontend and static analyzer
● LLDB
Next generation debugger leveraging the LLVM libraries, e.g. the Clang expression
parser
● lld
Framework for creating linkers, will make Clang independent of the system linker in
the future
● Polly
Polyhedral optimizer for LLVM, e.g. high-level loop optimizations and data-locality
optimizations
6Samsung Open Source Group
Which companies are contributing?
®
7Samsung Open Source Group
Who is using LLVM?
● Rust
● Android (NDK, RenderScript)
● Portable NativeClient (PNaCl)
● Majority of OpenCL implementations based on
Clang/LLVM
● CUDA
● LLVM on Linux: LLVMLinux, LLVMpipe (software
rasterizer in Mesa), AMDGPU drivers in Mesa
8Samsung Open Source Group
Clang users
● Default compiler on macOS
● Default compiler on FreeBSD
● Default compiler for native applications on Tizen
● Default compiler on OpenMandriva Lx 3.0
● Debian experimenting with Clang as an additional
compiler (94.4% of ~24.5k packages successfully built with Clang 3.8.1)
● Android NDK defaults to Clang
9Samsung Open Source Group
LLVM Overview
10Samsung Open Source Group
LLVM
● LLVM IR (Intermediate Representation)
● Scalar optimizations
● Interprocedural optimizations
● Auto-vectorizer (BB, Loop and SLP)
● Profile-guided optimizations
11Samsung Open Source Group
Compiler architecture
C Frontend
C++ Frontend
Fortran Frontend
Optimizer
x86 Backend
ARM Backend
MIPS Backend
12Samsung Open Source Group
Compilation steps
● Many steps involved in the translation from C source code to machine code:
– Frontend:
● Lexing, Parsing, AST (Abstract Syntax Tree) construction
● Translation to LLVM IR
– Middle-end
● Target-independent optimizations (Analyses & Transformations)
– Backend:
●
Translation into a DAG (Directed Acyclic Graph)
●
Instruction selection: Pattern matching on the DAG
● Instruction scheduling: Assigning an order of execution
● Register allocation: Trying to reduce memory traffic
13Samsung Open Source Group
LLVM Intermediate Representation
● The representation of the middle-end
● The majority of optimizations is done at LLVM IR level
● Low-level representation which carries type information
● RISC-like three-address code in static single assignment
form (SSA) with an infinite number of virtual registers
● Three different formats: bitcode (compact on-disk format),
in-memory representation and textual representation
(LLVM assembly language)
14Samsung Open Source Group
LLVM IR Overview
● Arithmetic: add, sub, mul, udiv, sdiv, ...
– %tmp = add i32 %indvar, -512
● Logical operations: shl, lshr, ashr, and, or, xor
– %shr21 = ashr i32 %mul20, 8
● Memory access: load, store, alloca, getelementptr
– %tmp3 = load i64* %tmp2
● Comparison: icmp, select
– %cmp12 = icmp slt i32 %add, 1024
● Control flow: call, ret, br, switch, ...
– call void @foo(i32 %phitmp)
● Types: integer, floating point, vector, structure, array, ...
– i32, i342, double, <4 x float>, {i8, <2 x i16>}, [40 x i32]
15Samsung Open Source Group
Target-independent code generator
● Part of the backend
● Domain specific language to describe the instruction set,
register file, calling conventions (TableGen)
● Pattern matcher is generated automatically
● Backend is a mix of C++ and TableGen
● Usually generates assembly code, direct machine code
emission is also possible
16Samsung Open Source Group
Clang
17Samsung Open Source Group
Clang
● Goals:
– Fast compile time
– Low memory usage
– GCC compatibility
– Expressive diagnostics
● Several tools built on top of Clang:
– Clang static analyzer
– clang-format, clang-tidy
18Samsung Open Source Group
Clang Static Analyzer
● Part of Clang
● Tries to find bugs without executing the program
● Slower than compilation
● False positives
● Source annotations
● Works best on C code
● Runs from the commandline (scan-build), web interface
for results
19Samsung Open Source Group
Clang Static Analyzer
● Core Checkers
● C++ Checkers
● Dead Code Checkers
● Security Checkers
● Unix Checkers
20Samsung Open Source Group
Clang Static Analyzer
21Samsung Open Source Group
Clang Static Analyzer
22Samsung Open Source Group
Clang Static Analyzer - Example
...
23Samsung Open Source Group
Clang Static Analyzer - Example
24Samsung Open Source Group
Clang Static Analyzer - Example
25Samsung Open Source Group
clang-format
● Automatic code formatting
● Consistent coding style is important
● Developers spend a lot of time on code formatting (e.g.
requesting trivial formatting changes in reviews)
● Supports different coding conventions (~80 settings)
● Includes configurations for LLVM, Google, Chromium,
Mozilla and WebKit coding conventions
26Samsung Open Source Group
clang-format
● Once the codebase is "clang-format clean" the coding
conventions can be enforced automatically
● Simplifies reformatting after automated refactorings
● Uses the Clang lexer
● Supports the following programming languages: C/C++,
Java, JavaScript, Objective-C and Protobuf
27Samsung Open Source Group
clang-tidy
● Detect bug prone coding patterns
● Enforce coding conventions
● Advocate modern and maintainable code
● Checks can be more expensive than compilation
● Currently 136 different checks
● Can run static analyzer checks as well
28Samsung Open Source Group
Sanitizers
● LLVM/Clang-based Sanitizer projects:
– AddressSanitizer – Fast memory error detector
– ThreadSanitizer – Detects data races
– LeakSanitizer – Memory leak detector
– MemorySanitizer – Detects reads of uninitialized variables
– UBSanitizer – Detects undefined behavior
29Samsung Open Source Group
AddressSanitizer: Stack Buffer Overflow
int main(int argc, char **argv) {
int stack_array[100];
stack_array[1] = 0;
return stack_array[argc + 100];
}
Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
$ clang++ -O1 -fsanitize=address a.cc; ./a.out
==10589== ERROR: AddressSanitizer stack-buffer-overflow
READ of size 4 at 0x7f5620d981b4 thread T0
#0 0x4024e8 in main a.cc:4
Address 0x7f5620d981b4 is located at offset 436 in frame
<main> of T0's stack:
This frame has 1 object(s):
[32, 432) 'stack_array'
30Samsung Open Source Group
AddressSanitizer: Use-After-Free
int main(int argc, char **argv) {
int *array = new int[100];
delete [] array;
return array[argc];
}
$ clang++ -O1 -fsanitize=address a.cc && ./a.out
==30226== ERROR: AddressSanitizer heap-use-after-free
READ of size 4 at 0x7faa07fce084 thread T0
#0 0x40433c in main a.cc:4
0x7faa07fce084 is located 4 bytes inside of 400-byte region
freed by thread T0 here:
#0 0x4058fd in operator delete[](void*) _asan_rtl_
#1 0x404303 in main a.cc:3
previously allocated by thread T0 here:
#0 0x405579 in operator new[](unsigned long) _asan_rtl_
#1 0x4042f3 in main a.cc:2
Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
31Samsung Open Source Group
AddressSanitizer: Stack-Use-After-Return
int main() {
LeakLocal();
return *g;
}
$ clang++ -g -fsanitize=address a.cc
$ ASAN_OPTIONS=detect_stack_use_after_return=1 ./a.out
==19177==ERROR: AddressSanitizer: stack-use-after-return
READ of size 4 at 0x7f473d0000a0 thread T0
#0 0x461ccf in main a.cc:8
Address is located in stack of thread T0 at offset 32 in frame
#0 0x461a5f in LeakLocal() a.cc:2
This frame has 1 object(s):
[32, 36) 'local' <== Memory access at offset 32
int *g;
void LeakLocal() {
int local;
g = &local;
}
Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
32Samsung Open Source Group
MemorySanitizer: Uninitialized Data
int main(int argc, char **argv) {
int x[10];
x[0] = 1;
return x[argc];
}
$ clang -fsanitize=memory a.c -g; ./a.out
WARNING: Use of uninitialized value
#0 0x7f1c31f16d10 in main a.cc:4
Uninitialized value was created by an
allocation of 'x' in the stack frame of
function 'main'
Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
33Samsung Open Source Group
UBSanitizer: Integer Overflow
int main(int argc, char **argv) {
int t = argc << 16;
return t * t;
}
$ clang -fsanitize=undefined a.cc -g; ./a.out
a.cc:3:12: runtime error:
signed integer overflow: 65536 * 65536
cannot be represented in type 'int'
Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
34Samsung Open Source Group
UBSanitizer: Invalid Shift
int main(int argc, char **argv) {
return (1 << (32 * argc)) == 0;
}
$ clang -fsanitize=undefined a.cc -g; ./a.out
a.cc:2:13: runtime error: shift exponent 32 is
too large for 32-bit type 'int'
Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
35Samsung Open Source Group
LibFuzzer
● Coverage-guided fuzz testing
● Coverage data provided by SanitizerCoverage (very low
overhead, tracking of function-level coverage causes no
measurable overhead)
● Best used in combination with the different Sanitizers
● LLVM project has bots which are fuzzing clang-format
and Clang continuously
36Samsung Open Source Group
IDEs/code browsers using Clang
● Code browsers:
– SourceWeb
– Woboq Code Browser
– Coati
– Doxygen
● Editor plugins:
– YouCompleteMe
– clang_complete
– rtags
● IDEs:
– KDevelop
– Qt Creator
– CodeLite
– Geany
37Samsung Open Source Group
Summary
38Samsung Open Source Group
Summary
● Great compiler infrastructure
● Fast C/C++ compiler with expressive diagnostics
● Bug detection at compile time
● Automated formatting of code
● Detect bugs early with Sanitizers
● Highly accurate source code browsing, code completion
39Samsung Open Source Group
Give it a try!
● Visit llvm.org
● Distributions with Clang/LLVM packages:
– Fedora
– Debian/Ubuntu
– openSUSE
– Arch Linux
– ...and many more
Thank you.
40Samsung Open Source Group
41Samsung Open Source Group
Contact Information:
Tilmann Scheller
t.scheller@samsung.com
Samsung Open Source Group
Samsung Research UK
42Samsung Open Source Group
Example
zx = zy = zx2 = zy2 = 0;
for (; iter < max_iter && zx2 + zy2 < 4; iter++) {
zy = 2 * zx * zy + y;
zx = zx2 - zy2 + x;
zx2 = zx * zx;
zy2 = zy * zy;
}
43Samsung Open Source Group
Example
zx = zy = zx2 = zy2 = 0;
for (; iter < max_iter && zx2 + zy2 < 4; iter++) {
zy = 2 * zx * zy + y;
zx = zx2 - zy2 + x;
zx2 = zx * zx;
zy2 = zy * zy;
}
loop:
%zy2.06 = phi double [ %8, %loop ], [ 0.000000e+00, %preheader ]
%zx2.05 = phi double [ %7, %loop ], [ 0.000000e+00, %preheader ]
%zy.04 = phi double [ %4, %loop ], [ 0.000000e+00, %preheader ]
%zx.03 = phi double [ %6, %loop ], [ 0.000000e+00, %preheader ]
%iter.02 = phi i32 [ %9, %loop ], [ 0, %.lr.ph.preheader ]
%2 = fmul double %zx.03, 2.000000e+00
%3 = fmul double %2, %zy.04
%4 = fadd double %3, %y
%5 = fsub double %zx2.05, %zy2.06
%6 = fadd double %5, %x
%7 = fmul double %6, %6
%8 = fmul double %4, %4
%9 = add i32 %iter.02, 1
%10 = icmp ult i32 %9, %max_iter
%11 = fadd double %7, %8
%12 = fcmp olt double %11, 4.000000e+00
%or.cond = and i1 %10, %12
br i1 %or.cond, label %loop, label %loopexit
44Samsung Open Source Group
Example
loop:
// zx = zy = zx2 = zy2 = 0;
%zy2.06 = phi double [ %8, %loop ], [ 0.000000e+00, %preheader ]
%zx2.05 = phi double [ %7, %loop ], [ 0.000000e+00, %preheader ]
%zy.04 = phi double [ %4, %loop ], [ 0.000000e+00, %preheader ]
%zx.03 = phi double [ %6, %loop ], [ 0.000000e+00, %preheader ]
%iter.02 = phi i32 [ %9, %loop ], [ 0, %preheader ]
// zy = 2 * zx * zy + y;
%2 = fmul double %zx.03, 2.000000e+00
%3 = fmul double %2, %zy.04
%4 = fadd double %3, %y
// zx = zx2 - zy2 + x;
%5 = fsub double %zx2.05, %zy2.06
%6 = fadd double %5, %x
// zx2 = zx * zx;
%7 = fmul double %6, %6
// zy2 = zy * zy;
%8 = fmul double %4, %4
// iter++
%9 = add i32 %iter.02, 1
// iter < max_iter
%10 = icmp ult i32 %9, %max_iter
// zx2 + zy2 < 4
%11 = fadd double %7, %8
%12 = fcmp olt double %11, 4.000000e+00
// &&
%or.cond = and i1 %10, %12
br i1 %or.cond, label %loop, label %loopexit
zx = zy = zx2 = zy2 = 0;
for (;
iter < max_iter
&& zx2 + zy2 < 4;
iter++) {
zy = 2 * zx * zy + y;
zx = zx2 - zy2 + x;
zx2 = zx * zx;
zy2 = zy * zy;
}
45Samsung Open Source Group
Example .LBB0_2:
@ d17 = 2 * zx
vadd.f64 d17, d12, d12
@ iter < max_iter
cmp r1, r0
@ d17 = (2 * zx) * zy
vmul.f64 d17, d17, d11
@ d18 = zx2 - zy2
vsub.f64 d18, d10, d8
@ d12 = (zx2 – zy2) + x
vadd.f64 d12, d18, d0
@ d11 = (2 * zx * zy) + y
vadd.f64 d11, d17, d9
@ zx2 = zx * zx
vmul.f64 d10, d12, d12
@ zy2 = zy * zy
vmul.f64 d8, d11, d11
bhs .LBB0_5
@ BB#3:
@ zx2 + zy2
vadd.f64 d17, d10, d8
@ iter++
adds r1, #1
@ zx2 + zy2 < 4
vcmpe.f64 d17, d16
vmrs APSR_nzcv, fpscr
bmi .LBB0_2
b .LBB0_5
zx = zy = zx2 = zy2 = 0;
for (;
iter < max_iter
&& zx2 + zy2 < 4;
iter++) {
zy = 2 * zx * zy + y;
zx = zx2 - zy2 + x;
zx2 = zx * zx;
zy2 = zy * zy;
}
Ad

More Related Content

What's hot (20)

CMake - Introduction and best practices
CMake - Introduction and best practicesCMake - Introduction and best practices
CMake - Introduction and best practices
Daniel Pfeifer
 
LLVM
LLVMLLVM
LLVM
guest3e5046
 
QEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded DevelopmentQEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded Development
GlobalLogic Ukraine
 
GCC, GNU compiler collection
GCC, GNU compiler collectionGCC, GNU compiler collection
GCC, GNU compiler collection
Alberto Bustamante Reyes
 
GCC
GCCGCC
GCC
Kir Chou
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Igor Anishchenko
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
Bhavesh Padharia
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Works
Zhen Wei
 
OpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel ComputingOpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel Computing
João Paulo Leonidas Fernandes Dias da Silva
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
Databricks
 
Insecure coding in C (and C++)
Insecure coding in C (and C++)Insecure coding in C (and C++)
Insecure coding in C (and C++)
Olve Maudal
 
Hands-on Helm
Hands-on Helm Hands-on Helm
Hands-on Helm
Docker, Inc.
 
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
Linaro
 
Interpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratchInterpreter, Compiler, JIT from scratch
Interpreter, Compiler, JIT from scratch
National Cheng Kung University
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Frederik Mogensen
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421
Linaro
 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
Jeeva Chelladhurai
 
Qemu Introduction
Qemu IntroductionQemu Introduction
Qemu Introduction
Chiawei Wang
 
When apache pulsar meets apache flink
When apache pulsar meets apache flinkWhen apache pulsar meets apache flink
When apache pulsar meets apache flink
StreamNative
 
Introduction to SLURM
Introduction to SLURMIntroduction to SLURM
Introduction to SLURM
CSUC - Consorci de Serveis Universitaris de Catalunya
 
CMake - Introduction and best practices
CMake - Introduction and best practicesCMake - Introduction and best practices
CMake - Introduction and best practices
Daniel Pfeifer
 
QEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded DevelopmentQEMU and Raspberry Pi. Instant Embedded Development
QEMU and Raspberry Pi. Instant Embedded Development
GlobalLogic Ukraine
 
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased ComparisonThrift vs Protocol Buffers vs Avro - Biased Comparison
Thrift vs Protocol Buffers vs Avro - Biased Comparison
Igor Anishchenko
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
Bhavesh Padharia
 
from Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Worksfrom Binary to Binary: How Qemu Works
from Binary to Binary: How Qemu Works
Zhen Wei
 
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
A Tale of Three Deep Learning Frameworks: TensorFlow, Keras, & PyTorch with B...
Databricks
 
Insecure coding in C (and C++)
Insecure coding in C (and C++)Insecure coding in C (and C++)
Insecure coding in C (and C++)
Olve Maudal
 
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, InternalsLAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
Linaro
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421
Linaro
 
When apache pulsar meets apache flink
When apache pulsar meets apache flinkWhen apache pulsar meets apache flink
When apache pulsar meets apache flink
StreamNative
 

Similar to Clang: More than just a C/C++ Compiler (20)

Where is LLVM Being Used Today?
Where is LLVM Being Used Today? Where is LLVM Being Used Today?
Where is LLVM Being Used Today?
Samsung Open Source Group
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation GuideBKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
Linaro
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
Samsung Open Source Group
 
不深不淺,帶你認識 LLVM (Found LLVM in your life)
不深不淺,帶你認識 LLVM (Found LLVM in your life)不深不淺,帶你認識 LLVM (Found LLVM in your life)
不深不淺,帶你認識 LLVM (Found LLVM in your life)
Douglas Chen
 
LCU14 209- LLVM Linux
LCU14 209- LLVM LinuxLCU14 209- LLVM Linux
LCU14 209- LLVM Linux
Linaro
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016
maiktoepfer
 
Static Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with CoverityStatic Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with Coverity
Samsung Open Source Group
 
Andriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tipsAndriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tips
OWASP Kyiv
 
Onnc intro
Onnc introOnnc intro
Onnc intro
Luba Tang
 
Adventures in Thread-per-Core Async with Redpanda and Seastar
Adventures in Thread-per-Core Async with Redpanda and SeastarAdventures in Thread-per-Core Async with Redpanda and Seastar
Adventures in Thread-per-Core Async with Redpanda and Seastar
ScyllaDB
 
Js on-microcontrollers
Js on-microcontrollersJs on-microcontrollers
Js on-microcontrollers
Seo-Young Hwang
 
Design and Implementation of the Security Graph Language
Design and Implementation of the Security Graph LanguageDesign and Implementation of the Security Graph Language
Design and Implementation of the Security Graph Language
Asankhaya Sharma
 
Two C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp InsightsTwo C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp Insights
Alison Chaiken
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
Xiaozhe Wang
 
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
ScyllaDB
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
Kynetics
 
HKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewHKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overview
Linaro
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin
敬倫 林
 
Ruxmon.2013-08.-.CodeBro!
Ruxmon.2013-08.-.CodeBro!Ruxmon.2013-08.-.CodeBro!
Ruxmon.2013-08.-.CodeBro!
Christophe Alladoum
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation GuideBKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
Linaro
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of ThingsJerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Things
Samsung Open Source Group
 
不深不淺,帶你認識 LLVM (Found LLVM in your life)
不深不淺,帶你認識 LLVM (Found LLVM in your life)不深不淺,帶你認識 LLVM (Found LLVM in your life)
不深不淺,帶你認識 LLVM (Found LLVM in your life)
Douglas Chen
 
LCU14 209- LLVM Linux
LCU14 209- LLVM LinuxLCU14 209- LLVM Linux
LCU14 209- LLVM Linux
Linaro
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016
maiktoepfer
 
Static Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with CoverityStatic Analysis of Your OSS Project with Coverity
Static Analysis of Your OSS Project with Coverity
Samsung Open Source Group
 
Andriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tipsAndriy Shalaenko - GO security tips
Andriy Shalaenko - GO security tips
OWASP Kyiv
 
Adventures in Thread-per-Core Async with Redpanda and Seastar
Adventures in Thread-per-Core Async with Redpanda and SeastarAdventures in Thread-per-Core Async with Redpanda and Seastar
Adventures in Thread-per-Core Async with Redpanda and Seastar
ScyllaDB
 
Design and Implementation of the Security Graph Language
Design and Implementation of the Security Graph LanguageDesign and Implementation of the Security Graph Language
Design and Implementation of the Security Graph Language
Asankhaya Sharma
 
Two C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp InsightsTwo C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp Insights
Alison Chaiken
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling ToolsTIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
TIP1 - Overview of C/C++ Debugging/Tracing/Profiling Tools
Xiaozhe Wang
 
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them AllScylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
Scylla Summit 2022: ScyllaDB Rust Driver: One Driver to Rule Them All
ScyllaDB
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
Kynetics
 
HKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overviewHKG15-300: Art's Quick Compiler: An unofficial overview
HKG15-300: Art's Quick Compiler: An unofficial overview
Linaro
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin
敬倫 林
 
Ad

More from Samsung Open Source Group (20)

The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
Samsung Open Source Group
 
Easy IoT with JavaScript
Easy IoT with JavaScriptEasy IoT with JavaScript
Easy IoT with JavaScript
Samsung Open Source Group
 
Spawny: A New Approach to Logins
Spawny: A New Approach to LoginsSpawny: A New Approach to Logins
Spawny: A New Approach to Logins
Samsung Open Source Group
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
Samsung Open Source Group
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Samsung Open Source Group
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
Samsung Open Source Group
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
Samsung Open Source Group
 
GENIVI + OCF Cooperation
GENIVI + OCF CooperationGENIVI + OCF Cooperation
GENIVI + OCF Cooperation
Samsung Open Source Group
 
Framework for IoT Interoperability
Framework for IoT InteroperabilityFramework for IoT Interoperability
Framework for IoT Interoperability
Samsung Open Source Group
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
Samsung Open Source Group
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
Samsung Open Source Group
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
Samsung Open Source Group
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Samsung Open Source Group
 
IoTivity: From Devices to the Cloud
IoTivity: From Devices to the CloudIoTivity: From Devices to the Cloud
IoTivity: From Devices to the Cloud
Samsung Open Source Group
 
SOSCON 2016 JerryScript
SOSCON 2016 JerryScriptSOSCON 2016 JerryScript
SOSCON 2016 JerryScript
Samsung Open Source Group
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
Run Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT NetworkRun Your Own 6LoWPAN Based IoT Network
Run Your Own 6LoWPAN Based IoT Network
Samsung Open Source Group
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Samsung Open Source Group
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
Samsung Open Source Group
 
Introduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential CollaborationIntroduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential Collaboration
Samsung Open Source Group
 
The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)The Complex IoT Equation (and FLOSS solutions)
The Complex IoT Equation (and FLOSS solutions)
Samsung Open Source Group
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
Samsung Open Source Group
 
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT DevicesTizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Tizen RT: A Lightweight RTOS Platform for Low-End IoT Devices
Samsung Open Source Group
 
IoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and BeyondIoTivity: Smart Home to Automotive and Beyond
IoTivity: Smart Home to Automotive and Beyond
Samsung Open Source Group
 
IoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorialIoTivity for Automotive: meta-ocf-automotive tutorial
IoTivity for Automotive: meta-ocf-automotive tutorial
Samsung Open Source Group
 
Open Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate StrategyOpen Source Metrics to Inform Corporate Strategy
Open Source Metrics to Inform Corporate Strategy
Samsung Open Source Group
 
IoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT InteroperabilityIoTivity for Automotive IoT Interoperability
IoTivity for Automotive IoT Interoperability
Samsung Open Source Group
 
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
JerryScript: An ultra-lighteweight JavaScript Engine for the Internet of Thin...
Samsung Open Source Group
 
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux DeviceAdding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Adding IEEE 802.15.4 and 6LoWPAN to an Embedded Linux Device
Samsung Open Source Group
 
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivityIoT: From Arduino Microcontrollers to Tizen Products using IoTivity
IoT: From Arduino Microcontrollers to Tizen Products using IoTivity
Samsung Open Source Group
 
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under LinuxPractical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Practical Guide to Run an IEEE 802.15.4 Network with 6LoWPAN Under Linux
Samsung Open Source Group
 
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/LinuxIoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
IoTivity Tutorial: Prototyping IoT Devices on GNU/Linux
Samsung Open Source Group
 
Introduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential CollaborationIntroduction to Linux-wpan and Potential Collaboration
Introduction to Linux-wpan and Potential Collaboration
Samsung Open Source Group
 
Ad

Recently uploaded (20)

Innovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at allInnovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at all
ayeshakanwal75
 
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
Imma Valls Bernaus
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Tools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google CertificateTools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Microsoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptxMicrosoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptx
Mekonnen
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Innovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at allInnovative Approaches to Software Dev no good at all
Innovative Approaches to Software Dev no good at all
ayeshakanwal75
 
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
🌱 Green Grafana 🌱 Essentials_ Data, Visualizations and Plugins.pdf
Imma Valls Bernaus
 
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025Why Orangescrum Is a Game Changer for Construction Companies in 2025
Why Orangescrum Is a Game Changer for Construction Companies in 2025
Orangescrum
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]Get & Download Wondershare Filmora Crack Latest [2025]
Get & Download Wondershare Filmora Crack Latest [2025]
saniaaftab72555
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Top 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docxTop 10 Client Portal Software Solutions for 2025.docx
Top 10 Client Portal Software Solutions for 2025.docx
Portli
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Tools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google CertificateTools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
Interactive odoo dashboards for sales, CRM , Inventory, Invoice, Purchase, Pr...
AxisTechnolabs
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Microsoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptxMicrosoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptx
Mekonnen
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 

Clang: More than just a C/C++ Compiler

  • 1. 1Samsung Open Source Group Clang: Much more than just a C/C++ Compiler Tilmann Scheller Principal Compiler Engineer [email protected] Samsung Open Source Group Samsung Research UK LinuxCon Europe 2016 Berlin, Germany, October 4 – 6, 2016
  • 2. 2Samsung Open Source Group Overview ● Introduction ● LLVM Overview ● Clang ● Summary
  • 3. 3Samsung Open Source Group Introduction
  • 4. 4Samsung Open Source Group What is LLVM? ● Mature, production-quality compiler framework ● Modular architecture ● Heavily optimizing static and dynamic compiler ● Supports all major architectures (x86, ARM, MIPS, PowerPC, …) ● Powerful link-time optimizations (LTO) ● Permissive license (BSD-like)
  • 5. 5Samsung Open Source Group LLVM sub-projects ● Clang C/C++/Objective C frontend and static analyzer ● LLDB Next generation debugger leveraging the LLVM libraries, e.g. the Clang expression parser ● lld Framework for creating linkers, will make Clang independent of the system linker in the future ● Polly Polyhedral optimizer for LLVM, e.g. high-level loop optimizations and data-locality optimizations
  • 6. 6Samsung Open Source Group Which companies are contributing? ®
  • 7. 7Samsung Open Source Group Who is using LLVM? ● Rust ● Android (NDK, RenderScript) ● Portable NativeClient (PNaCl) ● Majority of OpenCL implementations based on Clang/LLVM ● CUDA ● LLVM on Linux: LLVMLinux, LLVMpipe (software rasterizer in Mesa), AMDGPU drivers in Mesa
  • 8. 8Samsung Open Source Group Clang users ● Default compiler on macOS ● Default compiler on FreeBSD ● Default compiler for native applications on Tizen ● Default compiler on OpenMandriva Lx 3.0 ● Debian experimenting with Clang as an additional compiler (94.4% of ~24.5k packages successfully built with Clang 3.8.1) ● Android NDK defaults to Clang
  • 9. 9Samsung Open Source Group LLVM Overview
  • 10. 10Samsung Open Source Group LLVM ● LLVM IR (Intermediate Representation) ● Scalar optimizations ● Interprocedural optimizations ● Auto-vectorizer (BB, Loop and SLP) ● Profile-guided optimizations
  • 11. 11Samsung Open Source Group Compiler architecture C Frontend C++ Frontend Fortran Frontend Optimizer x86 Backend ARM Backend MIPS Backend
  • 12. 12Samsung Open Source Group Compilation steps ● Many steps involved in the translation from C source code to machine code: – Frontend: ● Lexing, Parsing, AST (Abstract Syntax Tree) construction ● Translation to LLVM IR – Middle-end ● Target-independent optimizations (Analyses & Transformations) – Backend: ● Translation into a DAG (Directed Acyclic Graph) ● Instruction selection: Pattern matching on the DAG ● Instruction scheduling: Assigning an order of execution ● Register allocation: Trying to reduce memory traffic
  • 13. 13Samsung Open Source Group LLVM Intermediate Representation ● The representation of the middle-end ● The majority of optimizations is done at LLVM IR level ● Low-level representation which carries type information ● RISC-like three-address code in static single assignment form (SSA) with an infinite number of virtual registers ● Three different formats: bitcode (compact on-disk format), in-memory representation and textual representation (LLVM assembly language)
  • 14. 14Samsung Open Source Group LLVM IR Overview ● Arithmetic: add, sub, mul, udiv, sdiv, ... – %tmp = add i32 %indvar, -512 ● Logical operations: shl, lshr, ashr, and, or, xor – %shr21 = ashr i32 %mul20, 8 ● Memory access: load, store, alloca, getelementptr – %tmp3 = load i64* %tmp2 ● Comparison: icmp, select – %cmp12 = icmp slt i32 %add, 1024 ● Control flow: call, ret, br, switch, ... – call void @foo(i32 %phitmp) ● Types: integer, floating point, vector, structure, array, ... – i32, i342, double, <4 x float>, {i8, <2 x i16>}, [40 x i32]
  • 15. 15Samsung Open Source Group Target-independent code generator ● Part of the backend ● Domain specific language to describe the instruction set, register file, calling conventions (TableGen) ● Pattern matcher is generated automatically ● Backend is a mix of C++ and TableGen ● Usually generates assembly code, direct machine code emission is also possible
  • 16. 16Samsung Open Source Group Clang
  • 17. 17Samsung Open Source Group Clang ● Goals: – Fast compile time – Low memory usage – GCC compatibility – Expressive diagnostics ● Several tools built on top of Clang: – Clang static analyzer – clang-format, clang-tidy
  • 18. 18Samsung Open Source Group Clang Static Analyzer ● Part of Clang ● Tries to find bugs without executing the program ● Slower than compilation ● False positives ● Source annotations ● Works best on C code ● Runs from the commandline (scan-build), web interface for results
  • 19. 19Samsung Open Source Group Clang Static Analyzer ● Core Checkers ● C++ Checkers ● Dead Code Checkers ● Security Checkers ● Unix Checkers
  • 20. 20Samsung Open Source Group Clang Static Analyzer
  • 21. 21Samsung Open Source Group Clang Static Analyzer
  • 22. 22Samsung Open Source Group Clang Static Analyzer - Example ...
  • 23. 23Samsung Open Source Group Clang Static Analyzer - Example
  • 24. 24Samsung Open Source Group Clang Static Analyzer - Example
  • 25. 25Samsung Open Source Group clang-format ● Automatic code formatting ● Consistent coding style is important ● Developers spend a lot of time on code formatting (e.g. requesting trivial formatting changes in reviews) ● Supports different coding conventions (~80 settings) ● Includes configurations for LLVM, Google, Chromium, Mozilla and WebKit coding conventions
  • 26. 26Samsung Open Source Group clang-format ● Once the codebase is "clang-format clean" the coding conventions can be enforced automatically ● Simplifies reformatting after automated refactorings ● Uses the Clang lexer ● Supports the following programming languages: C/C++, Java, JavaScript, Objective-C and Protobuf
  • 27. 27Samsung Open Source Group clang-tidy ● Detect bug prone coding patterns ● Enforce coding conventions ● Advocate modern and maintainable code ● Checks can be more expensive than compilation ● Currently 136 different checks ● Can run static analyzer checks as well
  • 28. 28Samsung Open Source Group Sanitizers ● LLVM/Clang-based Sanitizer projects: – AddressSanitizer – Fast memory error detector – ThreadSanitizer – Detects data races – LeakSanitizer – Memory leak detector – MemorySanitizer – Detects reads of uninitialized variables – UBSanitizer – Detects undefined behavior
  • 29. 29Samsung Open Source Group AddressSanitizer: Stack Buffer Overflow int main(int argc, char **argv) { int stack_array[100]; stack_array[1] = 0; return stack_array[argc + 100]; } Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html $ clang++ -O1 -fsanitize=address a.cc; ./a.out ==10589== ERROR: AddressSanitizer stack-buffer-overflow READ of size 4 at 0x7f5620d981b4 thread T0 #0 0x4024e8 in main a.cc:4 Address 0x7f5620d981b4 is located at offset 436 in frame <main> of T0's stack: This frame has 1 object(s): [32, 432) 'stack_array'
  • 30. 30Samsung Open Source Group AddressSanitizer: Use-After-Free int main(int argc, char **argv) { int *array = new int[100]; delete [] array; return array[argc]; } $ clang++ -O1 -fsanitize=address a.cc && ./a.out ==30226== ERROR: AddressSanitizer heap-use-after-free READ of size 4 at 0x7faa07fce084 thread T0 #0 0x40433c in main a.cc:4 0x7faa07fce084 is located 4 bytes inside of 400-byte region freed by thread T0 here: #0 0x4058fd in operator delete[](void*) _asan_rtl_ #1 0x404303 in main a.cc:3 previously allocated by thread T0 here: #0 0x405579 in operator new[](unsigned long) _asan_rtl_ #1 0x4042f3 in main a.cc:2 Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
  • 31. 31Samsung Open Source Group AddressSanitizer: Stack-Use-After-Return int main() { LeakLocal(); return *g; } $ clang++ -g -fsanitize=address a.cc $ ASAN_OPTIONS=detect_stack_use_after_return=1 ./a.out ==19177==ERROR: AddressSanitizer: stack-use-after-return READ of size 4 at 0x7f473d0000a0 thread T0 #0 0x461ccf in main a.cc:8 Address is located in stack of thread T0 at offset 32 in frame #0 0x461a5f in LeakLocal() a.cc:2 This frame has 1 object(s): [32, 36) 'local' <== Memory access at offset 32 int *g; void LeakLocal() { int local; g = &local; } Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
  • 32. 32Samsung Open Source Group MemorySanitizer: Uninitialized Data int main(int argc, char **argv) { int x[10]; x[0] = 1; return x[argc]; } $ clang -fsanitize=memory a.c -g; ./a.out WARNING: Use of uninitialized value #0 0x7f1c31f16d10 in main a.cc:4 Uninitialized value was created by an allocation of 'x' in the stack frame of function 'main' Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
  • 33. 33Samsung Open Source Group UBSanitizer: Integer Overflow int main(int argc, char **argv) { int t = argc << 16; return t * t; } $ clang -fsanitize=undefined a.cc -g; ./a.out a.cc:3:12: runtime error: signed integer overflow: 65536 * 65536 cannot be represented in type 'int' Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
  • 34. 34Samsung Open Source Group UBSanitizer: Invalid Shift int main(int argc, char **argv) { return (1 << (32 * argc)) == 0; } $ clang -fsanitize=undefined a.cc -g; ./a.out a.cc:2:13: runtime error: shift exponent 32 is too large for 32-bit type 'int' Example from https://linuxplumbersconf.org/2015/ocw/proposals/3261.html
  • 35. 35Samsung Open Source Group LibFuzzer ● Coverage-guided fuzz testing ● Coverage data provided by SanitizerCoverage (very low overhead, tracking of function-level coverage causes no measurable overhead) ● Best used in combination with the different Sanitizers ● LLVM project has bots which are fuzzing clang-format and Clang continuously
  • 36. 36Samsung Open Source Group IDEs/code browsers using Clang ● Code browsers: – SourceWeb – Woboq Code Browser – Coati – Doxygen ● Editor plugins: – YouCompleteMe – clang_complete – rtags ● IDEs: – KDevelop – Qt Creator – CodeLite – Geany
  • 37. 37Samsung Open Source Group Summary
  • 38. 38Samsung Open Source Group Summary ● Great compiler infrastructure ● Fast C/C++ compiler with expressive diagnostics ● Bug detection at compile time ● Automated formatting of code ● Detect bugs early with Sanitizers ● Highly accurate source code browsing, code completion
  • 39. 39Samsung Open Source Group Give it a try! ● Visit llvm.org ● Distributions with Clang/LLVM packages: – Fedora – Debian/Ubuntu – openSUSE – Arch Linux – ...and many more
  • 41. 41Samsung Open Source Group Contact Information: Tilmann Scheller [email protected] Samsung Open Source Group Samsung Research UK
  • 42. 42Samsung Open Source Group Example zx = zy = zx2 = zy2 = 0; for (; iter < max_iter && zx2 + zy2 < 4; iter++) { zy = 2 * zx * zy + y; zx = zx2 - zy2 + x; zx2 = zx * zx; zy2 = zy * zy; }
  • 43. 43Samsung Open Source Group Example zx = zy = zx2 = zy2 = 0; for (; iter < max_iter && zx2 + zy2 < 4; iter++) { zy = 2 * zx * zy + y; zx = zx2 - zy2 + x; zx2 = zx * zx; zy2 = zy * zy; } loop: %zy2.06 = phi double [ %8, %loop ], [ 0.000000e+00, %preheader ] %zx2.05 = phi double [ %7, %loop ], [ 0.000000e+00, %preheader ] %zy.04 = phi double [ %4, %loop ], [ 0.000000e+00, %preheader ] %zx.03 = phi double [ %6, %loop ], [ 0.000000e+00, %preheader ] %iter.02 = phi i32 [ %9, %loop ], [ 0, %.lr.ph.preheader ] %2 = fmul double %zx.03, 2.000000e+00 %3 = fmul double %2, %zy.04 %4 = fadd double %3, %y %5 = fsub double %zx2.05, %zy2.06 %6 = fadd double %5, %x %7 = fmul double %6, %6 %8 = fmul double %4, %4 %9 = add i32 %iter.02, 1 %10 = icmp ult i32 %9, %max_iter %11 = fadd double %7, %8 %12 = fcmp olt double %11, 4.000000e+00 %or.cond = and i1 %10, %12 br i1 %or.cond, label %loop, label %loopexit
  • 44. 44Samsung Open Source Group Example loop: // zx = zy = zx2 = zy2 = 0; %zy2.06 = phi double [ %8, %loop ], [ 0.000000e+00, %preheader ] %zx2.05 = phi double [ %7, %loop ], [ 0.000000e+00, %preheader ] %zy.04 = phi double [ %4, %loop ], [ 0.000000e+00, %preheader ] %zx.03 = phi double [ %6, %loop ], [ 0.000000e+00, %preheader ] %iter.02 = phi i32 [ %9, %loop ], [ 0, %preheader ] // zy = 2 * zx * zy + y; %2 = fmul double %zx.03, 2.000000e+00 %3 = fmul double %2, %zy.04 %4 = fadd double %3, %y // zx = zx2 - zy2 + x; %5 = fsub double %zx2.05, %zy2.06 %6 = fadd double %5, %x // zx2 = zx * zx; %7 = fmul double %6, %6 // zy2 = zy * zy; %8 = fmul double %4, %4 // iter++ %9 = add i32 %iter.02, 1 // iter < max_iter %10 = icmp ult i32 %9, %max_iter // zx2 + zy2 < 4 %11 = fadd double %7, %8 %12 = fcmp olt double %11, 4.000000e+00 // && %or.cond = and i1 %10, %12 br i1 %or.cond, label %loop, label %loopexit zx = zy = zx2 = zy2 = 0; for (; iter < max_iter && zx2 + zy2 < 4; iter++) { zy = 2 * zx * zy + y; zx = zx2 - zy2 + x; zx2 = zx * zx; zy2 = zy * zy; }
  • 45. 45Samsung Open Source Group Example .LBB0_2: @ d17 = 2 * zx vadd.f64 d17, d12, d12 @ iter < max_iter cmp r1, r0 @ d17 = (2 * zx) * zy vmul.f64 d17, d17, d11 @ d18 = zx2 - zy2 vsub.f64 d18, d10, d8 @ d12 = (zx2 – zy2) + x vadd.f64 d12, d18, d0 @ d11 = (2 * zx * zy) + y vadd.f64 d11, d17, d9 @ zx2 = zx * zx vmul.f64 d10, d12, d12 @ zy2 = zy * zy vmul.f64 d8, d11, d11 bhs .LBB0_5 @ BB#3: @ zx2 + zy2 vadd.f64 d17, d10, d8 @ iter++ adds r1, #1 @ zx2 + zy2 < 4 vcmpe.f64 d17, d16 vmrs APSR_nzcv, fpscr bmi .LBB0_2 b .LBB0_5 zx = zy = zx2 = zy2 = 0; for (; iter < max_iter && zx2 + zy2 < 4; iter++) { zy = 2 * zx * zy + y; zx = zx2 - zy2 + x; zx2 = zx * zx; zy2 = zy * zy; }