Commit Graph

13 Commits

Author SHA1 Message Date
Chris Lattner
53b1acd06d cleanups: mark stuff static, only tagdecls should be in anon namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-05 21:25:43 +00:00
Bill Wendling
ac53061464 Quiesce warning about non-virtual d'tor in virtual class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112991 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 18:41:20 +00:00
Michael J. Spencer
a87c163355 Fix the msvs 2010 build.
The Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01
implements parts of C++0x based on the draft standard. An old version of
the draft had a bug that makes std::pair<T1*, T2*>(something, 0) fail to
compile. This is because the template<class U, class V> pair(U&& x, V&& y)
constructor is selected, even though it later fails to implicitly convert
U and V to frist_type and second_type.

This has been fixed in n3090, but it seems that Microsoft is not going to
update msvc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-27 02:49:45 +00:00
John McCall
b82b4339d1 Check in a couple of changes that I apparently never committed:
- teach DifferenceEngine to unify successors of calls and invokes
    in certain circumstances
  - basic blocks actually don't have their own numbering;  did that change?
  - add llvm-diff to the Makefile and CMake build systems



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 09:16:51 +00:00
John McCall
44a9860247 Transcribe IRC to svn. Also don't print basic block names twice if they match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 18:20:13 +00:00
John McCall
73b21b738e Make the header self-contained and follow #include guidelines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 18:08:23 +00:00
John McCall
e5cbaf140b Switch to using the LLVM CommandLine library so that our help
message is properly contaminated with nonsense about timing passes
that doesn't apply at all to this utility. :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 17:55:00 +00:00
John McCall
82bd5eaa71 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109744 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 09:20:34 +00:00
John McCall
e2921432b6 Diagnose non-structural differences in the case where blocks were
structurally identical.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 09:04:45 +00:00
John McCall
02e116cb06 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 08:59:27 +00:00
John McCall
dfb44ac690 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109741 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 08:53:59 +00:00
John McCall
62dc1f3d82 Cache the result of errs() and implement formatted logging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109740 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 08:14:41 +00:00
John McCall
3dd706b528 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 07:53:27 +00:00