ExecveHandler.c:
* Use "" instead of <> for LLVM include files
* Use raw I/O, we don't need buffering
* Set errno = 0 before using open()
* strlen() doesn't count NULL terminator in its size
* Use memcmp() instead of strcmp()
* Return result of the real execve(), not 0
* Search for path to bytecode file if not absolute/relative path
SysUtils.c:
* Convert all comments to C-style
* Stop using `bool', use `unsigned' instead
SysUtils.h:
* Stop using `bool', use `unsigned' instead
* Updated comment to FindExecutable()
README.txt:
* Describe the goal of LLEE and an application
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7911 91177308-0d34-0410-b5e6-96231b3b80d8
* 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
* 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
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
* 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
* 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 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
* 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
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