Questions tagged [llvm]

For questions relating to LLVM, or the collection of 'reusable compiler and toolchain technologies'.

Filter by
Sorted by
Tagged with
4 votes
1 answer

Determining the most optimized data type for the platform with type inference

For my programming language, I have built an engine that goes after the parser and before the compiler. This engine analyzes, validates, and simplifies the AST. During the analasys, it determines as ...
Hg0428's user avatar
  • 171
1 vote
0 answers

Does WebAssembly have any instructions which don't have analogues in LLVM IR? [duplicate]

I know EMSCRIPTEN can convert from LLVM IR to WebAssembly, but I don't know of any tool that converts from WebAssembly to LLVM IR. Such a tool would come useful to me, as the compiler for my ...
FlatAssembler's user avatar
1 vote
0 answers

Is it possible to convert WebAssembly to LLVM? [closed]

I've made a compiler for my programming language that outputs WebAssembly Text Format, and it uses the wat2wasm assembler from WebAssembly Binary Toolkit to convert ...
FlatAssembler's user avatar
6 votes
1 answer

What, if any, runtime cost is incurred by using 64-bit ints on 32-bit platforms in LLVM?

I'm writing a language frontend for LLVM, and I noticed that the IR docs say that integers of (almost)any width can be used without limit. I presume this to mean that LLVM or its backends convert ...
Ginger's user avatar
  • 2,579
5 votes
0 answers

Why has there been little recent work on GPU compiler phase optimization?

While GPU compiler phase optimization has been shown to improve performance significantly (e.g., there has been very little follow-up ...
Amrit Baveja's user avatar
16 votes
7 answers

What are the pitfalls of using an existing IR/compiler infrastructure like LLVM?

Using something like LLVM when designing a compiler has a lot of advantages, since tons of work can be saved by using an existing optimizer and code generation for a variety of platforms. Even large, ...
Rydwolf Programs's user avatar
5 votes
1 answer

How do I explain to ClangFormat that `:=` is an assignment operator in my programming language, rather than label+assignment?

ClangFormat does a relatively good job formatting code written in my programming language. However, one quirky problem is that it inserts whitespace (sometimes even new-line characters) between ...
FlatAssembler's user avatar
6 votes
1 answer

How do I make LLVM actually inline anything?

I've been working on a draft of a Trilangle compiler using LLVM. Out of curiosity, I took the generated IR (given the Trilangle program ?!oi@) and plugged it into ...
Bbrk24's user avatar
  • 8,857