Commit Graph

628 Commits

Author SHA1 Message Date
Chris Lattner
bb37a69bfc Fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8613 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 02:42:54 +00:00
John Criswell
f430434e8d New header file for gccld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8610 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 20:24:40 +00:00
John Criswell
71478b7f72 Removed linking functionality from gccld.cpp and moved it to linker.cpp.
Renamed functions that were all lower-case.
Moved functions from util.cpp into linker.cpp or gccld.cpp.
Removed util.h and created gccld.h.
Refactored the linker functionality in linker.cpp so that it is easier to
follow, easier to modify, and it's library/object file search behavior is
easier to understand and document.
Added code to include library paths when doing native linking, but this
causes problems and is currently #ifdef'd out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8609 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-19 20:24:23 +00:00
John Criswell
dc0de4f07b Refactored gccld into three C++ source files.
Added code ignore bytecode link failures when generating native code.
Moved native code and bytecode generation out of the main() function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-18 16:22:26 +00:00
John Criswell
a589d31faa Replaced the call to strdup() with a new operator followed by a strcpy().
This should prevent calls to the new oerator and malloc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8587 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 19:14:41 +00:00
John Criswell
83ca6ec8a3 Added the use of the const keyword.
Have gccld find the path to llc and gcc instead of having the library do it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8586 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 19:04:22 +00:00
John Criswell
621727c29e Removed the use of the environ variable and instead use the environment array
passed into main().  This may (or may not) be more portable, but it looks
nicer.
Added functions to copy the environment array and modify the copy, thus
preserving the environment.
Switched from using system() to using ExecWait().
The code now removes the assembly file generated when using the -native option.
Fixed the remove_env() function: The previous revision truncated the
environment variable list.  This version just zaps the variable as intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8579 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 15:20:51 +00:00
Chris Lattner
79f03d350e Use new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8573 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 05:00:07 +00:00
John Criswell
dabaf7de39 Added the -native option.
With this option, gccld links the program into LLVM bytecode and a native code
binary.  This allows llvmgcc to correctly tell GNU configure scripts when
things aren't defined properly (because the native link will fail).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8570 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 21:27:35 +00:00
Misha Brukman
c679d7e88f link' is now llvm-link'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:21:52 +00:00
Misha Brukman
64899a4fb9 link' has become llvm-link'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8555 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-16 15:21:21 +00:00
Misha Brukman
3ef3beb1d7 link' is being renamed to llvm-link'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8541 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 18:34:34 +00:00
Misha Brukman
8248f11d26 Stop building as' and dis' as they have been removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 14:45:00 +00:00
Misha Brukman
e3d4e4458d `dis' is no longer an LLVM tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8528 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 14:44:22 +00:00
Misha Brukman
998b673a26 `as' is no longer an LLVM tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8527 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 14:44:05 +00:00
Chris Lattner
f7c7f5abf8 Enable the setjmp/longjmp lowering pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8521 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-15 04:56:44 +00:00
Tanya Lattner
dd8067f4fd Added llvm-ar to the Makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8506 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-13 03:23:46 +00:00
Tanya Lattner
e3df92e9c1 Fixed warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8505 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-13 03:18:56 +00:00
Misha Brukman
67b36e4a2f Bugpoint has the ability of generating a plethora of core files, so to
avoid filling up the disk, set the max core file size to 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8503 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-12 20:42:57 +00:00
Chris Lattner
b3e8fe4221 scalarrepl now includes mem2reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8472 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:46:10 +00:00
Chris Lattner
473205250d Move the -indvars pass much later to where it is more likely to do good stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8470 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-11 16:34:07 +00:00
Brian Gaeke
d1a85a744c Check in the fix I meant to apply here, but mistakenly applied to
tools/extract instead..... heh


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 21:11:42 +00:00
Chris Lattner
2148bcb7e3 Clean up header, remove extra #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8451 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:42:51 +00:00
Brian Gaeke
053134a1ee Make createVerifierPass return a FunctionPass *.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8449 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-10 19:37:04 +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
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
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
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
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
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
d35b5b542d Modified the code so that it uses the MakeFileExecutable() method. The new
library code now adds all execute bits that are allowed by the umask value to
the file's current permission bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8325 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-02 20:17:20 +00:00
Chris Lattner
145b7ddd67 #include is unnecessary
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8316 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:45:46 +00:00
Chris Lattner
253aef8e59 Preselection is now integrated into the Sparc target library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8305 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:30:17 +00:00
Chris Lattner
0748a3904a Sparc peephole optimizer moved out of post-opts library into Sparc target library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8302 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-01 20:26:14 +00:00
Chris Lattner
36f18aefe8 Remove the -stopAfterNPasses option, which has been long obsoleted by bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8278 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 21:47:24 +00:00
Chris Lattner
cf37c23a47 * move the dead-type-eliminate passes to the end, where they are more useful
* add prune-eh and inlining passes
* other minor pass reorganizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8277 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 21:45:55 +00:00
Chris Lattner
55b2eb3ef8 Rename TarjanSCCIterator -> scc_iterator
* Increases consistency with other iterators (e.g. df_iterator, po_iterator...)
  * It's shorter
  * We don't name classes by the implementation, we name it for the interface!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 20:01:57 +00:00
Chris Lattner
729d73d425 Don't explicitly use the SCC class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8271 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:55:06 +00:00
Chris Lattner
9f2a06e76d The SCC::HasLoop method is now in the main iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8269 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:51:38 +00:00
Chris Lattner
6c5fd8e055 The tarjan iterator now returns a reference to the current SCC, not a possibly null pointer!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:35:16 +00:00
Chris Lattner
8d0a23ab42 Indent classes correctly in the namespace
move bodies out-of-line
Add getAnalysisUsage method for SFGSCC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8259 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:27:11 +00:00
Chris Lattner
23ebd75aff * Cleanups
* Iterate from tarj_begin -> tarj_end, not from tarj_begin -> NULL


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8258 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 19:23:41 +00:00
John Criswell
3a9ce67289 "Help keep our secrets secret."
Added code to respect the umask value.  Before, files were generated world
readable, which may not be desirable for all installations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8215 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-29 14:46:12 +00:00
Misha Brukman
85544baf54 Renaming dis' -> llvm-dis'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8197 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 22:14:16 +00:00
Misha Brukman
231d64dd08 Build llvm-as and llvm-dis as the upgrade path to renamed tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8192 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:43:51 +00:00
John Criswell
b5d09bf4cc Added code to avoid checking for .bc when the filename is too short.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8190 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:42:29 +00:00
Misha Brukman
ad0bf0fc0c Renaming LLVM dis' to llvm-dis'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8189 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:34:13 +00:00
Misha Brukman
cbb62dd6b7 Renaming LLVM as' to llvm-as'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8188 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 21:32:57 +00:00