summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
* Initial checkin of the LLEE, the (LL)VM (E)xecution (E)nvironment.Misha Brukman2003-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7760 91177308-0d34-0410-b5e6-96231b3b80d8
* Include the new selection library for the X86 targetChris Lattner2003-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7720 91177308-0d34-0410-b5e6-96231b3b80d8
* Chomped spurious blank lines.Misha Brukman2003-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7700 91177308-0d34-0410-b5e6-96231b3b80d8
* File-related functions moved to FileUtilities.h .Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7696 91177308-0d34-0410-b5e6-96231b3b80d8
* Completely remove mention of the correlated branch elimination pass. It hasChris Lattner2003-08-07
| | | | | | | bugs and needs to be reworked anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7692 91177308-0d34-0410-b5e6-96231b3b80d8
* * The possessive third-person singular has no apostrophe (its)Misha Brukman2003-08-07
| | | | | | | | * Grouped header files to fit with the LLVM standard * Fit code into 80 columns git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7690 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-grouped and alphabetized headers for easier reading and cleaner style.Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7689 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed path for SystemUtils.h and a few code cleanups.Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7688 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.Misha Brukman2003-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7687 91177308-0d34-0410-b5e6-96231b3b80d8
* If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it forChris Lattner2003-08-05
| | | | | | | 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-05
| | | | 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-04
| | | | 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-04
| | | | | | | | 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-04
| | | | 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-04
| | | | 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-03
| | | | 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-01
| | | | 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-01
| | | | 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-01
| | | | 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-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7478 91177308-0d34-0410-b5e6-96231b3b80d8
* Parameterize the performFinalCleanups a bitChris Lattner2003-08-01
| | | | 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-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7438 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGeneratorBug.cpp:Misha Brukman2003-07-30
| | | | | | | | | | | | | | | | | * 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-30
| | | | | | | | * 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-30
| | | | 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-30
| | | | | | | | 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-30
| | | | | | | 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-30
| | | | | | | | 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-29
| | | | | | | | * 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-28
| | | | | | | | | | | | | | | | | | | | * 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-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7370 91177308-0d34-0410-b5e6-96231b3b80d8
* BugDriver.h:Misha Brukman2003-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-28
| | | | 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-24
| | | | | | | | | | | | | | | | | * 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-24
| | | | | | | | | | | | | | | | | | | | | | | | | 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-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7223 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove instloops libraryChris Lattner2003-07-21
| | | | 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-18
| | | | | | | | | 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-18
| | | | 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-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
* Converted tabs to spaces.Misha Brukman2003-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7139 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed indentation.Misha Brukman2003-07-07
| | | | 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-02
| | | | | | | | | | | | * 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-30
| | | | | | | 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-26
| | | | | | | 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-26
| | | | | | 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-25
| | | | 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-25
| | | | | | 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-22
| | | | | | | Other minor reorganizations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6849 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2003-06-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6799 91177308-0d34-0410-b5e6-96231b3b80d8