Commit Graph

1820 Commits

Author SHA1 Message Date
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Chandler Carruth
d5ee896193 Fixing a ">" redirect to be a ">>" redirect, so a sed command doesn't get clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33032 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 02:38:29 +00:00
Devang Patel
27376106d9 Modules are consumed when they are merged together by Linker.
Clear modules vector so that destructure does not try to
delete these modules again. Patch by Chandler Carruth.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33017 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 18:42:27 +00:00
Chris Lattner
c0974a1344 fix atexit. This is an overcomplex way of calling exit, but it is required,
as the jit intercepts exit calls to implement atexit handlers.  This
fixes SingleSource/UnitTests/2003-05-14-AtExit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 07:36:34 +00:00
Chandler Carruth
40e274b579 Build libLLVMlto on non-Darwin architectures. Resolves PR1055: http://llvm.org/PR1055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33006 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 06:25:29 +00:00
Chris Lattner
2db43c864e relax type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:13:39 +00:00
Reid Spencer
12969887a3 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:07:39 +00:00
Reid Spencer
e3671f90f2 Upgrade the llvm.isunordered intrinsics to "fcmp uno" instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:07:10 +00:00
Chris Lattner
f74edf28b6 this is an overcomplex way to call exit :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 06:43:08 +00:00
Chris Lattner
ddc6f353c0 Add C wrappers for the LTO library (PR1081). Patch by Chandler Carruth!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:53:43 +00:00
Chris Lattner
11fdadf407 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32965 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:51:31 +00:00
Reid Spencer
78d033e086 For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 07:24:44 +00:00
Reid Spencer
f8383def5c Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32955 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 06:04:32 +00:00
Reid Spencer
cb03b5a122 For PR1082:
Solve several related problems by making variable names more unique and
dealing with recursive phi nodes. Unfortunately, this doesn't solve the
main issue reported in the PR, but its a step in that direction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32953 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 06:03:09 +00:00
Reid Spencer
f72538ee2e Add an option for getting the C compiler flags, --cflags.
Patch contributed by Chandler Carruth


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 02:48:03 +00:00
Reid Spencer
a7c46fa921 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 00:23:53 +00:00
Reid Spencer
520071af0a For PR1080:
Emit the correct syntax for icmp and fcmp constant expressions. The
predicate goes outside the parentheses not inside. This was a change made
in the assembler without the corresponding change made in llvm-upgrade.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32942 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 00:12:05 +00:00
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