oota-llvm.git
17 years agoReally big cleanup.
Anton Korobeynikov [Wed, 3 Jan 2007 11:43:14 +0000 (11:43 +0000)]
Really big cleanup.
- New target type "mingw" was introduced
- Same things for both mingw & cygwin are marked as "cygming" (as in
gcc)
- .lcomm is supported here, so allow LLVM to use it
- Correctly use underscored versions of setjmp & _longjmp for both mingw
& cygwin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32833 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoA bit more debugging printf's.
Evan Cheng [Wed, 3 Jan 2007 07:44:30 +0000 (07:44 +0000)]
A bit more debugging printf's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32832 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRestore previous behavior of defaulting to ZEXT. This works around two
Reid Spencer [Wed, 3 Jan 2007 05:03:05 +0000 (05:03 +0000)]
Restore previous behavior of defaulting to ZEXT. This works around two
things: (1) preventing PR1071 and (2) working around missing parameter
attributes for bool type. (2) will be fixed shortly. When PR1071 is fixed,
this patch should be undone.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32831 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTwo changes:
Reid Spencer [Wed, 3 Jan 2007 04:25:33 +0000 (04:25 +0000)]
Two changes:
1. Switch expression and cases are compared signed and are sign extended.
2. For function results needing extended, do SIGN_EXTEND if the SExtAttribute
   is set and ZERO_EXTEND if the ZExtAttribute is set, otherwise just let
   the Legalizer do ANY_EXTEND.
This fixes the recent regression in kimwitu++ and probably the llvm-gcc
bootstrap issue we had today.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32830 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoClean up from recent changes. Comment the new parameter to ExpandLibCall.
Reid Spencer [Wed, 3 Jan 2007 04:22:32 +0000 (04:22 +0000)]
Clean up from recent changes. Comment the new parameter to ExpandLibCall.
Consolidate some lines of code and remove duplication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32829 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix this test cases to use parameter attributes for its parameter and
Reid Spencer [Wed, 3 Jan 2007 04:20:23 +0000 (04:20 +0000)]
Fix this test cases to use parameter attributes for its parameter and
result types. These tests are checking for sext behavior and it won't
happen unless requested with the parameter attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32828 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoVectors are not supported by ConstantInt::getAllOnesValue.
Jim Laskey [Wed, 3 Jan 2007 00:11:03 +0000 (00:11 +0000)]
Vectors are not supported by ConstantInt::getAllOnesValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32827 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis test case previously passed the assembler without error even though
Reid Spencer [Tue, 2 Jan 2007 21:56:26 +0000 (21:56 +0000)]
This test case previously passed the assembler without error even though
it used an undefined type name as a parameter argument. This bug in the
assembler has been fixed and it is now necessary to define the type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32826 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Tue, 2 Jan 2007 21:54:12 +0000 (21:54 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32825 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement checking for unresolved types in the argument types and result
Reid Spencer [Tue, 2 Jan 2007 21:53:43 +0000 (21:53 +0000)]
Implement checking for unresolved types in the argument types and result
type of function definitions.
This fixes test/Regression/Assember/2007-01-02-Undefined-Arg-Type.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32824 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix naming inconsistency.
Evan Cheng [Tue, 2 Jan 2007 21:33:40 +0000 (21:33 +0000)]
Fix naming inconsistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32823 91177308-0d34-0410-b5e6-96231b3b80d8

17 years ago- Fixing naming inconsistency: calleesave -> calleesaved.
Evan Cheng [Tue, 2 Jan 2007 21:31:15 +0000 (21:31 +0000)]
- Fixing naming inconsistency: calleesave -> calleesaved.
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32822 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix naming inconsistency: calleesave -> calleesaved.
Evan Cheng [Tue, 2 Jan 2007 21:30:17 +0000 (21:30 +0000)]
Fix naming inconsistency: calleesave -> calleesaved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32821 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd virtual method spillCalleeSaveRegisters() and restoreCalleeSaveRegisters()
Evan Cheng [Tue, 2 Jan 2007 20:55:17 +0000 (20:55 +0000)]
Add virtual method spillCalleeSaveRegisters() and restoreCalleeSaveRegisters()
to MRegisterInfo. These allow the target to issue instructions to spill and
restore callee saved registers in case where individual stores / loads aren't
the correct / profitable choice.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32820 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a test case for abstract parameter and result types in function
Reid Spencer [Tue, 2 Jan 2007 20:47:51 +0000 (20:47 +0000)]
Add a test case for abstract parameter and result types in function
definitions. The assembler should produce an error on this input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32819 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPR1068 - Unbounded array debug info.
Jim Laskey [Tue, 2 Jan 2007 11:53:52 +0000 (11:53 +0000)]
PR1068 - Unbounded array debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32818 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Tue, 2 Jan 2007 06:34:08 +0000 (06:34 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32817 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPermit signed and unsigned integer constants to be used with either signed
Reid Spencer [Tue, 2 Jan 2007 06:33:02 +0000 (06:33 +0000)]
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

17 years agoFor PR1070:
Reid Spencer [Tue, 2 Jan 2007 05:55:05 +0000 (05:55 +0000)]
For PR1070:
Tweak the RUN: lines of these tests to accommodate the renaming of
variables done by llvm-upgrade. The renaming occurs as a result of avoiding
name collisons for collapsed type planes. Conflicting names have a .u
(unsigned) or .s (signed) suffix added. This patch updates the grep
expression to accommodate the new names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32815 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1070:
Reid Spencer [Tue, 2 Jan 2007 05:53:06 +0000 (05:53 +0000)]
For PR1070:
Revert previous patch now that llvm-upgrade can handle collapsed type
plane conversion properly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32814 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoManually upgrade this test case to make sure that the new cast-to-bool
Reid Spencer [Tue, 2 Jan 2007 05:50:11 +0000 (05:50 +0000)]
Manually upgrade this test case to make sure that the new cast-to-bool
semantics are retained.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32813 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1070:
Reid Spencer [Tue, 2 Jan 2007 05:48:32 +0000 (05:48 +0000)]
For PR1070:
Add a test case to ensure that llvm-upgrade retains correct semantics
for the previous definition of "cast to bool" which compared against null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32812 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Tue, 2 Jan 2007 05:45:11 +0000 (05:45 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32811 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1070:
Reid Spencer [Tue, 2 Jan 2007 05:44:33 +0000 (05:44 +0000)]
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

17 years agoReverse last patch, committed by accident.
Reid Spencer [Tue, 2 Jan 2007 04:30:40 +0000 (04:30 +0000)]
Reverse last patch, committed by accident.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32809 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix this test case to be legal. There is no ubyte %tmp ever defined!
Reid Spencer [Tue, 2 Jan 2007 04:19:32 +0000 (04:19 +0000)]
Fix this test case to be legal. There is no ubyte %tmp ever defined!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32808 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd some convenience functions for getting the source and destination
Reid Spencer [Tue, 2 Jan 2007 02:08:27 +0000 (02:08 +0000)]
Add some convenience functions for getting the source and destination
types from any Cast instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32807 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoBack out last revision now that llvm-upgrade can remove useless bitcasts.
Reid Spencer [Mon, 1 Jan 2007 01:22:53 +0000 (01:22 +0000)]
Back out last revision now that llvm-upgrade can remove useless bitcasts.
This serves as a test of that feature.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32806 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Mon, 1 Jan 2007 01:20:41 +0000 (01:20 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32805 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1070:
Reid Spencer [Mon, 1 Jan 2007 01:20:16 +0000 (01:20 +0000)]
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

17 years agoFix a typo.
Reid Spencer [Sun, 31 Dec 2006 22:26:06 +0000 (22:26 +0000)]
Fix a typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32803 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoConvert the intrinsic function definitions to use llvm_i32_ty instead of
Reid Spencer [Sun, 31 Dec 2006 22:24:55 +0000 (22:24 +0000)]
Convert the intrinsic function definitions to use llvm_i32_ty instead of
llvm_uint_ty or llvm_int_ty. Similarly for i8, i16 and i64

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32802 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a cut-and-paste bug for processing of InvokeInst parameter attributes.
Reid Spencer [Sun, 31 Dec 2006 22:17:01 +0000 (22:17 +0000)]
Fix a cut-and-paste bug for processing of InvokeInst parameter attributes.
The lookup of parameter attributes was offset by two because of the
additional operands in an invoke instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32801 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Sun, 31 Dec 2006 21:47:02 +0000 (21:47 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32800 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove an extra semi-colon.
Reid Spencer [Sun, 31 Dec 2006 21:46:36 +0000 (21:46 +0000)]
Remove an extra semi-colon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32799 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug in comparison of GEP indices.
Reid Spencer [Sun, 31 Dec 2006 21:43:30 +0000 (21:43 +0000)]
Fix a bug in comparison of GEP indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32798 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRemove documentation of non-existent cextcc and csretextcc calling
Reid Spencer [Sun, 31 Dec 2006 21:30:18 +0000 (21:30 +0000)]
Remove documentation of non-existent cextcc and csretextcc calling
conventions as these have been replaced with parameter attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32797 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a missing colon. Noticed by Jeff Cohen.
Reid Spencer [Sun, 31 Dec 2006 21:25:25 +0000 (21:25 +0000)]
Add a missing colon. Noticed by Jeff Cohen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32796 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoimplement missing compares
Rafael Espindola [Sun, 31 Dec 2006 18:52:39 +0000 (18:52 +0000)]
implement missing compares
patch by Lauro
bug fixed by me

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32795 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix a bug in getParamAttrs where an invalid value would be returned if the
Reid Spencer [Sun, 31 Dec 2006 17:50:33 +0000 (17:50 +0000)]
Fix a bug in getParamAttrs where an invalid value would be returned if the
index passed in was out of range for the number of parameter attributes set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32794 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoOne more try on the table formatting.
Reid Spencer [Sun, 31 Dec 2006 07:20:23 +0000 (07:20 +0000)]
One more try on the table formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32793 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoClean up some typos and formatting.
Reid Spencer [Sun, 31 Dec 2006 07:18:34 +0000 (07:18 +0000)]
Clean up some typos and formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32792 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 07:07:53 +0000 (07:07 +0000)]
For PR950:
Update for signless integer types:
1. Replace [us]byte with i8
2. Replace [u]short with i16
3. Replace [u]int   with i32
4. Replace [u]long  with i64
5. Document the "define" keyword and use it in all examples.
6. Document parameter attributes and how they affect function types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32791 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 06:02:26 +0000 (06:02 +0000)]
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

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 06:02:00 +0000 (06:02 +0000)]
For PR950:
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:

1. Make sure llvm-upgrade is run on the source which does the bulk of the
   changes automatically.

2. Change things like "grep 'int'" to "grep 'i32'"

3. In several tests bitcasting caused the same name to be reused in the
   same type plane. These had to be manually fixed. The fix was (generally)
   to leave the bitcast and provide the instruction with a new name. This
   should not affect the semantics of the test. In a few cases, the
   bitcasts were known to be superfluous and irrelevant to the test case
   so they were removed.

4. One test case uses a bytecode file which needed to be updated to the
   latest bytecode format.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:55:36 +0000 (05:55 +0000)]
For PR950:
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
   type of an function parameter was used to determine whether it should
   be sign extended or zero extended before the call. This information is
   now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
   the parameter attribute information. Although it would have been
   convenient to pass in the FunctionType itself, there isn't always one
   present in the caller. Consequently, a signedness indication for the
   result type and for each parameter was provided for in the interface
   to this method. All implementations were changed to make the adjustment
   necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:51:36 +0000 (05:51 +0000)]
For PR950:
Convert signed integer types to signless ones.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32787 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:50:28 +0000 (05:50 +0000)]
For PR950:
Convert signed integer types to signless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32786 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:48:39 +0000 (05:48 +0000)]
For PR950:
This patch replaces signed integer types with signless ones:
1. [US]Byte -> Int8
2. [U]Short -> Int16
3. [U]Int   -> Int32
4. [U]Long  -> Int64.
5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion
   and other methods related to signedness. In a few places this warranted
   identifying the signedness information from other sources.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32785 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:45:57 +0000 (05:45 +0000)]
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

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:44:24 +0000 (05:44 +0000)]
For PR950:
Update for signless integer types and parameter attribute implementation.
Of significant note:
  1. This changes the bytecode format yet again.
  2. There are 1/2 as many integer type planes (this is a good thing)
  3. GEP indices now use only 1 bit to identify their type which means
     more GEP instructions won't be relegated to format 0 (size win)
  4. Parameter attributes are implemented but currently being stored
     verbosely for each function type. Some other day this needs to be
     optimized for size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32783 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:40:51 +0000 (05:40 +0000)]
For PR950:
Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32782 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:40:12 +0000 (05:40 +0000)]
For PR950:
Major reorganization. This patch introduces the signedness changes for
the new integer types (i8, i16, i32, i64) which replace the old signed
versions (ubyte, sbyte, ushort, short, etc). This patch also implements
the function type parameter attributes feature. Together these conspired
to introduce new reduce/reduce errors into the grammar. Consequently, it
was necessary to introduce a new keyword into the grammar in order to
disambiguate. Without this, yacc would make incorrect shift/reduce and
reduce/reduce decisions and fail to parse the intended assembly.

Changes in assembly:

1. The "implementation" keyword is superfluous but still supported. You
   can use it as a sentry which will ensure there are no remaining up
   reference types. However, this is optional as those checks are also
   performed elsewhere.

2. Parameter attributes are now implemented using an at sign to
   indicate the attribute. The attributes are placed after the type
   in a function declaration or after the argument value in a function
   call. For example:
      i8 @sext %myfunc(i16 @zext)
      call i8 @sext %myfunc(i16 @zext %someVal)
   The facility is available for supporting additional attributes and
   they can be combined using the @(attr1,attr2,attr3) syntax. Right
   now  the only two supported are @sext and @zext

3. Functions must now be defined with the "define" keyword which is
   analagous to the "declare" keyword for function declarations. The
   introduction of this keyword disambiguates situations where a
   named result type is confused with a new type or gvar definition.
   For example:
      %MyType = type i16
      %MyType %func(%MyType) { ... }
   With the introduction of optional parameter attributes between
   the function name and the function result type, yacc will pick
   the wrong rule to reduce unless it is disambiguated with "define"
   before the function definition, as in:
      define %MyType @zext %func(%MyType %someArg) { ... }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32781 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:26:44 +0000 (05:26 +0000)]
For PR950:
Change signed integer type names to unsigned equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32780 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:25:34 +0000 (05:25 +0000)]
For PR950:
Implement signless integer types and FunctionType parameter attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32779 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:24:50 +0000 (05:24 +0000)]
For PR950:
* Change integer type name from signed to signless
* Implement printing of FunctionType parameter attributes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32778 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:23:18 +0000 (05:23 +0000)]
For PR950:
Change integer type names for signless integer types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32777 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:22:12 +0000 (05:22 +0000)]
For PR950:
Add a new feature to FunctionType, Parameter Attributes. This allows tags
such as "sext" and "zext" to be associated with a faunction's arguments
or return type. This allows signedness information to be carried forward
from the frontend to the backend for arguments and result types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32776 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sun, 31 Dec 2006 05:20:51 +0000 (05:20 +0000)]
For PR950:
Make integer types signless:
  Rename [US]Byte->Int8, [U]Short->Int16, [U]Int->Int32, [U]Long->Int64
  Remove methods pertaining to sign of integer types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32775 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTypo.
Nick Lewycky [Sun, 31 Dec 2006 03:44:08 +0000 (03:44 +0000)]
Typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32774 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoWhen compiling a C or C++ file to assembly, make the assembly output
Reid Spencer [Sat, 30 Dec 2006 16:31:02 +0000 (16:31 +0000)]
When compiling a C or C++ file to assembly, make the assembly output
depend on the compiler. This works around problems in the Stacker runtime
when the CFE changes in such a way that the assembly file needs to be
updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32773 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRegenerate.
Reid Spencer [Fri, 29 Dec 2006 20:35:03 +0000 (20:35 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32772 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Fri, 29 Dec 2006 20:33:37 +0000 (20:33 +0000)]
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

17 years agoFor PR950:
Reid Spencer [Fri, 29 Dec 2006 20:29:48 +0000 (20:29 +0000)]
For PR950:
Remove all grammar conflicts from assembly parsing.  This change involves:
1. Making the "type" keyword not a primitive type (removes several
   reduce/reduce conflicts)
2. Being more specific about which linkage types are allowed for functions
   and global variables. In particular "appending" can no longer be
   specified for a function. A differentiation was made between the various
   internal and external linkage types.
3. Introduced the "define" keyword which is now required when defining a
   function. This disambiguates several cases where a named function return
   type could get confused with the definition of a new type. Using the
   keyword eliminates all shift/reduce conflicts and the remaining
   reduce/reduce conflicts.

These changes are necessary to implement the function parameter attributes
that will be introduced soon. Adding the function parameter attributes in
the presence of the shift/reduce and reduce/reduce conflicts led to severe
ambiguities that caused the parser to report syntax errors that needed to
be resolved. This patch resolves them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32770 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRun llvm-upgrade on test to prepare for new assembly syntax.
Reid Spencer [Fri, 29 Dec 2006 20:21:51 +0000 (20:21 +0000)]
Run llvm-upgrade on test to prepare for new assembly syntax.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32769 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoUpdate tests that need to be run through llvm-upgrade. This is necessary
Reid Spencer [Fri, 29 Dec 2006 20:01:32 +0000 (20:01 +0000)]
Update tests that need to be run through llvm-upgrade. This is necessary
for upcoming changes to the llvm assembly grammar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32768 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agofix comment
Rafael Espindola [Fri, 29 Dec 2006 14:28:12 +0000 (14:28 +0000)]
fix comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32767 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoMake a variable private now that the conditions requiring it to be
Reid Spencer [Fri, 29 Dec 2006 04:12:03 +0000 (04:12 +0000)]
Make a variable private now that the conditions requiring it to be
protected have been removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32766 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDoxygenify a comment.
Reid Spencer [Fri, 29 Dec 2006 04:10:59 +0000 (04:10 +0000)]
Doxygenify a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32765 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoPreview of new calling conventions: cextcc and csretextcc to handle explicit
Reid Spencer [Thu, 28 Dec 2006 16:55:55 +0000 (16:55 +0000)]
Preview of new calling conventions: cextcc and csretextcc to handle explicit
sign and zero extension in function calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32764 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDefine StaticCtorsSection and StaticDtorsSection for ARM.
Lauro Ramos Venancio [Thu, 28 Dec 2006 13:13:00 +0000 (13:13 +0000)]
Define StaticCtorsSection and StaticDtorsSection for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32763 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoImplement SELECT_CC (f32/f64) for ARM.
Lauro Ramos Venancio [Thu, 28 Dec 2006 13:11:14 +0000 (13:11 +0000)]
Implement SELECT_CC (f32/f64) for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32762 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoremove duplicated line
Rafael Espindola [Thu, 28 Dec 2006 12:51:40 +0000 (12:51 +0000)]
remove duplicated line
bug noticed by Lauro

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32761 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoThis patch defines extloadi1 and fixes an internal compiler error on
Lauro Ramos Venancio [Tue, 26 Dec 2006 19:30:42 +0000 (19:30 +0000)]
This patch defines extloadi1 and fixes an internal compiler error on
arm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32760 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoCleanup ConstantFoldCompareInstruction:
Reid Spencer [Sun, 24 Dec 2006 18:52:08 +0000 (18:52 +0000)]
Cleanup ConstantFoldCompareInstruction:
1. Make the arguments const like the other ConstantFold* functions.
2. Clean up evaluateFCmpRelation so it makes sense for floating point.
3. Implement the use of evaluateFCmpRelation to fold floating point CEs
4. Shorten a variable name so more things fit on one line.
5. Fix various comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32759 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix some comments.
Reid Spencer [Sun, 24 Dec 2006 18:42:29 +0000 (18:42 +0000)]
Fix some comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32758 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1066:
Reid Spencer [Sun, 24 Dec 2006 00:40:59 +0000 (00:40 +0000)]
For PR1066:
Fix this by ensuring that a bitcast is inserted to do sign switching. This
is only temporarily needed as the merging of signed and unsigned is next
on the SignlessTypes plate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32757 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoShut up some compilers that can't accurately analyze variable usage
Reid Spencer [Sat, 23 Dec 2006 19:17:57 +0000 (19:17 +0000)]
Shut up some compilers that can't accurately analyze variable usage
correctly and emit "may be used uninitialized" warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32756 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoTest case for PR1065.
Reid Spencer [Sat, 23 Dec 2006 19:14:10 +0000 (19:14 +0000)]
Test case for PR1065.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32755 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd some documentation to make Nick happy.
Reid Spencer [Sat, 23 Dec 2006 19:06:54 +0000 (19:06 +0000)]
Add some documentation to make Nick happy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32754 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR1065:
Reid Spencer [Sat, 23 Dec 2006 18:58:04 +0000 (18:58 +0000)]
For PR1065:
Don't allow CmpInst instances to be processed in FoldSelectOpOp because
you can't easily swap their operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32753 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDon't overload var names.
Reid Spencer [Sat, 23 Dec 2006 10:21:26 +0000 (10:21 +0000)]
Don't overload var names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32752 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFor PR950:
Reid Spencer [Sat, 23 Dec 2006 06:05:41 +0000 (06:05 +0000)]
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

17 years agoadd a simple fast-path for dead allocas
Chris Lattner [Fri, 22 Dec 2006 23:14:42 +0000 (23:14 +0000)]
add a simple fast-path for dead allocas

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32750 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoEnable new pass manager. 2nd attempt.
Devang Patel [Fri, 22 Dec 2006 22:55:30 +0000 (22:55 +0000)]
Enable new pass manager. 2nd attempt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32749 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoModulePass and ImmutablePass. Force out of line virtual method.
Devang Patel [Fri, 22 Dec 2006 22:49:00 +0000 (22:49 +0000)]
ModulePass and ImmutablePass. Force out of line virtual method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32748 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a generic component to this test
Chris Lattner [Fri, 22 Dec 2006 22:48:44 +0000 (22:48 +0000)]
add a generic component to this test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32747 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agolet this pass for ppc/linux
Chris Lattner [Fri, 22 Dec 2006 22:38:38 +0000 (22:38 +0000)]
let this pass for ppc/linux

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32746 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoRefactored JIT codegen for mingw32. Now we're using standart relocation
Anton Korobeynikov [Fri, 22 Dec 2006 22:29:05 +0000 (22:29 +0000)]
Refactored JIT codegen for mingw32. Now we're using standart relocation
type for distinguish JIT & non-JIT instead of "dirty" hacks :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32745 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoNeed to walk the derived chain of typedefs to get actual size.
Jim Laskey [Fri, 22 Dec 2006 20:03:42 +0000 (20:03 +0000)]
Need to walk the derived chain of typedefs to get actual size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32744 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoDebug dump error.
Evan Cheng [Fri, 22 Dec 2006 02:04:05 +0000 (02:04 +0000)]
Debug dump error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32743 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoIgnore the LibDeps.txt.tmp file.
Reid Spencer [Fri, 22 Dec 2006 02:02:45 +0000 (02:02 +0000)]
Ignore the LibDeps.txt.tmp file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32742 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoadd a note
Chris Lattner [Fri, 22 Dec 2006 01:03:22 +0000 (01:03 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32741 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoFix for ARM weak symbols, patch by Lauro Ramos Venancio!
Chris Lattner [Thu, 21 Dec 2006 22:59:58 +0000 (22:59 +0000)]
Fix for ARM weak symbols, patch by Lauro Ramos Venancio!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32740 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a new variable, LLVMGCCLIBEXEC to get the libexec directory where the
Reid Spencer [Thu, 21 Dec 2006 22:55:41 +0000 (22:55 +0000)]
Add a new variable, LLVMGCCLIBEXEC to get the libexec directory where the
cc1 and cc1plus executables live.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32738 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoGrandchildren are covered by protect.
Jim Laskey [Thu, 21 Dec 2006 21:24:35 +0000 (21:24 +0000)]
Grandchildren are covered by protect.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32736 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoChanges from Nick Lewycky with a simplified PPCTargetAsmInfo.
Jim Laskey [Thu, 21 Dec 2006 20:26:09 +0000 (20:26 +0000)]
Changes from Nick Lewycky with a simplified PPCTargetAsmInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32735 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoInteger constants now print out as signed values in the assembly,
Reid Spencer [Thu, 21 Dec 2006 19:14:49 +0000 (19:14 +0000)]
Integer constants now print out as signed values in the assembly,
regardless of the signedness of the associated type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32734 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoJust print integer constants as signed values. The actual signedness
Reid Spencer [Thu, 21 Dec 2006 19:04:23 +0000 (19:04 +0000)]
Just print integer constants as signed values. The actual signedness
doesn't matter as it is determined in the way the constant is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32733 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a FIXME about signedness.
Reid Spencer [Thu, 21 Dec 2006 18:59:16 +0000 (18:59 +0000)]
Add a FIXME about signedness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32732 91177308-0d34-0410-b5e6-96231b3b80d8