Commit Graph

7021 Commits

Author SHA1 Message Date
Reid Spencer
31b8568baa Remove this file. It was inadvertently added because I could not find
TargetLowering.cpp in CodeGen/SelectionDAG (location makes no sense to me)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33160 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:32:11 +00:00
Chris Lattner
286bf46a23 remove over-general code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:28:32 +00:00
Reid Spencer
7aa8a45922 Adjust #includes to compensate for lost of DerivedTypes.h in
TargetLowering.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33154 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:22:14 +00:00
Reid Spencer
a214cbbc80 Add a new home for TargetLowering member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33152 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:18:18 +00:00
Chris Lattner
c09b52faff remove obsolete fixme
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33151 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:52:50 +00:00
Lauro Ramos Venancio
5293e7d5d6 Don't add or sub zero to sp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33142 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:52:27 +00:00
Lauro Ramos Venancio
a38bbf7dd3 Build constants using instructions mov/orr or mvn/eor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33141 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:35:49 +00:00
Anton Korobeynikov
7f70559bc4 * PIC codegen for X86/Linux has been implemented
* PIC-aware internal structures in X86 Codegen have been refactored
* Visibility (default/weak) has been added
* Docs fixes (external weak linkage, visibility, formatting)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33136 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 19:20:47 +00:00
Evan Cheng
e77d10df41 Comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33114 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:25:16 +00:00
Reid Spencer
a54b7cbd45 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
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