LLVM's Realtime Safety Revolution: Tools for Modern Mission Critical SystemsLLVM’s Real-time Safety Revolution Tools for Modern Mission Critical SystemsChris Apple ● 10-year veteran of the audio industry ● Previously Dolby, Roblox, Spatial Inc. ● Currently: layabout David INTERCEPTOR (void *, malloc, size_t size) { return REAL(malloc)(size); } LLVM Intermediate Representation (IR) compilation step lightweight runtime library void __rtsan_realtime_enter() { . each tool outside of LLVM ContrastAgenda 1. Run time vs compile time 2. False negatives and false positives 3. Cost 4. Disabling each tool 5. Using each tool outside of LLVM ContrastRun time Compile0 码力 | 153 页 | 1.38 MB | 6 月前3
Just-In-Time Compilation: The Next Big Thing11HOW IT WORKS? - DETAILS HOW IT WORKS? - DETAILS HTTPS://GITHUB.COM/HFINKEL/LLVM-PROJECT-CXXJIT HTTPS://GITHUB.COM/HFINKEL/LLVM-PROJECT-CXXJIT 5 . 12EXAMPLES: C++20 AND BEYOND EXAMPLES: C++20 AND BEYOND LIBRARY/BINARY * INTERMEDIATE REPRESENTATION (IR) * INTERMEDIATE REPRESENTATION (IR) template[[clang::jit(R"(CXXFLAGS="-O3 -DNDEBUG", out="dispatch.ir*")")] 6 . 11SAVE LIBRARY/BINARY SAVE LIBRARY/BINARY LIBRARY/BINARY * INTERMEDIATE REPRESENTATION (IR) * INTERMEDIATE REPRESENTATION (IR) template [[clang::jit(R"(CXXFLAGS="-O3 -DNDEBUG", out="dispatch.ir*")")] auto dispatch(int id) -> void { 0 码力 | 222 页 | 5.45 MB | 6 月前3
Just-in-Time Compilation - J F Bastien - CppCon 2020Smalltalk. It discussed “macro-expansion of v-code into n-code, with caching”, in other words there’s an IR before machine code.SELF Optimizing Dynamically-Typed Object- Oriented Languages With Polymorphic intermediate representation (IR) of a method is a standard process. When compiling from Java bytecode, however, we can eliminate that overhead. The bytecodes themselves are an IR. Because they are primarily primarily designed to be compact and to facilitate interpretation, they are not the ideal IR for compilation, but they can easily be used for that purpose. — 1997 (read)Compiling Java just in time Avoiding0 码力 | 111 页 | 3.98 MB | 6 月前3
Khronos APIs for Heterogeneous Compute and Safety: SYCL and SYCL SCC++14 C++17 C++20 OpenCL 3.0 C++23SYCL IMPLEMENTATIONS IN DEVELOPMENT Source Code DPC++ Uses LLVM/Clang Part of oneAPI hipSYCL Multiple Backends Any CPU Intel CPUs Intel GPUs Intel FPGAs AMD GPUs CPUs NEC VEs neoSYCL SX-AURORA TSUBASA TBB Any CPU Samsung PIMS XILINX Versal ACAP LLVM IR FPGA LLVM IR HLS Experimental DPC++ fork DPC++ fork MLIR Inteon Poligeist SYCL MLIR Bisheng https://godbolt.org/z/zexn nr4ne “Compiler explorer is more fun than work”, Chris Gearing, MobileyeSYCL IR ON COMPILER EXPLORERhttps://godbolt.org/z/jdhKr7e5rExpressiveness and simplicity for heterogeneous0 码力 | 82 页 | 3.35 MB | 6 月前3
Cetting Started with C++Compiler Toolchains Clang/LLVM clang / clang++ Creates object files (.o) lld Creates executables and shared libraries (.so) ar Creates static libraries (.a) llvm Attaches to processes and Compiler Toolchains Clang/LLVM https://github.com/llvm/llvm-project/releases Building from source Repository git clone https://github.com/llvm/llvm-project.git https://llvm.org/docs/GettingStarted.html#getti Compiler Toolchains Clang/LLVM Ubuntu sudo apt-get install clang Windows MSYS - pacman -S mingw-w64-x86_64-clang macOS Install Xcode Apple Clang is not quite Clang/LLVM sudo port install clang-16Tools0 码力 | 95 页 | 4.71 MB | 6 月前3
Object Lifetime: From Start to Finish<< ")" << endl; } ~Foo() { cout << "~Foo(" << m_i << ")" << endl; } int i() { return m_i; } int& iR() { return m_i; } int m_i; }; 1 2 3 4 5 6 7 8 9 https://godbolt.org/z/rbK1sP8n9 168using << ")" << endl; } ~Foo() { cout << "~Foo(" << m_i << ")" << endl; } int i() { return m_i; } int& iR() { return m_i; } int m_i; }; 1 2 3 4 5 6 7 8 9 https://godbolt.org/z/rbK1sP8n9 169using << ")" << endl; } ~Foo() { cout << "~Foo(" << m_i << ")" << endl; } int i() { return m_i; } int& iR() { return m_i; } int m_i; }; 1 2 3 4 5 6 7 8 9 https://godbolt.org/z/rbK1sP8n9 170using0 码力 | 214 页 | 9.34 MB | 6 月前3
Mastering C++ Modules-- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /Users/hoffman/Work/llvm/llvm-inst/bin/clang++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - $hoffman@caprica b % ninja -v [1/10] "/Users/hoffman/Work/llvm/llvm-inst/bin/clang-scan-deps" -format=p1689 -- /Users/hoffman/Work/llvm/llvm-inst/bin/clang++ -std=gnu++20 -arch arm64 -isysroot /Li ules/simple/main.cxx -c -o CMakeFiles/hello.dir/main.cxx.o -resource-dir "/Users/hoffman/Work/llvm/llvm-inst/lib/clang/20" -MT CMakeFiles/hello.dir/main.cxx.o.ddi -MD -MF CMakeFiles/hello.dir/main.cxx0 码力 | 77 页 | 9.07 MB | 6 月前3
2020: The Year of Sanitizers?try dynamic/runtime analysis. After years of improvements and successes for Clang and GCC users, LLVM AddressSanitizer (ASan) is finally available on Windows, in the latest Visual Studio 2019 versions Sanitizers?18 2020 Victor Ciura | @ciura_victor - 2020: The Year of Sanitizers? clang-tidy clang.llvm.org/extra/clang-tidy/checks/list.html ~ 300 checks19 clang-tidy modernize-use-nullptr modernize-loop-convert clang-tidy checks 2020 Victor Ciura | @ciura_victor - 2020: The Year of Sanitizers?23 https://clang.llvm.org/extra/clang-tidy/checks/bugprone-dangling-handle.html clang-tidy bugprone-dangling-handle 〝0 码力 | 135 页 | 27.77 MB | 6 月前3
Practical memory pool based allocators for Modern C++information injected by the allocator we need to: ● Compile the code with clang into LLVM bitcode ● Implement a custom LLVM pass(es) which would be able to: ○ Compose the list of all unique allocation types memory pool definitions ● Run the pass on the bitcode using the LLVM opt tool © 2020 Apex.AI, Inc.Compile the code with clang into LLVM bitcode ● The code should be compiled with: ○ -g to have the file:line calls ○ -emit-llvm to compile into the bitcode ○ Probably -DNDEBUG to get the Release versions of data structures Then the bitcode files can be (optionally) linked together with llvm-link © 2020 Apex0 码力 | 49 页 | 986.95 KB | 6 月前3
Adventures in SIMD Thinking (Part 2 of 2)Reference Libraries • iconv – GNU libiconv, used here as the “gold standard” • LLVM – UTF conversion functions from the LLVM distribution • AV – UTF-8 to UTF-32 conversion by Alexey Vatchenko • std::codecvt 2500 3000 3500 english_wiki.txt chinese_wiki.txt hindi_wiki.txt Conversion Time (msec) iconv llvm av std::codecvt Boost.Text Hoehrmann kewb-basic kewb-fast kewb-sse kewb-avxCopyright © 2020 3000 3500 portuguese_wiki.txt russian_wiki.txt swedish_wiki.txt Conversion Time (msec) iconv llvm av std::codecvt Boost.Text Hoehrmann kewb-basic kewb-fast kewb-sse kewb-avxCopyright © 20200 码力 | 135 页 | 551.08 KB | 6 月前3
共 116 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
相关搜索词
LLVMRealtimeSafetyRevolutionToolsforModernMissionCriticalSystemsJustInTimeCompilationTheNextBigThinginBastienCppCon2020KhronosAPIsHeterogeneousComputeandSYCLSCCettingStartedwithC++ObjectLifetimeFromStarttoFinishMasteringModulesYearofSanitizersPracticalmemorypoolbasedallocatorsAdventuresSIMDThinkingPart













