clang plug-in instrumentation of llvm source code and analysis of function call logs (2)–google mirror

tick_plot__compile.ipynb clang plug-in instrumentation of llvm source code and analysis of function call logs (1) Analysis In and out, chain, out df in and out=df[ df[‘tickKind’].isin( [FuncEnter,FuncReturn] ) ] #In the code, only when the function enters, the chain length is calculated and written to the disk dfin=df[ df[‘tickKind’].isin( [FuncEnter] ) ] df chain=df in […]

clang plug-in instrumentation of llvm source code and analysis of function call logs (1)–google mirror

tick_plot__compile.ipynb Duration boundary_time chain anomaly: long and short function call chain list 0. Use matplotlib to find font files larger than 1MB in the system Chinese fonts are usually very large, so those filtered out usually have Chinese fonts. In the results, the name AR PL UMing CN’ is indeed a Chinese font. from matplotlib.font_manager […]

LLVM- cc1 & llc & lld

cc1 cc1 is a core part of the LLVM toolchain, specifically within the Clang compiler framework. Although developers may not interact directly with it in their daily programming work, understanding how it works is helpful for a deep understanding of the entire compilation process. Definition: cc1 is the actual compiler frontend for Clang. When we […]

github, git, google: clang-front-end plug-in-add curly braces to various “blocks” without curly braces-based on llvm15–clang-plugin-add-brace—–google mirror

Processed statements case Terminology conventions or memos The starting and ending range of case: from the colon to the beginning of the next ‘case’, the abbreviation is: case inside, case content Ast: Abstract syntax tree: abstract syntax tree Case without curly braces If any of the following conditions are true in a case, the case […]

Compile rt-thread using LLVM

LLVM17 has been released, and arm officials have also released the corresponding compiled version 17.01. See the link https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/tags. I have always wanted to use LLVM to replace GCC. , so let’s try it. Note that 17.01 does not come with compiled cfg files for common architectures. I copied them from the 16.0 compressed package […]

LLVM (5) ORC example analysis

ORC example summary Summarize Because there are so many APIs, some logical concepts need to be clarified, which will make coding much easier. The running entity of JIT can be created using LLVMOrcCreateLLJIT, a logical JIT instance. The JIT instance needs to add the runtime library (dependent library) and user-defined context (running content) to run. […]

Ubuntu download source code clang + llvm+lldb compile + install

[This article may involve installing the following tools on Ubuntu:]  A、g + + B. gcc C. make D. cmake E. clang(10.0.1)(required)  F, llvm(10.0.1)(required) G, lldb(10.0.1)(optional) H. libcxx(10.0.1)(required) I. libcxx abi(10.0.1)(required) J. compiler-rt (optional) 【Tired】 I currently have two virtual machines: A. Ubuntu [ubuntu-20.04.1-desktop-amd64.iso], B. fedora [Fedora-Workstation-Live-x86_64-32-1.6.iso]. A can share files with the physical machine normally, […]

Mac M2(arm64) homebrew install llvm

Homebrew directly installed llvm, and encountered a lot of environment configuration problems. I made a simple record for reference. Question Questions include but are not limited to Header file definition problem Undefined symbols for architecture arm64: “_LLVMInitializeAArch64AsmParser”, referenced from: _main in main-83696a.o Target file link problem Undefined symbols for architecture arm64: “_LLVMLinkInMCJIT”, referenced from: __GLOBAL__sub_I_main.cpp […]

Customize the new class sanitizer mechanism in LLVM

0. Compile llvm and clang cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS=clang ../llvm/ If you want to enable more projects, you need to specify the LLVM_ENABLE_RUNTIMES environment variable: -DLLVM_ENABLE_RUNTIMES=”libcxx;libcxxabi” -DLLVM_ENABLE_RUNTIMES=”libcxx;libcxxabi” cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS=“clang;compiler-rt;lld;libcxx;libcxxabi” …/llvm/ Compile directly with the following command: cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=host -DLLVM_ENABLE_PROJECTS=“clang;compiler-rt” …/llvm/ More command references: [1]: https://llvm.org/docs/CMake.html [2]: https://llvm.org/docs/CMake.html#llvm-related-variables [3]: https://github.com/vusec/fuzzbench-snappy/blob/0f2cab6dc1cf8335035f9d5f0eed8b0c58189821/fuzzers/snappy/builder.Dockerfile 1. About Transformation […]