Commit Graph

29154 Commits

Author SHA1 Message Date
Chris Lattner 19bb6b996b default to emiting an uncompressed .bc file
llvm-svn: 33420
2007-01-21 06:34:18 +00:00
Reid Spencer d7c8b3c105 For PR1128:
Regenerate for ARM support.

llvm-svn: 33419
2007-01-21 06:32:59 +00:00
Reid Spencer f7defa1c5f Add support for the ARM target in the target configuration processing.
llvm-svn: 33418
2007-01-21 06:31:55 +00:00
Reid Spencer 6598ca8ab1 Whoops, fix typo in last commit.
llvm-svn: 33417
2007-01-21 02:29:10 +00:00
Chris Lattner 16e255834d new testcase
llvm-svn: 33416
2007-01-21 00:56:42 +00:00
Reid Spencer 2eadb5310d For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!

llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Reid Spencer 9a4bed06dd Revise the store V, (cast P) -> store (cast V) -> P transform.
We only want to do this if the src and destination types have the same
bit width. This patch uses TargetData::getTypeSizeInBits() instead of
making a special case for integer types and avoiding the transform if
they don't match.

llvm-svn: 33414
2007-01-20 23:35:48 +00:00
Reid Spencer 2239163496 Implement a getTypeSizeInBits method. This helps in transforms that want
to ensure the bit size of a type is identical before proceeding.

llvm-svn: 33413
2007-01-20 23:32:04 +00:00
Reid Spencer ba66c52037 Initial template for the 2.0 Bitcode format that will replace the 1.x
Bytecode format.

llvm-svn: 33412
2007-01-20 23:21:08 +00:00
Owen Anderson e52a235e99 TargetData assumes (and some regression tests depend on it) that the size of
an unspecified datatype in the datalayout is capped by the size of a pointer.

llvm-svn: 33411
2007-01-20 23:07:13 +00:00
Chris Lattner 6e38094235 trivial cleanup
llvm-svn: 33410
2007-01-20 22:39:15 +00:00
Chris Lattner 50ee0e40e5 Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!

llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Chris Lattner 7476fa4456 DOUT still evaluates side effects, even though it doesn't print. This means
that disassembleBuffer will be called even if NDEBUG, but the result will
be ignored.

llvm-svn: 33408
2007-01-20 20:51:43 +00:00
Reid Spencer dca38eec0d For PR808:
Regenerate to include NetBSD.

llvm-svn: 33407
2007-01-20 20:45:39 +00:00
Reid Spencer 181fe4ad09 For PR808:
NetBSD also doesn't have pthread_mutexattr_setpshared

llvm-svn: 33406
2007-01-20 20:44:38 +00:00
Reid Spencer 78adb9d16f For PR808:
Add support for NetBSD.

llvm-svn: 33405
2007-01-20 20:43:35 +00:00
Reid Spencer 19531ac014 Try a negative number with ashr.
llvm-svn: 33404
2007-01-20 20:30:13 +00:00
Reid Spencer fff2797349 Implement the signed icmp instructions properly. To do this we introduce
a small inline function to sign extend a uint64_t value based on its
type's bitwidth. This function is then used in both executeSExtInst and
the various executeICMP_S** functions.

llvm-svn: 33403
2007-01-20 20:12:29 +00:00
Evan Cheng e3d8e42e27 Round up stack to multiple of alignment only if it's a leaf function without alloca.
llvm-svn: 33401
2007-01-20 10:22:33 +00:00
Evan Cheng 706b6797a0 One more try...
llvm-svn: 33400
2007-01-20 10:17:53 +00:00
Evan Cheng b268184363 Last check-in was bogus. There is no need to align the stack if the function is a leaf function (and without alloca).
llvm-svn: 33399
2007-01-20 10:11:56 +00:00
Evan Cheng 00a640dbe0 Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.
llvm-svn: 33398
2007-01-20 10:10:26 +00:00
Owen Anderson dfd79ad319 Correct a comment.
llvm-svn: 33397
2007-01-20 10:07:23 +00:00
Evan Cheng 887f75ac0a Remove an unused variable.
llvm-svn: 33396
2007-01-20 09:21:54 +00:00
Owen Anderson c709e5ee15 Fix incorrect run line.
llvm-svn: 33395
2007-01-20 08:48:05 +00:00
Reid Spencer 3615cdf957 Implement bit-accurate sext instruction.
This patch fixes test/Integer/2007-01-17-TruncSext.ll

llvm-svn: 33394
2007-01-20 08:32:52 +00:00
Reid Spencer 50a8df7342 Add a test case for sext bug that Leo found.
llvm-svn: 33393
2007-01-20 08:31:45 +00:00
Reid Spencer dfda061686 Regenerate for Anton Korobeynikov.
llvm-svn: 33392
2007-01-20 07:48:49 +00:00
Anton Korobeynikov 4480ec3513 Cleanup
llvm-svn: 33391
2007-01-20 07:40:26 +00:00
Evan Cheng a9af4be5ac Prologue and epilogue bugs for non-Darwin targets.
llvm-svn: 33390
2007-01-20 03:24:07 +00:00
Evan Cheng aa24f08926 Clean up ARM PEI code.
llvm-svn: 33389
2007-01-20 02:09:25 +00:00
Evan Cheng 86468ccaf3 Backend is reponsible for aligning the stack.
llvm-svn: 33388
2007-01-20 02:08:16 +00:00
Evan Cheng 7ab6fa3a67 We not align the final stack slot but instead let the target do so in emitPrologue(). Each target can make adjustments to the stack frame and re-align the stack as it deem appropriate. Do not align it twice which can end up wasting stack space.
llvm-svn: 33387
2007-01-20 02:07:13 +00:00
Reid Spencer 969bdf344f Fix a #include to resolve IntegerType class.
llvm-svn: 33385
2007-01-19 22:45:50 +00:00
Reid Spencer 727f31b2cd Add a #include to resolve IntegerType class.
llvm-svn: 33384
2007-01-19 22:45:05 +00:00
Evan Cheng fec133d2d1 Add test case extracted from lencod. Spiller was infinite looping in GetRegForReload().
llvm-svn: 33383
2007-01-19 22:43:14 +00:00
Evan Cheng fc74e2de26 GetRegForReload() now keeps track which registers have been considered and rejected during its quest to find a suitable reload register. This avoids an infinite loop in case like this:
t1 := op t2, t3
  t2 <- assigned r0 for use by the reload but ended up reuse r1
  t3 <- assigned r1 for use by the reload but ended up reuse r0
  t1 <- desires r1
        sees r1 is taken by t2, tries t2's reload register r0
        sees r0 is taken by t3, tries t3's reload register r1
        sees r1 is taken by t2, tries t2's reload register r0 ...

llvm-svn: 33382
2007-01-19 22:40:14 +00:00
Reid Spencer 9f900c1f92 Unbreak Darwin.
llvm-svn: 33375
2007-01-19 22:04:24 +00:00
Reid Spencer a96084901c Help the lli interpreter find the stderr/stdin/stdout symbols. These are
needed for output to be generated. On Linux these are both global vars and
macro definitions so we have to special case Linux.

llvm-svn: 33374
2007-01-19 21:41:04 +00:00
Reid Spencer dcf6f90033 Handle each of stderr/stdin/stdout separately.
llvm-svn: 33373
2007-01-19 21:30:39 +00:00
Reid Spencer adf4118a36 Remove dead methods in the ValTypes.
llvm-svn: 33372
2007-01-19 21:25:12 +00:00
Reid Spencer e928a15c9e For this transform: store V, (cast P) -> store (cast V), P
don't allow the transform if V and the pointer's element type are different
width integer types.

llvm-svn: 33371
2007-01-19 21:20:31 +00:00
Reid Spencer a94d394ad2 For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.

llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Reid Spencer eaedf70eea Make this test actually test what its supposed to test.
llvm-svn: 33369
2007-01-19 21:06:38 +00:00
Evan Cheng 77c15ded10 Code clean up. Use def : pat instead of defining new instructions.
llvm-svn: 33368
2007-01-19 20:27:35 +00:00
Andrew Lenharth e082e2ac7f fix build on amd64
llvm-svn: 33367
2007-01-19 20:17:59 +00:00
Evan Cheng bf216c364f isDarwin -> isTargetDarwin
llvm-svn: 33366
2007-01-19 19:28:01 +00:00
Evan Cheng 1199c2d653 Restructure code a bit to make use of continue (simplifying things). Generalize
the .zerofill directive emission to not be darwin-specific.

llvm-svn: 33365
2007-01-19 19:25:36 +00:00
Evan Cheng 023c7d667d Darwin doesn't support .bss, but it does have .zerofill
llvm-svn: 33364
2007-01-19 19:23:47 +00:00
Evan Cheng 181fe36d6c Introduce TargetType's ELF and Darwin.
llvm-svn: 33363
2007-01-19 19:22:40 +00:00