aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-diff/llvm-diff.cpp
AgeCommit message (Collapse)AuthorFilesLines
2014-08-26Return a std::unique_ptr from the IRReader.h functions. NFC.Rafael Espindola1-12/+10
llvm-svn: 216466
2013-09-19Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."Andrew Trick1-4/+0
Working on a better solution to this. This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2. llvm-svn: 190990
2013-09-18Encapsulate PassManager debug flags to avoid static init and cxa_exit.Andrew Trick1-0/+4
This puts all the global PassManager debugging flags, like -print-after-all and -time-passes, behind a managed static. This eliminates their static initializers and, more importantly, exit-time destructors. The only behavioral change I anticipate is that tools need to initialize the PassManager before parsing the command line in order to export these options, which makes sense. Tools that already initialize the standard passes (opt/llc) don't need to do anything new. llvm-svn: 190974
2013-09-18whitespaceAndrew Trick1-1/+1
llvm-svn: 190973
2013-03-26Split out the IRReader header and the utility functions it provides intoChandler Carruth1-1/+1
its own library. These functions are bridging between the bitcode reader and the ll parser which are in different libraries. Previously we didn't have any good library to do this, and instead played fast and loose with a "header only" set of interfaces in the Support library. This really doesn't work well as evidenced by the recent attempt to add timing logic to the these routines. As part of this, make them normal functions rather than weird inline functions, and sink the implementation into the library. Also clean up the header to be nice and minimal. This requires updating lots of build system dependencies to specify that the IRReader library is needed, and several source files to not implicitly rely upon the header file to transitively include all manner of other headers. If you are using IRReader.h, this commit will break you (the header moved) and you'll need to also update your library usage to include 'irreader'. I will commit the corresponding change to Clang momentarily. llvm-svn: 177971
2013-01-02Move all of the header files which are involved in modelling the LLVM IRChandler Carruth1-3/+3
into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
2012-12-04Sort the #include lines for tools/...Chandler Carruth1-6/+4
Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. llvm-svn: 169252
2012-06-06Remove unused private fields found by clang's new -Wunused-private-field.Benjamin Kramer1-2/+2
There are some that I didn't remove this round because they looked like obvious stubs. There are dead variables in gtest too, they should be fixed upstream. llvm-svn: 158090
2011-10-16Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner1-1/+1
does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
2011-03-14This patch is a big refactoring of llvm-diff. It doesn't add new features, ↵Renato Golin1-217/+1
but it re-organizes the old features, so I can insert the MetadataEngine to use the same infrastructure. llvm-svn: 127627
2010-09-13Use ParseIRFile to auto-detect LLVM Assembly automatically.Dan Gohman1-26/+7
llvm-svn: 113765
2010-09-05cleanups: mark stuff static, only tagdecls should be in anon namespaces.Chris Lattner1-20/+22
llvm-svn: 113120
2010-08-24Check in a couple of changes that I apparently never committed:John McCall1-3/+1
- 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 llvm-svn: 111909
2010-07-29Transcribe IRC to svn. Also don't print basic block names twice if they match.John McCall1-9/+19
llvm-svn: 109787
2010-07-29Make the header self-contained and follow #include guidelines.John McCall1-20/+29
llvm-svn: 109774
2010-07-29Switch to using the LLVM CommandLine library so that our helpJohn McCall1-39/+31
message is properly contaminated with nonsense about timing passes that doesn't apply at all to this utility. :) llvm-svn: 109769
2010-07-29Cache the result of errs() and implement formatted logging.John McCall1-29/+50
llvm-svn: 109740
2010-07-29Add the llvm-diff tool, which performs a relatively naive structuralJohn McCall1-0/+301
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