Skip to content

MitchBriles/PtrIntRoundTripRemover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pointer-Integer Round Trip Remover

is an out-of-tree LLVM pass that collapses instances of pointer-integer round-trips into a single GEP (get element pointer) instruction.

Warning

This optimization cannot always be done. Certain strict semantics such as pointer provenance make this kind of thing illegal. However, we can get this translation to verify with physical pointers.

Building & Running

To build the pass:

export $LLVM_DIR=<path/to/llvm/19>

cmake .
make

To run:

$LLVM_DIR/bin/opt -load-pass-plugin libPtrIntRoundTripRemover.so --passes="ptr-int-round-trip-remover" -disable-output inputs/simple.ll

About

An out-of-tree LLVM pass

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published