Commit Graph

16713 Commits

Author SHA1 Message Date
Andrew Lenharth
1acc5a4e87 Make packed structs use packed initialiers for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33015 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 18:16:47 +00:00
Reid Spencer
abaa8ca433 Comparison of primitive type sizes should now be done in bits, not bytes.
This patch converts getPrimitiveSize to getPrimitiveSizeInBits where it is
appropriate to do so (comparison of integer primitive types).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 16:32:00 +00:00
Reid Spencer
ac8cdf79e7 For PR1097:
Enable complex addressing modes on 64-bit platforms involving two induction
variables by keeping a size and scale in 64-bits not 32.
Patch by Dan Gohman.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33011 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 16:17:51 +00:00
Reid Spencer
fbe7ae9e3c For PR1090:
Clean up the definitions of the helper functions per Chris' review
suggestions so they are easier to read.

For PR1091:
Print minimum signed integer values as unsigned so that we get no warnings
from the C compiler about constant ranges and value comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33010 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 08:00:00 +00:00
Reid Spencer
b801a27121 Fix PR1090:
Implemented some llvm_fcmp_{pred} functions at the start of the function bodies
and use them for fcmp instructions and constant expressions. These help
implement the ordered and unordered comparisons necessary for correct exectuion
of these comparisons.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33007 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 06:58:32 +00:00
Reid Spencer
ca7ad8942a Fix a bug in an assert that would never trigger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33005 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 05:34:39 +00:00
Reid Spencer
e7ca042730 Convert uses of getPrimitiveSize that should be getPrimitiveSizeInBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33003 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 01:26:33 +00:00
Reid Spencer
3c628627ea Types should be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 21:45:41 +00:00
Chris Lattner
ba8b327f67 this pass is unused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32998 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 18:12:43 +00:00
Chris Lattner
f01da5939d llvm 2.0 doesn't support llvm.isunordered.*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:52:43 +00:00
Chris Lattner
a4810b52d0 remove support for llvm.isunordered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:37:22 +00:00
Chris Lattner
257cbf7a8d remove llvm.isunordered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32991 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:19:47 +00:00
Chris Lattner
b76efb71d4 Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.
This simplifies many clients also


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32989 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:12:01 +00:00
Chris Lattner
70d130516a Change the interface to Module::getOrInsertFunction to be easier to use,
to resolve PR1088, and to help PR411.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32988 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:09:25 +00:00
Chris Lattner
a121fddf3c prepare for adjustment to getOrInsertFunction method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32985 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 07:54:34 +00:00
Chris Lattner
52a457c7e2 relax type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32983 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 07:24:32 +00:00
Chris Lattner
febe5f1b3c relax some types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32982 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 07:22:20 +00:00
Chris Lattner
35057c2625 relax types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32981 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 06:59:47 +00:00
Chris Lattner
92141968cb relax some types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32980 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 06:58:05 +00:00
Chris Lattner
f3ccb692f2 remove support for old-style varargs upgrading
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32979 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 06:45:57 +00:00
Reid Spencer
0ae9693744 For PR1086:
Parameter attributes do have to be specially handled in the CBE. Implement
their handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32976 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 03:24:48 +00:00
Chris Lattner
8b0e3602e2 Fix PR1015 and Transforms/IndVarsSimplify/2007-01-06-TripCount.ll, a
miscompilation of Qt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32974 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 02:24:26 +00:00
Chris Lattner
f82188c9ce cast of int to bool no longer does a compare, rendering this fixme
obsolete


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32972 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 02:05:20 +00:00
Chris Lattner
ee4f13a904 add -debug output for -indvars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32971 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 01:14:12 +00:00
Anton Korobeynikov
d5f317d158 As PR1085 was fixed, back out workaround
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32969 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 00:41:20 +00:00
Chris Lattner
41a4429f65 wow, the link was already broken :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32963 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:20:51 +00:00
Chris Lattner
38742b9603 add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:19:38 +00:00
Chris Lattner
15c91887e4 Disable the macho writer until it is 100% functional. Enabling it when
broken invites bug reports.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32961 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 22:27:58 +00:00
Chris Lattner
46013f4044 Fix regressions in InstCombine/call-cast-target.ll and InstCombine/2003-11-13-ConstExprCastCall.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32959 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 19:53:32 +00:00
Anton Korobeynikov
cea9d1d634 gcc often inserts it's own names for sections (e.g.
gnu.linkonce.t.FunctionName). Convert them to "normal" LLVM names,
otherwise linker won't be able to merge them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32958 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 18:24:26 +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
Chris Lattner
80c6c3bbff this final call to canLosslesslyBitCastTo is dead, because ValueRequiresCast
is only called on integers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32949 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 02:11:56 +00:00
Chris Lattner
ec47992f5c simplify some more code now that there are not multiple different integer
types of the same size


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32948 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 02:09:32 +00:00
Chris Lattner
57d8637468 eliminate some uses of canLosslesslyBitCastTo, this actually makes the code stronger, by nuking
relational pointer comparisons with casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32947 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 01:45:59 +00:00
Chris Lattner
d5dc0fb011 no need to worry about int vs uint any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32946 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 01:37:35 +00:00
Chris Lattner
ab4be63287 new note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32945 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 01:30:45 +00:00
Evan Cheng
d08d23315d setSetCCIsExpensive is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32941 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 23:42:53 +00:00
Evan Cheng
636c753b6b Expand fcopysign to the bitwise sequence if select is marked as expensive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 23:33:44 +00:00
Devang Patel
cde53d3c1e 1) Remove old AnalysisResolver.
2) Rename AnalysisResolver_New as AnalysisResolver


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32938 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 22:47:07 +00:00
Reid Spencer
63c3445cfe Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32934 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:51:07 +00:00
Reid Spencer
90e2f63151 For PR1077:
Disallow merging of dupliate global variables. It is now illegal to declare
or define two global variables of the same name and same type. llvm-gcc3 is
dead in 2.0 and llvm-gcc4 doesn't have that problem nor need the hack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32933 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:50:38 +00:00
Evan Cheng
73d6cf12ad - FCOPYSIGN custom lowering bug. Clear the sign bit of operand 0 first before
or'ing in the sign bit of operand 1.
- Tweaking: rather than left shift the sign bit, fp_extend operand 1 first
  before taking its sign bit if its type is smaller than that of operand 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32932 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:37:56 +00:00
Evan Cheng
068c5f47ea Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0
before or'ing in the sign bit of operand 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32930 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:31:51 +00:00
Evan Cheng
489a87ca09 CopyToReg source operand can be a register as well. e.g. Copy from GlobalBaseReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 20:59:06 +00:00
Devang Patel
ddbc606e94 Remove PassManagerT.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32928 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 20:21:13 +00:00
Devang Patel
cccd80dfa3 Remove old pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32927 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 20:16:23 +00:00
Reid Spencer
218ded2fc9 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32905 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:07:23 +00:00
Reid Spencer
2c261789d3 Change the syntax for parameter attributes:
1. The @ sign is no longer necessary.
2. We now support "function attributes" as parameter attribute 0.
3. Instead of locating the return type attributes after the type of a
   function result, they are now located after the function header's
   closing paranthesis and before any alignment or section options.
4. The way has been prepared for a new "noreturn" function attribute but
   there is no support for recognizing it in the lexer nor doing anything
   with it if it does get set.
5. The FunctionType::getParamAttrsText method now has support for
   returning multiple attributes. This required a change in its interface.

I'm unhappy that this change leads to 6 new shift/reduce conflicts, but
in each case bison's decision to choose the shift is correct so there
shouldn't be any damage from these conflicts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32904 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:06:19 +00:00
Evan Cheng
1722eeeaa4 Typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32902 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 08:32:24 +00:00
Evan Cheng
68c47cba35 With SSE2, expand FCOPYSIGN to a series of SSE bitwise operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 07:55:56 +00:00
Chris Lattner
e4929dd0cc Implement InstCombine/vec_shuffle.ll:%test7, simplifying shuffles with
undef operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 07:36:08 +00:00
Chris Lattner
4f0e33d145 fold things like a^b != c^a -> b != c. This implements InstCombine/xor.ll:test27
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 03:04:57 +00:00
Chris Lattner
e617c9ed5d Compile X + ~X to -1. This implements Instcombine/add.ll:test34
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32890 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 02:17:46 +00:00
Evan Cheng
0d630d2204 GEP subscript is interpreted as a signed value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 01:46:20 +00:00
Chris Lattner
f8e7a21912 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
2007-01-04 22:22:37 +00:00
Evan Cheng
912095beca 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
2007-01-04 21:56:39 +00:00
Lauro Ramos Venancio
ca1f66db0d 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
2007-01-04 14:01:38 +00:00
Reid Spencer
8c5a53a603 Death to useless bitcast instructions!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 05:23:51 +00:00
Reid Spencer
affaf07bf8 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
2007-01-04 05:22:18 +00:00
Reid Spencer
ac4a1dd7fa Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32862 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 02:57:52 +00:00
Reid Spencer
539b471a33 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
2007-01-04 02:57:22 +00:00
Chris Lattner
70d8d121ea 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
2007-01-04 02:15:37 +00:00
Chris Lattner
898b2d52f9 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 02:13:20 +00:00
Chris Lattner
7ce2f8b265 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
2007-01-04 02:12:40 +00:00
Chris Lattner
e94d8b2f53 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
2007-01-04 01:56:39 +00:00
Chris Lattner
58513aa1c2 Add a new ConstantPacked::getAllOnesValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32856 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 01:49:26 +00:00
Reid Spencer
e68853be66 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32853 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 00:06:14 +00:00
Reid Spencer
b4fdfdb882 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
2007-01-04 00:05:48 +00:00
Bill Wendling
fcf17a3096 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
2007-01-03 22:37:27 +00:00
Chris Lattner
c9d3471d07 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
2007-01-03 19:12:31 +00:00
Chris Lattner
a3bfdd47ab 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
2007-01-03 18:16:48 +00:00
Reid Spencer
aff9387168 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
2007-01-03 17:24:59 +00:00
Reid Spencer
f54ad97a4e Remove two useless bit casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32839 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 17:24:11 +00:00
Reid Spencer
bcca3405bd 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
2007-01-03 16:49:33 +00:00
Jim Laskey
26a3687d53 NULL names should pass validation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32835 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 13:46:20 +00:00
Jim Laskey
1e3a5772d8 Silence warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 13:36:40 +00:00
Anton Korobeynikov
317848f4a1 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
2007-01-03 11:43:14 +00:00
Reid Spencer
376dd212f9 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
2007-01-03 05:03:05 +00:00
Reid Spencer
8c57dfb1ae 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
2007-01-03 04:25:33 +00:00
Reid Spencer
b47b25cfda 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
2007-01-03 04:22:32 +00:00
Jim Laskey
52ab904ee5 Vectors are not supported by ConstantInt::getAllOnesValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32827 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 00:11:03 +00:00
Reid Spencer
8c8a2dc467 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32825 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:54:12 +00:00
Reid Spencer
98b3c5c2c0 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
2007-01-02 21:53:43 +00:00
Evan Cheng
c2b861da18 Fix naming inconsistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32823 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:33:40 +00:00
Evan Cheng
ad93d7fda5 - 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
2007-01-02 21:31:15 +00:00
Reid Spencer
ee5d25e5cc Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32803 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 22:26:06 +00:00
Reid Spencer
6359618e43 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
2006-12-31 22:17:01 +00:00
Reid Spencer
c6c59fd89f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:47:02 +00:00
Reid Spencer
e03969f816 Remove an extra semi-colon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 21:46:36 +00:00
Reid Spencer
cc615c38b1 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
2006-12-31 21:43:30 +00:00
Reid Spencer
71305d760e 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
2006-12-31 21:25:25 +00:00
Rafael Espindola
9985f9f61e 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
2006-12-31 18:52:39 +00:00
Reid Spencer
1fd79b8c42 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
2006-12-31 17:50:33 +00:00
Reid Spencer
47857812e2 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
2006-12-31 05:55:36 +00:00
Reid Spencer
e49661bdf5 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
2006-12-31 05:51:36 +00:00
Reid Spencer
c5b206b6be 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
2006-12-31 05:48:39 +00:00
Reid Spencer
88cfda2122 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
2006-12-31 05:44:24 +00:00
Reid Spencer
1431061ebb For PR950:
Regenerate


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:40:51 +00:00
Reid Spencer
e1553cc956 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
2006-12-31 05:40:12 +00:00
Reid Spencer
79e21d338c 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
2006-12-31 05:26:44 +00:00