Commit Graph

35120 Commits

Author SHA1 Message Date
Chris Lattner 6b0fb58110 add the code for expression code that we'll add, though most of the
description is missing.

llvm-svn: 43547
2007-10-31 06:47:39 +00:00
Chris Lattner 149c55aba4 Add the first half of chapter 5: if/then/else.
To come: for statement.

llvm-svn: 43546
2007-10-31 06:30:21 +00:00
Chris Lattner da1988477d __main is dead along with llvm-gcc3.
llvm-svn: 43545
2007-10-31 05:53:31 +00:00
Owen Anderson 0b59fa0605 Add the skeleton of a better PHI elimination pass.
llvm-svn: 43542
2007-10-31 03:37:57 +00:00
Owen Anderson 9b8f34f2ac Some fixes to get MachineDomTree working better.
llvm-svn: 43541
2007-10-31 03:30:14 +00:00
Dale Johannesen b066c1f216 Make i64=expand_vector_elt(v2i64) work in 32-bit mode.
llvm-svn: 43535
2007-10-31 00:32:36 +00:00
Evan Cheng 240c1adade At end of LSR, replace uses of now constant (as result of SplitCriticalEdge) PHI node with the constant value.
llvm-svn: 43533
2007-10-30 23:45:15 +00:00
Ted Kremenek 4f4c3f9fd5 Added member function "size()" to FoldingSet to return the number of
nodes in the FoldingSet.

llvm-svn: 43531
2007-10-30 23:35:55 +00:00
Devang Patel 17833d7068 New test.
llvm-svn: 43527
2007-10-30 23:07:47 +00:00
Evan Cheng c2dbfee43f It's not safe to tell SplitCriticalEdge to merge identical edges. It may delete the phi instruction that's being processed.
llvm-svn: 43524
2007-10-30 22:27:26 +00:00
Dale Johannesen d50c8bcef6 Add missing SSE builtins: CVTPD2PI, CVTPS2PI,
CVTTPD2PI, CVTTPS2PI, CVTPI2PD, CVTPI2PS.

llvm-svn: 43523
2007-10-30 22:15:38 +00:00
Evan Cheng 0747bc1df6 Typo.
llvm-svn: 43511
2007-10-30 20:11:21 +00:00
Dan Gohman 9f39660c20 Add support for folding binary operators with vector zero operands.
llvm-svn: 43510
2007-10-30 19:00:49 +00:00
Duncan Sands b508c53c63 Fix for visibility warnings generated by gcc-4.2.
llvm-svn: 43500
2007-10-30 13:14:37 +00:00
Duncan Sands 9ad5465005 Add support for expanding trunc stores. Consider
storing an i170 on a 32 bit machine.  This is first
promoted to a trunc-i170 store of an i256.  On a
little-endian machine this expands to a store of
an i128 and a trunc-i42 store of an i128.  The
trunc-i42 store is further expanded to a trunc-i42
store of an i64, then to a store of an i32 and a
trunc-i10 store of an i32.  At this point the operand
type is legal (i32) and expansion stops (legalization
of the trunc-i10 needs to be handled in LegalizeDAG.cpp).
On big-endian machines the high bits are stored first,
and some bit-fiddling is needed in order to generate
aligned stores.

llvm-svn: 43499
2007-10-30 12:50:39 +00:00
Duncan Sands 341f093bb1 If a call to getTruncStore is for a normal store,
offload to getStore rather than trying to handle
both cases at once (the assertions for example
assume the store really is truncating).

llvm-svn: 43498
2007-10-30 12:40:58 +00:00
Dale Johannesen 3f156de60d Fix argument types for PSLLQ, PSRLQ.
llvm-svn: 43490
2007-10-30 01:44:33 +00:00
Dale Johannesen 6aa304e529 Add missing MMX PSUBQ.
llvm-svn: 43488
2007-10-30 01:18:38 +00:00
Evan Cheng b024c4c81d - Bug fixes.
- Allow icmp rewrite using an iv / stride of a smaller integer type.

llvm-svn: 43480
2007-10-29 22:07:18 +00:00
Hartmut Kaiser f557d896cb Updated VC++ build system
llvm-svn: 43479
2007-10-29 21:56:15 +00:00
Dan Gohman ae95d72a52 Fix a DAGCombiner abort on a bitcast from a scalar to a vector.
llvm-svn: 43470
2007-10-29 20:44:42 +00:00
Dan Gohman 2aec186dd0 Don't bitcast from pointer-to-vector to pointer-to-array when
lowering load and store instructions.

llvm-svn: 43468
2007-10-29 20:34:35 +00:00
Dan Gohman 3bcd5fe9f1 Use an array instead of a fixed-length std::vector.
llvm-svn: 43467
2007-10-29 20:24:00 +00:00
Dan Gohman d9911e21df Do a real assert if there is an unhandled vector instruction instead
of just printing to cerr.

llvm-svn: 43466
2007-10-29 20:14:29 +00:00
Evan Cheng e106e2f142 Enable more fold (sext (load x)) -> (sext (truncate (sextload x)))
transformation. Previously, it's restricted by ensuring the number of load uses
is one. Now the restriction is loosened up by allowing setcc uses to be
"extended" (e.g. setcc x, c, eq -> setcc sext(x), sext(c), eq).

llvm-svn: 43465
2007-10-29 19:58:20 +00:00
Dan Gohman 1961c28d46 Add explicit keywords.
llvm-svn: 43464
2007-10-29 19:52:04 +00:00
Dan Gohman 7414e21ec0 Update a comment to reflect the current code.
llvm-svn: 43463
2007-10-29 19:32:39 +00:00
Dan Gohman f5feb01056 Remove an unused function argument.
llvm-svn: 43462
2007-10-29 19:31:25 +00:00
Dan Gohman 50d42224d0 Fix a typo in a comment.
llvm-svn: 43461
2007-10-29 19:26:14 +00:00
Dan Gohman 8e8adada83 Avoid calling ValidStride when not all uses are addresses.
llvm-svn: 43460
2007-10-29 19:23:53 +00:00
Ted Kremenek ef23e34bba Fixed warning concerning implicit conversion from a NULL pointer
constant to an unsigned int.  We now just directly assign the literal 0.

llvm-svn: 43459
2007-10-29 18:43:39 +00:00
Chris Lattner 00860d7574 update testcase
llvm-svn: 43452
2007-10-29 17:06:35 +00:00
Evan Cheng 7b3f7feaea Avoid doing something dumb like rewriting using a 64-bit iv in 32-bit mode.
llvm-svn: 43446
2007-10-29 07:57:50 +00:00
Chris Lattner 909a54ccd4 add a note.
llvm-svn: 43444
2007-10-29 06:19:48 +00:00
Chris Lattner c541c3ee15 Model stacksave and stackrestore as both writing memory, since we
don't model their dependences on allocas correctly.  This fixes
PR1745.

llvm-svn: 43442
2007-10-29 05:47:52 +00:00
Owen Anderson 3692dbe492 Add a first attempt at dominator information for MBB's. Use with caution: this has been tested to compile. It has not yet been confirmed to generate correct analysis.
llvm-svn: 43438
2007-10-29 04:50:50 +00:00
Chris Lattner b6fc40e60f I am not sure this is a good idea to be an option, but rename the option for
now.  It conflicts with clang's -pedantic flag.

llvm-svn: 43431
2007-10-29 03:14:55 +00:00
Chris Lattner 5e99fd8c0d Add support for the x86-64 'q' regigster modifier, and add support for the
b/h/w/k/q inline asm memory modifiers, which are just ignored.  This fixes
PR1748 and CodeGen/X86/2007-10-28-inlineasm-q-modifier.ll

llvm-svn: 43430
2007-10-29 03:09:07 +00:00
Chris Lattner 9a641510bd Fix PR1749 and InstCombine/2007-10-28-EmptyField.ll by handling
zero-length fields better.

llvm-svn: 43427
2007-10-29 02:40:02 +00:00
Chris Lattner 4a15e04aee Fix PR1752 and LoopSimplify/2007-10-28-InvokeCrash.ll: terminators
can have uses too.  Wouldn't it be nice if invoke didn't exist? :)

llvm-svn: 43426
2007-10-29 02:30:37 +00:00
Ted Kremenek 8be9bc64ce Fixed assertion in Deserializer::~Deserializer that checks for
pointers that were not backpatched (previously checked the wrong invariant).

llvm-svn: 43425
2007-10-28 23:38:38 +00:00
Anton Korobeynikov 9dced3f9ae Add 'pedantic' mode to verifier rejecting syntactically valid, but 'bad' due to other reasons code
llvm-svn: 43424
2007-10-28 22:50:32 +00:00
Ted Kremenek 387204749b Updated backpatching logic during object deserialization to perform
eager backpatching instead of waithing until all objects have been
deserialized.  This allows us to reduce the memory footprint needed
for backpatching.

llvm-svn: 43422
2007-10-28 21:17:59 +00:00
Duncan Sands 1826deda68 The guaranteed alignment of ptr+offset is only the minimum of
of offset and the alignment of ptr if these are both powers of
2.  While the ptr alignment is guaranteed to be a power of 2,
there is no reason to think that offset is.  For example, if
offset is 12 (the size of a long double on x86-32 linux) and
the alignment of ptr is 8, then the alignment of ptr+offset
will in general be 4, not 8.  Introduce a function MinAlign,
lifted from gcc, for computing the minimum guaranteed alignment.
I've tried to fix up everywhere under lib/CodeGen/SelectionDAG/.
I also changed some places that weren't wrong (because both values
were a power of 2), as a defensive change against people copying
and pasting the code.
Hopefully someone who cares about alignment will review the rest
of LLVM and fix up the remaining places.  Since I'm on x86 I'm
not very motivated to do this myself...

llvm-svn: 43421
2007-10-28 12:59:45 +00:00
Evan Cheng c826ac533b New entry.
llvm-svn: 43420
2007-10-28 04:01:09 +00:00
Ted Kremenek 9dd1e702fa Fixed bug where default SerializeTrait<>::Materialize would not return the materialized object pointer.
llvm-svn: 43413
2007-10-26 23:44:59 +00:00
Bill Wendling 2305de81a4 Test to make sure that if we have an unaligned memcpy, it will still compile.
llvm-svn: 43412
2007-10-26 23:43:35 +00:00
Evan Cheng 9dbe99dcd6 A number of LSR fixes:
- ChangeCompareStride only reuse stride that is larger than current stride. It
  will let the general reuse mechanism to try to reuse a smaller stride.
- Watch out for multiplication overflow in ChangeCompareStride.
- Replace std::set with SmallPtrSet.

llvm-svn: 43408
2007-10-26 23:08:19 +00:00
Ted Kremenek 5e7133b090 Added SerializeAPInt.cpp and DeserializeAPInt.cpp to the XCode project.
llvm-svn: 43406
2007-10-26 21:53:37 +00:00
Ted Kremenek 2d95094bea Added serialization support for APInt.
llvm-svn: 43405
2007-10-26 21:50:10 +00:00