C++23 · LLVM 22 · interprocedural analysis · optimization

LLVM Interprocedural Global IV Optimization

The pass must recognize affine evolution of global IVs across calls and transform IR only when correctness conditions are established.

01

Problem

The pass must recognize affine evolution of global IVs across calls and transform IR only when correctness conditions are established.

02

Constraints

The transform is allowed only when affine evolution and legality are established; unsupported CFG/calls must be rejected rather than optimized unsafely.

03

Solution

APInt affine b + k·x evolution, transitive function/module effects, loop/dominator/must-execute reasoning, and a separate conservative legality phase that rejects unsupported CFG/calls.

04

Outcome

A conservative LLVM 22 prototype/MVP with an actual IR transform; 29 positive/negative regression cases cover verifier validity, idempotence, and before/after execution.

05

Verification

29 positive/negative IR regressions, LLVM verifier checks, idempotence, and before/after execution comparison.

06

My ownership

Affine-evolution model, interprocedural effects, legality analysis, LLVM IR transform, and regression harness.