-
Book Overview & Buying
-
Table Of Contents
LLVM Code Generation
By :
At its core, the legalization process relies on two main mechanisms that emulate the desired computations. The first emulation mechanism relies on using larger, supported computations – for instance, emulating an add i13 instruction with an add i32 instruction. The second emulation mechanism breaks down the computations with smaller, supported computations – for instance, emulating an add i64 instruction with add i32 instructions and propagating the carry flag.
In practice, you will need to define legalization strategies by listing the actions to apply to different operations and types using the primitives that are summarized in Table 16.2.
|
Action |
Input |
Transformed code |
Description |
|
Legal |
... |