aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-diff
AgeCommit message (Collapse)AuthorFilesLines
2016-11-19[CMake] llvm-diff depends on intrinsics_genChris Bieneman1-0/+3
llvm-diff.cpp has the following include chain: llvm/IR/Module.h llvm/IR/Function.h llvm/IR/Argument.h llvm/IR/Attributes.h llvm/IR/Attributes.gen This means llvm-diff needs to depend on intrinsics_gen. llvm-svn: 287427
2016-04-18[NFC] Header cleanupMehdi Amini5-6/+1
Removed some unused headers, replaced some headers with forward class declarations. Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap' Patch by Eugene Kosov <claprix@yandex.ru> Differential Revision: http://reviews.llvm.org/D19219 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
2016-02-18Remove uses of builtin comma operator.Richard Trieu1-3/+7
Cleanup for upcoming Clang warning -Wcomma. No functionality change intended. llvm-svn: 261270
2016-01-27Make more headers self-contained.Benjamin Kramer1-0/+1
A lot of this comes from the new complete type requirement of DenseMap. llvm-svn: 258956
2016-01-26Remove autoconf supportChris Bieneman1-17/+0
Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
2015-10-20llvm-diff: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith1-2/+2
llvm-svn: 250842
2015-08-05-Wdeprecated clean by making LogBuilder move constructible so it can be ↵David Blaikie2-4/+9
returned by value (in DifferenceEngine::logf) llvm-svn: 244129
2015-03-03Revert "Remove the explicit SDNodeIterator::operator= in favor of the ↵David Blaikie1-2/+0
implicit default" Accidentally committed a few more of these cleanup changes than intended. Still breaking these out & tidying them up. This reverts commit r231135. llvm-svn: 231136
2015-03-03Remove the explicit SDNodeIterator::operator= in favor of the implicit defaultDavid Blaikie1-0/+2
There doesn't seem to be any need to assert that iterator assignment is between iterators over the same node - if you want to reuse an iterator variable to iterate another node, that's perfectly acceptable. Just don't mix comparisons between iterators into disjoint sequences, as usual. llvm-svn: 231135
2014-08-26Return a std::unique_ptr from the IRReader.h functions. NFC.Rafael Espindola1-12/+10
llvm-svn: 216466
2014-08-13Canonicalize header guards into a common format.Benjamin Kramer3-6/+6
Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
2014-07-21Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) ↵Duncan P. N. Exon Smith1-2/+2
iterator ranges." This reverts commit r213474 (and r213475), which causes a miscompile on a stage2 LTO build. I'll reply on the list in a moment. llvm-svn: 213562
2014-07-20[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ↵Manuel Jacob1-2/+2
ranges. Summary: This patch introduces two new iterator ranges and updates existing code to use it. No functional change intended. Test Plan: All tests (make check-all) still pass. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4481 llvm-svn: 213474
2014-04-28[C++] Use 'nullptr'.Craig Topper1-1/+1
llvm-svn: 207394
2014-04-25[C++] Use 'nullptr'. Tools edition.Craig Topper1-2/+2
llvm-svn: 207176
2014-03-08[C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper1-5/+5
class. llvm-svn: 203345
2014-03-04[Modules] Move CFG.h to the IR library as it defines graph traits overChandler Carruth1-1/+1
IR types. llvm-svn: 202827
2014-03-04[Modules] Move CallSite into the IR library where it belogs. It isChandler Carruth1-1/+1
abstracting between a CallInst and an InvokeInst, both of which are IR concepts. llvm-svn: 202816
2013-12-10[CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi1-1/+5
llvm-svn: 196908
2013-10-01Remove several unused variables.Rafael Espindola1-2/+0
Patch by Alp Toker. llvm-svn: 191757
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-09-09Revert patches to add case-range support for PR1255.Bob Wilson1-4/+4
The work on this project was left in an unfinished and inconsistent state. Hopefully someone will eventually get a chance to implement this feature, but in the meantime, it is better to put things back the way the were. I have left support in the bitcode reader to handle the case-range bitcode format, so that we do not lose bitcode compatibility with the llvm 3.3 release. This reverts the following commits: 155464, 156374, 156377, 156613, 156704, 156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575, 157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884, 157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100, 159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659, 159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736 llvm-svn: 190328
2013-03-26Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth1-1/+1
that work on the LLVMBuild based dependency specification didn't actually work, we just now maintain dependencies in *3* places instead of 2. Yay. There may still be some missing dependencies, I'm still sifting through the bots and my builds, but this is a step in the right direction. llvm-svn: 177988
2013-03-26Split out the IRReader header and the utility functions it provides intoChandler Carruth3-3/+3
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 Carruth4-10/+10
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 Carruth6-23/+15
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-07-23Fix a typo (the the => the)Sylvestre Ledru1-1/+1
llvm-svn: 160621
2012-06-06Remove unused private fields found by clang's new -Wunused-private-field.Benjamin Kramer3-9/+6
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
2012-05-29ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to ↵Stepan Dyatkovskiy1-1/+1
IntegersSubsetMapping. llvm-svn: 157612
2012-05-19Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new ↵Stepan Dyatkovskiy1-4/+4
SwitchInst methods. llvm-svn: 157112
2012-03-11llvm::SwitchInstStepan Dyatkovskiy1-2/+2
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152532
2012-03-08Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:Stepan Dyatkovskiy1-5/+9
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*". ConstCaseIt is just a read-only iterator. CaseIt is read-write iterator; it allows to change case successor and case value. Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters. Main way of iterator usage looks like this: SwitchInst *SI = ... // intialize it somehow for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) { BasicBlock *BB = i.getCaseSuccessor(); ConstantInt *V = i.getCaseValue(); // Do something. } If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method. If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method. There are also related changes in llvm-clients: klee and clang. llvm-svn: 152297
2012-02-01SwitchInst refactoring.Stepan Dyatkovskiy1-4/+4
The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149481
2011-12-20Unweaken vtables as per ↵David Blaikie4-1/+8
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
2011-12-12LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar1-1/+0
llvm-svn: 146409
2011-11-11LLVMBuild: Add description files for the LLVM tools.Daniel Dunbar1-0/+23
llvm-svn: 144417
2011-11-09Use isa<> instead of dyn_cast<> as suggested by Nick.John McCall1-1/+1
Should've read the patch a bit closer, sorry. llvm-svn: 144164
2011-11-08Fix the printing of constants. Patch by Stepan Dyatkovskiy!John McCall2-1/+5
llvm-svn: 144079
2011-10-18build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar1-3/+3
new all-targets pseudo-component. llvm-svn: 142401
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-08-12Silence a bunch (but not all) "variable written but not read" warningsDuncan Sands1-2/+2
when building with assertions disabled. llvm-svn: 137460
2011-04-15Fix a ton of comment typos found by codespell. Patch byChris Lattner1-1/+1
Luis Felipe Strano Moraes! llvm-svn: 129558
2011-04-11Don't include Operator.h from InstrTypes.h.Jay Foad1-0/+1
llvm-svn: 129271
2011-03-14Make llvm::Consumer a class (to remove a MSVC warning since Consumer is ↵Francois Pichet1-1/+2
later forward declared as a struct) llvm-svn: 127632
2011-03-14This patch is a big refactoring of llvm-diff. It doesn't add new features, ↵Renato Golin8-321/+452
but it re-organizes the old features, so I can insert the MetadataEngine to use the same infrastructure. llvm-svn: 127627
2010-09-13Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer1-2/+2
This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
2010-09-13Use ParseIRFile to auto-detect LLVM Assembly automatically.Dan Gohman1-26/+7
llvm-svn: 113765
2010-09-10CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer1-2/+2
llvm-svn: 113632