Commit Graph

28653 Commits

Author SHA1 Message Date
Reid Spencer bf671f17cb Fix a configure warning noticed by Duncan Sands.
llvm-svn: 32844
2007-01-03 20:59:52 +00:00
Reid Spencer b8f3fe8ec5 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.

llvm-svn: 32843
2007-01-03 19:56:14 +00:00
Chris Lattner f9cf05370f fix testcase. It's not safe to strictly evaluate a load that should be lazy.
llvm-svn: 32842
2007-01-03 19:12:31 +00:00
Chris Lattner 4889a7af36 Private labels start with .L on linux, not just .
llvm-svn: 32841
2007-01-03 18:16:48 +00:00
Reid Spencer e87b5e9825 Fix a comment that referred to the now defunct ubyte type.
llvm-svn: 32840
2007-01-03 17:24:59 +00:00
Reid Spencer fb4070521a Remove two useless bit casts.
llvm-svn: 32839
2007-01-03 17:24:11 +00:00
Reid Spencer 95c466a52b It is no longer permissible to have undefined types in function parameters.
Just fix it by defining the type as opaque.

llvm-svn: 32838
2007-01-03 17:03:48 +00:00
Reid Spencer 98fd5eb48c Fix this test case. It is no longer permissible to have undefined types
in function parameters. Fix by just defining the type as opaque.

llvm-svn: 32837
2007-01-03 17:01:18 +00:00
Reid Spencer e6f81876eb 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.

llvm-svn: 32836
2007-01-03 16:49:33 +00:00
Jim Laskey 7601f2f36e NULL names should pass validation.
llvm-svn: 32835
2007-01-03 13:46:20 +00:00
Jim Laskey 751314fab9 Silence warning.
llvm-svn: 32834
2007-01-03 13:36:40 +00:00
Anton Korobeynikov 4efbbc963f 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

llvm-svn: 32833
2007-01-03 11:43:14 +00:00
Evan Cheng a50e3919b1 A bit more debugging printf's.
llvm-svn: 32832
2007-01-03 07:44:30 +00:00
Reid Spencer 2a34b91666 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.

llvm-svn: 32831
2007-01-03 05:03:05 +00:00
Reid Spencer 0917adf614 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.

llvm-svn: 32830
2007-01-03 04:25:33 +00:00
Reid Spencer 791864c6a5 Clean up from recent changes. Comment the new parameter to ExpandLibCall.
Consolidate some lines of code and remove duplication.

llvm-svn: 32829
2007-01-03 04:22:32 +00:00
Reid Spencer a6fda18b13 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.

llvm-svn: 32828
2007-01-03 04:20:23 +00:00
Jim Laskey c4ba9c161b Vectors are not supported by ConstantInt::getAllOnesValue.
llvm-svn: 32827
2007-01-03 00:11:03 +00:00
Reid Spencer ab2fccd9eb 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.

llvm-svn: 32826
2007-01-02 21:56:26 +00:00
Reid Spencer 87622ae03d Regenerate.
llvm-svn: 32825
2007-01-02 21:54:12 +00:00
Reid Spencer 6130ae0000 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

llvm-svn: 32824
2007-01-02 21:53:43 +00:00
Evan Cheng 74b46e8c05 Fix naming inconsistency.
llvm-svn: 32823
2007-01-02 21:33:40 +00:00
Evan Cheng 92484c2aa4 - Fixing naming inconsistency: calleesave -> calleesaved.
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().

llvm-svn: 32822
2007-01-02 21:31:15 +00:00
Evan Cheng 07140c22c7 Fix naming inconsistency: calleesave -> calleesaved.
llvm-svn: 32821
2007-01-02 21:30:17 +00:00
Evan Cheng f43d679951 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.

llvm-svn: 32820
2007-01-02 20:55:17 +00:00
Reid Spencer 42a1cb7c0c Add a test case for abstract parameter and result types in function
definitions. The assembler should produce an error on this input.

llvm-svn: 32819
2007-01-02 20:47:51 +00:00
Jim Laskey a131cf78ad PR1068 - Unbounded array debug info.
llvm-svn: 32818
2007-01-02 11:53:52 +00:00
Reid Spencer 03c80e72d1 Regenerate.
llvm-svn: 32817
2007-01-02 06:34:08 +00:00
Reid Spencer 77283c18a1 Permit signed and unsigned integer constants to be used with either signed
or unsigned integer types.

llvm-svn: 32816
2007-01-02 06:33:02 +00:00
Reid Spencer e9da1b0ae0 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.

llvm-svn: 32815
2007-01-02 05:55:05 +00:00
Reid Spencer 9f7ab3a3cd For PR1070:
Revert previous patch now that llvm-upgrade can handle collapsed type
plane conversion properly.

llvm-svn: 32814
2007-01-02 05:53:06 +00:00
Reid Spencer 5b353d3116 Manually upgrade this test case to make sure that the new cast-to-bool
semantics are retained.

llvm-svn: 32813
2007-01-02 05:50:11 +00:00
Reid Spencer f8e060f589 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.

llvm-svn: 32812
2007-01-02 05:48:32 +00:00
Reid Spencer 62ad3bbd4c Regenerate.
llvm-svn: 32811
2007-01-02 05:45:11 +00:00
Reid Spencer 25f4cd093b 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.

llvm-svn: 32810
2007-01-02 05:44:33 +00:00
Reid Spencer 51397401ba Reverse last patch, committed by accident.
llvm-svn: 32809
2007-01-02 04:30:40 +00:00
Reid Spencer 8218de2f01 Fix this test case to be legal. There is no ubyte %tmp ever defined!
llvm-svn: 32808
2007-01-02 04:19:32 +00:00
Reid Spencer 45fe75d755 Add some convenience functions for getting the source and destination
types from any Cast instruction.

llvm-svn: 32807
2007-01-02 02:08:27 +00:00
Reid Spencer 7b25bf07af Back out last revision now that llvm-upgrade can remove useless bitcasts.
This serves as a test of that feature.

llvm-svn: 32806
2007-01-01 01:22:53 +00:00
Reid Spencer 97f4ee7e93 Regenerate.
llvm-svn: 32805
2007-01-01 01:20:41 +00:00
Reid Spencer 1a5d6f56e2 For PR1070:
Remove useless bitcasts by commenting them out.

llvm-svn: 32804
2007-01-01 01:20:16 +00:00
Reid Spencer e8a74ee5ea Fix a typo.
llvm-svn: 32803
2006-12-31 22:26:06 +00:00
Reid Spencer 62f3c0d57b 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

llvm-svn: 32802
2006-12-31 22:24:55 +00:00
Reid Spencer 9cfa4e8459 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.

llvm-svn: 32801
2006-12-31 22:17:01 +00:00
Reid Spencer d0da3e200a Regenerate.
llvm-svn: 32800
2006-12-31 21:47:02 +00:00
Reid Spencer d6979030c1 Remove an extra semi-colon.
llvm-svn: 32799
2006-12-31 21:46:36 +00:00
Reid Spencer c90cf77367 Fix a bug in comparison of GEP indices.
llvm-svn: 32798
2006-12-31 21:43:30 +00:00
Reid Spencer 72ba499004 Remove documentation of non-existent cextcc and csretextcc calling
conventions as these have been replaced with parameter attributes.

llvm-svn: 32797
2006-12-31 21:30:18 +00:00
Reid Spencer 6829c25a3c Add a missing colon. Noticed by Jeff Cohen.
llvm-svn: 32796
2006-12-31 21:25:25 +00:00
Rafael Espindola fd68718467 implement missing compares
patch by Lauro
bug fixed by me

llvm-svn: 32795
2006-12-31 18:52:39 +00:00