now handle far calls (i.e., beyond the 30-bit limit in call instructions).
* As a side-effect, this allows us to unify and clean up the mmap() call and
code around it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7381 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
This us used by bugpoint -- when code is compiled to a shared object to be
JITted, it must use the JIT's lazy resolution method to find function addresses,
because some functions will not be available at .so load time, as they are in
the bytecode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7363 91177308-0d34-0410-b5e6-96231b3b80d8
Single and FP double reg types (which share the same reg class).
Now all methods marking/finding unused regs consider the regType
within the reg class, and SparcFloatRegClass specializes this code.
(2) Remove machine-specific regalloc. methods that are no longer needed.
In particular, arguments and return value from a call do not need
machine-specific code for allocation.
(3) Rename TargetRegInfo::getRegType variants to avoid unintentional
overloading when an include file is omitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7334 91177308-0d34-0410-b5e6-96231b3b80d8
causing a nasty array bound error later.
2. Fix silly typo causing logical shift of unsigned long to use
SRL instead of SRLX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7330 91177308-0d34-0410-b5e6-96231b3b80d8