Commit Graph

429 Commits

Author SHA1 Message Date
Bill Wendling
a089d4430d Need <iostream> for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31821 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 10:09:22 +00:00
Reid Spencer
2803b4cc58 Minor style fixes from review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 19:59:25 +00:00
Reid Spencer
dc31a8a70c Add a -disable-loop-extraction option to bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31683 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 19:05:02 +00:00
Chris Lattner
fef02427cd completely revert patrick's enhancement to bugpoint. Though it makes bugpoint
speed up, it sometimes makes it crash on complex bc files, which isn't very nice.


With this, bugpoint can reduce the 176.gcc failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31589 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 06:24:56 +00:00
Chris Lattner
cd6f46e2ac add a new bugpoint mode -llc-safe. This uses LLC for both halves of a
miscompilation.  This is useful for working around GCC+CBE bugs or for handling
programs that CBE doesn't support (e.g. inline asm) when searching for
optimizer bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 05:57:53 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Reid Spencer
3ed469ccd7 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Bill Wendling
22706e82d5 Forgot a }
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31226 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 20:22:04 +00:00
Bill Wendling
b3d83a3ed5 Re-added the part where it tries to remove all global variables first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31225 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 20:18:06 +00:00
Bill Wendling
4e3be89cb5 Fix for PR960. Improves bugpoint so that it removes global variable
initializers as well. This is only a first pass. It can be slow because
it clones the module for each pass. An obvious improvement is not to do that.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31182 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 18:36:14 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Chris Lattner
137d0ec3da Make the bugpoint reduction heuristics more effective. Patch submitted by
Domagoj Babic, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30863 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 21:42:25 +00:00
Chris Lattner
54e4c02d8e Remove a dead var noticed by Yorion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:12:37 +00:00
Chris Lattner
d42235051b comment out debug code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30401 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 23:01:10 +00:00
Chris Lattner
c600f3c337 Add a new -cbe-bug mode, which works just like -run-llc, except that it uses
LLC as the reference compiler to reduce testcases for bugs in GCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 21:29:15 +00:00
Nick Lewycky
e290c6d250 Fix --enable-valgrind. Add room for the new arguments, and don't keep
a pointer to a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 04:20:17 +00:00
Nick Lewycky
40394bc419 Add --enable-valgrind option to run optimizations through valgrind to
pick up on memory errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 03:49:54 +00:00
Chris Lattner
afd39f0cc4 Change DisambiguateGlobalSymbols to not rename asm globals, which breaks
bugpoint on leopard.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 18:21:07 +00:00
Chris Lattner
aea932d27f Use LINK_COMPONENTS to specify *components* to link against instead of
using USED_LIBS to specify *libraries* to link against.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 05:59:09 +00:00
Chris Lattner
1bb6f0643d Code cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29969 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 23:38:20 +00:00
Chris Lattner
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +00:00
Chris Lattner
a4be053d7d analyze no longer exists, don't offer to run it :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29919 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:12:06 +00:00
Reid Spencer
51c5a286ba For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:34:57 +00:00
Reid Spencer
8ea5ecb056 For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 06:04:45 +00:00
Reid Spencer
62c5105adc For PR885:
Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 05:34:03 +00:00
Reid Spencer
023fcf9776 For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 02:04:43 +00:00
Reid Spencer
61c83e023f For PR797:
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 08:43:06 +00:00
Chris Lattner
c0431fe1ca fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29754 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 18:51:28 +00:00
Chris Lattner
7f27570ae0 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 18:49:52 +00:00
Patrick Jenkins
032091d7f6 Adding FindBugs.cpp so the -find-bugs option will work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 16:41:52 +00:00
Patrick Jenkins
6a3f31cb70 This commit adds a new feature called find-bugs. The find-bugs option can be invoked on a .bc file from the command like with -find-bugs and a list of passes you wish to test. This procedure takes the set of optimization passes the user specifies, randomizes the passes, runs the passes on the specified .bc file, compiles the program, and finally runs the program checking its output vs the .bc file with no optimizations. This process repeats until either the user kills bugpoint or an error occurs in the optimizations, program complitation, or the running of the program. If an error occurs, bugpoint attempts to diagnose the error by eliminating passes that are not at fault and code that is not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 16:40:49 +00:00
Patrick Jenkins
68b163059d Updating the comments above SplitFunctionsOutOfModule in ExtractFunction.cpp to reflect the changes made to that function. Specifically I am removing the FIXME comment because the issue has been addressed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 18:03:01 +00:00
Patrick Jenkins
e47863e212 This commit improves bugpoints speed. On my G4 this changed caused kimwitu++ to run through bugpoint in 1091.15 seconds (user + system time). The time it took to run this on my G4 before I made these changes is 1420.82 seconds (user + system time). This is a speedup of about 5.5 minutes.
This is faster because SplitFunctionsOutOfModule no longer calls Clone Module and then removes the functions it doesnt want from the module returned. Instead it creates a module and copies over the specified functions, making changes to the new and old module where neccessary. This reduces the memory demand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 01:19:28 +00:00
Chris Lattner
0465fa9cf8 Tools require EH for their top-level try blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29035 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 00:46:19 +00:00
Chris Lattner
130e2a3611 Pass -Xlinker flags to gcc when it builds the shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28939 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:35:36 +00:00
Chris Lattner
831b121039 Don't pass target name into TargetData anymore, it is never used or needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:23:49 +00:00
Chris Lattner
9686ae7f4e Teach bugpoint to kill optimization passes that run over the timeout limit,
which allows it to debug optimizer infinite loops.  This patch is contributed
by Nick Lewycky, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 03:10:48 +00:00
Chris Lattner
629e48768a After telling GCC to type of the input file with -x asm/-x c, switch back to
-x none, to not foul up autodetection of .a file or .dylibs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 21:31:53 +00:00
Reid Spencer
e3f0561545 Make sure this tool links in all of libVMCore.a because it can --load
shared objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:06:50 +00:00
Chris Lattner
f1b20d8620 Move ToolRunner.(cpp|h) into the bugpoint directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28699 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:30:59 +00:00
Reid Spencer
51ab5c8862 Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 00:00:42 +00:00
Reid Spencer
18c8b49e7d Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:30:27 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Chris Lattner
53bd1b9de7 print a nice error if bugpoint gets an error reading inputs. Bug identified
by coverity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:15:56 +00:00
Chris Lattner
f877e60616 Fix a bug found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:11:40 +00:00
Chris Lattner
b923b2e04b Remove dead return value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28245 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 17:28:36 +00:00
Chris Lattner
67ef9e4304 wrap long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28113 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 23:35:31 +00:00
Chris Lattner
cc540ebabc add an assert to get a slightly better msg about this problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-16 23:16:17 +00:00
Reid Spencer
9dce2b3380 Convert llvm.cs.uiuc.edu -> llvm.org
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 05:54:52 +00:00
Chris Lattner
5a7a9e5386 Fix a really annoying bug in bugpoint that made reducing C++ testcases
almost impossible with the new CFE.  It now guarantees that the static
ctor/dtor list is correctly split between the modules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 23:55:38 +00:00
Andrew Lenharth
7c0a93785e For transforms the behave differently if main goes away, add an option to prevent bugpoint from removing main
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26557 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 22:21:36 +00:00
Chris Lattner
fdcc71eaa8 Let bugpoint work on sparc with v9 instructions enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25958 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 05:02:27 +00:00
Andrew Lenharth
e4da1ddada Pass plugins on to children when optimizing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 18:37:21 +00:00
Chris Lattner
04666d8a39 this doesn't work, remove it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25518 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 00:32:33 +00:00
Chris Lattner
e31a9ccb9c add explicit #includes of iostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25510 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 22:53:40 +00:00
Chris Lattner
86a5484079 Add explicit #includes of <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 22:53:01 +00:00
Chris Lattner
4df8665bf9 Revert this, I didn't mean to commit it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:40:24 +00:00
Chris Lattner
79959d21c7 Add support for programs with a null argv[0]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:32:28 +00:00
Reid Spencer
de83cee28b Fix line length of a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25149 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 22:40:10 +00:00
Jeff Cohen
46e1ee9791 Get bugpoint building with VC++ again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24977 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:00:38 +00:00
Reid Spencer
c4bb052ecc For PR351:
Generally, remove use of fork/exec from bugpoint in favor of the portable
sys::Program::ExecuteAndWait method. This change requires two new options
to bugpoint to tell it that it is running in "child" mode. In this mode,
it reads its input and runs the passes. The result code signals to the
parent instance of bugpoint what happened (success, fail, crash).

This change should make bugpoint usable on Win32 systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24961 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 20:02:55 +00:00
Chris Lattner
3bd5fac76f Fix printing of the instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-14 22:01:07 +00:00
Andrew Lenharth
0fccc74103 This solves the problem of the CBE renaming symbols that start with . but the assembly side still trying to reference them by their old names. Should be safe untill we hit a language front end that lets you specify such a name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24626 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 20:51:30 +00:00
John Criswell
a115643357 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 15:54:34 +00:00
John Criswell
e96a1a576b 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 20:35:13 +00:00
Chris Lattner
ad62eef794 Remove a now-unneeded library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23942 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:31:05 +00:00
Chris Lattner
831843d5d1 Link to archive versions of libraries instead of the relinked ones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:05:53 +00:00
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +00:00
Chris Lattner
d00b28809d Allow bugpoint+PPC codegen to use fsqrt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23128 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-29 13:14:24 +00:00
Chris Lattner
aed98fa886 If the user interrupts bugpoint, don't extract loops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22603 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 23:25:56 +00:00
Chris Lattner
f9aaae06cd When the user hits ctrl-c, bugpoint should attempt to stop reduction as
quickly as possible and output what it has so far.  If they hit it twice,
bugpoint is killed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22579 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 02:16:17 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Chris Lattner
a3efca16f2 Fix PR576.
Instead of emitting a JIT stub that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
header:
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=1]
        call void %resolverCast( int %0 )
        ret void
}

Emit one that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
Entry:
	%fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache               ; <void (int)*> [#uses=2]
        %isNull = seteq void (int)* %fpcache, null              ; <bool> [#uses=1]
        br bool %isNull, label %lookupfp, label %usecache

usecache:               ; preds = %lookupfp, %Entry
        %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ]            ; <void (int)*> [#uses=1]
        call void %fp( int %0 )
        ret void

lookupfp:               ; preds = %Entry
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=2]
        store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache
        br label %usecache
}


This makes the JIT debugger *MUCH* faster on large programs, as
getPointerToNamedFunction takes time linear with the size of the program, and
before we would call it every time a function in the text module was called from
the safe module (ouch!).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22387 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 01:00:32 +00:00
Reid Spencer
a229c5cce7 Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 03:08:58 +00:00
Nate Begeman
72b286b0a0 Add support for assembling .s files on mac os x for intel
Add support for running bugpoint on mac os x for intel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22351 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 00:23:26 +00:00
Reid Spencer
dd04df0ec3 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 23:21:43 +00:00
Chris Lattner
56c418676a If loopextract breaks the program provide output so that we can repro the
problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21790 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-08 21:54:56 +00:00
Reid Spencer
5a870448d1 Two changes:
1. Get rid of TOOLLINKOPTS as it is a hold over from llvm-test and only
   used to communicate additional libraries to the linker. The *standard*
   way to do that is with the LIBS variable which this change supports.

2. Allow the TARGETS_TO_BUILD variable to be set from the configuration
   substitution. This is the result of the --enable-target= parameter to
   the configure script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21449 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:14:14 +00:00
Jeff Cohen
ea3e5e56fd Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21441 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 04:13:13 +00:00
Misha Brukman
3da94aec4d Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 00:00:37 +00:00
Misha Brukman
f976c856fc Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 22:55:34 +00:00
Misha Brukman
63b3afa984 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:48:15 +00:00
Chris Lattner
5b3a4553c1 Fix the missing symbols problem Bill was hitting. Patch contributed by
Bill Wendling!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 15:38:16 +00:00
Chris Lattner
852b4d4bf4 Replace more a*'s with arg_*'s, thanks to Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20615 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 15:48:06 +00:00
Alkis Evlogimenos
5a1c58d009 Use arg_iterator and arg_begin and arg_end functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20608 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 07:02:26 +00:00
Andrew Lenharth
572668aa38 yay for camel_cvs diff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20552 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:15:09 +00:00
Chris Lattner
1c81f1390d get bugpoint working on ia64, by building .so's with -fpic. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20525 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 03:31:02 +00:00
Chris Lattner
da895d6337 Fix spelling, patch contributed by Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 06:18:25 +00:00
Chris Lattner
e56509c697 Remove some stuff I checked in accidentally
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20340 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 04:32:35 +00:00
Chris Lattner
9b5b1905db Fix a bugpoint crash that JeffC noticed, looking like this:
*** Attempting to perform final cleanups: Final cleanups failed.  Sorry. :(  Ple
ase report a bug!

<llc>llc.exe: bytecode didn't read correctly.
llc.exe: bytecode didn't read correctly.
<crash>
Assertion failed: M && "You can't write a null module!!", file c:\llvm\lib\bytec
ode\writer\writer.cpp, line 1094


The fact that llc bombed (in this case) is ok, but bugpoint shouldn't crash after this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20285 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 06:12:11 +00:00
Jeff Cohen
e210279047 Get bugpoint compiling with VC++ again, not that it works anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-16 05:05:31 +00:00
Chris Lattner
45495c5248 Move helper function here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20168 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:13:47 +00:00
Chris Lattner
a328c51bb9 Add support for fp tolerances
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19774 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:45:26 +00:00
Chris Lattner
cf989fd2a3 Adjust to changed interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19772 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:31:39 +00:00
Jeff Cohen
741c118230 oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19752 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:37:13 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Jeff Cohen
83881957ed Fix VC++ complaint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19747 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 16:30:58 +00:00
Chris Lattner
59615f0f85 Improve output precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19564 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 00:07:19 +00:00
Reid Spencer
1ef8bdaedb For PR351:
* Place a try/catch block around the entire tool to Make sure std::string
  exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
  abort with a useless message but indicate than an unhandled exception was
  generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19192 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 05:36:08 +00:00
Reid Spencer
51163306ab For PR351:
* sys::PreventCoreFiles -> sys::Process::PreventCoreFiles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19162 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:18:02 +00:00