Commit Graph

2553 Commits

Author SHA1 Message Date
Reid Spencer
8b31b2dea6 Fix dependencies. The lexer depends on the grammar for the UpgradeParser.h
file so make it depend on the .y file as well. This ensures that in
parallel builds the lexer is built after bison runs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32937 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 22:03:42 +00:00
Reid Spencer
319a730353 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:20:02 +00:00
Reid Spencer
bcdd54cf6f Adjust to new header file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:19:32 +00:00
Reid Spencer
90eb4d653c Major update of llvm-upgrade:
1. Completely revise the type system so that types are handled as const
   objects and not created multiple times, cloned, or otherwise copied.
   This gets around memory issues, saves memory, and also emulates LLVM's
   no-two-types-of-the-same-shape-created semantics.
2. Adjust the handling of global names. Basically, we cannot rename them
   for a variety of reasons: linking, forward references, etc.
3. Detect global names that have name conflicts as the result of collapsed
   type planes or redefinitions that llvm-as no longer accepts. These will
   produce warnings on stderr and one of the globals will be renamed.
4. Rename ParserInternals.h as UpgradeInternals.h so it doesn't conflict
   in the debugger with ParserInternals.h from lib/AsmParser.
5. Move the guts of the TypeInfo class into the grammar so we aren't
   implementing large functions in a header file. This also helps with
   debugging a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:18:58 +00:00
Chris Lattner
37e01c5e90 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32880 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 18:46:42 +00:00
Chris Lattner
b9240544d7 If we hit a parse error, emit something bad to the output stream. This ensures that
llvm-upgrade < foo | llvm-as | llvm-dis

will fail if llvm-upgrade fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 18:45:51 +00:00
Reid Spencer
eff838e18c Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32848 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 23:45:42 +00:00
Reid Spencer
7596fd0774 Implement many new type features including upreferences, proper retention
of structure contents, counts of packed and array types, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32847 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 23:45:17 +00:00
Reid Spencer
e8fc2f97cc Finish implementation of variable renaming to handle collapsed type planes
by correctly handling up references and enumerated types. Previously there
was some confusion of these two. Thanks to Chris Lattner for demistifying
llvm up references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32846 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 23:43:55 +00:00
Evan Cheng
7f7fdcca8f A bit more debugging printf's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32832 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 07:44:30 +00:00
Reid Spencer
7356ae4015 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32817 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 06:34:08 +00:00
Reid Spencer
2128607fd1 Permit signed and unsigned integer constants to be used with either signed
or unsigned integer types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32816 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 06:33:02 +00:00
Reid Spencer
52402b0bef Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32811 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 05:45:11 +00:00
Reid Spencer
2b8036e2c8 For PR1070:
Revise the upgrade parser to keep track of types more faithfully and use
this information to resolve name conflicts resulting from collapsed type
planes. The type planes have collapsed because the integer types are now
signless so that uint and int became i32. Where two planes existed for uint
and int, only i32 exists. Any variable names depending on the type planes
to pmake the identifier unique would cause a conflict. This patch resolves
that conflict for many but not all cases.

Situations involving the integer types and pointers to them are handled
by this patch.  However, there are corner cases that are not handled
well, such as:

%t1 = type { uint, int }
%t2 = type { int, uint }

void %myfunc(%t1* one, %t2* two) {
  %var = load %t1* one
  %var = load %t2* two
}

In the scenario above, %t1 and %t2 are really the same type: { i32, i32 }
Consequently attempting to name %var twice will yield a redefinition error
when assembled.

While this patch is sufficien to allow the llvm/test suite to pass, More
work needs to be to complete the handling of these corner cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32810 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 05:44:33 +00:00
Reid Spencer
f5626a38a7 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32805 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-01 01:20:41 +00:00
Reid Spencer
16222c006d For PR1070:
Remove useless bitcasts by commenting them out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32804 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-01 01:20:16 +00:00
Reid Spencer
71d2ec9e6d For PR950:
Convert signed integer types to signless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 06:02:26 +00:00
Reid Spencer
05e52a1b35 For PR950:
Don't attempt to parse both the old and new grammars. It is near impossible
to get it right. Remove support for the new define keyword and don't
attempt to insert parameter attributes because there isn't enough
contextual information for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:45:57 +00:00
Reid Spencer
6fd36abf5e Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:35:03 +00:00
Reid Spencer
a9d7e89fa9 For PR950:
Fix several bugs and update for new assembly syntax. Changes made include:
1. Fixing rules for icmp/fcmp instructions to not require a closing paren
   at the end. This was a cut-and-paste error from a previous commit.
2. Changing things like Out << " " to Out << ' '
3. Adding the "define" keyword for function definitions
4. Adding support for packed structures


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:33:37 +00:00
Reid Spencer
e4d87aa2de For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Reid Spencer
961a0f2670 Ignore the LibDeps.txt.tmp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 02:02:45 +00:00
Reid Spencer
f6c511cbb1 Remove a call to Type::isSigned().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 07:58:01 +00:00
John Criswell
e026c070c4 Remove DSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 16:54:24 +00:00
Reid Spencer
8782e53fd5 Ressurrect this needed file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32537 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 08:10:16 +00:00
Reid Spencer
b6f4ff2cb0 Ressurrect the Stacker "st" configuration. Someday this will all go
away, but until then Stacker needs its configuration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32536 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 08:09:48 +00:00
Reid Spencer
b0e9f722da Generate the correct cast opcode for constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32461 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 01:31:37 +00:00
Reid Spencer
4fbcdf61e8 Fix PR1040:
Don't rebuild llvm-config if none of the library dependencies changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:43:38 +00:00
Chris Lattner
ca3aa26c20 make statistics and timing info print even if the JIT'd program calls exit
instead of returning from main.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32414 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 19:01:52 +00:00
Reid Spencer
5fe27e7b99 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 19:41:25 +00:00
Reid Spencer
7969681c8b Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
Do not upgrade casts of bool to bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32404 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 19:40:41 +00:00
Reid Spencer
187ccf8d31 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 16:57:22 +00:00
Reid Spencer
a00c5a6d87 When upgrading cast to bool to a setne, generate icmp ne instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 16:56:55 +00:00
Reid Spencer
f0cf132db7 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 04:23:03 +00:00
Reid Spencer
7fed45ea18 Create an option to turn off generation of fcmp instructions while still
allowing integer setxx instructions to be converted to icmp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32302 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 04:22:23 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Jim Laskey
2792cfb82d No need to update generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 11:03:10 +00:00
Jim Laskey
98ba588c03 Fix build for older versios of bison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32274 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 10:57:33 +00:00
Reid Spencer
996fb28c0f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32269 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:30:15 +00:00
Reid Spencer
9f8b383353 Don't turn on SETCC upgrade yet!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:29:36 +00:00
Reid Spencer
3e5ab8c7f5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32267 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:25:46 +00:00
Reid Spencer
49aeed7455 Fix upgrade of setcc with bool operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:25:22 +00:00
Chris Lattner
c6c384314a reword message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32257 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:39:18 +00:00
Chris Lattner
c30598bc3a make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.
With this change, I can now move -stats to print when llvm_shutdown is called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 01:18:01 +00:00
Chris Lattner
8257bee70b This needs the callgraph data structure to stick around as long as the
printer does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32236 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:43:42 +00:00
Reid Spencer
f12ee4250d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32235 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:21:25 +00:00
Reid Spencer
999b2df114 For PR645:
Keep track of global constant and variable definitions for eventual use
in resolving conflicts between global and local symbol usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32234 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:18:29 +00:00
Reid Spencer
14042388a1 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32178 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 15:41:36 +00:00
Reid Spencer
57f28f9775 Match the llvmAsmParser's handling of ICmp and FCmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32153 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 07:10:26 +00:00
Reid Spencer
bec0b59229 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 03:16:48 +00:00
Reid Spencer
ec9c4f4348 Add a needed #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32141 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 03:15:23 +00:00
Reid Spencer
229e9369df Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32140 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 22:14:11 +00:00
Reid Spencer
2b40438597 Implement upgrade of setcc instruction to icmp/fcmp, but don't enable it
yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32139 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 22:09:27 +00:00
Reid Spencer
787207427a Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32128 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 20:21:22 +00:00
Reid Spencer
a8ca090440 Support several new upgrades:
div -> fdiv/udiv/sdiv
  rem -> frem/urem/srem
  except -> unwind
  uninitialized -> external
as well as tracking the element type of pointers, packed, and array.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32127 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 20:19:56 +00:00
Reid Spencer
f459d39613 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 16:19:52 +00:00
Reid Spencer
1d64a6c8d8 Implement the GEP upgrade for non-constant unsigned indices
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32121 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 16:19:28 +00:00
Reid Spencer
f8483657b3 Keep lists of values so they can be examined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 15:16:01 +00:00
Reid Spencer
f49c7a5f05 Build llvm-update now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 04:46:36 +00:00
Reid Spencer
a50d5962ed Add support for global types and type resolution. Fix several minor
formatting and spacing bugs. This is sufficient for llvm-upgrade to
correctly upgrade all of llvm/test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 04:11:07 +00:00
Reid Spencer
280d801839 Handle upgrade of fp -> ptr cast with fp -> int -> ptr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 23:40:53 +00:00
Reid Spencer
0b7e507247 Don't convert {} into []!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:42:01 +00:00
Reid Spencer
fcb5df8f2c Allow the new cast instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:34:43 +00:00
Reid Spencer
f7bde225f3 Upgrade shr to ashr and lshr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:26:37 +00:00
Chris Lattner
cd950a5308 target constructors are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32099 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:59:37 +00:00
Reid Spencer
f2d5532c66 Don't treat numeric (untyped) constants as a ConstInfo, just pass the
string and let ConstVal add the type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:52:30 +00:00
Reid Spencer
16244f4026 First version of llvm-upgrade that can correctly upgrade all of
test/Feature


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32092 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:10:07 +00:00
Reid Spencer
d154b57ab4 valgrind clean version of llvm-upgrade
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 20:36:40 +00:00
Reid Spencer
e77e35e8b1 First version of llvm-upgrade that can correctly upgrade a large test
case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 20:26:20 +00:00
Nick Lewycky
1a7f6ff272 Remove extra header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32056 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 01:05:14 +00:00
Nick Lewycky
5cbc63e91a Fix opt -o option. Don't pass a pointer to an auto variable which is going
away before it's needed, and don't try to delete that pointer!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 00:43:14 +00:00
Reid Spencer
96839be87f Allow llvm-upgrade to read from stdin. Configure the lexer for reading
from C++ std::istream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 16:50:26 +00:00
Reid Spencer
e8776d81f9 Ignore generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 06:37:43 +00:00
Reid Spencer
e7c3c60d86 Initial, non-functional, version of llvm-upgrade. This version just echos
its input. Committed for safekeeping purposes. Don't use this yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 06:36:44 +00:00
Bill Wendling
68fe61d6a1 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 00:19:40 +00:00
Bill Wendling
a5b31ca856 Convert to using llvm streams instead of iostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31989 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:33:06 +00:00
Reid Spencer
5e1452c856 Add an -append-exit-code option to bugpoint. This will cause bugpoint to
append "exit <retcode>" to the end of the output file. This is used by
the nightly tester to make bugpoint match the output generated by the
RunSafely.sh script so it doesn't find false positives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31960 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 07:04:10 +00:00
Reid Spencer
3da59db637 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Nick Lewycky
565706b93e Update to new predicate simplifier VRP design. Fixes PR966 and PR967.
Remove predicate simplifier from default gcc3 pipeline. New design is too
slow to enable by default.
Add new testcases for problems encountered in development.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31895 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-22 23:49:16 +00:00
John Criswell
d452599f6f Added the --disable-compression option which controls whether the
generated bytecode uses compression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31891 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-21 22:50:24 +00:00
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
Bill Wendling
31bf2b4979 Need iostream to be included for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 10:05:07 +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
Reid Spencer
4952143236 For PR998:
Fix an infinite loop in the Linker and a few other assorted link problems.

Patch contributed by Scott Michel. Thanks, Scott!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 11:54:25 +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
Reid Spencer
3822ff5c71 For PR950:
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 06:47:33 +00:00
Reid Spencer
7b28955c4c Fix a problem in the the last patch that subverts error message printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:53:08 +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
7bd78731eb Make llvm2cpp -pedantic clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31389 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 00:05:16 +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
Reid Spencer
0a783f783c For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:53:59 +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
Devang Patel
38187d6a56 Save temp. bc files when saveTemps flag is true. Use final output file
name supplied by linker to construct temp bc file names.

Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31205 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 20:46:22 +00:00
Reid Spencer
1628cec4d7 For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:15:43 +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
Devang Patel
08fb05c3ac Supply alignment info to linker through LLVMSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 18:10:07 +00:00
Devang Patel
6152b7ec25 Instead of hard coding global prefix, use TargetAsmInfo.
Add LTO destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31168 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 18:41:02 +00:00
Devang Patel
2a4dd68535 Fix typo. Add more comment. Avoid extra hash_map search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 23:57:53 +00:00
Devang Patel
f2ca21f88f Add removeModule().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 23:12:26 +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
Devang Patel
dc4c38279f Use FindProgramByName instead of FindExecutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 21:16:05 +00:00
Devang Patel
9f5d48bcb1 Do error checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30842 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:20:13 +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
Devang Patel
3f0e5e2057 Use GetTemporaryDirectory. Fix http://llvm.org/bugs/show_bug.cgi?id=894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30838 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 19:04:51 +00:00
Chris Lattner
e354df963d simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:24:48 +00:00
Nick Lewycky
b156afb791 Enable 'predsimplify' optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30589 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 00:08:16 +00:00
Devang Patel
c7cfbc58ad Use abstract class to facilitate dlopen() interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30569 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 17:22:55 +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
Anton Korobeynikov
b74ed07bfd Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Chris Lattner
43f249adb7 add a new (hidden) -disable-core-files option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:17:09 +00:00
Devang Patel
544ea34a9f Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 05:49:10 +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
Devang Patel
97d92d50aa GlobalValue with InternalLinkage may have operands with ExternalLinkage
type. Do not ignore these operands while finding external references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30310 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 01:35:13 +00:00
Chris Lattner
cf508bc38e Move ipsccp pass earlier to clean up obvious bogosities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30232 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-09 21:30:13 +00:00
Chris Lattner
cf8cb6d564 ok this really works :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:33:49 +00:00
Devang Patel
aa91978ea2 Remove redundant include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30194 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:20:25 +00:00
Chris Lattner
70c3537a92 Need to include Makefile.config to get the value of $(OS). Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:08:50 +00:00
Anton Korobeynikov
294492b25f Enabling LTO building on Darwin only right now. This probably should be
removed after 'PIC vs non-PIC' problem solution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:00:43 +00:00
Devang Patel
998051a221 Using addPassesToEmitWholeFile is not a good idea here.
Use FunctionPassManager to do the job.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30160 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 21:41:11 +00:00
Devang Patel
76ed7b1cf5 Add linker into list of LINK_COMPONENTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30159 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 21:36:55 +00:00
Devang Patel
0300352103 Add lto into the list of PARALLEL_DIRS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30154 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 20:21:58 +00:00
Devang Patel
bdaf3dc8c3 Use addPassesToEmitWholeFile() instead of addPassesToEmitFile()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30153 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 20:20:56 +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
Devang Patel
a291a68161 Add getTargetTriple() that linker can use to query target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 20:16:28 +00:00
Devang Patel
0701a2f70d Keep track of all modules crated using a name to module map.
Add private member function getMoudle().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30130 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:50:26 +00:00
Devang Patel
ed872865d0 Instead of demangling symbol name by hand, use original name, which was
used to mangle symbol name, directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30124 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 00:45:52 +00:00
Devang Patel
2681023488 Extract target triplet from optimized module.
Untabify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30123 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 00:28:22 +00:00
Chris Lattner
279015226e lli uses LinkAllCodegenComponents, so it needs this. Thanks to
Rafael Esp?ndola for pointing this out


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 18:34:16 +00:00
Chris Lattner
a563208898 Use llvm-config instead of magic JIT thing to link in libs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30091 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 06:01:43 +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
54eae9e1ec Allow things like --libs CBackend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 05:35:23 +00:00
Chris Lattner
ebfc3a9fc2 Switch to using llvm-config to build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30088 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 05:24:16 +00:00
Chris Lattner
9bf8ea26a9 Switch to using llvm-config to select components to link in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:47:49 +00:00
Chris Lattner
1911fd4f85 Completely rearchitect the interface between targets and the pass manager.
This pass:

1. Splits TargetMachine into TargetMachine (generic targets, can be implemented
any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by
things using libcodegen and other support).
2. Instead of having each target fully populate the passmgr for file or JIT
   output, move all this to common code, and give targets hooks they can
   implement.
3. Commonalize the target population stuff between file emission and JIT
   emission.
4. All (native code) codegen stuff now happens in a FunctionPassManager, which
   paves the way for "fast -O0" stuff in the CFE later, and now LLC could
   lazily stream .bc files from disk to use less memory.
5. There are now many fewer #includes and the targets don't depend on the
   scalar xforms or libanalysis anymore (but codegen does).
6. Changing common code generator pass ordering stuff no longer requires
   touching all targets.
7. The JIT now has the option of "-fast" codegen or normal optimized codegen,
   which is now orthogonal to the fact that JIT'ing is being done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:14:57 +00:00
Chris Lattner
3f2e0e6165 rearrange targets to satisfy dependencies. Too bad we aren't using llvm-config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30077 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:04:41 +00:00
Chris Lattner
80930eb414 If a cycle exists, don't succeed building the second time around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30076 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 01:49:10 +00:00
Chris Lattner
40ad304709 remove message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 01:48:32 +00:00
Chris Lattner
de1cce7e14 Remove use of target::getName()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30069 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 18:38:30 +00:00
Anton Korobeynikov
7d51544903 - Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 20:35:17 +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
Reid Spencer
e3a1069870 Delete a no-longer-supported configuration item.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29960 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 20:52:44 +00:00
Chris Lattner
5e9b177cb5 Add a --disable-compression option like llvm-link/llvm-as etc have
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29941 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 17:31:55 +00:00
Reid Spencer
3a9ec2463d For PR387:
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 01:02:49 +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
3b2493e2a1 -analyze mode shouldn't output a .bc file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29923 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:40:26 +00:00
Chris Lattner
5d8925c7c5 Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:30:17 +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
Chris Lattner
30967a54f4 eliminate only use of FilteredPassNameParser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:07:43 +00:00
Chris Lattner
7f500f7f2a Merge the 'analyze' mode code with the 'opt' mode code. Eliminate the
'autodetect .ll files' functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29915 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:07:01 +00:00
Reid Spencer
0b5a504d10 For PR797:
Remove exception throwing/handling from lib/Bytecode, and adjust its users
to compensate for changes in the interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 17:43:11 +00:00
Reid Spencer
30836fc74c Fix a bug introduced by a change in the Archive::writeToDisk interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29870 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 05:29:36 +00:00
Reid Spencer
09069b3bf5 Fix a bug caused by change in the interface of Archive::writeToDisk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29869 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 05:28:17 +00:00
Reid Spencer
0ff2d31766 For PR797:
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 23:45:08 +00:00
Nate Begeman
712b835de0 Make sure that both non-asm file types are marked as experimental
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:29:52 +00:00
Nate Begeman
eb883af390 Initial checkin of the Mach-O emitter. There's plenty of fixmes, but it
does emit linkable .o files in very simple cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:08:52 +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
Devang Patel
ca64012ac6 If unable to create tmp. file on disk then return LTO_WRITE_FAILURE status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29844 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 16:59:25 +00:00
Reid Spencer
5a060775da For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 07:30:48 +00:00
Reid Spencer
142ca8e818 For PR797:
Remove exception throwing from Path::getDirectoryContents and its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 06:56:27 +00:00
Reid Spencer
e5c9cb5eb6 For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29840 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:39:35 +00:00
Reid Spencer
b590a75eb5 Rearrange order to build more frequently used tools first and make the
triplet ordering (large, small, small) explicit with one triplet per line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29839 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:12:11 +00:00
Reid Spencer
c6a561e2ca Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29838 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:06:14 +00:00
Reid Spencer
e1647f4698 For PR797:
Change the Path::make*OnDisk methods exception free and adjust their usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:27:23 +00:00
Reid Spencer
ab96bb1df3 Rearrange the build order to better accommodate parallel build by reducing
memory pressure. This order spaces out large executables with small ones in
between so that in a -j2 or -j3 build, it only attempts to build only one
large executable at time. If you're doing -j4, you probably have enuogh
memory anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29835 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:21:21 +00:00
Reid Spencer
487447626c Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 19:01:30 +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
Nate Begeman
da6169b996 Fix a build failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 04:57:01 +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
dcee9d093f Make sure the verify pass gets run after the user's loaded passes as well
when the verify-each option is given.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29783 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 20:54:38 +00:00
Reid Spencer
ec9f050560 Rename the -verify option to be -verify-each so that it doesn't conflict
with the -verify pass option. It is also more accurate in that this option
causes a verify option to be run after every pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 20:48:44 +00:00
Reid Spencer
8e33fae0ed Convert llvm-ld to use the PluginLoader like opt instead of having its
one-off (and broken) RunOptimizations function. Also, run some cleanup
passes after the user's loaded passes run. This make sure to clean up
any cruft left around by thos passes.

This patch was inspired by a patch submitted by Bram Adams.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 19:18:36 +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
Reid Spencer
fd90dd5d55 For PR872:
Shrinkify LLVM's footprint by removing the analyze tool and moving its
functionality into the opt tool. THis eliminates one of the largest tools
from LLVM and doesn't make opt much bigger because it already included
most of the analysis passes.  To get the old analyze functionality pass
the -analyze option to opt. Note that the integeration here is dead
simple. The "main" of analyze was just copied to opt and invoked if the
-analyze option was given. There may be opportunities for further
integration such as removing the distinction between transform passes
and analysis passes.

To use the analysis functionality, if you previously did this:
  analyze $FNAME -domset -disable-verify
you would now do this:
  opt -analyze $FNAME -domset -disable-verify
Pretty simple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 06:34:30 +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
Reid Spencer
3b4c5d72e0 Patches to correct several bugs in llvmc.
Patches contributed by Bram Adams. Thanks Bram.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 20:31:44 +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
Devang Patel
2198f9cec4 untabify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:37:18 +00:00
Devang Patel
30235dad4b Use mangler, instead of addUnderscore(), to get mangled name.
Now, LLVMSymbol keeps symbol original name and mangled name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29679 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:36:16 +00:00
Reid Spencer
70bbf9a3dd Provide indentation of the generated program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:35:15 +00:00
Reid Spencer
b43ce5a148 Don't print double newline for --src-root and --obj-root as it tends to
confuse shells that might use this output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:50:24 +00:00
Anton Korobeynikov
3acbb9b9d4 Fixed typo. Thanks, Reid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29533 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 22:55:53 +00:00
Anton Korobeynikov
de9c02b171 Removed usage of "sort", which can lead to undeterministic behavior on mingw & cygwin platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29532 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 21:52:23 +00:00
Devang Patel
304d5f2edc Collect references from globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29530 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 19:10:26 +00:00
Reid Spencer
ecfe0888b6 For PR845:
Enable the makefile check on the result of find-cycles.pl. LLVM is now
cycle free and we intend to keep it that way. This patch will fail the
build if cycles are found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 21:46:42 +00:00
Reid Spencer
d8c20a9cf8 Fix a typo in the name of expand_dependencies.
Make the dependency line pattern match handle white space better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29516 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 21:45:35 +00:00
Devang Patel
30f63adef8 Make it fit into 80-columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 17:26:30 +00:00
Devang Patel
94a0ac9bea Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29502 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 17:25:36 +00:00
Devang Patel
f5a156deee Simplify. Use addprefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29501 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 17:18:45 +00:00
Chris Lattner
202ae321f8 Now that SparcV9 is gone, this logical can be simplified significantly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29498 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 16:59:17 +00:00
Devang Patel
bbd1cb43f9 Remove ARM for the moment since it is a work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29495 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 16:14:09 +00:00
Devang Patel
a89d47f54d Add new tool, lto, to do link time optimization. This tool installs
dynamic library that linker can use to optimize llvm byte codes at
link time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 15:44:57 +00:00
Chris Lattner
d3a680ae2c Fix the build on case-sensitive filesystems :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29457 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 22:34:35 +00:00
Chris Lattner
2f2d32437a no need to check readability here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29449 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:22:21 +00:00
Chris Lattner
33b0e9c644 No need to check isWriteable here (which isn't sufficient anyway). Just attempt
to do the operation and if it fails, oh well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:12:29 +00:00
Chris Lattner
8bdbb04f9b Use Path::getFileStatus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:09:46 +00:00
Chris Lattner
0b32d8b764 Use Path::getFileStatus to get status-related info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:04:01 +00:00
Jim Laskey
13ec702c43 Introducing plugable register allocators and instruction schedulers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 14:21:23 +00:00
Chris Lattner
252ad03d7d Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:03:44 +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
Reid Spencer
a6e216f456 Undo last commit, which was committed accidentally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 23:19:00 +00:00
Reid Spencer
1bc686433b Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to
have a compile-host version of "nm", not build-host. In order to effect this
we must use autoconf to determine the correct "nm" to use and propagate that
through the makefiles, through llvm-config and finally to GenLibDeps.pl as
an optional argument.
Patch contributed by Anton Korobeynikov. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 23:00:30 +00:00
Chris Lattner
7686b57803 Avoid a "scary" make warning for the 1.8 release. This should be reenabled
right after 1.8 "ships".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 21:14:04 +00:00
Chris Lattner
d8e421d40a Add llvm2cpp to DIRs list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 20:19:06 +00:00
Reid Spencer
dd3f6aa91f Make changes necessary for stopping the build if a cyclic library
dependency is found. The find-cycles.pl script now exits with a return code
that equals the number of cycles found. The Makefile was changed to ignore
the status code of find-cycles.pl. This should be removed once the libraries
are free of cyclic dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 17:10:54 +00:00
Reid Spencer
44b60ec455 Build llvm-config to identify library cycles earlier in the build process.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 17:06:02 +00:00
Devang Patel
2ebc1f82a2 Fix MacOSX build failures. (pr841)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29246 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 19:44:55 +00:00
Chris Lattner
02b04b4d34 Build more debugger/selectiondag libraries as archives instead of .o files.
This works around bugs in some versions of the cygwin linker.

Patch contributed by Anton Korobeynikov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29239 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 00:10:47 +00:00
Andrew Lenharth
74bda2e320 Fix linking on Alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29219 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 17:27:58 +00:00
Reid Spencer
8d8a7ffe58 Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 20:56:50 +00:00
Reid Spencer
3039b99697 Remove EH use from the Archive library and adjust its users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 19:09:14 +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
8eaafdedb2 Fix PR819, llvm2cpp should read .bc files, not .ll files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 23:48:57 +00:00
Chris Lattner
05ac92ca7d Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:02:27 +00:00
Reid Spencer
3d48e53584 Split long comment lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28988 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-03 16:46:03 +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
Devang Patel
e2f8ad854d Fix cut-n-pasto in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28928 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:07:29 +00:00
Chris Lattner
f8625d9018 Remove unneeded libs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28900 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 17:26:13 +00:00
Reid Spencer
28f6f2218b For PR811:
Don't both with the "C" and "cc" extensions as they aren't common and they
the "C" extension conflicts with the "c" extension on operating systems
that have case insensitive file names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28899 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 17:21:39 +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
Reid Spencer
68464b74b8 Actually add instructions to the list of defined values so it gets
recognized as such!  This prevents the CppWriter from treating every
operand as a forward reference and making a mess of the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 16:09:59 +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
Chris Lattner
7f3ac4108d This no longer needs plugins, this it doesn't need all of VMCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 00:25:44 +00:00
Reid Spencer
2991b01b18 Shorten a value description so --help out isn't so wide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:07:51 +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
Reid Spencer
af303d53e6 For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:03:13 +00:00
Chris Lattner
dc050090ea Remove useless noop argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28706 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 00:43:18 +00:00
Chris Lattner
3e347f28f1 Fix a bug in the following scenario.
1. llvm is built with objroot = OBJ and installed.
2. OBJ is deleted or install tree is shipped.
3. llvm-config is run.

In this scenario, llvm-config shouldn't emit an error message at #3, it
should just know it's not running in the objdir :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 23:54:15 +00:00
Chris Lattner
d179de5ca2 Add a new --libfiles option, for getting fully-qualified pathnames to libraries.
This can be used for tools that want makefile rules to depend on the libraries
(e.g. so the tool is relinked when a library changes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28701 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:38:29 +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
Chris Lattner
73ebd0974c Make the llvm-config library dependency database depend on all of the libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28695 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 17:43:03 +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
Chris Lattner
2e1f0ed151 temporarily add back this option, I will remove it in a couple days
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28675 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 23:43:27 +00:00
Chris Lattner
7c5357f0b9 Fix a -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28670 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 22:11:06 +00:00
Chris Lattner
0cd059eddb Add flags to get access to build_mode, objdir, srcdir etc.
If installed, ignore the prefix the tree is configured with: always use the
prefix that llvm-config is currently at, which may be different if the tree
was moved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 22:03:50 +00:00
Chris Lattner
16ad618fc2 Make llvm-config "do the right thing" when an install tree is relocated or
when run out of a build directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28668 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 21:48:10 +00:00
Chris Lattner
abdbae7bd3 Capture the build mode (e.g. Debug/Release) in the llvm-config script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 19:13:29 +00:00
Chris Lattner
584073a8cf Convert to standard file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:58:21 +00:00
Chris Lattner
41655cd0ce Remove a couple of things no longer figured out by autoconf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:55:36 +00:00
Reid Spencer
2d2c2f2bb8 Add several more autoconf variables so that new features can be implemented
by our illustrious project leader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:31:41 +00:00
Chris Lattner
e02b97bf5b Add a gross "--use-current-dir-as-prefix" option as a temporary workaround
for the "build with one prefix and move the installed files to another dir"
problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 01:23:18 +00:00
Chris Lattner
411c33da6a Remove some variables from the configured section that aren't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 01:04:35 +00:00
Chris Lattner
06e752e768 Remove more "alpha is archive" stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:56:15 +00:00
Reid Spencer
409411ea26 Suppress -pedantic warnings about print("%a")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:39:08 +00:00
Chris Lattner
6574994397 Remove obsolete CORE_IS_ARCHIVE support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28649 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:30:31 +00:00
Chris Lattner
c929c66756 Update the ignore file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28647 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:23:15 +00:00
Reid Spencer
f977e7bc83 Teach CppWriter how to emit an inline (partial) function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28645 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 23:43:47 +00:00
Reid Spencer
ad67a04e75 Restore default arguments for llvm2cpp back to health by declaring an
emitted variable to actually have a type (picky, picky, picky!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28625 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:24:29 +00:00
Reid Spencer
659a243b93 Fix a bug where incorrect C++ was being emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28615 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 04:21:20 +00:00
Reid Spencer
dee05112a6 Build llvm-config into the ToolDir not in the local directory. This makes
it more likely to be in a developer's path and consistent with all the
other tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:52:49 +00:00
Reid Spencer
b0e2fbc730 Oops, llc needs libTarget.a not Target.o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:42:33 +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
Andrew Lenharth
539d871ce3 fix utostr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:18:56 +00:00
Reid Spencer
12803f5b6b Major reorganization and extension of the code. The diff on this will be a
mess as functions were moved around into a better ordering. The code was
extended to provide various -gen-* options to better control what the
generated output should be. Currently it is possible to generate entire
modules (three different ways), functions, global variables, and types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28589 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 17:31:38 +00:00
Reid Spencer
25edc3565c Don't generate module definitions when the -fragment option is given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28583 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 04:43:19 +00:00
Reid Spencer
ac28588def llvm2cpp is ready to be compiled so add it to the makefile, but make it
optional.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28570 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:20:55 +00:00
Reid Spencer
15f7e01065 Fix more bugs. This version now passes all of the Feature test except for
a floating point conversion problem with NAN in intrinsics.ll. llvm2cpp
makes an attempt to provide the correct conversion, based on the
implementation in the CBackend writer, but it doesn't get NAN correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28568 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:18:23 +00:00
Reid Spencer
1a2a0cc5a3 Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
everything except PHI nodes and one odd recurse/opaque type situation.
PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28554 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 10:21:41 +00:00
Reid Spencer
66c873479f First complete version of llvm2cpp that doesn't crash on any of the Feature
tests. The output in a few cases still doesn't compile, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28547 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 03:43:49 +00:00
Chris Lattner
6d1727cf14 Silly cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28544 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:52:52 +00:00
Chris Lattner
74f48d133c silly cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28543 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:52:05 +00:00
Reid Spencer
e0d133f448 Next batch of implementation:
1. Get rid of old AsmWriter cruft that's not needed.
2. Implement several instructions. Enough to get by globalvars.ll and
   alignment.ll in the Feature test suite.
3. Handle constants properly (don't repeat definitions).
4. Make the output compatible with llvm-dis for diff purposes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28541 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:08:06 +00:00
Reid Spencer
ba570d700b Fix file header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28540 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:06:28 +00:00
Reid Spencer
4edca3325b Remove temporary testing rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28539 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:05:59 +00:00
Reid Spencer
74e032a4d4 Fix two bugs in the CppWriter.cpp:
1. Return the module from the MakeModule function so it can be verified.
2. Make sure types get generated with their names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28536 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:58:15 +00:00
Reid Spencer
d9169d3cbe Fix the file's comment block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:35:29 +00:00
Reid Spencer
fb0c0dc960 Initial Commit of llvm2cpp
This is a safekeeping commit. The program is not finished. It currently
handles modules, types, global variables and function declarations. Blocks
and instructions remain to be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28528 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 00:57:22 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 19:21:13 +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
Reid Spencer
adbc9b7f88 Remove the llvm-db and bugpoint restrictions from the win32 platform so
they can be compiled with ming32. The use of fork(2) has been removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:20:50 +00:00
Rafael Espindola
7bc59bc395 added a skeleton of the ARM backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 22:18:28 +00:00
Chris Lattner
c78098291e Free memory allocated by copy_env.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:17:28 +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
2f86362af8 Delete memory allocated by CopyEnv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 18:38:13 +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
Owen Anderson
07000c6f01 Refactor a bunch of includes so that TargetMachine.h doesn't have to include
TargetData.h.  This should make recompiles a bit faster with my current
TargetData tinkering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 06:33:49 +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
b93b0347d8 Adjust to use proper TargetData copy ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28112 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 21:18:40 +00:00
Reid Spencer
b3bd5ca0fc For PR764:
Don't check in the LibDeps.txt and FinalLibDeps.txt files to CVS because
the content differs from platform to platform. Instead, adjust the makefile
so that a dummy llvm-config is built if Perl is not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 17:49:50 +00:00
Owen Anderson
a69571c799 Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 01:29:57 +00:00
Chris Lattner
776eb6b21e This no longer needs the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27942 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-22 05:04:23 +00:00
Reid Spencer
7f872bb00d Okay, llvm-config is good to go now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:14:39 +00:00
Reid Spencer
05dee5064f Several Changes To Support Building llvm-config:
1. If Perl is not available, don't run Perl dependent targets.
2. Check in FinalLibDeps.txt for build environments that can't build it
   because there's no Perl processor.
3. Ensure that FinalLibDeps.txt depends on LibDeps.txt so it is
   automatically regenerated.
4. Support objdir != srcdir building.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27915 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:13:58 +00:00
Reid Spencer
563ff1cc92 Don't build llvm-config until issues are resolved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27914 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:00:24 +00:00
Reid Spencer
2e1284d569 Build the llvm-config directory as a tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27913 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 20:53:23 +00:00
Reid Spencer
d075dfb0cf Update the library dependencies for 1.8 with SparcV9 now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27910 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 19:50:53 +00:00
Chris Lattner
43c40ffa41 Never link in sparcv9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27884 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 17:07:46 +00:00
Andrew Lenharth
0cafa92371 fix printing call graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 23:45:19 +00:00
Chris Lattner
8b57ff75be Add a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 05:31:20 +00:00
Chris Lattner
6a58e0e144 Add a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 05:26:10 +00:00
Chris Lattner
7f71e21972 one too many l's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 04:21:31 +00:00
Reid Spencer
59524a5287 Distribute CVS versions of lex files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 20:56:12 +00:00
Jeff Cohen
2f51914d82 Get JIT/Interpreter working on Windows again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 02:53:49 +00:00
Reid Spencer
019a0a9725 Ignore the lexer output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 02:22:22 +00:00
Reid Spencer
1c070fc10b Remove the interpreter component as its not working at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27021 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 01:10:39 +00:00
Reid Spencer
f39fcc787b Ignore temporary files generated by building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:44:24 +00:00
Reid Spencer
b195d9d365 Update to llvm-config tool, by Erik Kidd:
1. Check for Perl and only build llvm-config if its available.
2. Add some virtual components
3. Don't depend on "standard" location for Perl, but configured location
4. Document the tool with a POD file.

This version is now ready for testing by users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27005 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:21:29 +00:00
Reid Spencer
025213e9f2 Don't print out ugly command line when building LibDeps.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27001 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 22:42:50 +00:00
Reid Spencer
ff9b038b20 Updated for library changes:
1. LLVMCBackend.o now depends on LLVMCodeGen.o (why we're not sure)
2. LLVMExecutionEngine.o no longer depends on LLVMInterpreter.o nor LLVMJIT.o
Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 06:15:27 +00:00
Chris Lattner
ef98691ca3 remove always-null IntrinsicLowering argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 05:28:02 +00:00
Reid Spencer
f2722ca339 These changes are necessary to support the new llvm-config tool. llvm-config
is a handy tool for users of LLVM who want to be able to quickly get
information about LLVM's configuration. It is intended to be used in the
command line of other tools. Documentation will be forthcoming in a
subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26952 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-22 15:59:55 +00:00
Reid Spencer
355ef219d2 The library dependency file in flat format. This file is generated by the
makefile using the utils/GenLibDeps.pl script with the -flat option. It
records the dependencies between libraries in such a way that the
llvm-config script can easily read it (in makefile dependency format).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26876 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:12:30 +00:00
Reid Spencer
0fab2b15ab First cut at the Makefile for llvm-config. This initial version just provides
the rule for building the LibDeps.txt file using GenLibDeps.pl. This needs
to be done from time to time manually in order to keep LibDeps.txt up to
date.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:10:53 +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
Chris Lattner
42d0b455ec Fit to 80 columns.
Add support for running static ctor/dtors that aren't handled by __main.
This fixes programs with the JIT and the new CFE, such as HBD.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:43:36 +00:00
Reid Spencer
78df5c3121 Make sure command line options are parsed before we try to add the LibPath
(-L options) to TheLinker. Problem noticed by Wink Saville.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26571 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 06:38:19 +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
Robert Bocchino
86d064d44c Implemented -quiet feature for analyze
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:12:04 +00:00
Chris Lattner
a2a51607a6 Turn on loop unswitching tonight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 07:33:49 +00:00
Chris Lattner
e7988aae94 reorder some libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:59:06 +00:00
Chris Lattner
27630d500e remove support for the skeleton target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26236 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 21:10:57 +00:00
Chris Lattner
1828ee191c Adjust to new style "generated files in CVS" mechanism for lex output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26163 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 05:16:35 +00:00
Chris Lattner
cb0dfba9e1 SparcV8 -> Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26008 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 08:30:45 +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
fc4417837a Remove dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25520 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 00:38:14 +00:00
Chris Lattner
7e07b24b39 It doesn't make sense to give llc a list of passes on the command line,
LLVM doesn't use it and it can't work anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25519 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 00:36:05 +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
f4484f3e16 For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 03:14:40 +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
Chris Lattner
7ac534f234 remove unused header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25101 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 00:21:37 +00:00
Jim Laskey
b2efb853f0 Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 22:28:25 +00:00
Jim Laskey
292a1afb4a Adding MachineDebugInfo as a immutable pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25088 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:42:02 +00:00
Reid Spencer
1adc3de914 Revert removal of std:: prefixes and addtion of "using namespace std;".
This violates the LLVM coding standards.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25050 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 09:07:29 +00:00
Duraid Madina
64c9e7a339 don't need this anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25049 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 02:50:44 +00:00
Duraid Madina
ea8aed7ef3 delete file portably
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25048 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 02:47:21 +00:00
Reid Spencer
78b0e6a42e General cleanup:
1. Don't mix C++ and C standard I/O, convert to C++ iostreams
2. Wrap long lines
3. use the std namespace to simplify/shorten the code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25042 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-29 21:13:45 +00:00
Duraid Madina
4e4fe664d8 ditto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:58:12 +00:00
Duraid Madina
6927b067bc more compliance stufff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25037 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:56:09 +00:00
Duraid Madina
d885251216 behold my standards-compliant humps!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25033 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 05:56:36 +00:00
Duraid Madina
3de3b05538 WAKEY WAKEY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25032 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 05:48:55 +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
171eee5471 Fix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
rework.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24959 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 19:26:06 +00:00
Reid Spencer
156aa35eb5 Implement PR679:
* Changed the -rpath option from cl::opt to cl::list
* Changed the interface to GenerateNative to take a std::vector<std::string>
  instead of just a std::string
* Changed GenerateNative to generate multiple -Wl,-rpath, options to be
  passed to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:50:56 +00:00
Reid Spencer
73a74be705 Implement PR512:
This patch adds a -post-link-opts option to llvm-ld which allows an arbitrary
program to optimize bytecode after linking. The program is passed two file
names. The first is the input (linked bytecode) the second is where it must
place its output (presumably after optimizing). If the output file is bytecode,
it is used as a substitute for the input. This will allow things like poolalloc
to be written as a separate program instead of a loadable module or built into
LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24893 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 05:03:23 +00:00
Chris Lattner
be193839fa rename option for consistency with -mcpu -mattr etc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24734 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 05:19:55 +00:00
Chris Lattner
60844d46ce rename option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24732 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 05:19:18 +00:00
Chris Lattner
3015e6061c provide an option to override the target triple in a module from the commandline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 05:00:21 +00:00
Chris Lattner
f33b8663bd provide an option to override the target triple in a module from the command
line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 04:59:57 +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
Reid Spencer
f574494e13 Remove -start-group and -end-group no-op options, accidentally committed
in last patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24710 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-14 19:08:51 +00:00
Reid Spencer
328ead9fce Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 20:00:37 +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
Chris Lattner
52098898b4 Revert my previous patch which broke due to lazy streaming of functions
from .bc files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24575 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-02 19:00:22 +00:00
Chris Lattner
48ba8221af If a module has a main, but it is defined externally, refuse to run it.
Attempting to run it will find lli's main, which isn't the desired effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24569 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 22:48:23 +00:00
Chris Lattner
cb8346563b Allow users to specify -Wl,-native* multiple times if they please
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 16:08:04 +00:00
Chris Lattner
178e0c41ce Add a new -fast option, which generates code quickly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24234 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 02:12:17 +00:00
Chris Lattner
2b11995547 add a hack that fixes:
llvm-gcc main.c -Wl,-native -o a.out -g

This is important because it used by many configure scripts.

John, please pull this onto the 1.6 branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24163 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-03 07:17:51 +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
604b95bd24 transforms before analyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23976 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 17:10:30 +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
465be21950 pull in the archive version of this lib to reduce exe size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23929 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:13:21 +00:00
Chris Lattner
5e22a6486a Pull in the archive versions of these libs to reduce executable size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23928 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:12:14 +00:00
Chris Lattner
df514ef5f8 Link in datastructure as a relinked o file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23926 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:07:56 +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
Chris Lattner
31360613cb Use the new LinkAllAnalyses.h header instead of forcing passes to be
in relinked object files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23922 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:00:13 +00:00
Chris Lattner
a322a5f58f Use archive versions of these libraries, using the LinkAllPasses header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23916 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:12:20 +00:00
Chris Lattner
2094725532 Shrinkify to make --help output look better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23911 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:37:13 +00:00
Chris Lattner
7b7593c481 shrinkify the option name a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23910 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:35:42 +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
07be8d4212 document this as experimental
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23883 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 22:00:45 +00:00
Chris Lattner
fbcd54f2cb Fix PR637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23784 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-18 06:29:43 +00:00
Chris Lattner
7b5634d213 Speed up isBytecodeLPath from 20s to .01s in common cases. This makes -native
not completely painful to use.  Once we decide a directory has a bytecode
library, we know it this function returns true, no need to scan entire directories.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23405 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 06:11:24 +00:00
Chris Lattner
f394213021 1. Do not use .c_str() to keep a persistent handle on a temporary string.
2. Concatenate -lfoo and -L/bar options into a single option instead of
   passing "-L /bar" (for example) which doesn't work on Darwin.
3. Send -v output to stderr instead of stdout


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 06:05:46 +00:00
Jim Laskey
839615a510 Add help support for -mcpu and -mattr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23222 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 19:27:43 +00:00
Jim Laskey
b1e1180ca0 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23192 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-01 21:38:21 +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
Reid Spencer
68a24bdba4 Implement PR614:
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23115 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-27 18:50:39 +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
1d924f6070 Pass -export-dynamic to gcc when compiling with -native and the link is
performed with -export-dynamic (aka. -disable-internalize).

Patch by Nicholas Riley!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22601 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 22:07:38 +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
d29b6aa608 Keep tabs and trailing spaces out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22565 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 18:33:25 +00:00
Reid Spencer
540f7d6018 Run the verifier pass after all the other passes rather than before them.
This catches mistakes in the passes rather than just verifying the bytecode
input to llc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-28 04:00:49 +00:00
Reid Spencer
4418c2b3ac Make the verifier pass run (in debug mode) in llc. This adds a sanity check
to llc when debugging. Also allow other passes to be run from llc.
Patch contributed by Michael McCracken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22532 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-28 02:25:30 +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
8f1ac1c631 Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22360 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 16:48:52 +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
Reid Spencer
c7f083297c For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 18:21:42 +00:00
Chris Lattner
812125aea9 add a new -filetype argument to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22287 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 03:32:05 +00:00
Chris Lattner
cbb34a76a9 minor cleanups, use copy ctor instead of manually doing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22285 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 03:00:34 +00:00
Chris Lattner
85141583cd refactor this interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22284 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 02:50:35 +00:00
Andrew Lenharth
705b9e55f2 make SparcV8 and V9 seperately configurable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22204 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 22:32:51 +00:00
Reid Spencer
ad38cd6ad0 Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22142 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 21:10:31 +00:00
Reid Spencer
5da2d08433 Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22141 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 21:03:11 +00:00
Reid Spencer
6a5d1d42b7 For PR514:
* Make sure the "etcdir" gets checked for configuration files so that
  the installed location for config files is checked.
* Remove the st.in file (moved to projects/Stacker/tools/stkrc)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22135 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 01:06:46 +00:00
Reid Spencer
cc97cfc43e For PR514:
* language specification files are no longer configured with "configure"
* add substitutions for %bindir%, %libdir%, and various llvmgcc related
  variables needed in the c and cpp spec files.
* Implement the stubstituions in the Compiler Driver.
* Move st.in to projects/Stacker/tools/stkrc where it belongs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22128 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 00:52:28 +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
Chris Lattner
cbe92e6d4a Move licm after reassociate, add some cond-propagate passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21769 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-07 22:45:35 +00:00
Misha Brukman
827e8f0ffa * Use consistent spacing for function arguments
* Output single-character strings as chars


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21705 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 22:38:21 +00:00
Misha Brukman
0b861485ec Minor clean-ups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21678 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 20:30:34 +00:00
Misha Brukman
e7d52b6b5c Clean up and correct llvmc configurations for C and C++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21667 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 06:13:18 +00:00
Misha Brukman
3a98ff8d3a std::string(NULL) does not a proper constructor make
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21666 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 06:10:51 +00:00
Misha Brukman
4c42937b64 Omit periods at the end of command-line switch explanations for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21664 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 05:36:14 +00:00
Reid Spencer
ff1c9e2147 Add the simplify-libcalls pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21585 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 02:22:47 +00:00
Misha Brukman
4e8458d02c extract has been renamed to llvm-extract to avoid conflicting with another tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:46:58 +00:00
Misha Brukman
e50b075b66 There are still uses for spaces in Makefiles -- to make text line up together,
regardless of the tab size/stop settings on the developer side


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:43:41 +00:00
Misha Brukman
de03bc07ef extract has been renamed to llvm-extract to avoid conflicting with another tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21498 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:36:05 +00:00
Reid Spencer
2c6584a72f Make the CBackend actually get included in llc by using USEDLIBS instead of
USEDLIB as the variable to which "CBackend" is appended. The surrounding
if clause is safe because currently the configure script ensures that the
CBackend target is always added to TARGETS_TO_BUILD. By using a non-hard
coded construct in the makefile, we gain uniformity and the ability to
change the default set of targets by only changing the configure script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 17:24:33 +00:00
Chris Lattner
3952bc6f39 Always enable the C backend. This fixes a *vast* number of failures on the
testers last night, as llc was not getting the cbe linked in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 14:36:22 +00:00
Reid Spencer
dadc96f07a Don't always build CBackend and Skeleton. Make use of the TARGETS_TO_BUILD
parameter instead which will correctly list the set of targets to be built.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21451 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:32:05 +00:00
Reid Spencer
18969fbc9f Implement the --enable-targets= feature of the configure script. The make
variable TARGETS_TO_BUILD is used to determine which targets in lib/Target
are built and which libraries are linked into llc. This effectively
implements the feature. One item remains: disabling targets in the dejagnu
test suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21450 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:20:11 +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
2b37d7cf28 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:13:18 +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
Misha Brukman
baec07cbfe #include system headers after all LLVM headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21374 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 04:51:29 +00:00
Misha Brukman
704448f83b Eliminate trailing spaces at end-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21372 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 04:08:35 +00:00
Misha Brukman
8f586ba4ed Consistently eschew space between *' or &' and function argument name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21371 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 04:07:47 +00:00
Misha Brukman
b0bafc55be * Print commands as we execute them with `-v'
* Add option `-save-temps'
Patch contributed by Markus Oberhumer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 03:22:18 +00:00
Reid Spencer
c30088f961 Ensure that the arguments passed to sys::Program::ExecuteAndWait include
the program name as the first argument. Thanks go to Markus Oberhumer for
noticing this problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21220 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-11 05:48:04 +00:00
Chris Lattner
bf9add4745 The first argument to ExecuteAndWait should be the program name, but pointed
out by Markus F.X.J. Oberhumer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-10 20:59:38 +00:00
Chris Lattner
0b77be8f0f there is no reason to run -instcombine -instcombine!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20915 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 06:25:11 +00:00
Alkis Evlogimenos
ab7ada3ed6 Rename createPromoteMemoryToRegister() to
createPromoteMemoryToRegisterPass() to be consistent with other pass
creation functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20885 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 02:01:12 +00:00
Chris Lattner
72dcaaf9c4 statically link ia64 into llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20656 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 18:39:06 +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
a3fcfff633 method renamed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20616 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 15:48:22 +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
35641ecc37 move the reassociation pass after the LICM pass. This speeds up mgrid
from 10.27s to 9.57s with the CBE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-07 03:19:50 +00:00
Reid Spencer
837149c08d Changes to enable creation of native executables directly from gccld and to
ensure that -L paths don't contain both bytecode and native libraries.
This patch contributed by Adam Treat.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 08:45:35 +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
Reid Spencer
38b5788544 Use DataInstall macro instead of INSTALL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20322 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 21:43:43 +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
Reid Spencer
5443af2b41 Adjust the help output so that it will fit cleanly within 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20239 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-18 20:00:05 +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
Andrew Lenharth
adf75775fa add Alpha to llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20198 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 21:14:09 +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
7456e3ce38 Conform to the documented interface by null terminating argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20167 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:10:45 +00:00
Chris Lattner
ed5fa58a07 Make sure to null terminate argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20166 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:02:34 +00:00
Chris Lattner
a88155dabf Print the module, not the pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20156 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 19:12:31 +00:00
Reid Spencer
ef11c5e64d Fix PR506:
* Use error returned from Archive::OpenAndLoad
* Make sure only std::string is thrown so it gets caught and printed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20147 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 07:34:17 +00:00
Chris Lattner
5ea56e5924 clean up comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19920 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 17:29:05 +00:00
Chris Lattner
4b724b1cb9 This has been deprecated for long enough, nuke it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19919 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 17:27:26 +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
Reid Spencer
e3e0fb19e9 sysconfdir -> PROJ_etcdir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-17 00:42:31 +00:00
Reid Spencer
bdf6a39d1c Rename BUILD_* to PROJ_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19592 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:21:29 +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
Chris Lattner
2e8bd68d13 X86 BE requires SelectionDAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19337 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:51:25 +00:00
Jeff Cohen
e67bc1384a Get the #ifdef right on LinkAllPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19310 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 07:01:08 +00:00
Jeff Cohen
00f3db6a4c Fix minor mistakes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19309 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 06:29:42 +00:00
Jeff Cohen
4b807e0381 Add project opt to Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19307 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 06:02:53 +00:00
Reid Spencer
564a571f62 Make opt honor the quiet option when printing the bytecode warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 17:31:55 +00:00
Reid Spencer
b687c0c218 Prevent output of bytecode to std::cout unless the --force flag is given.
This prevents bytecode splats with usage like: cat file.ll | llvm-as -


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19239 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 00:08:46 +00:00
Reid Spencer
5737913c46 Move the code for printing out a warning about bytecode output to a console
into lib/Support so it can be used with other tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19238 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 23:57:01 +00:00
Jeff Cohen
7109ce8258 Fix typo 'ompress' => 'compress'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19232 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 22:10:32 +00:00
Reid Spencer
bb4fe3d677 Correct the conditional test for non-portable tools so that it will
correctly omit them for non-Unix operating systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19206 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 22:56:14 +00:00
Reid Spencer
3d1cc28e7c Fix the help documentation to not imply multiple archive files can be
processed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19193 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 17:51:57 +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
Brian Gaeke
06c375bd1d Fix the build on PowerPC/Darwin - it thought we were declaring a new
function or something. Since FileRemover takes a const reference to
sys::Path, we need to pass an actual sys::Path variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 22:33:33 +00:00
Reid Spencer
8d8b41d3f1 Correct compilation for Cygwin. FindExecutable now returns a sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19109 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 13:50:17 +00:00
Reid Spencer
5512655574 Support the gas option --traditional-format which, for some reason, gets
passed to gccas when the --program-prefix option is used to configure CFE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 02:58:43 +00:00
Misha Brukman
81417b631a Fix the Win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19088 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 01:37:33 +00:00
Reid Spencer
bf427630a0 Make parameters to CopyFile use explicit instantiation of sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19086 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 01:26:48 +00:00
Reid Spencer
682084a157 Use explicit construction of sys::Path from std::string because the
constructor is "explicit".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19078 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 03:24:02 +00:00
Reid Spencer
5d282185f5 Allow compilers that can't distinguish between a class instantiation and
the declaration of a function to compile this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19073 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 19:16:12 +00:00
Misha Brukman
6e6e88a3f0 llvm/Config/unistd.h has gone away, far, far away
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19068 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 05:36:57 +00:00
Reid Spencer
3000cbfd10 Incorporate the contents of include/llvm/Config/unistd.h as this is the
last file in LLVM to require the header. After ths commmit, our unistd.h
will go away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19065 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:34:36 +00:00
Brian Gaeke
fabf41fc3e Use Config/alloca.h instead of alloca.h - pointed out by Duraid and Misha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19059 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:02:01 +00:00
Brian Gaeke
574314131f Make this compile on Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19047 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 21:08:07 +00:00
Reid Spencer
f6358c75eb For PR351:
* Support changes in sys::Program::ExecuteAndWait interface


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:56 +00:00
Reid Spencer
b31baa88a5 For PR351:
* Pass sys::Path instead of std::string for paths
* Correct the types of arguments passed to RunProgramWithTimeout due to its
  interface using sys::Path instead of std::string
* Replace "/dev/null" (not portable) with empty string which
  sys::Program::ExecuteAndWait recognizes as "redirect to bit bucket"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19041 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:21 +00:00
Reid Spencer
2418bf9546 For PR351:
Turn path instance variables into sys::Path instead of std::string


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19038 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 17:59:45 +00:00
Reid Spencer
06c06dbaaf sys::CopyFile returns void and throws an exception on error which will be
caught by llvm-ld's main function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:54:21 +00:00
Reid Spencer
b2d8c36018 sys::CopyString throws an exception on error which will be caught by gccld
main function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19029 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:53:10 +00:00
Reid Spencer
1bd2653c8f The CopyFile function got moved into the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 00:19:32 +00:00
Reid Spencer
9141f03322 Reverse the logic for Win32 to ensure that bugpoint and llvm-db are NOT
built on this platform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19015 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 08:00:40 +00:00
Reid Spencer
691b3a195b Fix this file to actually work. ifneq was incorrectly used. Subtract out
llvm-db and bugpoint for Win32 rather than add them in
subtr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19014 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 07:59:53 +00:00
Reid Spencer
30b9746e4e Makefile.JIT doesn't exist any more so it doesn't need to be distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 02:06:36 +00:00
Reid Spencer
a442107525 Disable bugpoint and llvm-db tools for Win32. They can't be supported on
that platform without a lot of work because they depend on process image
copy behavior of fork(2).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19008 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 01:46:41 +00:00
Tanya Lattner
f1131b35af Linking in all of ScalarOpts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19002 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:07:13 +00:00
Reid Spencer
5f76760c88 For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:04:20 +00:00
Reid Spencer
9ac141823d For PR351:
* Make the OutputC and OutputAsm functions work with sys::Path for the output
  file name instead of using std::string.
* Get rid of extraneous "toString" calls.
* Change "removeFile" to sys::Path::destroyFile()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19000 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:01:34 +00:00
Chris Lattner
780cbd9bae No targets actually use this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 19:39:45 +00:00
Reid Spencer
b4ed7b0f80 Unbreak all archive reading operations introduced by the last patch which
always exited the program with exit code 1 in these cases, regardless of
whether an error occurred or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18966 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 21:58:03 +00:00
Chris Lattner
67c3821ea0 Do not fail an assertion on a broken archive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18959 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:44:15 +00:00
Reid Spencer
175bf068ab Change LLVMGCCDIR/bytecode-libs -> LLVMGCCDIR/lib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18951 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:54:37 +00:00
Reid Spencer
b50ae12021 For PR351:
Remove #inclusion of Support/FileUtilities.h which isn't needed any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:53:50 +00:00
Reid Spencer
97182985d5 For PR351:
* Convert use of getUniqueFilename to sys::Path::makeUnique();


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18949 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:53:08 +00:00
Reid Spencer
cda985e191 For PR351:
* Remove #inclusion of FileUtilities.h, not needed any more.
* Convert getUniqueFilename -> sys::Pat::makeUnique()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:51:56 +00:00
Reid Spencer
6da1e0d50f For PR351:
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:20:08 +00:00
Reid Spencer
93f8f55e19 For PR351:
Adjust to interface change for FindExecutable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18920 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:44:23 +00:00
Reid Spencer
51ab8ec66e For PR351:
Adjust to changes in the interface of FindExecutable, getting ToolRunner
ready for bigger things to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18919 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:43:44 +00:00
Reid Spencer
90484fb9a2 For PR351:
llee was a nice hack, but it wasn't portable so its gone, with Misha's
approval.  Operating systems have facilities available for making bytecode
directly executable without this utility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18916 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:15:32 +00:00
Misha Brukman
f7d4f10a0d Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18914 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:42:16 +00:00
Reid Spencer
319cdeccd1 For PR351:
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18909 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:03:02 +00:00
Reid Spencer
05f7e7991b Make the loop termination condition clear when building the set of items to
pass to the Linker::LinkInItems function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:18:19 +00:00
Reid Spencer
9d88d1aaab For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:01:53 +00:00
Reid Spencer
12786d535d Make use of the new Path inserter function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18887 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 08:53:36 +00:00
Reid Spencer
11db4b8084 PR351: \
Use sys::Path not FileUtilities to check file types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18865 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:26 +00:00
Reid Spencer
c406413471 Convert to use new Linker class interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18864 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:14 +00:00
Reid Spencer
e4874029c3 LinkModules is now in the Linker class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:03 +00:00
Chris Lattner
bcfe1e2d64 Do not internalize a module if -link-as-library is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18825 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 07:53:51 +00:00
Reid Spencer
96690a81d4 Revert the last patch. We really do need SimplyCFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 03:03:54 +00:00
Reid Spencer
1fce09125c Path::get -> Path::toString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 00:14:15 +00:00
Reid Spencer
357cf5439a Remove this pass as its no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 22:55:35 +00:00
Chris Lattner
c59e09ec54 This pass is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 22:30:32 +00:00
Reid Spencer
cb8cb8eb66 Get rid of warning from flex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 21:59:47 +00:00
Chris Lattner
b4a400af2e Turn on ipsccp by default instead of simple IPCP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:03:43 +00:00
Brian Gaeke
17b1afe945 Link V8 backend into llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18739 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:04:13 +00:00
Reid Spencer
6b463b261e When -link-as-library, add -l options to Module's deplibs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18617 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 05:17:40 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Reid Spencer
c191d497d5 Fix PR139:\
When not linking as a library, use LinkItems to retain command line order of \
linking, otherwise use LinkFiles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18549 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 19:15:29 +00:00
Chris Lattner
40add594eb Add -strip-debug option
remove the temporary -disable-dse option


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 05:45:58 +00:00
Chris Lattner
f8f70c1a17 Adjust to change in pass name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18442 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 21:27:35 +00:00
Chris Lattner
3f14fb1a0b Recognize --strip-all as a synonym for -s.
Add -S and --strip-debug option support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18441 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 21:26:10 +00:00
Reid Spencer
0de66b5cc8 Implement file replacement correctly even with the f (TruncateNames) flag
set. The member name comparison was failing for truncated names. This patch
fixes that. Truncated names are now properly replaced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 09:21:55 +00:00
Reid Spencer
a564845f83 Shared library extension is now in LTDL_SHLIB_EXT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 12:40:21 +00:00
Reid Spencer
aadc41860d No longer necessary, moved Makefile.rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18337 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 07:17:31 +00:00
Reid Spencer
8f631784f7 Use LLVMLIBS=JIT to get JIT libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 07:17:18 +00:00
Reid Spencer
f00b54058b Make sure the program's symbols can be dlsym'd as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18331 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 06:23:19 +00:00
Reid Spencer
1a3ba7f10e Make the check a little quieter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 04:51:58 +00:00
Reid Spencer
bf714df962 Add LLVMbzip2 library, now required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 20:22:06 +00:00
Reid Spencer
07accb5a60 Always pass -D_GNU_SOURCE to cc1plus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 19:38:51 +00:00
Reid Spencer
c702fa3ff0 Always pass -D_GNU_SOURCE to cc1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 19:38:39 +00:00
Reid Spencer
1945a11249 Correct the configuration variable used to find the bin directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18244 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 09:36:28 +00:00
Reid Spencer
c9b37eea2e Make sure additional C++ suffixes are recognized by llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 00:01:57 +00:00
Reid Spencer
65bc4e0bc4 * Adjust the options to make them either accept multiple occurrences or be
optional so that compatibility with GCC is accomplished.
* Implement the -print-file-name option in an attempt to provide the same
  functionality as GCC. Unfortunately, without loading the cpp or c config
  files, this option won't help much.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:47:58 +00:00
Reid Spencer
0b3c7d084c * Don't pass empty arguments to ExecuteAndWait because it can cause the
sub-tool to start reading its standard input instead of the specified
  input.
* Clean up ouput of path names on error.
* Extend GetPathForLinkageItem to always search the LibraryPaths and thus
  make it suitable for an interface function (required by llvmc.cpp).
* Implement support for language-specific default library paths.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:45:49 +00:00
Reid Spencer
2d3ee4e2eb Configuration data now supports a vector of library paths.
Add the GetPathForLinkageItem method to the interface so full paths can
be generated for a given linkage item.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:40:06 +00:00
Reid Spencer
dc6812d92d Add the c and cpp configuration files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18186 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:38:46 +00:00
Reid Spencer
f1a889c99b Removed in favor of configurable (*.in) versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18185 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:38:07 +00:00
Reid Spencer
e9564cedb4 Make various adjustments to parsing so that the separator character doesn't
terminate options or paths, so that SPACE tokens legally separate options
on a command line, and so that the lang.libs paths are parsed properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18184 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:37:26 +00:00
Reid Spencer
c0f376dba2 SPACE is a legitimate token now, to separate option words.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18183 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:35:50 +00:00
Reid Spencer
90654fd924 Handle space, separators, bad substitutions, and library search path better
than before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18182 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:35:16 +00:00
Reid Spencer
b98c672328 Configurable language configuration files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18181 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:33:08 +00:00
Reid Spencer
08602e5a30 Get the -o option right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18052 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:45:33 +00:00
Reid Spencer
679a723a63 Get the -o option right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18051 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:39:33 +00:00
Reid Spencer
3c7b1075ff Not needed any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18050 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:27:20 +00:00
Reid Spencer
9822de2ed1 Content moved to llvm-ld.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18049 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:15:08 +00:00
Reid Spencer
445564a0bc Incorporate GenerateCode.cpp. Make static things static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:02:56 +00:00
Reid Spencer
c457fbb5ea First cut at implementing generic link-time Optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18047 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 19:43:28 +00:00
Reid Spencer
0fdd363a26 The Archive class now has differentiation for BSD4.4 and SVR4 style archive
symbol tables. Adjust our usage to compensate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18046 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 18:01:22 +00:00
Chris Lattner
fd80b5c260 Fix a bug that caused stuff like this:
main at ./eh.cpp:1414 ->          printf("a\n");

to be printed, instead of this:

main at ./eh.cpp:14
14 ->          printf("a\n");


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 19:45:44 +00:00
Chris Lattner
fa1af13449 Fix a bug in the checkin where I adjusted this code to work when
LinkModules nukes the second module argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 07:09:40 +00:00
Chris Lattner
d29c636a00 Remove debugging code, unneuter this functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17963 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 19:42:50 +00:00
Chris Lattner
a269ec7b0a remove debugging code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 19:40:13 +00:00
Tanya Lattner
75e8419e48 Adding option to llc for ModuloScheduling. By default it is turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17959 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 18:38:01 +00:00
Chris Lattner
86f42db22b -disable-opt is not -O0, it's okay for it to disable internalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-17 16:41:19 +00:00
Chris Lattner
429a9cbc2e Even with -disable-opt we should still internalize and strip if requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 18:59:20 +00:00
Reid Spencer
babb45b327 Per code review: \
* Make static things static \
* Get rid of unused TmpArchive variable \
* Implement symbol table printing \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17878 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:41:20 +00:00
Reid Spencer
bede58363c Per code review: \
* hide the compatibility option \
* Make static things static \
* Use cl::extrahelp instead of cl::MoreHelp (defunct) \
* Use cl::PrintHelpMessage instead of our own printUse function \
* Use a std::set<sys::Path> for the path list because its now required by \
  the sys::Path class and also ensues directories are traversed in sorted \
  order.\
* Implement symbol table printing locally instead of in libLLVMArchive \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:41:09 +00:00
Chris Lattner
90c18c5c69 Make this code not depend on LinkModules leaving the second argument unmolested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:31:38 +00:00
Tanya Lattner
d607491480 This file was originally developed by the LLVM research group so this comment should stay. I also do NOT want my name explicity listed on src files. I am already mentioned in the credits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 19:21:49 +00:00
Reid Spencer
6bb69355d2 Linker.h moved to include/llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17805 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:25:32 +00:00
Reid Spencer
b908356b93 bugpoint needs LLVMLinker.a now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17804 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:23:18 +00:00
Reid Spencer
b55bc06bad Correct call of methods whose names have changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17803 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:17:41 +00:00
Reid Spencer
d292fb92e8 This program needs libLLVMLinker.a now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17802 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:12:22 +00:00
Reid Spencer
605b9e2c5b Linker.h has a new home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:00:08 +00:00
Reid Spencer
227b6d00dd Fix usage of changed function prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17798 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:30:54 +00:00
Reid Spencer
63ab669120 A tool for adding a symbol table to LLVM Archives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17797 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:29:21 +00:00
Reid Spencer
8d18dcf4d9 Makefile for llvm-ranlib tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17796 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:28:33 +00:00
Reid Spencer
63efb77980 *Fix usage of changed function prototype*Use Archive interface to symbol table for archives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17795 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:27:46 +00:00
Reid Spencer
d129664066 This tool needs libLLVMArchive now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:27:00 +00:00
Reid Spencer
0486e17f7f Remove linking declarations (in Linker.h now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:25:26 +00:00
Reid Spencer
1893f9273c We need the libLLVMArchive library now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:23:31 +00:00
Reid Spencer
8c6ee6629c Moved to lib/Linker (common with gccld)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:22:45 +00:00
Reid Spencer
3a1582b5b2 Total rewrite using Archive library & new functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17790 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:20:07 +00:00
Reid Spencer
c7ebfdd2cc This tool needs the libLLVMArchive library now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17789 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:19:21 +00:00
Reid Spencer
6903c86348 Remove linking declarations (in Linker.h now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17788 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:17:49 +00:00
Reid Spencer
4c1af902ad Provide exception handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:17:03 +00:00
Reid Spencer
5e081fb74a Moved to lib/Linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:15:31 +00:00
Reid Spencer
cd18a8333e Add the llvm-ranlib tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:13:59 +00:00
Reid Spencer
31391b6792 Make sure llee can deal with compressed bytecode too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17652 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:21:25 +00:00
Misha Brukman
669b524399 Output the program name (in this case, gccld) with warning about invalid files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17638 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 04:24:59 +00:00
Nate Begeman
a591457857 Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17637 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 04:01:18 +00:00
Misha Brukman
eda20f933b Don't silently ignore invalid files: tell the user!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 22:03:10 +00:00
Reid Spencer
cc0bd565bb Add a --disable-compression option to gccas so the default compression of
bytecode can be defeated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17626 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 17:37:04 +00:00
Misha Brukman
a1527534bb Use LLVMToolDir instead of ToolDir because the latter is no longer set (?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17594 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 22:26:43 +00:00
Reid Spencer
4b5fdc71c9 Rename the option for defeating compression to be a little more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17567 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:50:16 +00:00
Reid Spencer
34b9071a3d Enable compression by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17566 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:43:51 +00:00
Reid Spencer
ae70fedfab * Enable bytecode compression by default
* Provide a -no-compress option to defeat compression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:41:32 +00:00
Reid Spencer
cf0eb8deb5 Turn on compression by default.
Change --compress to --no-compress so compression can be turned off.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17564 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:37:27 +00:00
Reid Spencer
17f52c5c46 Add support for compressed bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17535 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-06 23:17:23 +00:00
Reid Spencer
07adb2836b Stop propagating method names that violate the coding standard
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 22:15:36 +00:00
Misha Brukman
4ad0b11b95 No, really, the library name is `LLVMexecve'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 17:30:52 +00:00
Reid Spencer
cc2d1e25f3 Internalize variable names to prevent recursive assignment. Cleanup docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-30 09:19:36 +00:00
Misha Brukman
b1883932c7 Fix file header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17350 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 23:26:09 +00:00
Misha Brukman
a6ad12d4fa LLEE execve() wrapper library has changed its name and location
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17339 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 18:36:51 +00:00
Brian Gaeke
d6d8b83742 Fix library names for sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17311 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 06:39:10 +00:00
Reid Spencer
0dac2eb58e Remove the FORCE token, rename VERSION to VERSION_TOK so it doesn't
conflict with configuration variables and #defines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17298 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 04:06:15 +00:00
Reid Spencer
af77d74e07 Implement linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17297 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 04:05:06 +00:00
Reid Spencer
3a9b22234f Eliminate the force flag, configuration item, and related support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17296 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 04:04:38 +00:00
Reid Spencer
5a7f13b2ae Pass -f to stkrc to ensure the output file is always written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17295 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:57:49 +00:00
Reid Spencer
2967b61b68 Eliminate the -F option (for forcing output) .. not needed
Create GCC compatible -Wx, aliases for the existing -T options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:56:16 +00:00
Reid Spencer
6cf4acc18d Add llvm-ld to the subdirs to be built
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17293 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:53:02 +00:00
Reid Spencer
e84f92db26 Convert to new library names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17292 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:50:43 +00:00
Reid Spencer
f113e7bf43 Update for library name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17287 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 00:11:43 +00:00
Reid Spencer
6cb21d443e Change Library Names Not To Conflict With Others When Installed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Chris Lattner
395236f720 Improve help output from llvm-db 'info' command. Patch contributed by
Michael McCracken!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17241 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 05:46:17 +00:00
Reid Spencer
20ac4e3699 Add EXTRA_DIST for additional files to be distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17233 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 03:12:11 +00:00
Chris Lattner
83f7c3792b Remove template args that are the same as the default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 19:09:41 +00:00
Reid Spencer
d3f5e7e4ce Make clean quieter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-23 19:49:20 +00:00
Reid Spencer
40a955ab05 We're not doing automake any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17168 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 21:02:23 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Reid Spencer
f405d107d8 Actually link all the analysis passes and their dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17114 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 03:32:12 +00:00
Reid Spencer
0bade7e5e7 Remove extra comma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17113 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 03:26:21 +00:00
Reid Spencer
7b32daa4c1 Actually link in all the analysis passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17112 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 03:22:48 +00:00
Nate Begeman
792558898f Pass -single_module option to gcc when linking dynamic libraries for use with bugpoint, so that we can bugpoint multiple .cp files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17102 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 23:03:32 +00:00
Chris Lattner
a78a9027f5 Reid added --version to the CommandLine lib. Don't conflict with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 02:49:08 +00:00
Misha Brukman
81dd3d4536 Fix hyphenation and quoting style for great justice
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 23:22:48 +00:00
Misha Brukman
56cb207a39 * We don't use the ENABLE_*_JIT flags in the source base anymore
* Convert references to Sparc to SparcV9 to clearly identify CPU type


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16998 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 20:06:36 +00:00
Misha Brukman
53c8f29586 Use the shared Makefile.JIT for JIT-enablement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16992 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 19:01:25 +00:00
Misha Brukman
064782209b Since several tools and examples want JIT support, factor out the process of
adding the right libs for any given architecture's JIT into a single place


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16989 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 18:58:19 +00:00
Misha Brukman
ce6662fb6a Enable the PowerPC JIT by compiling powerpc.o library into lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 06:35:11 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Misha Brukman
fc6723f659 No space allowed between \ and end-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16940 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 19:17:11 +00:00
Misha Brukman
2c9039eb1a Wrap lines at 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16939 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 18:35:57 +00:00
Chris Lattner
e3ef9b5fe2 Don't miss global optimizations because we run before the inliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 04:47:18 +00:00
Reid Spencer
769dd7d5ec Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16898 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:52:14 +00:00
Reid Spencer
796aacf2e2 Fix named of a library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16896 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:50:31 +00:00
Reid Spencer
90a2adc866 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:36:40 +00:00
Misha Brukman
41605ab6e7 Use the SparcV9-marked instr scheduling library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16851 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 18:14:56 +00:00
Chris Lattner
93a00e4ceb Rename pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 04:12:02 +00:00
Chris Lattner
48f44cf5b3 Hrm, if there is an error loading a file, try printing a message so the
user knows that...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16524 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-27 16:41:01 +00:00
Reid Spencer
aefd04b6d0 Add some missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 16:00:07 +00:00
Reid Spencer
8d9b6800f6 Qualify Path with sys:: namespace so this file compiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16516 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 15:59:41 +00:00
Chris Lattner
b12914bfc0 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Chris Lattner
68d033cc94 Finegrainify namespacification
'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16434 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:44:31 +00:00
Reid Spencer
e6bd638fec Fix compilation warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16336 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 15:46:13 +00:00
Reid Spencer
e52b44e799 Update to reflect stkrc's new optimization capabilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16327 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 02:00:24 +00:00
Reid Spencer
d4ff15af96 Support substitution options for the W, M, and f options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16326 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 01:59:31 +00:00
Reid Spencer
54fafe4dc9 Support the -WX, -f -M options as pass throughs
Change force option from -f to -F
Support the -strip option
Make changes to reflect different interface in sys::Program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 01:58:45 +00:00
Reid Spencer
14c225e6f6 Change banner name to reflect actual program this Makefile is for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16311 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 21:15:19 +00:00
Reid Spencer
6dd3713be5 Get rid of compile warning by having llvmExecve return the result of its
call to executeProgram.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16306 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 15:37:33 +00:00
Reid Spencer
c0af3f0052 Initial implementation of llvm-ld: stolen from gccld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 01:27:53 +00:00
Misha Brukman
247384c041 Add LLEE into compilation, but not for Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16304 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 01:18:30 +00:00
Reid Spencer
dccc01eb61 Excise the -L option since llvm-link should not do library searches. It
just links bytecode files together.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16303 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 23:39:42 +00:00
Reid Spencer
a2dfd05d84 Excise dependent library linking at Chris' request. llvm-link is intended
to provide only the simplest linking of LLVM modules without trying to be
complete. Dependent library linking will be added to gccld or its successor


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 23:08:29 +00:00
Misha Brukman
a6bcd83854 Squelch compilation warnings on Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16301 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 23:01:24 +00:00
Reid Spencer
6939f8141c Implement dependent library processing and search paths for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16287 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 04:32:42 +00:00
Misha Brukman
ac09e25b58 Make file comment span the entire line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16249 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-08 19:48:15 +00:00
Reid Spencer
a3b4e09715 Don't re-instantiate the std::string in catch block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 22:59:32 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
790306852c Make sure <cassert> is included for platforms that don't include it via
other header files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 20:36:15 +00:00
Reid Spencer
016e335e87 Initial commit of a configuration file for compiling C++ programs with
the file name pattern *.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16117 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 06:32:24 +00:00
Reid Spencer
ca01f9bc6f Implement the "setIncludePaths" and "setSymbolDefines" interface methods.
Revise token substitution to be a little faster.
Clean up exception throwing, make sure its always a std::string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16116 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 06:29:06 +00:00
Reid Spencer
7c14fd152e Pass lists of -I and -D options through to the Compiler Driver.
Handle -g and -Wxxx for GCC compatibility


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16115 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 06:27:32 +00:00
Reid Spencer
6386009ea6 Need to throw std::string not const char* if we want error messages to be
caught.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16109 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 00:06:52 +00:00
Reid Spencer
93426ba5ed Add a missing header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16099 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 20:02:28 +00:00
Reid Spencer
7c4c98d986 Add the LLVMsystem.a library as it is now used for operating system
independence of the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16092 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:29:38 +00:00
Reid Spencer
9de7b334ec The functions in Signal.h are now in the llvm::sys namespace - adjust
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:28:55 +00:00
Reid Spencer
615edcccda add llvmc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16090 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:27:34 +00:00
Reid Spencer
52c2dc1a42 Convert llvmc to use the lib/System interface instead of directly
using Unix operating system calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16089 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:26:56 +00:00
Reid Spencer
ca044879fe License file for llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16045 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-25 00:41:06 +00:00
Reid Spencer
9fd58e0ae8 Insert declarations for two new functions that support the dependent
libraries feature.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:55:34 +00:00
Reid Spencer
198e888705 Run the compilation actions before we attempt linking work.
Correctly implement the dependent libraries feature so that linked bytecode
files automatically include any dependent libraries they specify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16042 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:54:32 +00:00
Reid Spencer
aff3c77ac2 Add the directory specified by LLVM_LIB_SEARCH_PATH to the list of
directories to be searched during linking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16041 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:53:13 +00:00
Reid Spencer
44956326f0 Get rid of error messages from CommandLine because -time-passes was
defined twice. We make use of the new TimePassesIsEnabled global boolean
value from Pass.h to access the value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16033 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:54:26 +00:00
Reid Spencer
01b77f9c08 Adjustments for changes in the configuration language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:24:14 +00:00
Reid Spencer
2cf17a4f0f - Unify format of output messages
- All errors throw std::string
- Default output file name to a.out (if we're linking)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:05:30 +00:00
Reid Spencer
02413b0294 Link with bcreader and vmcore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:04:07 +00:00
Reid Spencer
f384db3a90 - Implement the %args% substitution
- Implement parsing of the .output={bytecode|assembly} item.
- Drop parsing support for translator.optimizes, translator.groks_dash_O,
  optimizer.groks_dash_O, translator.output_is_asm, optimizer.output_is_asm
- Add parsing support for translator.output and optimizer.output
- Add optimizer.required parsing support
- Add linker.libs and linker.libpaths parsing support
- Fix error messages to list correct set of tokens expected.
- Rename FileReadable -> FileIsReadable (changed in CompilerDriver.cpp)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:03:23 +00:00
Reid Spencer
bf3948884e - Alphabetize the list of token enumerators.
- Drop old tokens, insert new tokens


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16022 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:59:35 +00:00
Reid Spencer
ec4f588418 - Rename and rearrange for clarity
- Drop name tokens not used any more (GROKS_DASH_O)
- Rename OUTPUT_IS_ASM as OUTPUT and allow "bytecode" and "assembly" as
  values of it.
- Simplify handleContext (now handleNameContext) arguments and ensure that
  it returns OPTION tokens exactly as scanned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16021 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:58:37 +00:00
Reid Spencer
a01439ada2 - Remove unused GetSuffix function
- Renamed FileReadable -> FileIsReadable
- Remove support for GROKS_DASH_O; deferr it to %opts% substitution
- Require a -o option except in case of linking where it defaults to a.out
- Fix problem processing *.o and *.bc files.
- Ignore optimization phase if -emit-raw-code
- Correct the assembly generation phase to support -emit-native-code
- Implement dependent library lookup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16020 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:55:17 +00:00
Reid Spencer
fd2f728b48 Remove unneeded flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16019 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:49:57 +00:00
Reid Spencer
59a745a26f Provide support for retaining the version number found in a config file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:03:25 +00:00
Reid Spencer
c0e9bec9fc Add the VERSION token.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:02:41 +00:00
Reid Spencer
1df71210fe Add support for version numbers.
Allow CRLF as a line terminator (as well as plain LF)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15993 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:02:13 +00:00
Reid Spencer
b50acbcf49 Shorten lines so this file can be used as the documentation example
directly. Remove -pre (experimental pass).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15992 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:01:19 +00:00
Reid Spencer
7593745563 Correct to change interface of the analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 21:00:24 +00:00
Reid Spencer
53aa793721 Change @ -> % in config files. @name@ might be needed for config files to
themselves be configured via autoconf so its not a good substitition syntax
for llvmc. Furthermore % is more llvmish :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 22:53:11 +00:00
Reid Spencer
b38e40564b Implement the correct search for configuration files. llvmc will now try
the following in this order:
 1. -config-dir=/path/to/configs
 2. LLVM_CONFIG_DIR=/path/to/configs
 3. ~/.llvm/etc
 4. $prefix/etc
 5. /etc/llvm


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:24:07 +00:00
Reid Spencer
aa43a4b025 Add CONFIG_FILES so the language specific config files can be installed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15949 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:21:51 +00:00
Reid Spencer
9a8fedd6f9 Implement Assembly support.
Consolidate platform-specific code into "sys" namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15947 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:14:05 +00:00
Reid Spencer
f51a87cb57 Actually let it compile after file name changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 21:52:49 +00:00
Reid Spencer
cbabe7f06e Moved ConfigData -> Configuration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 21:17:53 +00:00
Reid Spencer
bae6825e1d Implement many new features for llvmc. This is the first version that will
actually execute actions and it is been shown to optimize a Stacker program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15912 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 04:49:47 +00:00
Reid Spencer
2a069fa003 Back out dependencies on lib/System/Path.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15815 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 07:06:38 +00:00
Reid Spencer
6964e3f57d Fix definitions to match tool's actual capabilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15814 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-16 07:06:13 +00:00
Chris Lattner
d2e89a7b34 Documentation like this doesn't belong here, and now we have the commandguide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 22:53:20 +00:00
Reid Spencer
bf43772038 More Functionality:
- cleaned up lexical scanner
- added support for "lang.optN" configuration items
- added temporary file support (ala lib/System)
- corrected logic for deciding which phases to run
- consolidated the Action and ActionPattern classes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15765 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 08:19:46 +00:00
Reid Spencer
936f5c72e2 Initial configuration files (to be installed) for ll (LLVM Assembly) and
st (Stacker) source files. These versions for testing/review only.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15764 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 08:16:12 +00:00
Reid Spencer
68fb37ad67 Converted to use flex for tokenizing input so we can use an easier to
understand recursive descent parser, we can easily handle more syntax
variety, and we can more easily change the configuration items accepted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15732 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-14 09:37:15 +00:00
Reid Spencer
a3f185577c Fix header commentary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15729 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-13 20:25:54 +00:00
Reid Spencer
5c56dc1f62 Additional functionality. This version handles option parsing and parameter
subsitution correctly for at least .ll and .st files. There's still a long
way to go (i.e. this isn't worth of review yet).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15728 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-13 20:22:43 +00:00
Reid Spencer
2594c9abbf First version of a utility internal to llvmc that handles the parsing and
construction of configuration data for compiler front ends.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15727 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-13 20:21:22 +00:00
Chris Lattner
891150f0b2 If the block extractor fails, actually emit the bc file that failed to extract
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15675 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-12 02:36:50 +00:00
Reid Spencer
abf1ce3c4e Move CompilerDriver.h here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15609 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 16:29:18 +00:00
Reid Spencer
8fd3bca957 Initial makefile for the LLVM Compiler Driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15608 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 16:27:08 +00:00
Reid Spencer
034a544401 First "do nothing" version of the LLVM Compiler Driver. This version just
processes command line arguments and allows --help to be used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15607 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 16:26:01 +00:00
Chris Lattner
84b3e01ac2 while we're at it, make the libraries be on separate lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15526 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-05 18:32:57 +00:00
Misha Brukman
5520bd3839 Lines need to end with \ to make sure they're actually continued
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15525 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-05 18:31:33 +00:00
Misha Brukman
b9ebe8a303 * Add PowerPC library to LLC
* Fit used libraries on a few lines


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15524 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-05 18:24:11 +00:00
Brian Gaeke
a2b5f45fed sparcv9select is history.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15516 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-05 05:17:19 +00:00
Misha Brukman
3b87f215b6 * Convert C++ comments to C
* Add UIUC copyright notice headers


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15503 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 21:19:49 +00:00
Misha Brukman
eab43d86fb Shared libraries are usually prepended with `lib'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15502 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 21:19:27 +00:00
Brian Gaeke
4efe35fd5e sparcv9select is history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15479 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:39:21 +00:00
Brian Gaeke
76333917eb libsparcv9select is history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15478 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 07:38:52 +00:00
Chris Lattner
93127fbc4a This pass has proven its metal, remove -disable option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-02 10:10:08 +00:00
Misha Brukman
47b14a4a6a Fix #includes of i*.h => Instructions.h as per PR403.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15334 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-29 17:30:56 +00:00
Chris Lattner
2d26ffb679 Run DSE at link-time, and turn on an IP alias analysis by default in gccld!
The -disable-globalsmodref is temporary and will be removed eventually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15268 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-27 08:13:15 +00:00
Chris Lattner
7d91e49ff7 Finally give bugpoint -timeout support!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15163 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 07:53:26 +00:00
Chris Lattner
e96b2ed211 Pass timeouts into the low level "execute program with timeout" function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15160 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 07:49:11 +00:00
Chris Lattner
62c91fcda5 Provide timeout values to all abstract interpreters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-24 07:48:50 +00:00
Misha Brukman
eed80e2375 * Convert "\n" -> '\n'
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15123 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-23 01:30:49 +00:00
Chris Lattner
b11a4637fe Remove redundant SCCP pass
Add new DSE pass.  Add a temporary option to disable it in case we need it
This is going in after the July 22 nightly tester run, so we'll wait until the 23rd to see it
:)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15104 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-22 08:34:33 +00:00
Brian Gaeke
7848e68c16 These files don't need to include <iostream> since they include "Support/Debug.h".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15089 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-21 20:50:33 +00:00
Chris Lattner
e312e156c3 Err, fix last checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 06:03:51 +00:00
Chris Lattner
5fbf29ce53 Fix bugpoint miscompilation support on OS/X
Patch contributed by the fabulous Nate Begeman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-19 06:00:17 +00:00
Chris Lattner
269c80c6ba Remove this printer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14980 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 23:43:34 +00:00
Reid Spencer
518310cb0d bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:44:37 +00:00
Reid Spencer
593eb95228 bug 122:
- Minimize redundant isa<GlobalValue> usage


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14952 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-18 00:44:14 +00:00
Misha Brukman
b3998ec5c5 Correctly build shared objects on MacOS X for debugging code generators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 19:45:45 +00:00
Chris Lattner
84c34b72d9 Build skeleton target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14876 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 07:12:46 +00:00
Chris Lattner
4d143ee019 IA64 compat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14867 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-16 00:08:28 +00:00
Chris Lattner
b3366bc37e Actually, use an exception to stop verification. This gives us much better
error messages because verification stops at the first error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-13 08:48:04 +00:00
Chris Lattner
00dd5cd356 There is no reason to abort and print a stack trace if there is a verification
error.  Just print the message like a good little tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-13 08:45:41 +00:00
Misha Brukman
878ba7cc5d * Tabs to spaces
* Delete extra blank lines


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-12 22:58:07 +00:00
Reid Spencer
0d88616c9a Correct an output typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14766 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 23:20:54 +00:00
Chris Lattner
988a1a0c66 Prune unused #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:05:32 +00:00
Chris Lattner
e45110e012 Goodbye macro hell, hello nice clean and simple code. This also gives llc
the ability to dynamically load and use targets that are not linked into it
statically.  e.g.:

  llc -load libparisc.so -march=parisc foo.bc -o foo.s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14751 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 04:03:24 +00:00
Chris Lattner
4a1de8b250 Add -load option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14740 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 01:08:19 +00:00
Chris Lattner
a3eb7b3983 Add a -load option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14739 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-11 01:06:59 +00:00
Reid Spencer
86f42bdad9 Add #include <iostream> since Value.h does not include it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14623 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:20:55 +00:00
Reid Spencer
954da37bb4 Add #include <iostream> since Value.h does not #include it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:19:56 +00:00
Brian Gaeke
db67ecd49d Build llvm-bcanalyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14568 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 05:59:20 +00:00
Reid Spencer
8a542aeb84 Name Change: llvm-abcd -> llvm-bcanalyzer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14555 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-02 03:22:53 +00:00
Reid Spencer
86a9a7a9c4 Implement verification feature.
Ensure output occurs even in the face of an error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14499 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 23:34:27 +00:00
Reid Spencer
53d55432cc The analyzer code now lives in the bcreader library. The bcanalyzer lib
is no more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-29 23:33:31 +00:00
Chris Lattner
a8e750f2b0 Write .bc files to binary ostreams. This shouldn't change anything on unix,
but allows us to generate valid code on hosts (like windows) that do newline
translation for text files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14418 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 20:54:43 +00:00
Chris Lattner
4391946558 Make sure to link all IPA's into opt, so that it has access to stuff like
anders-aa


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-25 05:19:17 +00:00
Misha Brukman
b01c1381c0 TransformUtils library is no longer needed since Linker.cpp is in VMCore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14352 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-23 17:36:17 +00:00
Misha Brukman
008248f2c0 Linker.h moved to include/llvm/Support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14351 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-23 17:33:09 +00:00
Reid Spencer
23d46e70b1 Clean up documentation and naming of variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14119 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-10 18:38:44 +00:00
Reid Spencer
465ba87c92 Made detailed output the default and changed -details option to -nodetails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14114 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-10 08:24:42 +00:00
Reid Spencer
96684ef886 Clean up the documentation.
Simplify the file handling. It now only writes to std::cout.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14059 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-08 05:56:58 +00:00
Chris Lattner
a822160402 Eliminate more traces of the -c option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14049 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-07 18:10:01 +00:00
Reid Spencer
dac69c83c2 Commit For New Tool: llvm-abcd (Analysis of ByteCode Dumper). This tool
will (eventually) provide statistical analysis of bytecode files as well
as the ability to dump them in a low level format (slot numbers not
resolved). The purpose of this is to aid in the Type!=Value change of
bug 122. With this initial release, llvm-abcd merely dumps out the
bytecode. However, the infrastructure for separating bytecode parsing from
handling the parsing events is in place. The style chosen is similar to
SAX XML parsing where a handler object is called to handlign the parsing
events. This probably isn't useful to anyone but me right now as there is
no analysis yet, and the dumper doesn't work on every bytecode file. It
will probably be useful by the end of this week. Note that there is some
duplication of code from the bytecode reader.  This was done to eliminate
errors from being introduced in the reader and to minimize the impact to
other LLVM developers. At some point, the Analyzer and the Reader will be
integrated to use the same infrastructure. Also, sorry for the minor change
to Instruction.h but I just couldn't bring myself to write code that
depends on Instruction internals.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-07 17:53:43 +00:00
Chris Lattner
681692da43 Make gccld copy the llvm-stub program to be the execution wrapper for
bytecode files on win32 systems.  We keep the shell script on unix systems
because it is much more transparent for the users and supports -load
options.

This allows llvmgcc work correctly on win32 systems without the -native or
-native-cbe options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13946 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:53:57 +00:00
Misha Brukman
fff0ff8313 Fix a double negation (in grammar).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13943 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:29:52 +00:00
Chris Lattner
0ebee7410f Move some functions out of gccld.cpp to GenerateCode.cpp. This allows us
to reduce the inter-file interface in the gccld tool and gets some
uninteresting code out of gccld.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13942 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:22:24 +00:00
Chris Lattner
7e88d418bb Refactor a bit of code into a function, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13941 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:10:19 +00:00
Chris Lattner
f7e92b1dcf No really cygwin, we LIKE .exe'ness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13939 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-02 00:04:54 +00:00
Chris Lattner
0ed1f38ea6 Build the llvm-stub directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13938 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-01 23:49:55 +00:00
Chris Lattner
4c6d124efa Initial checkin of a stub executable that can be used by gccld to forward to
bytecode files on systems that don't support #!/bin/sh natively (ie, win32).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13937 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-01 23:48:45 +00:00
Chris Lattner
3153e4fc80 Neuter the -q option. Stop printing the "program modified" message, ever
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13844 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 20:32:10 +00:00
Reid Spencer
ec7eb45926 Re-introduce the -q option and make opt always return 0, even if the
optimization pasess fail. This is necessary to avoid breaking feature
tests in the tests suite that depend on this behavior. *sigh*


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13832 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 16:28:54 +00:00
Reid Spencer
0870594530 Removed the -q option and the default message written to stderr. The
output produces confusing results in TestRunner.sh


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13828 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 08:26:22 +00:00
Chris Lattner
b04cb7daf5 Right, globals aren't values yet..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13822 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 06:43:37 +00:00
Chris Lattner
d9572118eb Add a simple pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13820 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 06:13:36 +00:00
Chris Lattner
6623cffb6a Uhh, that doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13815 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 05:44:22 +00:00
Chris Lattner
bed85ff010 Header file moved
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13813 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-27 05:41:36 +00:00
Reid Spencer
9231ac8b6f Convert to SymbolTable's new iteration interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13754 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:53:40 +00:00
Chris Lattner
7507c297d0 Turn the block extractor on by default now that it basically works, eliminating the option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13502 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 19:02:44 +00:00
Chris Lattner
68bee938e5 Check to see if all blocks are extractible first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13491 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 16:08:01 +00:00
Chris Lattner
b83c0f3f63 Don't leave dead bytecode.output files around if the optimizer/block extractor crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13477 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 02:55:45 +00:00
Chris Lattner
2290e75406 Implement the final missing bits for block extractor support. Now bugpoint
can extract basic blocks up to the limit of the block extractor implementation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13475 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-12 02:43:24 +00:00
Chris Lattner
5e783ab0b5 Implement basic block extraction for the miscompilation debugger. This still needs
two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block
extractor itself needs to have enough bugs fixed for this to be more or less
useful.

Until the time that this is generally useful, it is hidden behind the new bugpoint
-enable-block-extraction option.  I hope to get the FIXME done tonight.

Also of note, this patch adds a -extract-bbs option to bugpoint which can be used
to debug the block extractor.  (hint hint Misha :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13471 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-11 21:54:13 +00:00
Chris Lattner
1c2f68631e A class that is meant to be a base class should have a virtual destructor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13470 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-11 20:41:07 +00:00
Brian Gaeke
7532e34537 Allow the user to set the LLVMINTERP environment variable as a workaround, for
when they have to run a gccld shell script without having lli in their path.
This is intended to address Bug 289.

Also, emit the traditional syntax ${1+"$@"} for passing all of a shell script's
args to a subprocess. If you have arguments that have spaces in them, $* will
not preserve the quoting (i.e., the quoted string "foo bar" as an argument will
end up as two arguments "foo" "bar" to lli.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13414 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-07 21:47:36 +00:00
Chris Lattner
60083e2fc0 Use the new commandline flag to allow us to call bugpoint like this:
bugpoint ... --tool-args -enable-correct-eh-support -regalloc=linearscan --args -- -foo

So that tool-args option gets the -enable-correct-eh-support -regalloc=linearscan flags instead of bugpoint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13389 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 22:05:35 +00:00
Chris Lattner
817d8d3046 Remove a really old comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13385 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-06 19:29:58 +00:00
Brian Gaeke
48b008db57 Apply simplification suggested by Chris: why assign() when operator = will do?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13364 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 22:02:41 +00:00
Brian Gaeke
636df3d7ec Add --tool-args flag which lets you pass arguments to llc or lli.
This is intended to address Bug 40.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13358 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:09:16 +00:00
Brian Gaeke
d11577b68b Add "Args" optional argument to AbstractInterpreter factory methods, which
fills in a ToolArgs vector in the AbstractInterpreter if it is set. This
ToolArgs vector is used to pass additional arguments to LLI and/or LLC.
This is intended to address Bug 40.

Also, make -debug-only=toolrunner work for the LLC and CBE
AbstractInterpreters.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13356 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 21:09:01 +00:00
Chris Lattner
f4789e6d04 Teach bugpoint to be a little bit smarter and avoid repeating work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13132 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-23 20:36:51 +00:00
Misha Brukman
ca718e41cf Add command-line option to select whether to isolate or delete function from
module. Default is `isolate' as before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13113 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-22 23:07:39 +00:00
Misha Brukman
123f8fec94 Add a space before result for readability on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13109 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-22 20:02:09 +00:00
Misha Brukman
8c194eaa05 Add doxygenified comments to functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13097 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-21 18:36:43 +00:00
Alkis Evlogimenos
09233fb86e Include cerrno (gcc-3.4 fix)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-21 16:11:40 +00:00
Misha Brukman
de4803d0af As per Chris, greatly simplify handling of external functions by using the
wrapper idea uniformly: we can use Value::replaceAllUsesWith() instead of
special-casing by class of user.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13063 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-19 03:36:47 +00:00
Misha Brukman
b687d82b02 * Reorder #includes
* Wrap a long line


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13061 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-19 03:12:35 +00:00
Misha Brukman
dc7fef83dc Finally implement rewriting global initializers which use external functions
by creating an internal wrapper function with same signature as the external
function, and use it instead of the "real" function.

The wrapper then calls the external function using the same JIT function
resolution API that has been used before for rewriting instructions, since the
wrapper has an explicit call instruction which we can rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13054 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-19 01:12:01 +00:00
Chris Lattner
93d82020ef Move loop optimization passes up, add loop unroller
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-18 05:21:01 +00:00
Misha Brukman
7a46e4c62b Don't use invalid HTML in a doxygen comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-15 15:23:45 +00:00
Chris Lattner
f9c455d3df Add a couple more IPO's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 05:38:15 +00:00
Chris Lattner
27829ec5ff finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12862 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-12 05:38:01 +00:00
Chris Lattner
36ee07ff9d Disambiguate symbols after loop extraction so that we can diagnose a code
generator bug if multiple loops are extracted from a function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-11 23:52:35 +00:00
Chris Lattner
2423db0e85 Fix an obvious bug in the refactoring I did a few days ago
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12797 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-09 22:28:33 +00:00
Chris Lattner
a1346a2619 Disable strict alias analysis in the backend c compiler, as the code we
generate is not TBAA safe.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12774 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 15:18:59 +00:00
Chris Lattner
67e0a34178 Revert previous patch, I'm a moron :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12773 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 15:18:03 +00:00
Chris Lattner
121f09fb05 Right, we break strict aliasing requirements. Make sure to disable strict
aliasing in the C compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12772 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-08 15:14:43 +00:00
Misha Brukman
b04da8a3c6 Wrap at 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12701 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 17:04:30 +00:00
Chris Lattner
27a9b2713b Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12700 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 16:54:04 +00:00
Chris Lattner
69e8d282bf Add a new gccld -native-cbe option which causes gccld to generate native code
for the application with the C backend instead of the native LLVM code generator


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12698 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-06 16:43:13 +00:00
Chris Lattner
a57d86b436 Merge the code generator miscompilation code into the optimizer miscompilation
code.  This "instantly" gives us loop-extractor power to assist with the
debugment of our nasty codegen issues.  :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12678 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 22:58:16 +00:00
Chris Lattner
11b8cd197a Make a method public
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12677 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 22:01:48 +00:00
Chris Lattner
9ae427a14c Minor cleanups, remove some old debug code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12676 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 21:37:55 +00:00
Chris Lattner
b15825b0a2 Refactor and genericize code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12675 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 21:37:38 +00:00
Chris Lattner
8505c867b1 lli no longer takes the -quiet option!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12674 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 20:28:41 +00:00
Chris Lattner
30878f42c2 Make full use of the Mangler interface to simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12671 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 19:31:02 +00:00
Chris Lattner
af48fa8259 Minor change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12655 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-05 01:31:50 +00:00
Chris Lattner
04eaef28a8 Remove obsolete analyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12634 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:56:33 +00:00
Chris Lattner
106dc527b0 Tweak libraries for scev changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12625 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 20:32:46 +00:00
Chris Lattner
fb4b96e77e Minor speedup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12612 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 16:28:32 +00:00
Chris Lattner
02bb481881 minor formatting change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12606 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 06:32:45 +00:00
Chris Lattner
5313f23b8c Fix two pretty serious bugs:
1. Each time the loop extractor extracted a loop, we would leak a module.
  2. When we extracted a loop, we didn't add the new function to the list of
     miscompiled functions.  Thus if the bug was in a loop nest and we
     extracted it, we could actually *LOSE THE BUG*, which is very bad.

With these patches, bugpoint has successfully found a bug for me in a function
with several nested loops, and cut it down to just one of them. :) :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12605 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 06:32:17 +00:00
Chris Lattner
87ab7e994f Fix a fairly nasty bug that prevented bugpoint from working quite right when
hacking on programs with two functions that have the same name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12604 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 06:30:33 +00:00
Chris Lattner
58d84ced5f If the program returns a non-zero exit value, don't leave files laying
around


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12603 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 05:33:06 +00:00
Chris Lattner
76351aa57e Fix wonky header
Address PR305: LLVM tools will happily spew bytecode onto your terminal


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12602 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-02 05:06:57 +00:00
Chris Lattner
d3a533d94d When loop extraction succeeds, make sure to map the function pointers over
to avoid dangling references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12470 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 17:42:09 +00:00
Chris Lattner
7fa44fca30 Fix an inverted condition that causes us to think that loop extraction
accomplished something when it really did not.  This does not fix the bigger problem tho.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12469 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 17:37:18 +00:00
Chris Lattner
9d5968dd51 Fix an iterator invalidation problem in a "buggy" pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12468 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-17 17:29:08 +00:00
Brian Gaeke
e40eae7370 Add a better head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12447 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 21:47:20 +00:00
Chris Lattner
002dbddccd Fix thinko, and PR292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12426 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-16 01:51:54 +00:00
Chris Lattner
a1cf1c8c87 After reducing a miscompiled program down to the functions which are being
miscompiled, try to use the loop extractor to reduce the program down to a
loop nest that is being miscompiled.  In practice, the loop extractor appears
to have too many bugs for this to be useful, but hopefully they will be fixed
soon...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12398 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 22:08:00 +00:00
Chris Lattner
44a64bccac Fix a minor bug in runPassesOn
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12397 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 21:37:41 +00:00
Chris Lattner
0a00256900 Add a new "AutoDebugCrashes" option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12396 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 21:21:57 +00:00
Chris Lattner
a75766a6c1 Refactor to use a new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12395 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 21:17:22 +00:00
Chris Lattner
3b6441e105 Add new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12394 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 21:17:03 +00:00
Chris Lattner
efdc0b5057 Refactor and clean up a bunch more code. No major functionality changes.
* Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList)
 * Make PrintFunctionList truncate the output after 10 entries, like the crash debugger
   did.  This allows code sharing.
 * Add a couple of methods to BugDriver that allows us to eliminate some friends
 * Improve comments in ExtractFunction.cpp
 * Make classes that used to be friends up bugdriver now live in anon namespaces
 * Rip a bunch of functionality in the miscompilation tester into a new
   TestMergedProgram function for future code sharing.
 * Fix a bug in the miscompilation tester induced in my last checkin


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12393 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 20:50:42 +00:00
Chris Lattner
7546c3884a Add a method to extract a loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12391 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 20:02:07 +00:00
Chris Lattner
5eda1f2f65 add a fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12388 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 19:31:00 +00:00
Chris Lattner
be21ca54e0 Refactor all of the "splitting a module into two pieces" code to avoid
code duplication.  Also, don't use ReduceMiscompilingFunctions::TestFuncs
to print out the final message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12387 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-14 19:27:19 +00:00
Chris Lattner
2c7b430bc0 Turn on argument promotion in gccas. This can give us substantially better
code in cases where the file has lots of static functions or anon namespaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12361 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-13 21:38:35 +00:00
Chris Lattner
b2c180f04e Fix the "infinite looping unless you disable adce" bug
Also remove an option to disable adce :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-13 19:35:54 +00:00
Brian Gaeke
744b5fb93f Revise comment and error message for the Bug 38 situation. Also, make it
print out the name of the function being used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12347 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-12 21:37:46 +00:00
Misha Brukman
094158a133 SparcV8 removed until it grows up becomes a mature backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12288 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-11 18:16:33 +00:00
Chris Lattner
8c2730e347 Annotate functions with edge counts as well, if they are available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12233 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 20:04:32 +00:00
Chris Lattner
f8338c4375 Run the new pass in gccld now that it passes all tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12196 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-07 22:12:40 +00:00
Chris Lattner
d62276a66e Add a hook to run with the V8 target, though it doesn't currently work. Also
mark the PPC backend as experimental


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-28 19:55:16 +00:00
Chris Lattner
f74a401f61 We have this snazzy link-time optimizer. How about we start using it? This
removes some cruft from 255.vortex, cleaning up after DAE and IPCP, which
do horrible, beautiful, things to vortex.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11861 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-26 03:34:30 +00:00
Chris Lattner
dd429c6de9 Add a new pass, run internalize first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11839 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:35:13 +00:00
Chris Lattner
a93d19fff7 Add a new pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11838 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 21:35:02 +00:00
Brian Gaeke
150666fd82 Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11827 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-25 19:08:12 +00:00
Alkis Evlogimenos
c38aa6dd79 Include Config/config.h for SHLIBEXT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-23 22:42:51 +00:00
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