Commit Graph

7011 Commits

Author SHA1 Message Date
Reid Spencer
579dca12c2 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 04:24:46 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Reid Spencer
7679693fdf Change the file header name as this file was renamed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33051 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 04:17:32 +00:00
Reid Spencer
93a0962e08 Rename Writer.cpp as CBackend.cpp so it doesn't conflict with Writer.cpp
in the bytecode writer library. This helps with debugging.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33050 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-10 04:16:17 +00:00
Reid Spencer
251f21492e For PR1099:
Invert the "isSigned" logic in calls to printType and printPrimitiveType.
We want variables to be declared unsigned by default so that signless
operators like + and - perform the unsigned operation that LLVM expects
by default. Parameters with the sext attribute will be declared signed and
signed instructions will case operand values to signed regardless of the
type of the variable. This passes all tests and fixes PR1099.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 17:09:09 +00:00
Reid Spencer
30f9e27f64 For PR1099:
Partial fix for this PR. Default function parameters to signed integer, just
like everything else in CBE. The bug was caused by incorrectly introducing
parameter attributes feature by choosing "signed" parameter if the
SExtAttribute was specified. Howeer, if no attribute is specified, this
causes it to become unsigned which is incorrect. Reversing the logic so
that signedness is detected by "not ZExtAttribute" set fixes the issue.

This fixes 197.parser but there is more to do. Any comparison and possibly
other operators involving arguments may need to correctly cast the parameter
before its use, depending on the sign of the operator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33034 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 06:38:06 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Rafael Espindola
0cc2bd12d2 fix comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32767 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 14:28:12 +00:00
Lauro Ramos Venancio
da4842e266 Define StaticCtorsSection and StaticDtorsSection for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 13:13:00 +00:00
Lauro Ramos Venancio
301009a0fc Implement SELECT_CC (f32/f64) for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 13:11:14 +00:00
Rafael Espindola
6547c55988 remove duplicated line
bug noticed by Lauro


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32761 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-28 12:51:40 +00:00
Lauro Ramos Venancio
a8f9f4af54 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
2006-12-26 19:30:42 +00:00
Reid Spencer
e4d87aa2de 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
2006-12-23 06:05:41 +00:00
Anton Korobeynikov
2b2bc68884 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
2006-12-22 22:29:05 +00:00
Chris Lattner
b9853ebc7b add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 01:03:22 +00:00
Chris Lattner
1a199de813 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
2006-12-21 22:59:58 +00:00
Jim Laskey
bf1118285c 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
2006-12-21 20:26:09 +00:00
Jim Laskey
2aa14aad98 Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32724 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 21:35:00 +00:00
Jim Laskey
40ee69f3ca Original patch was overly complicated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 21:33:34 +00:00
Jim Laskey
b608a4dd4c Changes to target powerpc for non-Darwin assemblers.
1. Patches from Nick Lewycky.
2. Code to filter register names and print them as numeric values on
non-Darwin systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 20:56:46 +00:00
Anton Korobeynikov
48c8e3de2f Fixed 80 cols & style violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 20:40:30 +00:00
Anton Korobeynikov
15fccf1d93 Fixed dllimported symbols support during JIT'ing. JIT on mingw32
platform should be more or less workable. At least, sim is running fine
under lli :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32711 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 01:03:20 +00:00
Chris Lattner
95b2c7da5e eliminate static ctors for Statistic objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:59:26 +00:00
Evan Cheng
a70d14bd16 Fix for PR1062 by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32688 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:31:42 +00:00
Anton Korobeynikov
24287ddb81 Fix for PR1059: http://llvm.org/PR1059
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:04:20 +00:00
Chris Lattner
21847f43e8 The x86-64 target machine should be used for amd64-* target triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 19:40:09 +00:00
Chris Lattner
0bb3af9ec1 Fix PR1061 and CodeGen/X86/2006-12-19-IntelSyntax.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32676 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 19:29:58 +00:00
Rafael Espindola
3ef39ca6a1 macros -> Inline functions
Lauros's patch


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32656 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 11:07:09 +00:00