[LLVMdev] Reversing a function's CFG?

Justin M. LaPre jlapre at gmail.com
Fri Mar 18 12:33:22 PDT 2011


Hello,

I was wondering if there was a quick way to reverse a function's CFG and, in turn, all basic blocks within it.  Assuming all variables are globals, is there a quick way to generate a function's reversal?  I highly doubt such functionality exists but I figured it was worth asking.  I'm trying to develop an "undo function" generator pass that would be able to restore system state (without state-saving) after determining an error occurred.  This is documented in, "Efficient Optimistic Parallel Simulations using Reverse Computation" by Carothers et al.[1]

Thanks,

-Justin

[1] http://www.cs.rpi.edu/~chrisc/publications/carothers-tomacs-1999.html





More information about the llvm-dev mailing list