Commit Graph

28596 Commits

Author SHA1 Message Date
Reid Spencer 0d54e78a39 For PR950:
Convert signed integer types to signless ones.

llvm-svn: 32787
2006-12-31 05:51:36 +00:00
Reid Spencer bc013ba367 For PR950:
Convert signed integer types to signless.

llvm-svn: 32786
2006-12-31 05:50:28 +00:00
Reid Spencer c635f47d9a 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.

llvm-svn: 32785
2006-12-31 05:48:39 +00:00
Reid Spencer be5fd4a771 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.

llvm-svn: 32784
2006-12-31 05:45:57 +00:00
Reid Spencer b46895bc1f 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.

llvm-svn: 32783
2006-12-31 05:44:24 +00:00
Reid Spencer 42f0cbe769 For PR950:
Regenerate

llvm-svn: 32782
2006-12-31 05:40:51 +00:00
Reid Spencer fa35bb3e20 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) { ... }

llvm-svn: 32781
2006-12-31 05:40:12 +00:00
Reid Spencer 8d9336d065 For PR950:
Change signed integer type names to unsigned equivalents.

llvm-svn: 32780
2006-12-31 05:26:44 +00:00
Reid Spencer b82ea5354c For PR950:
Implement signless integer types and FunctionType parameter attributes.

llvm-svn: 32779
2006-12-31 05:25:34 +00:00
Reid Spencer 8c4914c1e3 For PR950:
* Change integer type name from signed to signless
* Implement printing of FunctionType parameter attributes.

llvm-svn: 32778
2006-12-31 05:24:50 +00:00
Reid Spencer 61543eab05 For PR950:
Change integer type names for signless integer types

llvm-svn: 32777
2006-12-31 05:23:18 +00:00
Reid Spencer 67c4d9633d 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.

llvm-svn: 32776
2006-12-31 05:22:12 +00:00
Reid Spencer d30fd1d723 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.

llvm-svn: 32775
2006-12-31 05:20:51 +00:00
Nick Lewycky bfe93dfdd8 Typo.
llvm-svn: 32774
2006-12-31 03:44:08 +00:00
Reid Spencer 96edbd5c07 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.

llvm-svn: 32773
2006-12-30 16:31:02 +00:00
Reid Spencer dc0a3a2fd2 Regenerate.
llvm-svn: 32772
2006-12-29 20:35:03 +00:00
Reid Spencer 0a53afe5ba 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

llvm-svn: 32771
2006-12-29 20:33:37 +00:00
Reid Spencer 7ce2d2a8fe 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.

llvm-svn: 32770
2006-12-29 20:29:48 +00:00
Reid Spencer 399b10a48c Run llvm-upgrade on test to prepare for new assembly syntax.
llvm-svn: 32769
2006-12-29 20:21:51 +00:00
Reid Spencer 640509924e Update tests that need to be run through llvm-upgrade. This is necessary
for upcoming changes to the llvm assembly grammar.

llvm-svn: 32768
2006-12-29 20:01:32 +00:00
Rafael Espindola 64493fb30d fix comment
llvm-svn: 32767
2006-12-29 14:28:12 +00:00
Reid Spencer c48b0c714d Make a variable private now that the conditions requiring it to be
protected have been removed.

llvm-svn: 32766
2006-12-29 04:12:03 +00:00
Reid Spencer 4b880acf07 Doxygenify a comment.
llvm-svn: 32765
2006-12-29 04:10:59 +00:00
Reid Spencer c329a4e9cc Preview of new calling conventions: cextcc and csretextcc to handle explicit
sign and zero extension in function calls.

llvm-svn: 32764
2006-12-28 16:55:55 +00:00
Lauro Ramos Venancio 8ab8f7df6f Define StaticCtorsSection and StaticDtorsSection for ARM.
llvm-svn: 32763
2006-12-28 13:13:00 +00:00
Lauro Ramos Venancio 7251e57ff8 Implement SELECT_CC (f32/f64) for ARM.
llvm-svn: 32762
2006-12-28 13:11:14 +00:00
Rafael Espindola 865b979833 remove duplicated line
bug noticed by Lauro

llvm-svn: 32761
2006-12-28 12:51:40 +00:00
Lauro Ramos Venancio d0ced3f1e8 This patch defines extloadi1 and fixes an internal compiler error on
arm.

llvm-svn: 32760
2006-12-26 19:30:42 +00:00
Reid Spencer 9d36acf9ec 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.

llvm-svn: 32759
2006-12-24 18:52:08 +00:00
Reid Spencer b15374974d Fix some comments.
llvm-svn: 32758
2006-12-24 18:42:29 +00:00
Reid Spencer 193df25eb9 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.

llvm-svn: 32757
2006-12-24 00:40:59 +00:00
Reid Spencer 910f23f7d7 Shut up some compilers that can't accurately analyze variable usage
correctly and emit "may be used uninitialized" warnings.

llvm-svn: 32756
2006-12-23 19:17:57 +00:00
Reid Spencer 208099bbee Test case for PR1065.
llvm-svn: 32755
2006-12-23 19:14:10 +00:00
Reid Spencer 9aad39af4f Add some documentation to make Nick happy.
llvm-svn: 32754
2006-12-23 19:06:54 +00:00
Reid Spencer 43c77d53ff For PR1065:
Don't allow CmpInst instances to be processed in FoldSelectOpOp because
you can't easily swap their operands.

llvm-svn: 32753
2006-12-23 18:58:04 +00:00
Reid Spencer ccf78ac1d0 Don't overload var names.
llvm-svn: 32752
2006-12-23 10:21:26 +00:00
Reid Spencer 266e42b312 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.

llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Chris Lattner f171af97d5 add a simple fast-path for dead allocas
llvm-svn: 32750
2006-12-22 23:14:42 +00:00
Devang Patel cdd9807cba Enable new pass manager. 2nd attempt.
llvm-svn: 32749
2006-12-22 22:55:30 +00:00
Devang Patel f5a994e5cc ModulePass and ImmutablePass. Force out of line virtual method.
llvm-svn: 32748
2006-12-22 22:49:00 +00:00
Chris Lattner 70e09a2148 add a generic component to this test
llvm-svn: 32747
2006-12-22 22:48:44 +00:00
Chris Lattner b3fbcbea8f let this pass for ppc/linux
llvm-svn: 32746
2006-12-22 22:38:38 +00:00
Anton Korobeynikov 430e68a1b9 Refactored JIT codegen for mingw32. Now we're using standart relocation
type for distinguish JIT & non-JIT instead of "dirty" hacks :)

llvm-svn: 32745
2006-12-22 22:29:05 +00:00
Jim Laskey d7a090ffc4 Need to walk the derived chain of typedefs to get actual size.
llvm-svn: 32744
2006-12-22 20:03:42 +00:00
Evan Cheng 763550323d Debug dump error.
llvm-svn: 32743
2006-12-22 02:04:05 +00:00
Reid Spencer 87fbf70789 Ignore the LibDeps.txt.tmp file.
llvm-svn: 32742
2006-12-22 02:02:45 +00:00
Chris Lattner 959113a5c8 add a note
llvm-svn: 32741
2006-12-22 01:03:22 +00:00
Chris Lattner 5cfa5ef912 Fix for ARM weak symbols, patch by Lauro Ramos Venancio!
llvm-svn: 32740
2006-12-21 22:59:58 +00:00
Reid Spencer b68935a947 Add a new variable, LLVMGCCLIBEXEC to get the libexec directory where the
cc1 and cc1plus executables live.

llvm-svn: 32738
2006-12-21 22:55:41 +00:00
Jim Laskey c4c39aeb1d Grandchildren are covered by protect.
llvm-svn: 32736
2006-12-21 21:24:35 +00:00