1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
John McCall
1e34d6da8e Make the header self-contained and follow #include guidelines.
llvm-svn: 109774
2010-07-29 18:08:23 +00:00
John McCall
0722760971 Centralize the logic to permanently unify two instructions and make sure
it establishes a context and does a complaining diff.  Also make sure we
unify the prelude and postlude of a diff after a block-diff call.

llvm-svn: 109744
2010-07-29 09:20:34 +00:00
John McCall
8fda7303db Diagnose non-structural differences in the case where blocks were
structurally identical.

llvm-svn: 109743
2010-07-29 09:04:45 +00:00
John McCall
9c21031e5b When unifying instructions during a block diff, actually complain about
any differences we see.  This should only happen if there are "non-structural"
differences between the instructions, i.e. differences which wouldn't cause
diff to return true.

llvm-svn: 109742
2010-07-29 08:59:27 +00:00
John McCall
a56b8f4800 Somehow I was getting reasonable results for the test cases I was interested
in despite not ever incrementing any path costs, so that the only nonzero costs
arose from the all-left path in the first column.  Anyway.  Perform the diff
starting from the beginning of the block to avoid capturing (say) loads of
allocas.

Vastly improves diff results on code that hasn't been mem2reg'ed.

llvm-svn: 109741
2010-07-29 08:53:59 +00:00
John McCall
f1e24e1d2b Cache the result of errs() and implement formatted logging.
llvm-svn: 109740
2010-07-29 08:14:41 +00:00
John McCall
edc50f3f5b Add the llvm-diff tool, which performs a relatively naive structural
diff of a function.  There's a lot of cruft in the current version, and
it's pretty far from perfect, but it's usable.

Currently only capable of comparing functions.  Currently ignores metadata.
Currently ignores most attributes of functions and instructions.

Patches welcome.

llvm-svn: 109739
2010-07-29 07:53:27 +00:00