[LLVMdev] Instruction comparison

James Tuck jtuck at cs.uiuc.edu
Thu Nov 21 12:09:01 PST 2002


I am looking at making my recompilation analysis smarter by
automatically detecting which functions have changed from one source
code modification to the next.  So, I have one Module representing the
original code, and another module representing the new code.

I think it's fairly straight forward to match functions and global
variables between these modules.  However, mathching functions for
equality , or just trying to detect if they are still the same, seems to
be quite difficult.  It seems that I cannot use a simple heuristic of
testing opcode or number of params, etc. because I must also detect very
subtle changes, like the changing of a constant.  

Are there any supports in llvm for drawing conclusions about equivalence
of instructions or functions.

Or, is it possible to be certain of equality just by looking at
per-instruction properties and ignoring the problem of proving
equivalence of the instructions supplying the values to the current
instruction.


Thanks,
James



More information about the llvm-dev mailing list