summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/Miscompilation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix invalid function pointers in bugpoint ExtractLoopsHal Finkel2013-08-021-7/+42
| | | | | | | | | | | | | | | | | | | | | | | The ExtractLoops function tries to reduce the failing test case by extracting one or more loops from the misoptimized piece of the program. In doing this, ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring that the pointers refer to functions in the current failing program. Unfortunately, this is not trivial because: - ExtractLoops is iterative, and there are several early exits (and the MiscompiledFunctions vector must be consistent with the current program at every non-fatal exit point). - Several of the utility functions used by ExtractLoops (such as TestOptimizer, some of which are called through the TestFn callback parameter, and Linker::LinkModules) delete their inputs upon success. This change adds several updates of the MiscompiledFunctions vector at different points. The first is after the initial call to TestMergedProgram which checks that the loop-extracted program still works. The second is after the call to TestFn (TestOptimizer, for example). This function will delete its inputs (which is why the existing ExtractLoops logic cloned the inputs first). llvm-svn: 187674
* Use sys::fs::createTemporaryFile.Rafael Espindola2013-07-051-8/+8
| | | | llvm-svn: 185719
* Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.Rafael Espindola2013-06-181-19/+28
| | | | llvm-svn: 184193
* Convert two uses of eraseFromDisk.Rafael Espindola2013-06-171-2/+2
| | | | llvm-svn: 184136
* Don't use PathV1.h in ToolRunner.h.Rafael Espindola2013-06-171-0/+1
| | | | llvm-svn: 184107
* Use only explicit bool conversion operatorsDavid Blaikie2013-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | BitVector/SmallBitVector::reference::operator bool remain implicit since they model more exactly a bool, rather than something else that can be boolean tested. The most common (non-buggy) case are where such objects are used as return expressions in bool-returning functions or as boolean function arguments. In those cases I've used (& added if necessary) a named function to provide the equivalent (or sometimes negative, depending on convenient wording) test. One behavior change (YAMLParser) was made, though no test case is included as I'm not sure how to reach that code path. Essentially any comparison of llvm::yaml::document_iterators would be invalid if neither iterator was at the end. This helped uncover a couple of bugs in Clang - test cases provided for those in a separate commit along with similar changes to `operator bool` instances in Clang. llvm-svn: 181868
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-4/+4
| | | | | | | | | | | | | | | | | | | | | 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
* Sort the #include lines for tools/...Chandler Carruth2012-12-041-3/+3
| | | | | | | | 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
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-051-1/+2
| | | | | | | | | but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-2/+1
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* eliminate the "string" form of ConstantArray::get, usingChris Lattner2012-01-311-1/+2
| | | | | | ConstantDataArray::getString instead. llvm-svn: 149365
* Make it possible to use the linker without destroying the source module. ↵Tanya Lattner2011-10-111-3/+5
| | | | | | | | | | | | | | This is so the source module can be linked to multiple other destination modules. For all that used LinkModules() before, they will continue to destroy the source module as before. This line, and those below, will be ignored-- M include/llvm/Linker.h M tools/bugpoint/Miscompilation.cpp M tools/bugpoint/BugDriver.cpp M tools/llvm-link/llvm-link.cpp M lib/Linker/LinkModules.cpp llvm-svn: 141606
* Fix bugpoint fallout from the new type system.Nick Lewycky2011-08-121-4/+0
| | | | llvm-svn: 137467
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-2/+1
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-3/+3
| | | | llvm-svn: 135375
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-6/+4
| | | | llvm-svn: 135265
* Bugpoint support for miscompilations that result in a crash.Andrew Trick2011-05-111-2/+3
| | | | | | | | | This change allows bugpoint to pinpoint the "opt" pass and bitcode segment responsible for a crash caused by miscompilation. At least it works well for me now, without having to create any custom execution wrappers. llvm-svn: 131186
* Fix whitespace.Michael J. Spencer2011-03-311-13/+13
| | | | llvm-svn: 128631
* Switch FileRemover from PathV1 to V2.Michael J. Spencer2011-03-311-3/+3
| | | | llvm-svn: 128630
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-0/+1
| | | | llvm-svn: 128535
* Be more consistent in using ValueToValueMapTy.Rafael Espindola2010-10-131-6/+6
| | | | llvm-svn: 116387
* Most of bugpoint now only needs to know the pass names.Rafael Espindola2010-08-081-5/+5
| | | | llvm-svn: 110534
* Make EmitProgressBitcode const and add a Module argument to runPasses. UseRafael Espindola2010-08-051-3/+6
| | | | | | that argument to simplify runPassesOn. llvm-svn: 110291
* Add const to some methods and change TestMergedProgram to return the mergedRafael Espindola2010-07-311-17/+25
| | | | | | module and take a const BugDriver. llvm-svn: 109951
* Add a Program argument to diffProgram to avoid a use of swapProgramIn.Rafael Espindola2010-07-301-11/+14
| | | | llvm-svn: 109859
* Make the test while reducing blocks functional. This avoids accessing freedRafael Espindola2010-07-291-4/+22
| | | | | | memory when one of the original BB is destroyed. llvm-svn: 109747
* Instead of abusing swapProgramIn, just add a Module argument toRafael Espindola2010-07-281-10/+8
| | | | | | EmitProgressBitcode. llvm-svn: 109602
* Clone and restore the module being reduced inRafael Espindola2010-07-261-6/+27
| | | | | | | | | | | ReduceMiscompilingFunctions::TestFuncs. This makes the test functional (i.e., no side effects). Before we would end up using dead functions if a pass decided to remove them (inline for example) and we would also keep broken functions and conclude that that a single function was enough to reproduce the bug. llvm-svn: 109387
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-201-5/+5
| | | | | | | | working again. I don't see why this patch would cause them to fail the way they are, but none of the other intervening patches seem likely either. llvm-svn: 108818
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-201-5/+5
| | | | llvm-svn: 108813
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-201-5/+5
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. llvm-svn: 108805
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-201-5/+5
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). llvm-svn: 108794
* Use ValueMap instead of DenseMap.Devang Patel2010-06-241-18/+18
| | | | | | The ValueMapper used by various cloning utility maps MDNodes also. llvm-svn: 106706
* Save more temps with -save-temps.Rafael Espindola2010-06-211-3/+7
| | | | llvm-svn: 106409
* Use ->isVoidTy().Dan Gohman2010-06-071-1/+1
| | | | llvm-svn: 105550
* Fix PR6951 by fixing Module leaks in bugpoint.Jeffrey Yasskin2010-05-111-7/+7
| | | | llvm-svn: 103523
* The llc -f flag was removed.Nick Lewycky2010-04-291-1/+1
| | | | llvm-svn: 102670
* Boolify.Benjamin Kramer2010-04-121-1/+1
| | | | llvm-svn: 101035
* Remove use of exceptions from bugpoint. No deliberate functionality change!Nick Lewycky2010-04-121-98/+189
| | | | llvm-svn: 101013
* remove obsolete comment.Chris Lattner2010-01-161-5/+2
| | | | llvm-svn: 93661
* bugpoint doesn't need the mangler at all. DisambiguateGlobalSymbolsChris Lattner2010-01-161-25/+5
| | | | | | | | dates to a time when two different LLVM values could have the same name but different types. Simplify it to just assign names to unnamed things and let the core symtab resolve duplicates. llvm-svn: 93660
* switch liblto to use the new getNameWithPrefix() method instead of ↵Chris Lattner2010-01-161-2/+2
| | | | | | getMangledName. llvm-svn: 93643
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-2/+2
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* Add -output-prefix option to bugpoint (to change the default output name).Daniel Dunbar2009-09-071-4/+8
| | | | llvm-svn: 81154
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-17/+22
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* Change bugpoint to use Triple to make runtime decisions.Daniel Dunbar2009-08-181-7/+8
| | | | | | | | | - This is cleaner, and makes bugpoint match the host instead of the build architecture. - Patch by Sandeep Patel! llvm-svn: 79309
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-12/+17
| | | | llvm-svn: 78948
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-3/+1
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-1/+1
| | | | llvm-svn: 77635
OpenPOWER on IntegriCloud