summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/Miscompilation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When a function takes a variable number of pointer arguments, with a zeroJeff Cohen2005-10-231-1/+1
| | | | | | | | | | | | | pointer marking the end of the list, the zero *must* be cast to the pointer type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will not extend the zero to 64 bits, thus allowing the upper 32 bits to be random junk. The new END_WITH_NULL macro may be used to annotate a such a function so that GCC (version 4 or newer) will detect the use of un-casted zero at compile time. llvm-svn: 23888
* If the user interrupts bugpoint, don't extract loopsChris Lattner2005-08-021-2/+6
| | | | llvm-svn: 22603
* When the user hits ctrl-c, bugpoint should attempt to stop reduction asChris Lattner2005-08-021-8/+13
| | | | | | | quickly as possible and output what it has so far. If they hit it twice, bugpoint is killed. llvm-svn: 22579
* Eliminate all remaining tabs and trailing spaces.Jeff Cohen2005-07-271-6/+6
| | | | llvm-svn: 22523
* Fix PR576.Chris Lattner2005-07-121-21/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting a JIT stub that looks like this: internal void %l1_main_entry_2E_ce_wrapper(int) { header: %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) ) ; <sbyte*> [#uses=1] %resolverCast = cast sbyte* %resolver to void (int)* ; <void (int)*> [#uses=1] call void %resolverCast( int %0 ) ret void } Emit one that looks like this: internal void %l1_main_entry_2E_ce_wrapper(int) { Entry: %fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache ; <void (int)*> [#uses=2] %isNull = seteq void (int)* %fpcache, null ; <bool> [#uses=1] br bool %isNull, label %lookupfp, label %usecache usecache: ; preds = %lookupfp, %Entry %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ] ; <void (int)*> [#uses=1] call void %fp( int %0 ) ret void lookupfp: ; preds = %Entry %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) ) ; <sbyte*> [#uses=1] %resolverCast = cast sbyte* %resolver to void (int)* ; <void (int)*> [#uses=2] store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache br label %usecache } This makes the JIT debugger *MUCH* faster on large programs, as getPointerToNamedFunction takes time linear with the size of the program, and before we would call it every time a function in the text module was called from the safe module (ouch!). llvm-svn: 22387
* Final Changes For PR495:Reid Spencer2005-07-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This chagne just renames some sys::Path methods to ensure they are not misused. The Path documentation now divides methods into two dimensions: Path/Disk and accessor/mutator. Path accessors and mutators only operate on the Path object itself without making any disk accesses. Disk accessors and mutators will also access or modify the file system. Because of the potentially destructive nature of disk mutators, it was decided that all such methods should end in the work "Disk" to ensure the user recognizes that the change will occur on the file system. This patch makes that change. The method name changes are: makeReadable -> makeReadableOnDisk makeWriteable -> makeWriteableOnDisk makeExecutable -> makeExecutableOnDisk setStatusInfo -> setStatusInfoOnDisk createDirectory -> createDirectoryOnDisk createFile -> createFileOnDisk createTemporaryFile -> createTemporaryFileOnDisk destroy -> eraseFromDisk rename -> renamePathOnDisk These changes pass the Linux Deja Gnu tests. llvm-svn: 22354
* For PR495:Reid Spencer2005-07-071-5/+5
| | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. llvm-svn: 22349
* If loopextract breaks the program provide output so that we can repro theChris Lattner2005-05-081-1/+9
| | | | | | problem. llvm-svn: 21790
* Eliminate tabs and trailing spacesJeff Cohen2005-04-221-1/+1
| | | | llvm-svn: 21441
* Remove trailing whitespaceMisha Brukman2005-04-221-23/+23
| | | | llvm-svn: 21428
* Replace more a*'s with arg_*'s, thanks to Gabor Greif!Chris Lattner2005-03-151-1/+1
| | | | llvm-svn: 20615
* Use arg_iterator and arg_begin and arg_end functions.Alkis Evlogimenos2005-03-151-4/+5
| | | | llvm-svn: 20608
* Fix spelling, patch contributed by Gabor Greif!Chris Lattner2005-02-271-1/+1
| | | | llvm-svn: 20343
* Improve output precision.Chris Lattner2005-01-151-2/+12
| | | | llvm-svn: 19564
* For PR351:Reid Spencer2004-12-161-5/+5
| | | | | | | | | | | * removeFile() -> sys::Path::destroyFile() * remove extraneous toString() calls * convert local variables representing path names from std::string to sys::Path * Use sys::Path objects with FileRemove instead of std::string * Use sys::Path methods for construction of path names llvm-svn: 19001
* For PR351:Reid Spencer2004-12-151-13/+19
| | | | | | * Convert use of getUniqueFilename to sys::Path::makeUnique(); llvm-svn: 18949
* LinkModules is now in the Linker classReid Spencer2004-12-131-3/+3
| | | | llvm-svn: 18863
* Fix a bug in the checkin where I adjusted this code to work whenChris Lattner2004-11-191-7/+8
| | | | | | LinkModules nukes the second module argument. llvm-svn: 17986
* Make this code not depend on LinkModules leaving the second argument unmolested.Chris Lattner2004-11-161-20/+30
| | | | llvm-svn: 17874
* Linker.h has a new home.Reid Spencer2004-11-141-1/+1
| | | | llvm-svn: 17801
* Changes For Bug 352Reid Spencer2004-09-011-2/+2
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* * Convert "\n" -> '\n'Misha Brukman2004-07-231-10/+10
| | | | | | | * Print out another '\n' after printing out program execution status * Make sure code wraps at 80 cols llvm-svn: 15123
* bug 122:Reid Spencer2004-07-181-2/+1
| | | | | | - Replace ConstantPointerRef usage with GlobalValue usage llvm-svn: 14953
* Linker.h moved to include/llvm/SupportMisha Brukman2004-06-231-1/+1
| | | | llvm-svn: 14351
* Turn the block extractor on by default now that it basically works, ↵Chris Lattner2004-05-121-7/+0
| | | | | | eliminating the option. llvm-svn: 13502
* Check to see if all blocks are extractible first.Chris Lattner2004-05-121-8/+19
| | | | llvm-svn: 13491
* Implement the final missing bits for block extractor support. Now bugpointChris Lattner2004-05-121-2/+35
| | | | | | can extract basic blocks up to the limit of the block extractor implementation. llvm-svn: 13475
* Implement basic block extraction for the miscompilation debugger. This ↵Chris Lattner2004-05-111-0/+112
| | | | | | | | | | | | | | | | still needs two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block extractor itself needs to have enough bugs fixed for this to be more or less useful. Until the time that this is generally useful, it is hidden behind the new bugpoint -enable-block-extraction option. I hope to get the FIXME done tonight. Also of note, this patch adds a -extract-bbs option to bugpoint which can be used to debug the block extractor. (hint hint Misha :) llvm-svn: 13471
* Teach bugpoint to be a little bit smarter and avoid repeating workChris Lattner2004-04-231-1/+5
| | | | llvm-svn: 13132
* Add a space before result for readability on the command line.Misha Brukman2004-04-221-7/+7
| | | | llvm-svn: 13109
* Add doxygenified comments to functions.Misha Brukman2004-04-211-0/+18
| | | | llvm-svn: 13097
* As per Chris, greatly simplify handling of external functions by using theMisha Brukman2004-04-191-75/+22
| | | | | | | wrapper idea uniformly: we can use Value::replaceAllUsesWith() instead of special-casing by class of user. llvm-svn: 13063
* Finally implement rewriting global initializers which use external functionsMisha Brukman2004-04-191-10/+83
| | | | | | | | | | | by creating an internal wrapper function with same signature as the external function, and use it instead of the "real" function. The wrapper then calls the external function using the same JIT function resolution API that has been used before for rewriting instructions, since the wrapper has an explicit call instruction which we can rewrite. llvm-svn: 13054
* Disambiguate symbols after loop extraction so that we can diagnose a codeChris Lattner2004-04-111-16/+18
| | | | | | generator bug if multiple loops are extracted from a function. llvm-svn: 12847
* Fix an obvious bug in the refactoring I did a few days agoChris Lattner2004-04-091-1/+1
| | | | llvm-svn: 12797
* Merge the code generator miscompilation code into the optimizer miscompilationChris Lattner2004-04-051-1/+255
| | | | | | | code. This "instantly" gives us loop-extractor power to assist with the debugment of our nasty codegen issues. :) llvm-svn: 12678
* Refactor and genericize codeChris Lattner2004-04-051-55/+71
| | | | llvm-svn: 12675
* minor formatting changeChris Lattner2004-04-021-3/+2
| | | | llvm-svn: 12606
* Fix two pretty serious bugs:Chris Lattner2004-04-021-9/+14
| | | | | | | | | | | | 1. Each time the loop extractor extracted a loop, we would leak a module. 2. When we extracted a loop, we didn't add the new function to the list of miscompiled functions. Thus if the bug was in a loop nest and we extracted it, we could actually *LOSE THE BUG*, which is very bad. With these patches, bugpoint has successfully found a bug for me in a function with several nested loops, and cut it down to just one of them. :) :) llvm-svn: 12605
* When loop extraction succeeds, make sure to map the function pointers overChris Lattner2004-03-171-0/+11
| | | | | | to avoid dangling references. llvm-svn: 12470
* Fix thinko, and PR292Chris Lattner2004-03-161-1/+1
| | | | llvm-svn: 12426
* After reducing a miscompiled program down to the functions which are beingChris Lattner2004-03-141-27/+105
| | | | | | | | | miscompiled, try to use the loop extractor to reduce the program down to a loop nest that is being miscompiled. In practice, the loop extractor appears to have too many bugs for this to be useful, but hopefully they will be fixed soon... llvm-svn: 12398
* Refactor and clean up a bunch more code. No major functionality changes.Chris Lattner2004-03-141-42/+46
| | | | | | | | | | | | | | * Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList) * Make PrintFunctionList truncate the output after 10 entries, like the crash debugger did. This allows code sharing. * Add a couple of methods to BugDriver that allows us to eliminate some friends * Improve comments in ExtractFunction.cpp * Make classes that used to be friends up bugdriver now live in anon namespaces * Rip a bunch of functionality in the miscompilation tester into a new TestMergedProgram function for future code sharing. * Fix a bug in the miscompilation tester induced in my last checkin llvm-svn: 12393
* Refactor all of the "splitting a module into two pieces" code to avoidChris Lattner2004-03-141-88/+30
| | | | | | | code duplication. Also, don't use ReduceMiscompilingFunctions::TestFuncs to print out the final message. llvm-svn: 12387
* A couple of minor cleanups: don't forward declare private classes, put privateChris Lattner2004-02-181-3/+3
| | | | | | classes in an anon namespace llvm-svn: 11604
* Add a stub for debugging code generator crashesChris Lattner2004-02-181-4/+4
| | | | llvm-svn: 11602
* finegrainify namespacificationChris Lattner2004-01-141-25/+28
| | | | llvm-svn: 10839
* Bugpoint had appalingly bad grammar. Fix some of it.Chris Lattner2003-12-071-4/+8
| | | | llvm-svn: 10308
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+4
| | | | llvm-svn: 9903
* fix file headersChris Lattner2003-10-201-1/+0
| | | | llvm-svn: 9293
OpenPOWER on IntegriCloud