Commit Graph

1718 Commits

Author SHA1 Message Date
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