summaryrefslogtreecommitdiff
path: root/tools/bugpoint/CrashDebugger.cpp
Commit message (Collapse)AuthorAge
* A couple misc fixes so that bugpoint doesn't explode reducing code ↵Eli Friedman2011-11-01
| | | | | | containing landingpads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143435 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more consistent in using ValueToValueMapTy.Rafael Espindola2010-10-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116387 91177308-0d34-0410-b5e6-96231b3b80d8
* Use RunPassesOn as in the rest of bugpoint.Rafael Espindola2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110682 91177308-0d34-0410-b5e6-96231b3b80d8
* Most of bugpoint now only needs to know the pass names.Rafael Espindola2010-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110534 91177308-0d34-0410-b5e6-96231b3b80d8
* Add const to compileProgram and to the various test functions in CrashDebugger.Rafael Espindola2010-08-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110306 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a Module argument to the remaining runPasses methods and mark getContextRafael Espindola2010-08-05
| | | | | | const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110300 91177308-0d34-0410-b5e6-96231b3b80d8
* Make EmitProgressBitcode const and add a Module argument to runPasses. UseRafael Espindola2010-08-05
| | | | | | that argument to simplify runPassesOn. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110291 91177308-0d34-0410-b5e6-96231b3b80d8
* Instead of abusing swapProgramIn, just add a Module argument toRafael Espindola2010-07-28
| | | | | | EmitProgressBitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109602 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r108813, in an attempt to get the self-host buildbots ↵Owen Anderson2010-07-20
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r108794, a fix for the failing test from last time.Owen Anderson2010-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r108794, "Separate PassInfo into two classes: a constructor-freeDaniel Dunbar2010-07-20
| | | | | | | superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is breaking teh everything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate PassInfo into two classes: a constructor-free superclass ↵Owen Anderson2010-07-20
| | | | | | (StaticPassInfo) and a constructor-ful subclass (PassInfo). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ValueMap instead of DenseMap.Devang Patel2010-06-24
| | | | | | | The ValueMapper used by various cloning utility maps MDNodes also. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106706 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ->isVoidTy().Dan Gohman2010-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105550 91177308-0d34-0410-b5e6-96231b3b80d8
* No need to special-case structs here; structs are first-class now.Dan Gohman2010-06-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105513 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of exceptions from bugpoint. No deliberate functionality change!Nick Lewycky2010-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-16
| | | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-23
| | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-31
| | | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
* Use errs() instead of std::cerr.Dan Gohman2009-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-13
| | | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-01
| | | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the crash debugger to actually bisect globals once it's determined that itNick Lewycky2009-05-25
| | | | | | | can't just eliminate all global initializers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72378 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bisection step on the list of instructions before doing the linearNick Lewycky2009-05-25
| | | | | | | | simplification. It's not clear to me whether this can replace the first of the linear instruction simplification stages or not, so I left it in. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72377 91177308-0d34-0410-b5e6-96231b3b80d8
* Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itselfTorok Edwin2009-05-24
| | | | | | | | can crash during instruction simplification (for example if it creates a broken module). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72362 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -disable-global-remove option to bugpoint.Torok Edwin2009-05-24
| | | | | | | | | | Sometimes when bugpointing a crash the bugpoint-reduced-simplified.bc reproduces a totally different bug than the original one ("GV doesn't have initializer"). Although its useful to report that bug too, I need a way to reduce the original bug, hence I introduced -disable-global-remove. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72361 91177308-0d34-0410-b5e6-96231b3b80d8
* CloneModule stores the BasicBlock mapping in ValueMap. There's no need toNick Lewycky2009-04-04
| | | | | | | recompute it. This fixes a O(n^2) in number of blocks when reducing a crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68422 91177308-0d34-0410-b5e6-96231b3b80d8
* Use CloneModule's ValueMap to avoid needing to look upDan Gohman2009-03-06
| | | | | | | functions by name. This fixes PR718. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66239 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bugpoint bug on anonymous functions. Instead of looking upDan Gohman2009-03-05
| | | | | | | | functions in the new module by name, use the ValueMap provided by CloneModule to do the lookups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66216 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve bugpoint output a bit by outputting the actual instructions instead ofMatthijs Kooijman2008-07-29
| | | | | | | | just it's name, which is often empty. Also remove a newline from the output that wasn't really needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54158 91177308-0d34-0410-b5e6-96231b3b80d8
* several multiple-retval fixes for bugpoint.Chris Lattner2008-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50331 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs. Patch by Mike Stump!Bill Wendling2008-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49317 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* With debug info, there are nameless constant global values. do not crash ↵Andrew Lenharth2008-03-24
| | | | | | when we hit one git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48749 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from tools.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
* Pretty straightforward replacement of "bytecode" by "bitcode"Gabor Greif2007-07-04
| | | | | | | performed on tools/ first, in order not to cause lethal damage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37877 91177308-0d34-0410-b5e6-96231b3b80d8
* add bitcode supportChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36849 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-05
| | | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-02-05
| | | | | | | | | | | This patch replaces the SymbolTable class with ValueSymbolTable which does not support types planes. This means that all symbol names in LLVM must now be unique. The patch addresses the necessary changes to deal with this and removes code no longer needed as a result. This completes the bulk of the changes for this PR. Some cleanup patches will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-30
| | | | | | | confusion with external linkage types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR411:Reid Spencer2007-01-06
| | | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-11-02
| | | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot a }Bill Wendling2006-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31226 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-added the part where it tries to remove all global variables first.Bill Wendling2006-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31225 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR960. Improves bugpoint so that it removes global variableBill Wendling2006-10-25
| | | | | | | | initializers as well. This is only a first pass. It can be slow because it clones the module for each pass. An obvious improvement is not to do that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31182 91177308-0d34-0410-b5e6-96231b3b80d8
* This commit adds a new feature called find-bugs. The find-bugs option can be ↵Patrick Jenkins2006-08-15
| | | | | | invoked on a .bc file from the command like with -find-bugs and a list of passes you wish to test. This procedure takes the set of optimization passes the user specifies, randomizes the passes, runs the passes on the specified .bc file, compiles the program, and finally runs the program checking its output vs the .bc file with no optimizations. This process repeats until either the user kills bugpoint or an error occurs in the optimizations, program complitation, or the running of the program. If an error occurs, bugpoint attempts to diagnose the error by eliminating passes that are not at fault and code that is not needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29703 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ToolRunner.(cpp|h) into the bugpoint directoryChris Lattner2006-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28699 91177308-0d34-0410-b5e6-96231b3b80d8
* add an assert to get a slightly better msg about this problemChris Lattner2006-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26812 91177308-0d34-0410-b5e6-96231b3b80d8