home.social

#llvm — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #llvm, aggregated by home.social.

  1. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  2. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  3. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  4. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  5. Thanks to @JensGustedt TIL that C++26 also introduces native support for #C23 checked #integer #arithmetic functions, as defined in the <stdckdint.h> compatibility header. These are peripherally related to the (bleeding edge) #saturation arithmetic functions defined in the C+26 version of the <numeric> header: en.cppreference.com/cpp/numeric (You might not find these in your system headers unless you have a seriously up to date #LLVM or #GCC ) @wdtz #languagelawyering

  6. Твой код на Rust компилируется, проходит тесты и является UB. Ты просто об этом не знаешь

    Если взять случайный крейт с crates.io и поставить его под Miri, шанс увидеть undefined behavior где-то в зависимостях стремится к единице. Разбираемся, почему: pointer provenance, Stacked Borrows, Tree Borrows и почему noalias в LLVM выключали три раза.

    habr.com/ru/articles/1033328/

    #rust #unsafe #miri #stacked_borrows #tree_borrows #provenance #llvm #noalias #undefined_behavior

  7. My vision for the loop vectorizer in #LLVM has finally crystallized into a first patch! The line of work would have a major impact on optimization result as well as compile time! 🎉

    github.com/llvm/llvm-project/p

  8. My overall vision for what #LLVM VPlan should ideally be is becoming clearer. It's going to be huge design overhaul, and the work has to be done piece-wise with no unit of work causing regressions. The hard part is convincing all stakeholders to align on the vision, which I cannot explain in natural language sufficiently well.

  9. I need a recap for how to write plugins for #llvm
    What is you favourit blog post or book on this topic.
    Please share.

    Yes yes I am reading the docs also

    #development #compiler

  10. Question for #PL folks:

    Is there any usable work taking the typed assembly languages work and layering it on top of #LLVM ? Been quite a while since I read that work, but from what I remember, TAL two had the intersection / union types you'd need for SSA form.

    Reason: I will (eventually) need a low-overhead, direct-to-native, and safe way to distribute executable code in a distributed system.

    #CS #compsci #ProgrammingLanguages #ProgLang

  11. Question for #PL folks:

    Is there any usable work taking the typed assembly languages work and layering it on top of #LLVM ? Been quite a while since I read that work, but from what I remember, TAL two had the intersection / union types you'd need for SSA form.

    Reason: I will (eventually) need a low-overhead, direct-to-native, and safe way to distribute executable code in a distributed system.

    #CS #compsci #ProgrammingLanguages #ProgLang

  12. Question for #PL folks:

    Is there any usable work taking the typed assembly languages work and layering it on top of #LLVM ? Been quite a while since I read that work, but from what I remember, TAL two had the intersection / union types you'd need for SSA form.

    Reason: I will (eventually) need a low-overhead, direct-to-native, and safe way to distribute executable code in a distributed system.

    #CS #compsci #ProgrammingLanguages #ProgLang

  13. Question for #PL folks:

    Is there any usable work taking the typed assembly languages work and layering it on top of #LLVM ? Been quite a while since I read that work, but from what I remember, TAL two had the intersection / union types you'd need for SSA form.

    Reason: I will (eventually) need a low-overhead, direct-to-native, and safe way to distribute executable code in a distributed system.

    #CS #compsci #ProgrammingLanguages #ProgLang

  14. Question for #PL folks:

    Is there any usable work taking the typed assembly languages work and layering it on top of #LLVM ? Been quite a while since I read that work, but from what I remember, TAL two had the intersection / union types you'd need for SSA form.

    Reason: I will (eventually) need a low-overhead, direct-to-native, and safe way to distribute executable code in a distributed system.

    #CS #compsci #ProgrammingLanguages #ProgLang

  15. ”You cannot boot Windows without #llvm today.” - Clang and LLVM in modern gaming, panel at EuroLLVM.

  16. 🎉 Oh, joy! Another thrilling day in the life of a programmer chasing bugs in #LLVM #RISC-V while pretending to be Sherlock Holmes. 🔍 The article takes us on a wild ride through benchmarks and code tweaks, but spoiler alert: we still don't really care. 📉
    blog.kaving.me/blog/tracking-d #programmerlife #bugchasing #SherlockHolmes #codebenchmarks #techhumor #HackerNews #ngated

  17. Создание языка программирования дилетантом. Как это?

    Идея создать собственный компилятор появилась у меня раньше идеи сделать собственный язык программирования. Помню, ковырялся в исходниках прошивки EV3 контроллера , чтобы сделать его эмуляцию , и в голову пришла идея -- почему бы не сделать что-то такое, но свое? Эмуляция так и не получилась адекватная, но идея написания компилятора или виртуальной машины из головы не уходила.

    habr.com/ru/articles/1018038/

    #hapet #hapetlang #hapetlang #хапет #компиляторы #llvm #язык_программирования

  18. [$] An API for handling arithmetic overflow

    On March 31, Kees Cook shared a patch set that represents the culmination of more than a year of work toward eliminating the possibility of silent, unintentional integer overflow [...]

    lwn.net/Articles/1065889/ #LWN #Linux #kernel #GCC #LLVM #Clang #Rust

  19. @resistor has been spelunking in LLVM history and found my first LLVM commit! from just over 18 years ago! Truly an indispensable contribution to the ecosystem!

    #llvm

  20. Как найти UB, которое никто не хочет замечать: разбираем clang-tidy изнутри

    Привет, Хабр! Меня зовут Анастасия Черникова, я занимаюсь разработкой компиляторных технологий и инструментов на базе LLVM в Синтакоре. Неопределенное поведение (undefined behavior, UB) по-разному выглядит с точки зрения компилятора и разработчика. Для первого оно, как правило, открывает дополнительные возможности для оптимизации. Для программиста же UB может стать проблемой, особенно если оно остается незамеченным и не учитывается при разработке. В этой статье рассмотрим подход к поиску UB с использованием статического анализа. В качестве примера я использую clang-tidy: сначала разберу, как устроены существующие чекеры и как работают AST matchers, а затем покажу, как расширять их и добавлять собственные проверки, если стандартных возможностей оказывается недостаточно. Отправимся на поиски и поимку UB →

    habr.com/ru/companies/yadro/ar

    #llvm #clangtidy #ast #check #cpp #undefined_behavior #UB #compiler #sanitizers

  21. Как найти UB, которое никто не хочет замечать: разбираем clang-tidy изнутри

    Привет, Хабр! Меня зовут Анастасия Черникова, я занимаюсь разработкой компиляторных технологий и инструментов на базе LLVM в Синтакоре. Неопределенное поведение (undefined behavior, UB) по-разному выглядит с точки зрения компилятора и разработчика. Для первого оно, как правило, открывает дополнительные возможности для оптимизации. Для программиста же UB может стать проблемой, особенно если оно остается незамеченным и не учитывается при разработке. В этой статье рассмотрим подход к поиску UB с использованием статического анализа. В качестве примера я использую clang-tidy: сначала разберу, как устроены существующие чекеры и как работают AST matchers, а затем покажу, как расширять их и добавлять собственные проверки, если стандартных возможностей оказывается недостаточно. Отправимся на поиски и поимку UB →

    habr.com/ru/companies/yadro/ar

    #llvm #clangtidy #ast #check #cpp #undefined_behavior #UB #compiler #sanitizers

  22. Как найти UB, которое никто не хочет замечать: разбираем clang-tidy изнутри

    Привет, Хабр! Меня зовут Анастасия Черникова, я занимаюсь разработкой компиляторных технологий и инструментов на базе LLVM в Синтакоре. Неопределенное поведение (undefined behavior, UB) по-разному выглядит с точки зрения компилятора и разработчика. Для первого оно, как правило, открывает дополнительные возможности для оптимизации. Для программиста же UB может стать проблемой, особенно если оно остается незамеченным и не учитывается при разработке. В этой статье рассмотрим подход к поиску UB с использованием статического анализа. В качестве примера я использую clang-tidy: сначала разберу, как устроены существующие чекеры и как работают AST matchers, а затем покажу, как расширять их и добавлять собственные проверки, если стандартных возможностей оказывается недостаточно. Отправимся на поиски и поимку UB →

    habr.com/ru/companies/yadro/ar

    #llvm #clangtidy #ast #check #cpp #undefined_behavior #UB #compiler #sanitizers

  23. Как найти UB, которое никто не хочет замечать: разбираем clang-tidy изнутри

    Привет, Хабр! Меня зовут Анастасия Черникова, я занимаюсь разработкой компиляторных технологий и инструментов на базе LLVM в Синтакоре. Неопределенное поведение (undefined behavior, UB) по-разному выглядит с точки зрения компилятора и разработчика. Для первого оно, как правило, открывает дополнительные возможности для оптимизации. Для программиста же UB может стать проблемой, особенно если оно остается незамеченным и не учитывается при разработке. В этой статье рассмотрим подход к поиску UB с использованием статического анализа. В качестве примера я использую clang-tidy: сначала разберу, как устроены существующие чекеры и как работают AST matchers, а затем покажу, как расширять их и добавлять собственные проверки, если стандартных возможностей оказывается недостаточно. Отправимся на поиски и поимку UB →

    habr.com/ru/companies/yadro/ar

    #llvm #clangtidy #ast #check #cpp #undefined_behavior #UB #compiler #sanitizers

  24. So I'm writing a #compiler. No LLMs just my squishy brain and textbooks for the language #Oberon and docs for #llvm

    This is a path well travelled but my trick is I'm keeping Professor Wirth's freely licensed original source and replacing only the code generation parts with calls to the llvm-c api.

    So I guess I'm not even writing the compiler, I'm adapting it.

    Huge thanks to obnc which translates oberon to c. When the translated compiler can compile itself I'll just stop using the translator.

  25. After watching the #gamersnexus video about the #ssdshortage:
    youtube.com/watch?v=-O6FQFhNhiw

    Can't wait for the #AIbubble to die.
    I know the price spikes are not created by #LLVM's but by corruption/lack of market regulation.

  26. Wondering if it is possible to make #llvm / #clang produce assembly code that ensures a function has a single exit point that the flow always goes through whenever the function exits (excluding exceptions).

    Theoretically one could convert all ret into unconditional jmp to a single ret and this should be possible using a llvm pass. Unfortunately I cannot modify the Clang/llvm I need this for.

    So wondering if something like this is already there, maybe even as a per-function annotation. Anyone?

  27. KDAB engineer Shivam Kunwar contributed a fix to LLVM/Clang that enables debuggers to display constexpr array contents in optimized builds. Previously, inspecting static constexpr arrays under -O2 showed "no symbol in current context", now GDB and LLDB show the actual values. A small but meaningful improvement for anyone debugging optimized C++. #LLVM #Clang #DebugInfo #DWARF #CPlusPlus #OpenSource

    More details:
    github.com/llvm/llvm-project/p

  28. KDAB engineer Shivam Kunwar contributed a fix to LLVM/Clang that enables debuggers to display constexpr array contents in optimized builds. Previously, inspecting static constexpr arrays under -O2 showed "no symbol in current context", now GDB and LLDB show the actual values. A small but meaningful improvement for anyone debugging optimized C++. #LLVM #Clang #DebugInfo #DWARF #CPlusPlus #OpenSource

    More details:
    github.com/llvm/llvm-project/p

  29. KDAB engineer Shivam Kunwar contributed a fix to LLVM/Clang that enables debuggers to display constexpr array contents in optimized builds. Previously, inspecting static constexpr arrays under -O2 showed "no symbol in current context", now GDB and LLDB show the actual values. A small but meaningful improvement for anyone debugging optimized C++. #LLVM #Clang #DebugInfo #DWARF #CPlusPlus #OpenSource

    More details:
    github.com/llvm/llvm-project/p

  30. KDAB engineer Shivam Kunwar contributed a fix to LLVM/Clang that enables debuggers to display constexpr array contents in optimized builds. Previously, inspecting static constexpr arrays under -O2 showed "no symbol in current context", now GDB and LLDB show the actual values. A small but meaningful improvement for anyone debugging optimized C++. #LLVM #Clang #DebugInfo #DWARF #CPlusPlus #OpenSource

    More details:
    github.com/llvm/llvm-project/p

  31. KDAB engineer Shivam Kunwar contributed a fix to LLVM/Clang that enables debuggers to display constexpr array contents in optimized builds. Previously, inspecting static constexpr arrays under -O2 showed "no symbol in current context", now GDB and LLDB show the actual values. A small but meaningful improvement for anyone debugging optimized C++.

    More details:
    github.com/llvm/llvm-project/p

  32. Flame: Системный язык программирования на C и LLVM с мета-исключениями и Memory Safety без Borrow Checker

    Пока индустрия движется в сторону усложнения компиляторов, я задался вопросом: можно ли создать инструмент, который дает безопасность Rust, гибкость C и при этом не весит сотни мегабайт? Так появился Flame — системный язык с компилятором в 226 КБ , который реализует управление памятью через статический анализ AST и предлагает альтернативный взгляд на обработку ошибок через патчинг дерева токенов.

    habr.com/ru/articles/1007758/

    #flame #c #c++ #c# #системное_программирование #компиляторы #компилятор #коддинг #llvm #llvm_ir

  33. Профилирование и PGO в LLVM

    Нередко при оптимизации приложений, написанных на языках со статической компиляцией (C, C++, Rust), наступает момент, когда стандартные методы оптимизации, такие как улучшение алгоритмов, подбор структур данных, флаги компиляции вроде -O3, перестают давать дополнительный прирост производительности. В этот момент многие вспоминают про фундаментальное ограничение статических компиляторов. В отличие от JIT, они не знают, какой код будет горячим, а какой холодным. JIT-компиляторы (JVM, V8, .NET) получают эту информацию в runtime и адаптируют оптимизации под реальную нагрузку. Статические компиляторы генерируют машинный код заранее и лишены информации о поведении программы в runtime. Для решения этой проблемы используется подход Profile Guided Optimization (PGO). Он позволяет собрать данные о выполнении программы и передать их компилятору для принятия более оптимальных решений при генерации кода. По сути, PGO - это способ дать статическому компилятору некоторые преимущества JIT, сохраняя при этом все преимущества ahead-of-time компиляции: отсутствие пауз на перекомпиляцию и полный контроль над билдом.

    habr.com/ru/articles/1006620/

    #llvm #pgo #clang #компиляторы

  34. Профилирование и PGO в LLVM

    Нередко при оптимизации приложений, написанных на языках со статической компиляцией (C, C++, Rust), наступает момент, когда стандартные методы оптимизации, такие как улучшение алгоритмов, подбор структур данных, флаги компиляции вроде -O3, перестают давать дополнительный прирост производительности. В этот момент многие вспоминают про фундаментальное ограничение статических компиляторов. В отличие от JIT, они не знают, какой код будет горячим, а какой холодным. JIT-компиляторы (JVM, V8, .NET) получают эту информацию в runtime и адаптируют оптимизации под реальную нагрузку. Статические компиляторы генерируют машинный код заранее и лишены информации о поведении программы в runtime. Для решения этой проблемы используется подход Profile Guided Optimization (PGO). Он позволяет собрать данные о выполнении программы и передать их компилятору для принятия более оптимальных решений при генерации кода. По сути, PGO - это способ дать статическому компилятору некоторые преимущества JIT, сохраняя при этом все преимущества ahead-of-time компиляции: отсутствие пауз на перекомпиляцию и полный контроль над билдом.

    habr.com/ru/articles/1006620/

    #llvm #pgo #clang #компиляторы

  35. Профилирование и PGO в LLVM

    Нередко при оптимизации приложений, написанных на языках со статической компиляцией (C, C++, Rust), наступает момент, когда стандартные методы оптимизации, такие как улучшение алгоритмов, подбор структур данных, флаги компиляции вроде -O3, перестают давать дополнительный прирост производительности. В этот момент многие вспоминают про фундаментальное ограничение статических компиляторов. В отличие от JIT, они не знают, какой код будет горячим, а какой холодным. JIT-компиляторы (JVM, V8, .NET) получают эту информацию в runtime и адаптируют оптимизации под реальную нагрузку. Статические компиляторы генерируют машинный код заранее и лишены информации о поведении программы в runtime. Для решения этой проблемы используется подход Profile Guided Optimization (PGO). Он позволяет собрать данные о выполнении программы и передать их компилятору для принятия более оптимальных решений при генерации кода. По сути, PGO - это способ дать статическому компилятору некоторые преимущества JIT, сохраняя при этом все преимущества ahead-of-time компиляции: отсутствие пауз на перекомпиляцию и полный контроль над билдом.

    habr.com/ru/articles/1006620/

    #llvm #pgo #clang #компиляторы

  36. Профилирование и PGO в LLVM

    Нередко при оптимизации приложений, написанных на языках со статической компиляцией (C, C++, Rust), наступает момент, когда стандартные методы оптимизации, такие как улучшение алгоритмов, подбор структур данных, флаги компиляции вроде -O3, перестают давать дополнительный прирост производительности. В этот момент многие вспоминают про фундаментальное ограничение статических компиляторов. В отличие от JIT, они не знают, какой код будет горячим, а какой холодным. JIT-компиляторы (JVM, V8, .NET) получают эту информацию в runtime и адаптируют оптимизации под реальную нагрузку. Статические компиляторы генерируют машинный код заранее и лишены информации о поведении программы в runtime. Для решения этой проблемы используется подход Profile Guided Optimization (PGO). Он позволяет собрать данные о выполнении программы и передать их компилятору для принятия более оптимальных решений при генерации кода. По сути, PGO - это способ дать статическому компилятору некоторые преимущества JIT, сохраняя при этом все преимущества ahead-of-time компиляции: отсутствие пауз на перекомпиляцию и полный контроль над билдом.

    habr.com/ru/articles/1006620/

    #llvm #pgo #clang #компиляторы

  37. is has issues when module import is in a header file, and not the cpp file. This is not a problem for clang, its all in the same translation unit. AFAICT this is legal and fine C++20 module code, clangd shouldn't have this issue.

    github.com/llvm/llvm-project/i

  38. Interestingly, when building Pocl with the option to statically link against LLVM 18, the crash can be reproduced by simply running `clinfo -l` (which is the least-intrusive OpenCL-using command you can run, basiclaly) and the error is caused by the good old

    : CommandLine Error: Option 'internalize-public-api-file' registered more than once!
    LLVM ERROR: inconsistency in registered CommandLine options

    during the Pocl ICD device numeration.

    *sigh*

    #llvm #clang #pocl #rusticl #mesa

  39. Interestingly, the segfault seems to be from clang::DiagonsticOptions from llvm-21, so this is likely one of the neverending series of issues that arise when mixing #LLVM versions that has plagued #FLOSS #OpenCL ICDs since forever. I thought we had finally gotten rid of these issues, but apparently this is not the case: dynamic loading independent libraries that depend on different versions of LLVM *still* causes issues. Is it again some unversioned global? Another weird gimmick? Who knows!

  40. Interesting article on long running teams of Claudes working together, the harnesses used and the results. A C-compliler was built from scratch for 20K$.

    I'm curious

    • what will happen to the countless Claude memory and multi Claude orchestration solutions
    • how the resulting compiler rates on human review in terms of performance and safety against the existing ones.

    Article:anthropic.com/engineering/buil

    #claude #llm #ai #codereview #ccompiler #llvm #itsec

  41. Làm xong hackathon IBM sau 48h thức trắng, mình vừa tạo ra LazyA – ngôn ngữ lập trình biên dịch (Flex/Bison + LLVM 18) tích hợp AI ngay trong cú pháp. Dùng Ollama local để so sánh ngữ nghĩa (~=), tự sinh code từ docstring có @verify, và không gửi data lên đám mây. 70% code tự viết, 60% bug do AI gây ra. Dự án còn thô nhưng mở để góp ý! #LazyA #AIProgramming #Compiler #Ollama #LLM #LậpTrìnhAI #BiênDịch #Hackathon
    #CaffeineHaze #LocalFirst #CSStudent #LLVM #FlexBison

    reddit.com/r/Lo