oota-llvm.git
17 years agofix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
Chris Lattner [Thu, 4 Jan 2007 22:22:37 +0000 (22:22 +0000)]
fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
the recent signless changes.

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

17 years agonew testcase
Chris Lattner [Thu, 4 Jan 2007 22:22:07 +0000 (22:22 +0000)]
new testcase

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

17 years agoFix broken links, reported by Baptiste Lepilleur
Chris Lattner [Thu, 4 Jan 2007 22:01:45 +0000 (22:01 +0000)]
Fix broken links, reported by Baptiste Lepilleur

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

17 years agoExpand fcopysign to a series of bitwise of operations when it's profitable to
Evan Cheng [Thu, 4 Jan 2007 21:56:39 +0000 (21:56 +0000)]
Expand fcopysign to a series of bitwise of operations when it's profitable to
do so.

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

17 years agoregenerate
Chris Lattner [Thu, 4 Jan 2007 18:46:42 +0000 (18:46 +0000)]
regenerate

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

17 years agoIf we hit a parse error, emit something bad to the output stream. This ensures that
Chris Lattner [Thu, 4 Jan 2007 18:45:51 +0000 (18:45 +0000)]
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

17 years agoDocument this tool as experimental and list its deficiencies.
Reid Spencer [Thu, 4 Jan 2007 17:55:11 +0000 (17:55 +0000)]
Document this tool as experimental and list its deficiencies.

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

17 years agoremove the 'protected' workaround now that we don't care about gcc 2.95 anymore.
Chris Lattner [Thu, 4 Jan 2007 17:50:42 +0000 (17:50 +0000)]
remove the 'protected' workaround now that we don't care about gcc 2.95 anymore.
Reid already did this for FunctionType, this just cleans the rest up.

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

17 years agoremove xfailed test that depends on obsolete argument to lli
Chris Lattner [Thu, 4 Jan 2007 17:47:42 +0000 (17:47 +0000)]
remove xfailed test that depends on obsolete argument to lli

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

17 years agoRemove a manual renaming of a variable that was introduced before
Reid Spencer [Thu, 4 Jan 2007 16:46:46 +0000 (16:46 +0000)]
Remove a manual renaming of a variable that was introduced before
llvm-upgrade could properly handle collapsed type planes.

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

17 years agoClean up usage of "unsigned" and "signed" in the documentation to indicate
Reid Spencer [Thu, 4 Jan 2007 16:43:23 +0000 (16:43 +0000)]
Clean up usage of "unsigned" and "signed" in the documentation to indicate
only that specific instructions regard their operands as signed and
unsigned not that the operands *are* signed or unsigned.

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

17 years agoAdd test for constructor and destructor sections.
Lauro Ramos Venancio [Thu, 4 Jan 2007 14:41:33 +0000 (14:41 +0000)]
Add test for constructor and destructor sections.

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

17 years agoAdd extload(i1) test.
Lauro Ramos Venancio [Thu, 4 Jan 2007 14:27:21 +0000 (14:27 +0000)]
Add extload(i1) test.

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

17 years agoAdd test for FCOPYSIGN.
Lauro Ramos Venancio [Thu, 4 Jan 2007 14:24:32 +0000 (14:24 +0000)]
Add test for FCOPYSIGN.

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

17 years agoExpand SELECT (f32/f64) and FCOPYSIGN (f32/f64).
Lauro Ramos Venancio [Thu, 4 Jan 2007 14:01:38 +0000 (14:01 +0000)]
Expand SELECT (f32/f64) and FCOPYSIGN (f32/f64).

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

17 years agoRemoved reference to "cnull" because typical users shouldn't need to use
Bill Wendling [Thu, 4 Jan 2007 08:38:04 +0000 (08:38 +0000)]
Removed reference to "cnull" because typical users shouldn't need to use
it.

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

17 years agoding dong llvm-gcc3 is dead
Chris Lattner [Thu, 4 Jan 2007 07:08:27 +0000 (07:08 +0000)]
ding dong llvm-gcc3 is dead

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

17 years agogcc 4.1.1 on amd64 is broken
Chris Lattner [Thu, 4 Jan 2007 07:06:05 +0000 (07:06 +0000)]
gcc 4.1.1 on amd64 is broken

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

17 years agoDeath to useless bitcast instructions!
Reid Spencer [Thu, 4 Jan 2007 05:23:51 +0000 (05:23 +0000)]
Death to useless bitcast instructions!

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

17 years agoDo not allow packed types for icmp and fcmp instructions.
Reid Spencer [Thu, 4 Jan 2007 05:22:18 +0000 (05:22 +0000)]
Do not allow packed types for icmp and fcmp instructions.

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

17 years agoicmp and fcmp do not take packed type operands.
Reid Spencer [Thu, 4 Jan 2007 05:19:58 +0000 (05:19 +0000)]
icmp and fcmp do not take packed type operands.

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

17 years agoXFAIL this test until such time that code gen can handle a comparison of
Reid Spencer [Thu, 4 Jan 2007 03:06:23 +0000 (03:06 +0000)]
XFAIL this test until such time that code gen can handle a comparison of
packed types.

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

17 years agoRegenerate.
Reid Spencer [Thu, 4 Jan 2007 02:57:52 +0000 (02:57 +0000)]
Regenerate.

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

17 years agoDisallow packed types in icmp/fcmp instructions. The code generator is
Reid Spencer [Thu, 4 Jan 2007 02:57:22 +0000 (02:57 +0000)]
Disallow packed types in icmp/fcmp instructions. The code generator is
not prepared to handle them yet.

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

17 years agoNow that setcondinst has been eliminated, we can mark Value::SubclassID
Chris Lattner [Thu, 4 Jan 2007 02:15:37 +0000 (02:15 +0000)]
Now that setcondinst has been eliminated, we can mark Value::SubclassID
const and remove the ugly mutator methods.

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

17 years agofix typo
Chris Lattner [Thu, 4 Jan 2007 02:13:20 +0000 (02:13 +0000)]
fix typo

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

17 years agoEnable a couple xforms for packed vectors (undef | v) -> -1 for packed.
Chris Lattner [Thu, 4 Jan 2007 02:12:40 +0000 (02:12 +0000)]
Enable a couple xforms for packed vectors (undef | v) -> -1 for packed.

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

17 years agofix some bugs handling vectors, avoid host-specific handling of undefined shift results.
Chris Lattner [Thu, 4 Jan 2007 01:56:39 +0000 (01:56 +0000)]
fix some bugs handling vectors, avoid host-specific handling of undefined shift results.

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

17 years agoAdd a new ConstantPacked::getAllOnesValue method
Chris Lattner [Thu, 4 Jan 2007 01:49:26 +0000 (01:49 +0000)]
Add a new ConstantPacked::getAllOnesValue method

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

17 years agoEnable new pass manager, which was accidentally disabled.
Devang Patel [Thu, 4 Jan 2007 01:27:03 +0000 (01:27 +0000)]
Enable new pass manager, which was accidentally disabled.

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

17 years agoAdd a test to ensure that we can assembly comparisons of packed values.
Reid Spencer [Thu, 4 Jan 2007 00:29:09 +0000 (00:29 +0000)]
Add a test to ensure that we can assembly comparisons of packed values.

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

17 years agoRegenerate.
Reid Spencer [Thu, 4 Jan 2007 00:06:14 +0000 (00:06 +0000)]
Regenerate.

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

17 years agoPermit icmp and fcmp to have packed operands.
Reid Spencer [Thu, 4 Jan 2007 00:05:48 +0000 (00:05 +0000)]
Permit icmp and fcmp to have packed operands.
Make an error message a little more useful.

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

17 years agoTest @zext and @sext fully as well as testing the "short" call syntax.
Reid Spencer [Thu, 4 Jan 2007 00:03:37 +0000 (00:03 +0000)]
Test @zext and @sext fully as well as testing the "short" call syntax.

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

17 years agoAdd a test case to test parameter attributes feature.
Reid Spencer [Wed, 3 Jan 2007 23:54:02 +0000 (23:54 +0000)]
Add a test case to test parameter attributes feature.

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

17 years agoUpdate test cases that grepped for register names that have now changed
Reid Spencer [Wed, 3 Jan 2007 23:47:29 +0000 (23:47 +0000)]
Update test cases that grepped for register names that have now changed
as a result of llvm-upgrade handling collapsed type planes better.

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

17 years agoRegenerate.
Reid Spencer [Wed, 3 Jan 2007 23:45:42 +0000 (23:45 +0000)]
Regenerate.

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

17 years agoImplement many new type features including upreferences, proper retention
Reid Spencer [Wed, 3 Jan 2007 23:45:17 +0000 (23:45 +0000)]
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

17 years agoFinish implementation of variable renaming to handle collapsed type planes
Reid Spencer [Wed, 3 Jan 2007 23:43:55 +0000 (23:43 +0000)]
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

17 years agoThe previous implementation of LLVM Streams wasn't removing symbols. This
Bill Wendling [Wed, 3 Jan 2007 22:37:27 +0000 (22:37 +0000)]
The previous implementation of LLVM Streams wasn't removing symbols. This
one should.

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

17 years agoFix a configure warning noticed by Duncan Sands.
Reid Spencer [Wed, 3 Jan 2007 20:59:52 +0000 (20:59 +0000)]
Fix a configure warning noticed by Duncan Sands.

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

17 years agoRemove the find_rule label from the output of flex. This will break any
Reid Spencer [Wed, 3 Jan 2007 19:56:14 +0000 (19:56 +0000)]
Remove the find_rule label from the output of flex. This will break any
use of the REJECT macro but we don't use it. This just hushes up a warning
in the presence of -Wno-unused.

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

17 years agofix testcase. It's not safe to strictly evaluate a load that should be lazy.
Chris Lattner [Wed, 3 Jan 2007 19:12:31 +0000 (19:12 +0000)]
fix testcase.  It's not safe to strictly evaluate a load that should be lazy.

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

17 years agoPrivate labels start with .L on linux, not just .
Chris Lattner [Wed, 3 Jan 2007 18:16:48 +0000 (18:16 +0000)]
Private labels start with .L on linux, not just .

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

17 years agoFix a comment that referred to the now defunct ubyte type.
Reid Spencer [Wed, 3 Jan 2007 17:24:59 +0000 (17:24 +0000)]
Fix a comment that referred to the now defunct ubyte type.

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

17 years agoRemove two useless bit casts.
Reid Spencer [Wed, 3 Jan 2007 17:24:11 +0000 (17:24 +0000)]
Remove two useless bit casts.

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

17 years agoIt is no longer permissible to have undefined types in function parameters.
Reid Spencer [Wed, 3 Jan 2007 17:03:48 +0000 (17:03 +0000)]
It is no longer permissible to have undefined types in function parameters.
Just fix it by defining the type as opaque.

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

17 years agoFix this test case. It is no longer permissible to have undefined types
Reid Spencer [Wed, 3 Jan 2007 17:01:18 +0000 (17:01 +0000)]
Fix this test case. It is no longer permissible to have undefined types
in function parameters. Fix by just defining the type as opaque.

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

17 years agoLegalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure
Reid Spencer [Wed, 3 Jan 2007 16:49:33 +0000 (16:49 +0000)]
Legalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure
that we default to an ANY_EXTEND if no parameter attribute is set on the
result value of a function.

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

17 years agoNULL names should pass validation.
Jim Laskey [Wed, 3 Jan 2007 13:46:20 +0000 (13:46 +0000)]
NULL names should pass validation.

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

17 years agoSilence warning.
Jim Laskey [Wed, 3 Jan 2007 13:36:40 +0000 (13:36 +0000)]
Silence warning.

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

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