1. twuai.com
  2. #llvm
#programming#llvm#compilers#registerallocation#computerscience
#programming#llvm#compilers#registerallocation#computerscience





hace 8 horas

LLVM IR: add nsw - On Overflow the Answer Is Poison, Not a Wrapped Number

This add does not wrap around - it hands back a value that is not well-defined, and everybody downstream is allowed to plan around that. nsw is a promise to whoever optimises the code rather than extra work for...

hace 9 horas

LLVM IR: select - Pick a Value With an i1 Instead of a Branch

The ternary of IR - one compare, one select, and the function never leaves its first block. icmp answers with a one-bit value and select uses that bit to name one of two values, so @max is still a...

hace 10 horas

LLVM IR: getelementptr Computes an Address and Never Touches Memory

Two indices, and the first one is not a field - it steps over whole objects from the pointer. getelementptr answers which address and nothing else, so the load underneath it is the first instruction that reads memory -...

hace 12 días

The Secret IBM Algorithm from 1981 That Decides Where Every Variable in Your Code Lives

Same function. Same compiler. Your CPU has sixteen general-purpose registers, and your function has two hundred variables. Something has to decide which ones live in silicon, where access takes zero cycles, and which ones get exiled to memory,...