Commit Graph

7057 Commits

Author SHA1 Message Date
Chris Lattner
afd7a08a76 move contents of PR587 to here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33333 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 07:34:57 +00:00
Bill Wendling
39e9c09763 The zerofill directive needs a newline after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33327 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 02:30:19 +00:00
Evan Cheng
071b9d5d7c Minor code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33323 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:49:58 +00:00
Bill Wendling
c904a5b925 Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:23:11 +00:00
Chris Lattner
b266ccd0f4 Modify emission of jump tables on darwin to emit an extra "l" label that
delimits the boundaries of jump tables.  This lets the linker's dead code
stripping optimization do a better job.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33315 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:15:58 +00:00
Chris Lattner
393a8eea3c add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:12:56 +00:00
Bill Wendling
203d3e4386 Changed to use the OutputBuffer instead of the methods in MachO and ELF
writers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 22:22:31 +00:00
Chris Lattner
8e13e90052 restructure code a bit to make use of continue (simplifying things). Generalize
the .zerofill directive emission to not be darwin-specific


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33304 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 17:44:25 +00:00
Chris Lattner
42ca450a57 darwin doesn't support .bss, but it does have .zerofill
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33303 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 17:43:33 +00:00
Chris Lattner
6f198dfb38 add new directive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33302 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 17:42:42 +00:00
Anton Korobeynikov
5032e5a613 * Fix one more bug in PIC codegen: extra load is needed for *all*
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33299 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 10:33:08 +00:00
Bill Wendling
e911615c47 Revert patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 09:06:13 +00:00
Bill Wendling
22fb30231b Create the specified TargetObjInfo and use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33291 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:51:37 +00:00
Bill Wendling
cc91f5862c Create/store/and delete the TargetObjInfo object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33290 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:50:41 +00:00
Bill Wendling
34f03fff2d New "TargetObjInfo" class. This holds information that the object writers will
use to write things to the file. It's abstract so each target should implement
its own version for each writer type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33286 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:46:30 +00:00
Anton Korobeynikov
b93a7c9b66 Missed "<" :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33265 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 20:22:18 +00:00
Anton Korobeynikov
1e0f33873b Cleanup. Comments added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33260 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 18:23:09 +00:00
Chris Lattner
a80cc93f10 Fix SMG2000 with the CBE: opaque types need names too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33258 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 18:02:45 +00:00
Chris Lattner
26aa785942 document some subtlety
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33257 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 17:51:40 +00:00
Anton Korobeynikov
d05ca657da Emit symbol type information for ELF/COFF targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33256 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 16:41:57 +00:00
Bill Wendling
cb9009993b Instead of yet another enum indicating the "assembly language flavor",
just use the one that's in the subtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33255 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 09:29:17 +00:00
Chris Lattner
19e8b0c1f5 Fix PR918 by only using typedefs to name struct types. This makes the later
type ordering stuff work better.  This fixes PR918 and
CodeGen/CBackend/2007-01-15-NamedArrayType.ll

Patch by Gordon Henriksen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33254 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 07:22:23 +00:00
Chris Lattner
03a6d96d32 add a note: we need whole-function selectiondags :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33252 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 06:39:48 +00:00
Bill Wendling
11502860c1 Make inline ASM the INTEL one if it's in that emission mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33247 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 04:13:03 +00:00
Bill Wendling
eb9a42c90b Fix for PR1095:
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 03:42:04 +00:00
Chris Lattner
7ace299bdc add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33228 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 06:25:39 +00:00
Chris Lattner
42a7551725 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:27:26 +00:00
Chris Lattner
9e1b1cf3aa Make use of isInteger vs isIntegral more explicit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33216 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 01:48:11 +00:00
Anton Korobeynikov
1a85645d46 No hidden visiblity on Mingw32/Cygwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33202 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 11:49:39 +00:00
Chris Lattner
70d4107a45 add support for hidden visibility to darwin/ppc and linux/ppc targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33200 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 06:37:54 +00:00
Chris Lattner
43bbc5c38f add support for hidden visibility to darwin/x86
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 06:29:53 +00:00
Chris Lattner
9784bc73c3 add a new HiddenDirective member for handling visibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 06:27:21 +00:00
Chris Lattner
5b3a48d853 add a missing else. This caused globals to be printed as:
movq ___dso_handle@GOTPCREL(%rip)(%rip), %rsi

instead of:
        movq ___dso_handle@GOTPCREL(%rip), %rsi


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33196 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 06:08:14 +00:00
Chris Lattner
fd92ec40a9 darwin doesn't use .hidden. Disable this until we fix it right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33191 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 00:50:56 +00:00
Chris Lattner
32c9a4527d Fix PR1103 and Regression/CodeGen/X86/2007-01-13-StackPtrIndex.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33189 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-14 00:13:07 +00:00
Chris Lattner
ae77c7b47a remove dead code, frameindices must be resolve before the asmprinter runs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 23:59:03 +00:00
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