6,570 questions
2
votes
1
answer
135
views
Why when I try to print all generated code from an LLVM Module, the module doesn't print function calls?
I have been following along with the LLVM Kaleidoscope ("My First Language Frontend With LLVM Tutorial") tutorial and have run into a strange bug in chapter 3. Those familiar with the ...
Tooling
0
votes
3
replies
132
views
How should I architect a lightweight cross-platform package registry and toolchain manager for systems programming?
I’m building an experimental project called CPM (C Package Manager) focused on systems programming workflows, and I’d like architectural feedback before going further.
Repository:
https://github.com/...
1
vote
0
answers
96
views
KyleMayes/install-llvm-action@v2 on windows-latest — LLVMConfig.cmake not found at expected path
Using KyleMayes/install-llvm-action@v2 with version: "16" on windows-latest in a GitHub Actions workflow. The action sets LLVM_PATH and reports "Using cached LLVM and Clang 16" ...
1
vote
0
answers
47
views
How to filter llvm tests by name
I want to run only a few tests from the check-llvm-codegen-aarch64 target which has over 3000 tests. During development, only a handful of them are failing so I just want to quickly iterate on them ...
3
votes
1
answer
96
views
Can I get more information why the compiler's cost model considers vectorization of a loop not beneficial?
I'm writing a program in C and trying to get a loop to vectorize using the Clang compiler. Following the documentation, I use the compiler flags
CFLAGS += -fsave-optimization-record
CFLAGS += -Rpass-...
Tooling
0
votes
6
replies
180
views
How can I make a custom programming language run closer to C-level performance?
I'm building a custom programming language and want performance close to C.
Currently I'm deciding between:
Generating C code and compiling with GCC/Clang
Generating LLVM IR directly
Using a JIT
My ...
Advice
0
votes
0
replies
51
views
How can i make Syntax highlighting for a custom extension?
i'm working on an llvm<sup>[1]</sup>
based language and i want it to have its own Syntax Highlighting,
i don't know how to do that, and the documentation<sup>[2]</sup> for VSC ...
-3
votes
2
answers
101
views
Undefined symbols for architecture x86_64 while linking rustc_driver on macosx
I want build rust 1.83 on macosx 10.13 , high sierra.
I have built rust 1.74 with llvm@15.
I want to upgrade rust to 1.83, it depend on llvm@18.
I have buit llvm@18
While install rust with this ...
3
votes
1
answer
28
views
Recovering typedef/type alias name from a substituted template type parameter in Clang AST
I'm writing a Clang AST plugin (with Clang 18) to print out some metadata type things about the code and part of that is that it has to inspect class template specializations. I want to recover the as-...
0
votes
1
answer
91
views
How to create a Target Machine in LLVM?
I'm trying to create a TargetMachine for my TTI (TargetTransformInfo) Wrapper to query instruction costs and vector costs, but the LLVM documentation is scarce on how to instantiate one after ...
Best practices
0
votes
5
replies
122
views
Comparison between std::unordered_set and llvm::FoldingSet
Can someone help with a comparison between std::unordered_set and llvm::FoldingSet?
I need a data structure to store a large number of objects and retrieve them. Retrievals will be far more than ...
2
votes
1
answer
148
views
Why I am unable to cross-compile my program?
I tried to cross-compile a simple windows app on Linux using llvm and ninja:
#include <stdio.h>
int main()
{
puts("Hello");
return 0;
}
So far I made this:
winsroot = ./winsdk
...
0
votes
1
answer
51
views
Linking error when building LLVM with Debug symbols
I'm building LLVM inside a container, using this Dockerfile:
FROM ubuntu:22.04 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
...
0
votes
0
answers
36
views
Why is -affine-scalrep failing to remove redundant load/store in my MLIR inner loop?
I am trying to optimize a GEMM-like kernel using the MLIR Affine dialect. Inside my innermost loop (%arg5), I have a redundant affine.load and affine.store on %alloc.
Despite running the -affine-...
3
votes
1
answer
70
views
@available() and _builtin_available() on Linux and other non-Darwin systems
Clang has @available() (ObjC) and _builtin_available() (C/C++) functions which allow easy runtime testing of the OS version. At least they do on Mac aka Darwin.
I'm aware that they revolve around weak ...