Difference between revisions of "LDC LLVM profiling instrumentation"

From D Wiki
Jump to: navigation, search
(Fix header hierarchy)
(LLVM intrinsics)
Line 8: Line 8:
 
== LLVM intrinsics ==
 
== LLVM intrinsics ==
  
This was introduced with [http://reviews.llvm.org/rL223672 LLVM commit r223672]
+
These intrinsics were introduced with [http://reviews.llvm.org/rL223672 LLVM commit r223672], and Clang was modified to use them in [http://reviews.llvm.org/rL223683 Clang commit r223683].
  
 
LLVM features two intrinsics for instrumentation:
 
LLVM features two intrinsics for instrumentation:
 
* [http://llvm.org/docs/LangRef.html#llvm-instrprof-increment-intrinsic |llvm.instrprof_increment]
 
* [http://llvm.org/docs/LangRef.html#llvm-instrprof-increment-intrinsic |llvm.instrprof_increment]
 
* [http://llvm.org/docs/LangRef.html#llvm-instrprof-value-profile-intrinsic |llvm.instrprof_value_profile]
 
* [http://llvm.org/docs/LangRef.html#llvm-instrprof-value-profile-intrinsic |llvm.instrprof_value_profile]
 
 
  
 
== Example of Clang's LLVM IR output ==
 
== Example of Clang's LLVM IR output ==
 
[show minimal C code example and Clang's -emit-llvm output for it]
 
[show minimal C code example and Clang's -emit-llvm output for it]

Revision as of 14:22, 21 November 2015

This page functions as a place to collect information and to document how the implementation in LDC is done.

LLVM InstrProf

[describe what and how LLVM supports profile instrumentation]

LLVM intrinsics

These intrinsics were introduced with LLVM commit r223672, and Clang was modified to use them in Clang commit r223683.

LLVM features two intrinsics for instrumentation:

Example of Clang's LLVM IR output

[show minimal C code example and Clang's -emit-llvm output for it]