Commit Graph

7885 Commits

Author SHA1 Message Date
John Criswell
7f33695eac Checkin of autoconf-style object root.
Moved Makefile.common to Makefile.rules.  This makes project Makefiles easier
to support, and allows for easier overriding of default configuration values
that used to be in Makefile.common.
Modified Makefile.config.in to determine paths for directories (like
LLVM_SRC_ROOT) and to use the pwd binary as opposed to the shell builtin (this
works better for symbolic links).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8377 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-06 14:44:17 +00:00
Misha Brukman
103f0c3472 Added some optimizations:
* Generate a single BA instead of 6-instruction JUMP if possible
  (this occurs both in the creation and overwriting of the stub code)
* If possible, rewrite the ORIGINAL call to call the generated function
  directly, thus bypassing the stub entirely

Also added some statistics on how often calls are overwritten and how often the
CompilationCallback is invoked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8376 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 22:59:31 +00:00
Chris Lattner
fd13129bdf Reorder #includes to follow LLVM conventions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8375 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 20:08:15 +00:00
Brian Gaeke
f10da33e21 No longer used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8374 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:43:45 +00:00
Brian Gaeke
85ce5f3ccc Correct comments
Don't include InstLoops.h
Don't export factory functions for these passes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8373 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:43:19 +00:00
Brian Gaeke
d1cab3e6ce Interpreter, JIT moved to lib/ExecutionEngine (includes -> llvm/ExecutionEngine)
Build lli using executionengine library


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8372 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:42:34 +00:00
Brian Gaeke
dbff77238f Add ExecutionEngine directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8371 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:39:49 +00:00
Brian Gaeke
9722294d30 ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
Build ExecutionEngine as library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8370 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:39:22 +00:00
Brian Gaeke
5c9cd9564f -abort-on-exception is gone. Rebuild your gccld shell scripts, folks! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8368 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 19:23:03 +00:00
Brian Gaeke
29794cba81 Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8367 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 18:55:03 +00:00
Brian Gaeke
70975eef57 Make CreateArgv part of lli rather than part of ExecutionEngine.
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
 GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
 into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
 isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
 more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8366 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 18:42:01 +00:00
Chris Lattner
5bea411ad2 Fix reading of invoke instrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8365 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 18:25:29 +00:00
Brian Gaeke
f3c333e36f Zap some more unused static method decls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8364 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 06:10:50 +00:00
Chris Lattner
8e2185ea07 Whoa, we were misreading invoke instructions "normal" destinations quite badly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8363 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 05:27:58 +00:00
Brian Gaeke
d5caf7c432 Remove printOperandInfo(), and simplify run().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8362 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 05:22:08 +00:00
Chris Lattner
c9b24a3bad Add asserts, move code around. This gets the dropAllTypeUses partially implemented
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8361 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 05:10:04 +00:00
Brian Gaeke
932539a941 Remove support for printing values from a module by name, only used
w/ interactive keyboard entry of names.
With that, Support.cpp is history.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8360 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 05:04:32 +00:00
Brian Gaeke
413ab6655b Remove support for interactive (step finish next) instructions.
Remove printCurrentInstruction, printStackFrame and infoValue
 (only used interactively) and other unused methods of Interpreter.
Fold UserInput.cpp containing only callMainFunction() into Interpreter.cpp.
Remove unused Profile flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8359 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 04:46:26 +00:00
Chris Lattner
8df956ccf2 Move functionality preserving changes.
Inline containsEquivalent
Remove some //'s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8358 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:39:52 +00:00
Chris Lattner
266caa2c3d Refactor what has effectively become copy-and-pasted code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8357 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:30:47 +00:00
Chris Lattner
b1678c6132 Get friendly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8356 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:30:18 +00:00
Chris Lattner
169726b113 Check in a bunch of minor fixes, plus a whole lot of #if 0'd out code, which will hopefully be enabled in the near future
This does not make any functionality changes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8355 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:21:39 +00:00
Chris Lattner
f2bbe37610 Reshuffling of APIs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8354 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-05 02:15:36 +00:00
Chris Lattner
663b479004 containsEquivalent never returns its argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8353 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:49:53 +00:00
Chris Lattner
d256ed8954 Non-functional change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8352 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:47:07 +00:00
Chris Lattner
a5112c768d Remove needless usage of getDescription()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:46:03 +00:00
Chris Lattner
e09a128df0 Inline method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8350 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:43:40 +00:00
Chris Lattner
6f4e3854fd Remove method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8349 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:43:35 +00:00
Chris Lattner
a3057e8c89 Don't try to be sneaky, breaking recursive types in the process
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8348 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:41:03 +00:00
Chris Lattner
c34c13245a This is now unnecessary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8347 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:38:22 +00:00
Brian Gaeke
9ad671d540 Remove support for breakpoints (not used).
Remove some dead code and whitespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8346 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 23:15:40 +00:00
Brian Gaeke
8e53948881 Move EE dtor where it belongs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8345 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 22:57:27 +00:00
Brian Gaeke
f58815e161 Interpreter cleanups:
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
 which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8344 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-04 22:21:24 +00:00
Brian Gaeke
82d8277ad5 ExecutionEngine.cpp: Move execution engine creation stuff into a new
static method here.
 Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.

Make creation method for each type of EE into a static method of its
own subclass.

Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
 Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8343 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 20:34:19 +00:00
Chris Lattner
6c51a36371 Avoid printing meaningless numbers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8342 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 20:25:27 +00:00
Chris Lattner
b8565e3918 Fix bug where we couldn't print a function without a name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8341 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 17:56:43 +00:00
Chris Lattner
3e80abee49 Follow the pattern of all other atu's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8340 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 16:01:54 +00:00
Chris Lattner
a3ad5b21e8 No need to rescan types when they are created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8339 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 14:44:53 +00:00
Chris Lattner
43c2eb7def Final cleanups, document is good to go
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8338 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 04:20:13 +00:00
Chris Lattner
27f71f2659 Add a WHOLE lot of updates clarifications and fixes. This is not done but getting closer. I changed the docs to reflect the goal of making unwind an instruction, not an intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8337 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-03 00:41:47 +00:00
Chris Lattner
fde246a42f hyphenation police visited here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8336 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 23:38:41 +00:00
Chris Lattner
a2f3e1d80b Another small speedup, this one to: 2.42s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8335 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 22:52:49 +00:00
Chris Lattner
d8d6c76a9a Don't return bogus references, and don't add an entry to the Concrete map
unless it's not empty!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8334 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 22:50:02 +00:00
Chris Lattner
1bb626387b Another optimization, speed up the testcase to 2.7s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8333 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 22:15:15 +00:00
Chris Lattner
bc4846d76c Removal of explicit stack, which requires the method to be a member (so it can
call setAbstract).  Now that we just compute abstractness we can also return
the computed value by value instead of as an argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8332 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:56:34 +00:00
Chris Lattner
2a4a4b54ad New method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8331 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:54:56 +00:00
Chris Lattner
87ca5faed7 Remove the "recursive bit", not only is it unused by anyone, it was also
not correctly calculated, and calculating it wrong for fun seems rather
pointless.  This also speeds up my favorite testcase by .25 seconds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8330 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:41:05 +00:00
Chris Lattner
ca371048a5 Remove the "recursive bit", not only is it unused by anyone, it was also
not correctly calculated, and calculating it wrong for fun seems rather
pointless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8329 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:40:33 +00:00
John Criswell
22edc39046 Added code that makes the bytecode file readable (needed by the generated shell
script).
Removed the use of sys/types.h and sys/stat.h.
Modified FileExists() so that it uses the access() system call to check for
file existance.  This requires less header files and might even be a tad bit
faster.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8328 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:11:22 +00:00
John Criswell
66622be46a Added the MakeFileReadable() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8327 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 21:09:30 +00:00