Commit Graph

1253 Commits

Author SHA1 Message Date
Chris Lattner
5110bed0a0 If bugpoint can't match the reference output, at LEAST provide the output
we can get.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11653 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 06:12:58 +00:00
Chris Lattner
bdc9784613 Wild and passionate uncontrolled goose chases are amusing to watch, but not
very helpful.  Let bugpoint favor being helpful instead of determined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11652 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 05:58:58 +00:00
Chris Lattner
47dd2766f2 Format a bit more nicely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11651 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-20 05:56:48 +00:00
Chris Lattner
3733f3be73 Make sure to print a stack trace whenever an error signal is delivered
to the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11634 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:33:00 +00:00
Chris Lattner
364d1203e7 Make sure to print a stack trace whenever an error signal is delivered to
the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:32:39 +00:00
Chris Lattner
f73b4ca7f9 Make sure to print a stack trace whenever an error signal is delivered to the
tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11632 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 20:32:12 +00:00
Chris Lattner
7c955fdb44 Be a bit more robust. Explicitly check for a code generator crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11624 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 17:03:49 +00:00
Alkis Evlogimenos
1d29a6d6c7 Make ToolExecutionError inherit std::exception and implement its
interface: getMessage() is gone, use what() instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11621 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-19 07:39:26 +00:00
Chris Lattner
f66d9069cf Fix the "horribly N^2'd" problem when deleting individual instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11617 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:59:11 +00:00
Chris Lattner
8b189277bd * Predicate the optimizer crash debugger on a function.
* Implement a new code generator crash debugger which uses this predicate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11614 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:26:28 +00:00
Chris Lattner
ea9212ca96 Add a new method for use by the code generator crash debugger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11613 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:25:22 +00:00
Chris Lattner
ca00512008 Don't crash if there are no passes in the PassesToRun list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11612 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:24:56 +00:00
Chris Lattner
9cbbee332f Add support for just running the code generator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11611 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:24:41 +00:00
Chris Lattner
f03715c6a8 Add support for just compiling a program
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11610 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 23:24:29 +00:00
Chris Lattner
9709272675 Make the executeProgram method exception safe, not leaving around bytecode
files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11607 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 22:01:21 +00:00
Chris Lattner
0cc8807029 Make more stuff public. Make the instruction argument to
deleteInstructionFromProgram be const


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11606 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 21:50:26 +00:00
Chris Lattner
a36ec88203 make a bunch of methods public
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11605 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 21:35:28 +00:00
Chris Lattner
f913f40be8 A couple of minor cleanups: don't forward declare private classes, put private
classes in an anon namespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11604 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 21:29:46 +00:00
Chris Lattner
06905db7d2 Cleanup and simplify manipulation of the program, eliminate the need for so
many 'friends' of bugdriver.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11603 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 21:24:48 +00:00
Chris Lattner
025262692a Add a stub for debugging code generator crashes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11602 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 21:02:04 +00:00
Chris Lattner
a3de11783f indent correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11601 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:58:00 +00:00
Chris Lattner
722ca71285 Don't yell. BUGPOINT should yell, not the tool runner :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11600 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:57:38 +00:00
Chris Lattner
7bb11547e4 Update comments, if we are running with the CBE, make sure the Interpreter
variable and the CBE variable are pointer equal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11599 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:52:02 +00:00
Chris Lattner
c8580b2aee Byebye method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11598 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:38:12 +00:00
Chris Lattner
89bf9ea65e If there is an error running a tool, include the error message (e.g. assertion failure) in the exception
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11597 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:38:00 +00:00
Chris Lattner
5dcc3664b5 ctor arguments changed order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11595 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:22:25 +00:00
Chris Lattner
230fef8b11 Catch exception and print message as appropriate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11594 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:22:11 +00:00
Chris Lattner
8c56be5e2b When an error occurs executing a tool, we now throw an exception instead
of calling exit(1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11593 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 20:21:57 +00:00
Chris Lattner
74d4527e40 Bugpoint will be throwing exceptions soon, perpare for the worst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11584 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 17:32:54 +00:00
Chris Lattner
c064e8930f This class got moved to FileUtilities.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11583 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 17:17:10 +00:00
Chris Lattner
ba9cc1f789 Give extract -o and -f options, just like every other tool!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11580 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-18 16:53:59 +00:00
Chris Lattner
c4601bf2f3 The CBE is now in llc, not llvm-dis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11534 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 06:40:51 +00:00
Chris Lattner
9915cd9e9f The C backend is no longer in llvm-dis, it's in llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11533 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 06:40:06 +00:00
Chris Lattner
df2cf418a8 The CBE is no longer in llvm-dis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11532 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-17 06:39:48 +00:00
Chris Lattner
74661c838c When the user runs 'llc foo.bc -march=c', write the output to "foo.cbe.c", not
to "foo.s".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11485 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-15 22:54:19 +00:00
Misha Brukman
dc5feab7fd Break a line that's over 80cols into two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:46:47 +00:00
Chris Lattner
e8e7a188ec Do not advertise our -c option anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11413 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:24:46 +00:00
Chris Lattner
2f1f8e0c4e Mercilessly rip the cbackend out of llvm-dis. Leave a helpful error message
for those who have not heard the news.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11412 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:22:40 +00:00
Chris Lattner
666d20a301 Add support for -march=c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11410 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:19:09 +00:00
Chris Lattner
055b3ff7bd Change how we create the cwriter, and add a buttload of libraries that it now
needs.  This will be fixed shortly


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11407 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:01:14 +00:00
Brian Gaeke
c5cad211d6 Add check-exit-code option, defaulting to true.
Add ProgramExitedNonzero argument to executeProgram(), and make it
tell its caller whether the program exited nonzero.

Move executeProgramWithCBE() out of line, to ExecutionDriver.cpp, and remove
its extra arguments which are always defaulted.  Make it turn off
check-exit-code if the program exits nonzero while generating a reference
output.

Make diffProgram() assume that any nonzero exit code is a failure, if
check-exit-code is turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 18:37:32 +00:00
Chris Lattner
89cf3939b7 Factor profile information loading OUT of llvm-prof into libanalysis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11316 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-11 05:56:07 +00:00
Brian Gaeke
973e3ec7db Fix indentation of selectiondag.
I don't know why its indentation has been bugging me, but it has.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11180 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 05:49:29 +00:00
Chris Lattner
f2592ce201 Minor change to breakpoint (lack of) support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11169 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-08 00:06:20 +00:00
Brian Gaeke
2217bdbf68 Add a -march=powerpc option. Automatically select it if this looks like a
big-endian, 32-bit module, or if __ppc__, __POWERPC__, or __APPLE__ are
defined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11075 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 19:06:12 +00:00
Brian Gaeke
7ca255b76c Link in the PowerPC back-end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11074 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-02 19:05:52 +00:00
Chris Lattner
05e4e8a5d2 Now that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
This tremendously improves the code generated by the LLVM optimizer, primarily
by making the inliner more aggressive.  For example, it improves the stepanov
benchmark from 55.56 mega-additions/sec to 98.04 Ma/s.  It also improves the
oopack/iterator benchmark from 338.3MFLOPS/s to 1103.4MFLOPS/s.  Less noteworthy,
it improves oopack/matrix from 573 -> 641 MFLOPS/s.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11053 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-01 07:24:53 +00:00
John Criswell
6f5592ae2c Fixed PR#197. The libcrtend library is removed from the library linking list
when creating native executables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10979 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-26 23:51:10 +00:00
John Criswell
7f7d16b62f Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
every file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10976 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-26 20:59:41 +00:00
Chris Lattner
0cccb18c98 Make sure to verify the result before writing out the bytecode file. Not doing
so can cause obscure errors downstream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10840 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 03:39:46 +00:00
Chris Lattner
fa76183e8e finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-14 03:38:37 +00:00
Chris Lattner
e275fe834a Remove standard C header wrappers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10748 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 19:15:38 +00:00
Chris Lattner
335eb9d912 Remove wrappers around std c files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10744 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-10 19:12:09 +00:00
Chris Lattner
f6608ddf44 Ugh, fix some copy and pasted code that somehow never got compiled or something
:(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10706 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-06 23:46:17 +00:00
Chris Lattner
e1567ae5ef * Implement set/show args
* Implement support for arguments to the 'run' command
* Minor cleanups and fixes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10703 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-06 05:37:16 +00:00
Chris Lattner
8b1125f53d implement the "null command" which repeats the last command
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10702 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-06 05:36:30 +00:00
Chris Lattner
d508776cd5 /me slaps head
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10694 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-05 05:47:19 +00:00
Chris Lattner
6d47bae50b Add new directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10688 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-05 05:28:15 +00:00
Chris Lattner
7af5c12597 Initial checkin of the LLVM Source-Level Debugger. This is incomplete, but
a good start.  The status is documented in docs/SourceLevelDebugging.html


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10687 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-05 05:27:31 +00:00
Chris Lattner
c4ee2747f2 Remove some pointless #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10653 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-30 07:50:31 +00:00
Chris Lattner
b74f4d0422 Use getFileSize() instead of sys/stat.h directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10652 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-30 07:48:17 +00:00
Chris Lattner
97f752f6d5 Use new getFileSize function. Eliminate some using directives. Reorder #includes a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10651 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-30 07:45:46 +00:00
Chris Lattner
74295c0164 Add a -disable-opt flag to gccas, so that we can use -Wa,-disable-opt just
like -Wl,-disable-opt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10647 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-30 03:24:27 +00:00
Chris Lattner
6fb6ce3148 Pass extra arguments around n stuph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10631 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-28 09:51:04 +00:00
Chris Lattner
269a42811b Factor out code to ExecutionEngine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10614 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-26 06:49:53 +00:00
Chris Lattner
3ef3dd36fe Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10613 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-26 06:36:20 +00:00
Chris Lattner
efec9669d9 * eliminate the -f argument to lli, as it was silly and never useful anyway
* Inline callMain function
* Remove hack from the ExecutionEngines where the 'run' method would automatically
  run atExit functions.  Fixing this requires explicitly calling exit if main returns


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10611 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-26 06:14:47 +00:00
Chris Lattner
7efea1dd98 update comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10607 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-26 05:07:35 +00:00
John Criswell
368751f2b7 Modified the logic so that library objects with main() are only linked in
if the program currently has main undefined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10597 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 20:27:14 +00:00
John Criswell
1715ce00e4 Modified the linker so that it always links in an object from an archive
that defines the symbol "main."  This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.

There is probably a more correct way to do this, but this works for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 17:37:06 +00:00
Chris Lattner
ac1ccae982 Rename method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10593 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-23 09:41:45 +00:00
Chris Lattner
ef1b62b00a There is no reason to add -load support to LLC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10483 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-15 23:10:25 +00:00
Chris Lattner
2cdd21c2e4 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-14 21:35:53 +00:00
Brian Gaeke
3f6e798a14 Add an assertion to make sure we are at least getting argv[0] right.
Use a clearer error message when we fail to load a program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10414 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-12 00:47:19 +00:00
Chris Lattner
ca6cc6f277 Run tailcall elimination in a more logical place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10402 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-11 17:50:32 +00:00
Chris Lattner
b592fc2b8d Make 'opt -o -' work correctly instead of creating a file named './-'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10359 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-10 14:41:33 +00:00
John Criswell
aa2a47d813 Added the -h option for compatibility with other linkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10335 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-09 15:39:11 +00:00
Chris Lattner
de9750def7 Bugpoint had appalingly bad grammar. Fix some of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 02:43:09 +00:00
Chris Lattner
1b747167da Do not leave a bunch of crud lying around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10307 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 02:31:03 +00:00
Chris Lattner
1dcf7bc6a9 It is now after pldi. This issue has been fixed, so remove the hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10306 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-07 01:44:18 +00:00
Tanya Lattner
57bd796604 New command line parsing. This isn't as perfect as I would have liked. The CommandLine Library needs to be extended, in order to parse the options and allow for optional dashes. In addition, the help option isn't correct since I do the parsing mostly myself. But this is in the ocorrect ar format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10297 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-06 23:01:25 +00:00
Chris Lattner
043b9722f5 be 3.4 happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10265 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 20:04:13 +00:00
Chris Lattner
9e6f686559 Fix compatibility with gcc 3.4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10262 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-29 19:45:47 +00:00
Chris Lattner
548e813fa7 The function resolving pass must be run, even if -disable-opt is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 09:44:03 +00:00
Chris Lattner
6cc8ca9229 * The return value of LinkLibraries is ignored, so remove it.
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
  CONTINUE ANYWAY!  Instead, just output the warning, and keep going. :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10249 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-28 07:44:09 +00:00
Misha Brukman
0d2459a49f I'm gonna be picky and say we don't really need that trailing slash "lib/"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10196 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:31:57 +00:00
Misha Brukman
3e15c7a976 Make sure we ONLY add a `-load' switch to the JIT command line if the file is
verified as having an ELF header. This fixes PR151.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10195 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-24 05:29:42 +00:00
Chris Lattner
c6b519d64e Do not DESTROY programs by default. No wonder bugpoint was not being useful all this time!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10175 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-23 04:51:05 +00:00
Chris Lattner
3edb77c07e Revert the previous patch since it causes lots of miscompilations. :( :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10172 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 19:07:47 +00:00
Chris Lattner
8bc098be0c Do not crash when dealing with invoke and unwind instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10160 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 02:10:38 +00:00
Chris Lattner
89eca9097d Use new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10159 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-22 02:10:26 +00:00
Chris Lattner
14b170f5ff Reorder passes a bit. In particular, it makes sense to run globaldce IMMEDIATELY after funcresolve. Also, run the mem2reg pass _early_ so that IPCP and DAE actually do stuff.
Run instcombine and simplify cfg after this to cleanup the intraprocedural messes we create.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10134 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-21 21:44:35 +00:00
Misha Brukman
3e25f2e1be When writing out the runner script, add -load=<lib> lines to pull in all the
shared objects automagically, so it doesn't have to be done by hand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10114 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:42 +00:00
Misha Brukman
84fbc653ce Add ability to search only for native shared object, and expose the
functionality to the rest of gccld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10113 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 19:08:06 +00:00
Misha Brukman
438e364692 For consistency, removed space between function name and left paren in function
call, i.e. [ addPass (...) ]  =>  [ addPass(...) ]


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10105 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:26:15 +00:00
Misha Brukman
9839969110 * Doxygenified comments, simplifying them and shortening in the process
* Eliminated extra space


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10104 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-20 06:21:54 +00:00
Brian Gaeke
8b1daa3e71 Unbreak the "-" as filename hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10099 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 22:15:00 +00:00
Brian Gaeke
820428711f Also print an error msg. for files we cannot currently deal with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10097 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 21:57:30 +00:00
Brian Gaeke
08d03c79a2 Fix PR134, by checking FileOpenable() on each input file before analyzing its
type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10096 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-19 21:52:09 +00:00
Brian Gaeke
c8db76c647 Only use -Wl,-R. if HAVE_LINK_R.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10066 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-18 06:31:17 +00:00
Brian Gaeke
1c0b6982d2 Include Support/FileUtilities.h.
Print module identifier in DumpSymbolNamesFromModule().
In DumpSymbolNamesFromFile(), check whether it is an archive or a bytecode
 file, and call the corresponding reader function (ParseBytecodeFile or
 ReadArchiveFile).
Unconditionally set MultipleFiles for archives.
Fixes PR117.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10044 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:34:13 +00:00
Brian Gaeke
1ab90d4e38 Add a -verify option to verify the results of gccld passes.
Add a -disable-opt option to turn off gccld optimization passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10040 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:28 +00:00
Brian Gaeke
2282ae1ebd When we find a module we want, in an archive, in verbose mode,
print out the module's identifier (which should now contain the name
 of both the archive and the module.)
Wrap some lines at 80 cols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10039 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-16 23:07:13 +00:00
Chris Lattner
a8d76d4bde As the comments indicate, this is a temporary, repulsive, hack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9982 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-13 19:26:54 +00:00
Chris Lattner
6a45da0de6 Restore the -llvm option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-12 04:59:59 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Brian Gaeke
0d723acf15 Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9902 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 21:54:01 +00:00
Misha Brukman
aab9ca73fd 'Tis quite silly to check for a cached version of the entire executable. That
amounts to checking for a completely-native version. We'll cache on a
function-by-function basis instead (in the JIT's CodeEmitter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9894 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:38:56 +00:00
Brian Gaeke
ee8adb1955 This version of Linker.cpp works a lot better, but it's a little messy. Sorry.
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:27:37 +00:00
Misha Brukman
fa33a13232 The caching will not live in LLEE's execve() handler; that's suboptimal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9890 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 18:23:09 +00:00
Chris Lattner
cc650b615d Give gccld more guts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9835 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:55:09 +00:00
Chris Lattner
cde1cf3f9d Add new command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-06 20:29:25 +00:00
Brian Gaeke
aee4de9957 Give this header file an Emacs mode-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9749 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:10 +00:00
Brian Gaeke
00cc86a8fc Do not assume the first file is a bytecode file. Instead, construct a dummy
Module and link things into that.

Also, fix a typo in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:13:00 +00:00
Brian Gaeke
3b3640a373 Shorten and correct some function-header comments.
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.

Make LinkFiles not skip the first file in Files.

Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 22:12:52 +00:00
Chris Lattner
fcb6ec0c7e I hate it when bugpoint is all ready to give me a bytecode file, then crashes
in final cleanups.  Then you had to run the whole mess again with
-disable-final-cleanups.

This makes bugpoint run the cleanups in a protected environment so that if
they crash, bugpoint itself doesn't crash.  This makes things much happier,
implements a FIXME, and gets rid of YABPO (yet another bugpoint option).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:45:35 +00:00
Chris Lattner
417477d6c2 Simplify the performFinalCleanups interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9740 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 21:15:19 +00:00
Chris Lattner
fe32bf5d0d Make -r work, fixing PR 91
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9724 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-05 06:05:21 +00:00
Chris Lattner
fd35c6417d If linking a library, do not link other libraries, like libc, into it!
This fixes lots of annoying warnings and error messages


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9677 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-03 17:27:17 +00:00
Chris Lattner
9088de7357 never print zero executions blocks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9626 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:34:05 +00:00
Chris Lattner
3b7f41631d Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9625 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:20:09 +00:00
Chris Lattner
e1ccadf58c Add percentage info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9624 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:13:26 +00:00
Chris Lattner
3baed41672 Hrm, some of my counters are wrapping around 32 bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9623 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-31 00:06:57 +00:00
Chris Lattner
367373053b If only have function profile, don't print out "not executed" for all of the blocks :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9622 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:44:28 +00:00
Chris Lattner
5e717646d7 Add the ability to print out llvm code when the -annotated-llvm option is given
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:42:09 +00:00
Chris Lattner
750ba3d6eb Add the ability to synthesize function counts from block count information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9595 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 21:47:44 +00:00
Chris Lattner
18884a86ae Print the top 20 most frequently executed blocks. Fix sort predicate problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-29 21:41:17 +00:00
Chris Lattner
368820586b Cleanup output a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 22:53:49 +00:00
Chris Lattner
e69671d65b Add the ability for users to specify a specific argv[0] to pass into the
program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 22:51:44 +00:00
Chris Lattner
4963dcf584 Print out command lines used to run the programs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 22:30:37 +00:00
Brian Gaeke
204089042b Fix extract to use the right TargetData, like Bugpoint does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9561 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 22:22:16 +00:00
Chris Lattner
33f1ca7d8a Add support for reading block frequencies. Fix bug in attribution of counts
to functions


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9559 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 21:25:23 +00:00
Chris Lattner
7a78d819b7 Provide an accessor for getting function count information. Print a simple
report


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9557 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 21:08:18 +00:00
Chris Lattner
e436779c5a Read in the bytecode and profile information, but don't do anything with
it yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9556 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 20:13:07 +00:00
Chris Lattner
67e7104db7 Build the llvm-prof directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 19:16:49 +00:00
Chris Lattner
6f82d07060 Initial checkin of llvmprof stub
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9551 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 19:16:35 +00:00
Chris Lattner
08020c13d0 Reorder #includes, drop unneeded one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9548 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-28 19:08:15 +00:00
Chris Lattner
73b96bd52d Do not print out lists with thousands of elements in them, that's kinda silly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9523 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-27 04:44:59 +00:00
Brian Gaeke
2f828c343b TraceMode, as you may have heard, is history.
ExecutionEngine::create no longer takes a TraceMode argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9495 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 20:00:17 +00:00
Brian Gaeke
7c7a3a2d7f lli -q is history. Rebuild your gccld shell scripts, folks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9494 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 20:00:06 +00:00
Chris Lattner
246ce3c2d5 Turn on the inliner by default at link-time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9477 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-24 18:09:23 +00:00
Chris Lattner
eaa35bb794 Turn on the IPCP pass by default. It has passed all of the tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9435 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 18:25:57 +00:00
Chris Lattner
5da69c79f9 Fix an assertion failure in Bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9406 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 15:42:55 +00:00
Chris Lattner
3b39537e71 Delete the -print-cfg pass from this file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9372 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 16:02:58 +00:00
Chris Lattner
20678b96ea New library needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9364 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-22 03:40:33 +00:00
Brian Gaeke
f1fce0881f Fix off-by-one error in processing of libraries named on command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9351 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 21:07:12 +00:00
Brian Gaeke
b5ee509be2 Fix the first FIXME in this file: automatically pick a "good"
interpreter by default, by picking the first one that works
from a hard-coded list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9337 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-21 17:41:35 +00:00
John Criswell
e2fab734ad Added LLVM copyright to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9314 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:29:16 +00:00
John Criswell
1ee1e64293 Removed extraneous comment line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:40:30 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Misha Brukman
06ea151895 Made error message more comprehensible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9299 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:47 +00:00
John Criswell
b576c94c15 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 19:43:21 +00:00
Chris Lattner
1dd27b157b fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9294 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:58:43 +00:00
Chris Lattner
943211187d fix file headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9293 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:57:13 +00:00
Chris Lattner
10cf8fa592 Fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9292 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:52:11 +00:00
John Criswell
7c0e022c5c Added copyright header to all C++ source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9291 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 17:47:21 +00:00
Chris Lattner
9fc2adc487 Don't bother forwarding function references which are external to the program entirely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9274 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 23:32:50 +00:00
Chris Lattner
6ebe44d22f Ok, return an explicit path to the shared object, unbreaking code generator
debugging with the JIT


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9273 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 21:54:13 +00:00
Chris Lattner
b656c20cf1 Fix iterator invalidation problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9272 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 21:48:27 +00:00
Chris Lattner
0b1fe84e81 Add debugtype, make output marginally more nice
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9251 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 02:27:40 +00:00
Chris Lattner
7b2ccffa59 Fix PR #47
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9250 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-19 02:14:58 +00:00
Chris Lattner
365f09a0e1 Update compile information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9247 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 21:55:47 +00:00
Chris Lattner
670406d269 Add usage blurb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9246 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 21:55:35 +00:00
Chris Lattner
1f0f1621f0 Without this option, the -run-llc mode does not work with shared objects at
all, making it pointless for use with the code generator debugger.  With it,
it works like a charm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9245 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 21:54:47 +00:00
Chris Lattner
b715497a56 Print -fno-strict-aliasing as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9243 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 21:08:57 +00:00
Chris Lattner
1a28a2b76d Don't leave a trail of bugpoint-execution-output-* breadcrumbs all over the place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9242 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 21:02:51 +00:00
Chris Lattner
367e1ee5be Change run-lli -> run-int
Many people associate lli with the jit, so we don't want to suprise them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9238 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 20:30:48 +00:00
Chris Lattner
25d66473c6 Default to using the CBE instead of the Interpreter if no -run-* option is specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9237 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 20:18:20 +00:00
Chris Lattner
a12c06a9fe If we detect a pass crash during miscompilation testing, immediately enter the
crash debugger


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9234 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 19:27:48 +00:00
Chris Lattner
a64c3fa47e Fix bug in my checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9217 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 00:14:13 +00:00
Chris Lattner
9f71e799c3 Another formatting fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9216 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-18 00:05:05 +00:00
Chris Lattner
5ef681c19d More cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9215 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 23:07:47 +00:00
Chris Lattner
9c6cfe1bff Be more helpful if a pass fails while chasing down a miscompilation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9214 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-17 23:03:16 +00:00
Chris Lattner
fc046d52e4 Make llvm-nm work in "pipe mode"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9172 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 18:45:23 +00:00
Chris Lattner
9eb52a5c29 Geeze, what is with Brian and these ifdef's?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9169 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 18:27:24 +00:00
Chris Lattner
784fa188be Welcome llvm-nm to the family
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9161 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 17:46:21 +00:00
Chris Lattner
f07c833b4b Unfortunately, it looks like level raise is still needed :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9158 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 16:50:34 +00:00
Brian Gaeke
972d3d7fff Okay, this is a little hack that "scratches an itch" of mine.
I dislike having to examine the output of "dis" to see what symbols
are in a bytecode file. So, here is a first cut at a "nm" utility for llvm.
Flame away.... :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9153 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-16 04:43:15 +00:00
Chris Lattner
dbc23189b1 Give this file a proper header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9141 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 21:49:57 +00:00
Chris Lattner
76a1bf9eb9 The levelraise pass is a broken old piece of crufty code that should be
left on the side of the road without a second thought.

It is preventing forward progress, so for now, we will disable it by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9140 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 21:48:38 +00:00
Brian Gaeke
b6c3a88dc4 Flush output after writing out the list of function names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9138 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-15 20:42:48 +00:00
Chris Lattner
7dac658792 add support forloading additional .so files on the command line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9131 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 22:24:31 +00:00
Chris Lattner
769f1fe672 Change the execute methods to take the shared object filename by const reference.
Other adjustments to work with the new ToolRunner interfaces


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9130 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:59:36 +00:00
Chris Lattner
eeed983821 Generalize abstract interpreter interface to allow linking in an arbitrary number of shared objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9129 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:52:52 +00:00
Misha Brukman
c4fb6fdd86 Enabling incremental bytecode loading in the JIT:
* Use the incremental bytecode reader interface to speed up execution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9127 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:39:53 +00:00
Chris Lattner
7915a1e764 Substantial cleanups:
* Add header comment
 * Remove extraneous #includes
 * Move the FileType enum into the GCC class
 * The GCC class is not virtual.
 * Move all of the "constructor" functions into the classes themselves
 * Stop using cl::list as arguments, use std::vector instead (which cl::list
   derives from)
 * Improve comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9121 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:34:11 +00:00
Chris Lattner
a0f5b15e1e The return value of compileSharedObject was never used. Return the shared
object's name instead


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9120 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:09:11 +00:00
Chris Lattner
1798e4ade8 Actually return an error if something bad happens, don't just exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9119 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:07:25 +00:00
Chris Lattner
8deb5814a1 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9118 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 21:01:51 +00:00
Chris Lattner
182a21ea71 Fix minor formatting bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9116 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 20:55:56 +00:00
Chris Lattner
a5a96a9ed9 Eliminate the bugpoint -mode option, by making bugpoint automatically infer the root of all of your problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9115 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-14 20:52:55 +00:00
Chris Lattner
99b85334d7 Unbreak code generator debug mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9106 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 21:04:26 +00:00
Chris Lattner
da17eb62f7 LLI no longer has -abort-on-exception
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9097 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-13 18:26:49 +00:00
Brian Gaeke
ac32bfa54b Don't include <stdlib.h>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9038 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 19:12:45 +00:00
Brian Gaeke
82a036fd19 Don't include "Config/stdlib.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9037 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 19:12:22 +00:00
Brian Gaeke
4fa9fd3035 Rewrite head-of-file comment.
Include <cstdio> instead of <stdio.h>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9033 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 18:47:08 +00:00
Chris Lattner
0cea3ec964 Add a new -disable-inlining option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9028 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 18:18:53 +00:00
Misha Brukman
cf00c4ab3b Fix spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9027 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:57:28 +00:00
Misha Brukman
452fea9972 Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9026 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:56:49 +00:00
Misha Brukman
af9e45f892 Renamed dis.cpp => llvm-dis.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9017 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:30:10 +00:00
Misha Brukman
27b1a0b6bb Renamed as.cpp => llvm-as.cpp; this should've happened a long time ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9016 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-10 17:28:53 +00:00
Brian Gaeke
608e75c604 Make more error messages have gccld's name in them.
Add a newline after "Cannot find <library>".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8968 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-08 19:09:30 +00:00
Chris Lattner
5de0bac111 This header file moved. Thanks to Bill and Nightly tester for noticing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8920 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-07 13:45:51 +00:00
Misha Brukman
6873450ed5 ToolRunner.h has been moved from include/Support to include/llvm/Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8898 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-06 18:37:24 +00:00
Chris Lattner
f474449804 Add a file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8781 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:28:53 +00:00
Misha Brukman
5208ba1292 Doxygen-ified comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:09:32 +00:00
Misha Brukman
e97fbed83a * Ordered includes according to LLVM style
* Put function signatures on one line if possible
* Deleted empty comment lines (^//$)
* Deleted braces around single statements
* Deleted space between function call and argument list


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8775 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:59:25 +00:00
Misha Brukman
61087cc023 Made code more terse:
* Deleted empty comment lines
* No single begin-braces '{' on a line by themselves


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8773 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:51:20 +00:00
Misha Brukman
1c53405b68 Doxygen-ified function comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8771 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:42:57 +00:00
Misha Brukman
b6b28431d1 Removed extra space in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8770 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:40:12 +00:00
Chris Lattner
238cf3c875 Remove initials from source file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8769 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:36:51 +00:00
Misha Brukman
bb5a4d0ec0 Make code more terse:
* Remove extra blank lines
* Delete space between function call and arg list
* Delete non-content comment lines ("//")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8768 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 17:33:12 +00:00
Brian Gaeke
e98ddfce7e 1. Use better error messages in LinkFiles().
2. I think the caller of LinkFiles() should not ignore a true return value.
   (If you have a good reason why it ought to, feel free to revert
   this. It's just something that's been bugging me for a while.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8760 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 14:03:48 +00:00
Chris Lattner
a58d2be76f Update file headers for renamed files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 03:24:28 +00:00
Misha Brukman
4148556a9c Use the newly abstracted interface for running our tools and gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8756 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:40:52 +00:00
Misha Brukman
9558c6af7b Implementation of the abstraction of running our tools + gcc, taken out of
bugpoint for general usage and enjoyment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8754 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:39:25 +00:00
Misha Brukman
29afb64d5b Abstracted away the process of running our tools + gcc from bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:38:57 +00:00
Misha Brukman
2e1fbdd267 * Added an interface for how LLEE would communicate with the OS
* Implemented the interface in StorageProxy.c
* Removed the script `llee' as it is now created by the Makefile
* Makefile now compiles a shared object version of the library, but only if
  using gcc-3.3, linking fails under gcc-3.2


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8751 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:37:00 +00:00
Misha Brukman
e676313966 Tersified code:
* Removed space between function name and its argument list
* Removed space between '&' and variable name
* Removed empty comment lines: `//'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8750 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:26:24 +00:00
Misha Brukman
17dc4ce5a7 * Ordered includes according to LLVM programmers' guide
* Made code layout more verbose: no more '{' on a line by itself
* Pruned extra whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-29 22:16:43 +00:00
Misha Brukman
00ce84066f Squelch warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8729 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-27 22:26:37 +00:00
Misha Brukman
3d8a54d00c To be consistent with the rest of LLVM codebase (and the rest of this file):
* Changed tabs to spaces
* Removed a space between a function call and its arguments (...)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8712 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-25 18:10:34 +00:00
Misha Brukman
8d2ff13149 Squelch warning and delete extra space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8685 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-23 17:27:02 +00:00
Chris Lattner
6e271236a5 Minor cleanups:
* Local header file goes at top
 * Remove unneeded #includes
 * Wrap code at 80 columns
 * Declare variables where they are used
 * 'register' is not needed
 * Use 'unsigned' instead of 'int' variables where possible


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8657 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-22 20:21:34 +00:00
Chris Lattner
75ebab89ff Now that the TCE pass passes all of the tests, add it to GCCAS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8621 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-20 05:26:22 +00:00
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
Chris Lattner
a55c4b1ce7 Reorder #includes
Make sure that we veryify the result before writing it out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8177 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 16:25:34 +00:00
Tanya Lattner
14baebf4ee First version of llvm-ar added to cvs repository.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8173 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-28 15:22:38 +00:00
Chris Lattner
0c8c0e80ca Remove some long-dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8135 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:52:02 +00:00
Chris Lattner
39c07264da Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8134 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:50:53 +00:00
Chris Lattner
62c720a5bd Targets now configure themselves with the module, not flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8133 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 19:50:12 +00:00
Chris Lattner
1543e40cea Add preliminary support for "any" pointersize/endianness. This will need
to change soon though.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8123 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 14:02:47 +00:00
Chris Lattner
bb43350e32 Add support for modules with "any" pointersize/endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8122 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 14:02:14 +00:00
Chris Lattner
a2b2dc9795 add preliminary support for -export-dynamic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8058 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-22 19:18:45 +00:00
Chris Lattner
c28c1d3cd1 Kill warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8056 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-22 18:57:43 +00:00
Misha Brukman
79063d6c4b Squash the warning that `Result' may not be initialized on all code paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8042 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-22 03:35:24 +00:00
John Criswell
69582b35b6 The JIT now passes the environment pointer to the main() function when it
starts a program.  This allows the GNU env program to compile and JIT under
LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8022 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 21:12:30 +00:00
Misha Brukman
c1fdca8045 Make the bytecode file executable as well for LLEE purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7992 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-20 20:38:15 +00:00
Chris Lattner
a59f71adea no-strict-aliasing redux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7965 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 22:32:48 +00:00
Chris Lattner
c13115c633 The CBE generates code which violates the TBAA rules of C, thus we must disable
optimizations based on these rules.  :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7964 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 22:32:03 +00:00
Chris Lattner
04aa29d7bf Add new -disable-verify option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7960 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 20:47:13 +00:00
Misha Brukman
5560c9d49c Spell `necessary' correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7944 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-18 14:43:39 +00:00
Chris Lattner
57c6941631 Give correct command line for making a shared object
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7929 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-17 23:38:53 +00:00
Chris Lattner
57e5a702d0 Make sure that "newmain" gets names for its arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7927 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-17 22:14:20 +00:00
Chris Lattner
e533cefbc0 Fix message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7926 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-17 22:08:25 +00:00
Misha Brukman
bdfb1d83d2 `execve_test' is not part of LLEE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7912 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 23:31:54 +00:00
Misha Brukman
593ece0050 A lot of changes were suggested by Chris.
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
2003-08-15 23:31:16 +00:00
Chris Lattner
ad6ba3e071 Revert my last (accidental) checkin, but keep the typeo fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7879 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:56:47 +00:00
Chris Lattner
80df4638fe rename selection library to selectiondag
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7878 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-15 04:56:09 +00:00
Chris Lattner
4c7fc1e813 Incorporate mapping library into the sparc library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7800 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-13 02:28:20 +00:00
Misha Brukman
0abaaf49fd Initial checkin of the LLEE, the (LL)VM (E)xecution (E)nvironment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7760 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 22:29:36 +00:00
Chris Lattner
4c08840e4b Include the new selection library for the X86 target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7720 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-11 14:59:53 +00:00
Misha Brukman
249d64a14c Chomped spurious blank lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7700 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-08 15:37:35 +00:00
Misha Brukman
3d9cafa003 File-related functions moved to FileUtilities.h .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7696 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:42:28 +00:00
Chris Lattner
23d5724c61 Completely remove mention of the correlated branch elimination pass. It has
bugs and needs to be reworked anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7692 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:30:12 +00:00
Misha Brukman
57d708b122 * The possessive third-person singular has no apostrophe (its)
* 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
2003-08-07 21:23:52 +00:00
Misha Brukman
e49603d79d Re-grouped and alphabetized headers for easier reading and cleaner style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7689 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:19:30 +00:00
Misha Brukman
11c6592daf Fixed path for SystemUtils.h and a few code cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7688 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:05:13 +00:00
Misha Brukman
0bd75bb92d Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7687 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-07 21:04:42 +00:00
Chris Lattner
47ae4a1cee If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it for
narrowing, no matter what.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7596 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 15:51:05 +00:00
Misha Brukman
a493ae300b Only test the vector of functions if it is non-empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 15:26:21 +00:00
Misha Brukman
5d3f1f01aa Do not attempt to reduce a test case if it is an empty set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7570 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 19:03:42 +00:00
John Criswell
5cfff2545d Added code that ensures that we don't try to reduce an empty vector of basic
blocks.
This fixes the bugpoint regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7569 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 18:24:31 +00:00
Chris Lattner
ca25b956f1 Make sure to flush the output stream so that we get incremental updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7555 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 00:56:43 +00:00
Chris Lattner
6730c8133a Print accurate run instructions for when testing LLC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-04 00:56:27 +00:00
Chris Lattner
15d11276c1 Fix problem I introduced in bugpoint with the cleanup functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7549 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-03 22:29:43 +00:00
Chris Lattner
c648dabf65 DEBUG got moved to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7491 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:13:59 +00:00
Chris Lattner
65f62790d6 Use the new FileUtilities library to do diff'ing of files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7484 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 20:29:45 +00:00
Chris Lattner
794a58ed19 Use the C++, more portable, deleter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7483 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 20:29:18 +00:00
Chris Lattner
10b9fa89a1 Don't emit modules with lots of cruft hanging off of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7478 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 16:14:33 +00:00
Chris Lattner
587a6ce4b9 Parameterize the performFinalCleanups a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7477 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 16:13:49 +00:00
Misha Brukman
3b624625e7 Ignore intrinsic functions -- don't mangle their names or rewrite calls to them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7438 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 21:45:20 +00:00
Misha Brukman
be6bf5668c CodeGeneratorBug.cpp:
* 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
2003-07-30 20:15:56 +00:00
Misha Brukman
9d679cbc6c * Moved InputArgv out of anonymous scope to be extern'd in another file.
* 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
2003-07-30 20:15:44 +00:00
Misha Brukman
800e6e216a Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7427 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:59:23 +00:00
Misha Brukman
7835c85227 Use a vector<char*> instead of char*[] so that we can add arbitrary number of
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
2003-07-30 17:44:15 +00:00
Chris Lattner
c1869e85de Add variable to capture arguments that should be passed to the user program
This is unused so far.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7422 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-30 17:36:07 +00:00
Misha Brukman
5d5bc7b90c Revert change: default architecture is never set, it is guessed from input
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
2003-07-30 15:29:55 +00:00
Misha Brukman
de9720ffce * Disambiguate symbols before we start splitting module by functions
* 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
2003-07-29 16:02:28 +00:00
Misha Brukman
c1e39ee659 Implemented cleanups as suggested by Chris:
* 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
2003-07-28 21:07:39 +00:00
Misha Brukman
fe04db890b Added comment to function isExecutingJIT()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7370 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 20:59:16 +00:00
Misha Brukman
91eabc13d3 BugDriver.h:
* 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
2003-07-28 19:16:14 +00:00
Misha Brukman
248ea32cc9 Add in support to load shared objects (-load is provided by Support library).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7360 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:06:19 +00:00
Misha Brukman
a259c9be2a Made a bunch of cleanups, as per Chris' recommendations:
* 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
2003-07-24 21:59:10 +00:00
Misha Brukman
5073336cd4 Major addition to bugpoint: ability to debug code generators (LLC and LLI).
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
2003-07-24 18:17:43 +00:00
Misha Brukman
265789f155 Fixed misspelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7223 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-21 21:58:16 +00:00
Chris Lattner
b18ed088fb Remove instloops library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7210 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-21 19:07:27 +00:00
Misha Brukman
fcf2be75ec Initialize the target architecture based on compiler defines, so if compiled on
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
2003-07-18 22:21:40 +00:00
Anand Shukla
e79b4f1875 Added pass to instrument backedges for lightweight tracing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7202 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-18 16:25:40 +00:00
Misha Brukman
bc0e998c49 The word separate' only has one e'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7173 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-14 17:20:40 +00:00
Misha Brukman
cc41afa6b1 Converted tabs to spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7139 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-10 16:35:17 +00:00
Misha Brukman
29abc97100 Fixed indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7122 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-07 22:28:42 +00:00
Misha Brukman
82742916f3 * If compiling on X86 or Sparc, automagically enable the JIT for that arch
* 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
2003-07-02 17:53:19 +00:00
John Criswell
7a73b80b90 Merged in autoconf branch. This provides configuration via the autoconf
system.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7014 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-30 21:59:07 +00:00
Chris Lattner
dc52353833 Run the simplify CFG pass after instcombine which has the effect of deleting
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
2003-06-26 05:29:50 +00:00
Chris Lattner
293a33a911 Move the instcombine pass before globaldce, so that if globals are made dead by instcombine, that they can be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6910 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-26 04:32:31 +00:00
Chris Lattner
898e0e42e3 Try to run cleanups even if nothing was modified in the preview passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6897 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25 04:13:52 +00:00
Chris Lattner
06c818e717 Run dead arg elimination, and tell it that it's ok to hack up non-internal functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6896 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-25 04:13:36 +00:00
Chris Lattner
e643a6cb9a Add tail duplication pass to the pipeline, move the verifier pass to the front
Other minor reorganizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6849 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 20:11:45 +00:00
Chris Lattner
5b836c4a06 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6799 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-20 15:49:04 +00:00
Chris Lattner
dccb6d017b Funcresolve no longer performs nicification of resolved functions
instcombine does this


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6787 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-19 17:03:51 +00:00
Brian Gaeke
5ce1a585df tools/llc/llc.cpp: Make "-o -" work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6780 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:43:33 +00:00
Brian Gaeke
2e2f2dcd6a lib/Target/Sparc/Sparc.cpp:
Move LowerAllocations, PrintFunction, and SymbolStripping passes, and
  the corresponding -disable-strip and -d options, over here to the SPARC
  target-specific bits of llc. Rename -d to -dump-asm.

tools/llc/Makefile:
 Reindent. Add x86 library so that llc compiles again.

tools/llc/llc.cpp:
 Remove support for running arbitrary optimization passes. Use opt instead.
 Remove LowerAllocations, PrintFunction, and SymbolStripping passes, as noted
  above.
 Allow user to select a backend (x86 or SPARC); default to guessing from
  the endianness/pointer size of the input bytecode file.
 Fix typos.
 Delete empty .s file and exit with error status if target does not support
  static compilation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6776 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 21:14:23 +00:00
Chris Lattner
cccc28c674 Reindent code to match the rest of the file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6772 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 18:46:08 +00:00
Chris Lattner
a34f440f69 Add new DAE pass to gccld. It does not add cause any regressions in the test-suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6770 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-18 16:29:02 +00:00
Brian Gaeke
5285270871 Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
it is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6753 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 20:09:18 +00:00
Chris Lattner
f25b7729c1 Life is too short. Link in too much stuff on Linux to make building on sun easier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6748 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 19:14:59 +00:00
Chris Lattner
da601403d9 The never-ending odyssey trying to get sparc to link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6747 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 18:19:52 +00:00
Chris Lattner
d562436355 Make sure to get the value of ARCH before we use it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6746 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 17:53:35 +00:00
Chris Lattner
2bf4c61557 Do not link in the Sparc JIT when building on X86. Eventually the sparc will not
link in the X86 JIT either, but this makes testing easier.

For some reason, the sparc JIT was breaking the X86 JIT when it was linked in. :(


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6745 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:54:52 +00:00
Chris Lattner
7a5500e2f6 Whoops, didn't mean to check that in :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6743 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:46:34 +00:00
Chris Lattner
97ac14f33c Use more structured command line option processing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6742 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-17 15:43:13 +00:00
Chris Lattner
2eb9a257c8 Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6727 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:29:09 +00:00
Chris Lattner
5b1688d73b Remove usage of alloca
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6726 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 22:22:11 +00:00
Brian Gaeke
ad95d9ef50 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-16 21:54:01 +00:00
Chris Lattner
4a4dabaac0 Fix major bug in my last checkin. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6688 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-13 16:10:26 +00:00
Chris Lattner
8fce4bf39b Remove obsolete comments about llvm-ar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6686 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-12 18:57:42 +00:00
Chris Lattner
5b4299c26d Remove duplicate pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6631 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 20:51:10 +00:00
Chris Lattner
b417c795d2 Remove stupid thinko that was preventing bugpoint from working
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6533 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:54:29 +00:00
Chris Lattner
24271cf8d7 Give better information about how the passes crash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6532 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:54:16 +00:00
Chris Lattner
3ce0ea8fd8 Add support for: -o -
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6485 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-31 21:47:16 +00:00
Chris Lattner
42ed21b151 Add SRoA pass to gccas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6442 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 19:24:06 +00:00
Chris Lattner
4dc3535e7a Move indvars pass after mem2reg pass where it is more likely to be useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6441 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 19:23:10 +00:00
Chris Lattner
e68e4d59e8 Fix formatting in file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6398 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-29 15:13:15 +00:00
Misha Brukman
1df4d5e668 Link in Sparc libs for the JIT, even on X86 to be able to support debugging
of Sparc JIT (printing out instrs) on X86. Con: this increases linking time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6361 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:42:05 +00:00
Chris Lattner
68d9ed8b76 Remove ugly hack (that I put in originally) for building in trace stuff
automatically in LLC


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6358 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 21:23:02 +00:00
Chris Lattner
6ac79d115e Add compatibility option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6354 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 19:15:11 +00:00
Brian Gaeke
6ae73dc98f Remove ".bc" from the end of InputFile if it is there, in
tools/lli/lli.cpp:main().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6317 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 20:28:07 +00:00
Brian Gaeke
69a79600cb gccld.cpp:
Fix typo in header.
 Add IsArchive static method.
 Roll LoadLibraryFromDirectory() into LoadLibrary(), and factor
  LoadLibraryExactName() out of the result. Instead of treating the current
  directory specially, just insert it into LibPaths in the beginning of
  main().
 Make LoadLibrary() take a "search" flag that says whether to search for the
  correct library, or just trust that LibName is right.
 Make LinkLibrary() take a "search" flag, and pass it to LoadLibrary().
 Change the for-loop over InputFilenames to detect ar archives and link them
  in as libraries without searching.
 Change the for-loop over Libraries to explicitly turn on the "search" flag
  to LinkLibrary() that makes LoadLibrary() search for the correct library
  (i.e., when processing -lNAME options.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6316 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 20:27:07 +00:00
Brian Gaeke
dae7f92366 Clarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
explanatory comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6308 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-23 05:34:32 +00:00
Chris Lattner
6c8103f7dd Kill using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6292 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-22 20:13:16 +00:00
Chris Lattner
dbe48dcaec Allow disabling final cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6271 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 20:38:59 +00:00
Chris Lattner
28b8ed90c7 Increase odds that this won't bork things
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6267 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-21 19:41:31 +00:00
Chris Lattner
9148ec65c2 Get rid of really old makefile cruft
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6218 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-14 21:31:31 +00:00
Chris Lattner
7cb77e188f Search LLVM_LIB_SEARCH_PATH for objects to allow it to find crtend.o
Implement minor library linking optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6181 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-13 22:14:13 +00:00
Chris Lattner
59039a926d Add a disable-verify option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6155 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 22:12:44 +00:00
Chris Lattner
0b43f4ef29 Move static stuff to an anonymous namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6154 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 22:08:58 +00:00
Chris Lattner
3cbacc9047 Print filename correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6119 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:32:04 +00:00
Chris Lattner
19669f37b0 The JIT is the default mode for LLI now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6118 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-12 14:31:57 +00:00
Chris Lattner
f479be58f5 Make a comment more accurate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5991 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:20:36 +00:00
Chris Lattner
cc876a7421 Add support for debugging miscompilations with the use of the JIT or CBE!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5990 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:19:41 +00:00
Chris Lattner
fb74224662 Bugpoint is always verbose, eliminate option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5989 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 03:18:41 +00:00
Misha Brukman
c8b27318a3 The Grammar Police is out on patrol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5985 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-03 02:16:43 +00:00
Chris Lattner
590607b01c Add an instcombine pass before levelraise
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5980 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-02 18:19:05 +00:00
Chris Lattner
68492725a0 Add a new option to disable stripping of bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5969 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-28 03:28:56 +00:00
Chris Lattner
10daaa1416 Remove two fields from TargetData which are target specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5963 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-26 20:11:09 +00:00
Chris Lattner
6db70ef879 Add options to disable simplification with passes, in case one of them crashes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5950 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 22:08:12 +00:00
Chris Lattner
bc19466912 Make sure to copy double alignment as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5936 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 06:06:13 +00:00
Chris Lattner
b5881f126d Kill using declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5934 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:26:11 +00:00
Chris Lattner
2b5f2c1a64 Make sure to add a targetdata instance to the passmanager, and make it match the
one in use by the TargetMachine


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5931 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 05:22:29 +00:00
Chris Lattner
0c13998775 Rename Kept -> Suffix
FIX problem where we were incorrectly putting the prefix of the list into the "suffix" list.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5926 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 03:16:33 +00:00
Chris Lattner
06943add8b Rename Kept -> Suffix
Fix problem where we accidentally returned KeepPrefix instead of KeepSuffix!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5925 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 03:16:05 +00:00
Chris Lattner
5f73e38548 Big programs have tons of global variable initializers, and most passes don't care
about them.  Try to delete them if it doesn't affect the passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5918 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 00:53:05 +00:00
Chris Lattner
16608b4c85 When cleaning up the final bytecode file, make sure to run DTE as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5917 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-25 00:52:30 +00:00
Chris Lattner
286921e8d2 Speed up convergence significantly and also reduce the size of testcases by making large portions of a function's CFG dead at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5915 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 23:51:38 +00:00
Chris Lattner
f607b79bc7 The big fix is this change:
-    if (I->isExternal() && !Functions.count(I))
+    if (!I->isExternal() && !Functions.count(I))

We were not actually deleting any functions from the module!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5914 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:54:06 +00:00
Chris Lattner
44be257166 Remove dead functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5913 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:53:24 +00:00
Chris Lattner
473a843f31 Make sure that deleted functions have external linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5912 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:53:01 +00:00
Chris Lattner
aae33f9137 Use the list reducer to improve convergence speed and to support crashes that
only occur when multiple passes interact or when multiple functions exist in a module


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5911 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:24:58 +00:00
Chris Lattner
39aebca3a2 Adjust to match new ListReducer interface
Move function to generic code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5910 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:24:22 +00:00
Chris Lattner
b4ebe13643 Allow reducer interfaces to mutate the lists passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5909 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:23:56 +00:00
Chris Lattner
ff4aaf0010 Move function from Miscompilation.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5908 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 22:23:34 +00:00
Chris Lattner
126840f49e Move the ListReducer Class into it's own header file instead of living in Miscompilation.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5907 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 20:16:29 +00:00
Chris Lattner
a148ccb158 Allow bugpoint to try new an different methods for pruning down lists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5905 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 19:32:42 +00:00
Chris Lattner
9c3b55ea9f Make sure to create a target data that matches the Module's target properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5904 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 19:13:02 +00:00
Chris Lattner
c986392c30 Remove support for "target data" pass ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5900 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:36:41 +00:00
Chris Lattner
961f7b4e4f LevelRaise now gets target data from passmanager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5898 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 18:26:03 +00:00
Chris Lattner
640f22e66d Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5893 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-24 17:02:17 +00:00
Chris Lattner
eea21dd91c Print where reference output goes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5891 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:41:18 +00:00
Chris Lattner
a4dd4e2de8 The new CFrontend generates LOTs of basic blocks that just fall through and do
other funky stuff.  Clean it up early.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5889 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:40:42 +00:00
Chris Lattner
3c053a0a98 Allow specifying an input file for the program being executed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5888 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 20:31:37 +00:00
Chris Lattner
cf31784c69 We now need to link libscalar to get the switch lowering pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5874 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:43:02 +00:00
Chris Lattner
6e96a99ce3 Remove unnecessary &*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5873 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-23 16:38:00 +00:00
Chris Lattner
e0b235cd97 Build the appropriate target machine for the input pointer size and endianness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5838 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:10:32 +00:00
Chris Lattner
d34a51dbbe Add support for allowing the user to extend the GCCLD searchpath
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5825 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-21 19:53:24 +00:00
Chris Lattner
c65b104309 Eliminate useless duplicate libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5823 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 23:07:33 +00:00
Chris Lattner
10970eb05f Add first support for linking in .a files correctly and minimally, like a real linker does
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5822 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-19 22:44:38 +00:00
Chris Lattner
a856db22fa Add crufty compatibility stuff for ld
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5813 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 23:38:22 +00:00
Chris Lattner
e1c8153d63 Eliminate some compatibility stuff no longer needed :P
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5812 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 23:38:09 +00:00
Chris Lattner
f3d4f178b2 Use anonymous namespace instead of "static"
Kill using decl


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5811 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-18 23:01:25 +00:00
Chris Lattner
0af1e8e3a4 Don't support codegen passes in opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5797 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 23:02:16 +00:00
Chris Lattner
f5653226b5 Remove codegen libraries to speed up linking opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5796 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 22:55:55 +00:00
Chris Lattner
dabaa46c66 Allow the user to disable the internalize pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5792 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 21:43:22 +00:00
Chris Lattner
56620da5b4 Give verbose error messages if bytecode file cannot be parsed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5789 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 20:51:36 +00:00
Chris Lattner
8c7b0551f4 Improve compatibility with system AS further by allowing input from stdin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5780 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 17:49:18 +00:00
Chris Lattner
2c1d2f21fd * Get rid of using declaration
* Add two compatibility options to work better with new GCC frontend


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5779 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 17:41:08 +00:00
Chris Lattner
f2956fcc11 Namespacify command line options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5778 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-16 17:34:29 +00:00
Chris Lattner
0e08e1beda Minor tweak
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5758 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-31 17:30:35 +00:00
Chris Lattner
10f22cb1a0 Make sure that intermediate code is verifier clean to avoid wierd problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5723 91177308-0d34-0410-b5e6-96231b3b80d8
2003-03-07 18:17:13 +00:00
Chris Lattner
ba386d943f * Reduce the number of useless bytecode files produced by bugpoint.
- This also speeds it up as the bytecode writer isn't terribly fast.
* Add a new cleanup pass after everything else to run -funcresolve -globaldce


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5668 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-28 16:13:20 +00:00
Chris Lattner
ddd5b417c6 Rename -no-* to -disable-*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5642 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-26 20:00:41 +00:00
Chris Lattner
22a3b55406 Make printing messages nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5616 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-24 20:07:54 +00:00
Chris Lattner
f3bafc1043 Add new -no-verify option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-12 18:45:08 +00:00
Chris Lattner
d70b68ebd0 Add a new -no-output option, useful for -aa-eval tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5541 91177308-0d34-0410-b5e6-96231b3b80d8
2003-02-12 18:43:33 +00:00
Chris Lattner
3301b695cb Fix build problem on sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5428 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-29 18:15:34 +00:00
Chris Lattner
6520785dcd Make bugpoint *much* more powerful, giving it the capability to delete instructions
out of a large function to reduce it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5408 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-23 02:48:33 +00:00
Chris Lattner
f2bcccfbab Allow creating of passes like levelraise which use a targetdata ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5403 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 23:24:11 +00:00
Chris Lattner
cabda2134e link with static versions of some libs to avoid having to pull in all of ipo/ipa and datastructure at all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5402 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 22:14:04 +00:00
Chris Lattner
285ca5ed2f Fix didn't fix the race condition in the makefiles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5394 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-22 15:41:10 +00:00
Chris Lattner
c479db964f Fix race condition in Makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5380 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-21 15:20:50 +00:00
Chris Lattner
784fac874c * Prune down library list. In particular, llc doesn't need all of IPO, and none of data structure and IPA completely!
* Do not keep symbols by default!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5375 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-19 21:55:43 +00:00