Loading…
For full conference details, please visit the 2018 European LLVM Developers’ Meeting website.
Back To Schedule
Tuesday, April 17 • 11:00am - 11:40am
MIR-Canon: Improving Code Diff Through Canonical Transformation.

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Comparing IR and assembly through diff-tools is common but can involve tediously reasoning through differences that are semantically equivalent. The development of GlobalISel presented problems of correctness verification between two programs compiled from identical IR using two different instruction selectors (SelectionDAG versus GlobalISel) where outcomes of each selector should ideally be reducible to identical programs. It is in this context that transforming the post-ISel Machine IR (MIR) to a more canonical form shows promise.

To address said verification challenges we have developed a MIR Canonicalization pass in the LLVM open source tree to perform a host of transformations that help to reduce non-semantic differences in MIR. These techniques include canonical virtual register renaming (based on the order operands are walked in the def-use graph), canonical code motion of defs in relation to their uses, and hoisting of idempotent instructions.

In this talk we will discuss these algorithms and demonstrate the benefits of using the tool to canonicalize code prior to diffing MIR. The tool is available for the whole LLVM community to try.

Speakers
avatar for Puyan Lotfi

Puyan Lotfi

Compiler Engineer, Facebook


Tuesday April 17, 2018 11:00am - 11:40am BST
Bristol 1