Automatic detection of inverse operations while avoiding loop unrolling
Kunal Banerjee, Ramanuj Chouksey, Chandan Karfa, Pankaj Kalita · 2018
A pair of inverse operations is denned as two operations that when performed on a number or variable always results in the original number or variable. Novice programmers may introduce such inverse operations; automated parallelizing tools also employ such operations to undo the effects of some speculatively executed operation. Therefore, detection of inverse operations is helpful in both compiler optimization (redundant code elimination) as well as verification of parallelizing frameworks. In this work, we extend the definition of inverse operations to include a set of operations instead of only two and present a method for detecting inverse operations symbolically which would otherwise need complete unrolling of loops. Some interesting intricacies of detecting inverse operations are also discussed.