Morgana is a lightweight, high-performance Intermediate Representation designed to cut through the heavy, bloated pipeline of LLVM. It powers the Carla compiler, but is fully usable as a standalone IR for any custom language or code generation tool.
LLVM is slow.
Yes, it's insanely powerful and feature-heavy β but that complexity comes with a price: massive pipelines, heavy abstractions, and sluggish code generation.
Morgana strips away the unnecessary layers and gives you a direct, nearly-metal IR, with a tiny translation pipeline that turns instructions into machine code with minimal overhead.
If you want real speed without drowning in LLVMβs complexity,
Morgana isnβt an upgrade β itβs the alternative.
Morgana is a clean and compact IR language originally built to replace LLVM in the Carla compiler project.
But nothing stops you from using it in your own compiler or VM. It was designed to be simple enough to generate, powerful enough to optimize, and low-level enough to map cleanly to native assembly.
What is extensors?
Extensors are extensions to Morgana codegen, which allow you to add your custom instructions, types, and optimizations to the language.
I need implement my own extensors?: No, you can use the official extensors, third-party extensors or even write your own.How can i write my own extensors?: You can write your own extensors using Runa (γ«γ) and the pattern who is teach on the Morgana Extensors repository.I can write without overriding any of the existing extensors?: Yes, you can write your own extensors without overriding any of the existing ones. Compiling with the flag-o
# x86_64 extensor for example
$ morgana build -o x86_64-optimized| Linux | Windows | Android | MacOS / IOS | Embeded boards | |
| x86_64 | π‘ (In progress) | π‘ (Just cross-compiling) | - | β | β |
| i3286 | β | β | β | β | β |
| aarch64 | β | β | β | β | β |
| arm | β | β | β | β | β |
| risc-V | β | β | β | β | β |
| xtensa | β | β | β | β | π (Pendent) |
| atmega | - | - | - | - | π (Pendent) |
| NVIDIA | β | β | β | β | β |
| AMD (GPU) | β | β | β | β | β |
| Intel (GPU) | β | β | β | β | β |
| Adreno | β | β | β | β | β |