aboutsummaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it forChris Lattner2003-08-053-8/+14
| | | | | | | narrowing, no matter what. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7596 91177308-0d34-0410-b5e6-96231b3b80d8
* Only test the vector of functions if it is non-empty.Misha Brukman2003-08-051-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7594 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not attempt to reduce a test case if it is an empty set.Misha Brukman2003-08-041-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7570 91177308-0d34-0410-b5e6-96231b3b80d8
* Added code that ensures that we don't try to reduce an empty vector of basicJohn Criswell2003-08-041-1/+1
| | | | | | | | blocks. This fixes the bugpoint regressions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7569 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to flush the output stream so that we get incremental updatesChris Lattner2003-08-041-11/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7555 91177308-0d34-0410-b5e6-96231b3b80d8
* Print accurate run instructions for when testing LLCChris Lattner2003-08-041-6/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7554 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix problem I introduced in bugpoint with the cleanup functionsChris Lattner2003-08-031-8/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7549 91177308-0d34-0410-b5e6-96231b3b80d8
* DEBUG got moved to Debug.hChris Lattner2003-08-012-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7491 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new FileUtilities library to do diff'ing of filesChris Lattner2003-08-011-22/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7484 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the C++, more portable, deleterChris Lattner2003-08-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7483 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't emit modules with lots of cruft hanging off of them.Chris Lattner2003-08-011-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7478 91177308-0d34-0410-b5e6-96231b3b80d8
* Parameterize the performFinalCleanups a bitChris Lattner2003-08-012-5/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7477 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore intrinsic functions -- don't mangle their names or rewrite calls to them.Misha Brukman2003-07-301-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7438 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGeneratorBug.cpp:Misha Brukman2003-07-303-14/+39
| | | | | | | | | | | | | | | | | * Temporarily externing InputArgv to print it out for the benefit of LLI command needed to reproduce the result. * Print out the list of functions currently being tested * ListReducer now returns a bool if there was a failure, so test for it ListReducer.h: * Handle the case where there is no problem by returning true if failure is found. Also correctly handles the case when there is only 1 pass/function. Miscompilation.cpp: * ListReducer now returns a bool if there was a failure, so test for it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7434 91177308-0d34-0410-b5e6-96231b3b80d8
* * Moved InputArgv out of anonymous scope to be extern'd in another file.Misha Brukman2003-07-301-32/+47
| | | | | | | | * Added DEBUG() statements to print out parameters passed to executing programs * Actually ADD parameters to a program running via the JIT (using vector<char*>) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7433 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.Misha Brukman2003-07-302-8/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7427 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a vector<char*> instead of char*[] so that we can add arbitrary number ofMisha Brukman2003-07-301-38/+35
| | | | | | | | parameters, such as command-line arguments that the executing program gets via bugpoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7423 91177308-0d34-0410-b5e6-96231b3b80d8
* Add variable to capture arguments that should be passed to the user programChris Lattner2003-07-301-2/+5
| | | | | | | This is unused so far. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7422 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert change: default architecture is never set, it is guessed from inputMisha Brukman2003-07-301-8/+1
| | | | | | | | bytecode file. This means that LLC on X86 will compile to Sparc assembly given a 64-bit input bytecode file... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7419 91177308-0d34-0410-b5e6-96231b3b80d8
* * Disambiguate symbols before we start splitting module by functionsMisha Brukman2003-07-291-5/+6
| | | | | | | | * Moved DisambiguateGlobalSymbols() out of the ReduceMisCodegenFunctions class * Added an assert to have a cleaner exit if `main' is not found in the module git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7380 91177308-0d34-0410-b5e6-96231b3b80d8
* Implemented cleanups as suggested by Chris:Misha Brukman2003-07-281-41/+39
| | | | | | | | | | | | | | | | | | | | * Use Module::getNamedFunction() to delete "main" instead of using a loop * Compare function pointers instead of function names to determine equivalence * Simplified creation of a 2-element vector containing zeroes * Manually performed LICM on code * Added an abort() in case a function we're considering occurs in something that is not an instruction * Use DEBUG() around code sections instead of just in a statement in a loop, because GCC's DCE may not be good enough to completely remove it in a release build * Print out a command that can be directly copied-and-pasted to re-execute * Instead of just checking if a symbol begins with a dot and fixing it accordingly, use Mangler and fix all the problems (invalid chars in C symbol names) entirely * The new `main' function has external linkage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7371 91177308-0d34-0410-b5e6-96231b3b80d8
* Added comment to function isExecutingJIT()Misha Brukman2003-07-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7370 91177308-0d34-0410-b5e6-96231b3b80d8
* BugDriver.h:Misha Brukman2003-07-283-43/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Added method to query if BugDriver is executing the JIT currently. This provides the ability in adding code that is conditionally executed in codegen debugging phase. CodeGeneratorBug.cpp: * Delete test functions from the Safe module * Code conditionally added when debugging the JIT: use the lazy resolver function added to Emitter.cpp to get function pointer by name. When compiled into an .so, this is the only way to get a pointer to an external function * Added a symbol disambiguator which will keep symbols uniquely named across modules * Delete generated files by default * The function `main' *must* stay in the .bc file for the JIT, but that prevents debugging it alone. This patch makes the old `main' become `old_main' and adds a new function named `main' which just calls the original with the same parameters, thereby keeping functionality the same. ExecutionDriver.cpp: * Returned to getting unique filenames * Simplified code choosing between using and not using shared library option git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7364 91177308-0d34-0410-b5e6-96231b3b80d8
* Add in support to load shared objects (-load is provided by Support library).Misha Brukman2003-07-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7360 91177308-0d34-0410-b5e6-96231b3b80d8
* Made a bunch of cleanups, as per Chris' recommendations:Misha Brukman2003-07-244-44/+61
| | | | | | | | | | | | | | | | | * Removed unused global and member variables * Fixed comments (CodeGeneratorBug.cpp) * Check for possibly failing GCC::create() and CBE::create() * Remove generated files after diffing the output (e.g., shared object) * Instead of using std::for_each, use explicit loops as std::for_each may duplicate the functor, and ours carries state * Changed member var from cl::opt<std::string> to just std::string * Fixed doxygen comments * Fixed string comparisons to use [ str.empty() ] instead of [ str == "" ] * Cache instances of CBE and GCC in BugDriver across compilations and executions while testing tools. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7302 91177308-0d34-0410-b5e6-96231b3b80d8
* Major addition to bugpoint: ability to debug code generators (LLC and LLI).Misha Brukman2003-07-246-167/+620
| | | | | | | | | | | | | | | | | | | | | | | | | The C backend is assumed correct and is used to generate shared objects to be loaded by the other two code generators. LLC debugging should be functional now, LLI needs a few more additions to work, the major one is renaming of external functions to call the JIT lazy function resolver. Bugpoint now has a command-line switch -mode with options 'compile' and 'codegen' to debug appropriate portions of tools. ExecutionDriver.cpp: Added implementations of AbstractInterpreter for LLC and GCC, broke out common code within other tools, and added ability to generate C code with CBE individually, without executing the program, and the GCC tool can generate executables shared objects or executables. If no reference output is specified to Bugpoint, it will be generated with CBE, because it is already assumed to be correct for the purposes of debugging using this method. As a result, many functions now accept as an optional parameter a shared object to be loaded in, if specified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7293 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed misspelling.Misha Brukman2003-07-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7223 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove instloops libraryChris Lattner2003-07-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7210 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize the target architecture based on compiler defines, so if compiled onMisha Brukman2003-07-181-1/+8
| | | | | | | | | x86 or Sparc, LLC will automatically default to that platform, no guessing required. On another platform, it will default to `noarch' and will have to guess which architecture to compile to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7207 91177308-0d34-0410-b5e6-96231b3b80d8
* Added pass to instrument backedges for lightweight tracingAnand Shukla2003-07-181-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7202 91177308-0d34-0410-b5e6-96231b3b80d8
* The word `separate' only has one `e'.Misha Brukman2003-07-144-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
* Converted tabs to spaces.Misha Brukman2003-07-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7139 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed indentation.Misha Brukman2003-07-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7122 91177308-0d34-0410-b5e6-96231b3b80d8
* * If compiling on X86 or Sparc, automagically enable the JIT for that archMisha Brukman2003-07-021-9/+25
| | | | | | | | | | | | * Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will force the inclusion of that JIT on a different architecture * If neither JIT is enabled (e.g., compiling on a different architecture), the -march option will not be available to LLI. * As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit faster by not including the x86 library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7070 91177308-0d34-0410-b5e6-96231b3b80d8
* Merged in autoconf branch. This provides configuration via the autoconfJohn Criswell2003-06-302-7/+7
| | | | | | | system. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
* Run the simplify CFG pass after instcombine which has the effect of deletingChris Lattner2003-06-261-0/+4
| | | | | | | ALL of the global ctor/dtor stuff if it is not used! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6916 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the instcombine pass before globaldce, so that if globals are made dead ↵Chris Lattner2003-06-261-4/+4
| | | | | | by instcombine, that they can be deleted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6910 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to run cleanups even if nothing was modified in the preview passesChris Lattner2003-06-251-13/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6897 91177308-0d34-0410-b5e6-96231b3b80d8
* Run dead arg elimination, and tell it that it's ok to hack up non-internal ↵Chris Lattner2003-06-251-0/+1
| | | | | | functions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6896 91177308-0d34-0410-b5e6-96231b3b80d8
* Add tail duplication pass to the pipeline, move the verifier pass to the frontChris Lattner2003-06-221-6/+4
| | | | | | | Other minor reorganizations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6849 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2003-06-201-22/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6799 91177308-0d34-0410-b5e6-96231b3b80d8
* Funcresolve no longer performs nicification of resolved functionsChris Lattner2003-06-191-0/+5
| | | | | | | instcombine does this git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6787 91177308-0d34-0410-b5e6-96231b3b80d8
* tools/llc/llc.cpp: Make "-o -" work.Brian Gaeke2003-06-181-12/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6780 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Target/Sparc/Sparc.cpp:Brian Gaeke2003-06-182-62/+50
| | | | | | | | | | | | | | | | | | | | | | Move LowerAllocations, PrintFunction, and SymbolStripping passes, and the corresponding -disable-strip and -d options, over here to the SPARC target-specific bits of llc. Rename -d to -dump-asm. tools/llc/Makefile: Reindent. Add x86 library so that llc compiles again. tools/llc/llc.cpp: Remove support for running arbitrary optimization passes. Use opt instead. Remove LowerAllocations, PrintFunction, and SymbolStripping passes, as noted above. Allow user to select a backend (x86 or SPARC); default to guessing from the endianness/pointer size of the input bytecode file. Fix typos. Delete empty .s file and exit with error status if target does not support static compilation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6776 91177308-0d34-0410-b5e6-96231b3b80d8
* Reindent code to match the rest of the fileChris Lattner2003-06-181-38/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6772 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new DAE pass to gccld. It does not add cause any regressions in the ↵Chris Lattner2003-06-181-0/+4
| | | | | | test-suite git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6770 91177308-0d34-0410-b5e6-96231b3b80d8
* Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms whereBrian Gaeke2003-06-175-5/+5
| | | | | | | it is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6753 91177308-0d34-0410-b5e6-96231b3b80d8
* Life is too short. Link in too much stuff on Linux to make building on sun ↵Chris Lattner2003-06-171-4/+3
| | | | | | easier git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6748 91177308-0d34-0410-b5e6-96231b3b80d8
* The never-ending odyssey trying to get sparc to linkChris Lattner2003-06-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6747 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to get the value of ARCH before we use itChris Lattner2003-06-171-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6746 91177308-0d34-0410-b5e6-96231b3b80d8