Commit Graph

35083 Commits

Author SHA1 Message Date
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
Ted Kremenek 18c1393ddb Fixed incorrect "path name" in preamble (comment) of header file.
llvm-svn: 43402
2007-10-26 20:44:02 +00:00
Ted Kremenek f8555a23ec Fixed incorrect "path name" in preamble (comment) of header file.
llvm-svn: 43401
2007-10-26 20:42:45 +00:00
Bill Wendling b0bfd69684 On second thought. Remove this as it should never be generated in the first
place.

llvm-svn: 43400
2007-10-26 20:34:37 +00:00
Bill Wendling 6d15b32c15 - Remove the hacky code that forces a memcpy. Alignment is taken care of in the
FE.
- Explicitly pass in the alignment of the load & store.
- XFAIL 2007-10-23-UnalignedMemcpy.ll because llc has a bug that crashes on
  unaligned pointers.

llvm-svn: 43398
2007-10-26 20:24:42 +00:00
Ted Kremenek fc88b1ddb8 Added default implementation of SerializeTrait<> that dispatches to
calling member functions of the target type to perform type-specific
serialization.
                         
Added version of ReadPtr that allows passing references to uintptr_t
(useful for smart pointers).

llvm-svn: 43396
2007-10-26 20:23:27 +00:00
Evan Cheng d78a3e5555 Fix a crash. Make sure TLI is not null.
llvm-svn: 43384
2007-10-26 17:24:46 +00:00
Anton Korobeynikov d07d6a411c Fix off-by-one stack offset computations (dwarf information) for callee-saved
registers in case, when FP pointer was eliminated. This should fixes misc. random
EH-related crahses, when stuff is compiled with -fomit-frame-pointer.
Thanks Duncan for nailing this bug!

llvm-svn: 43381
2007-10-26 09:13:24 +00:00
Eric Christopher 18063916b5 clo/clz aren't supported on mips I. Keep them around for when we'll
want them later (mips32/64).

llvm-svn: 43380
2007-10-26 04:00:13 +00:00
Owen Anderson b7971bbdd7 Make a comment better.
llvm-svn: 43379
2007-10-26 03:47:14 +00:00
Gordon Henriksen 78c63ac41e More fleshing out of docs/Passes.html, plus some typo fixes and
improved wording in source files.

llvm-svn: 43377
2007-10-26 03:03:51 +00:00
Evan Cheng 7f3d02471d Loosen up iv reuse to allow reuse of the same stride but a larger type when truncating from the larger type to smaller type is free.
e.g.
Turns this loop:
LBB1_1: # entry.bb_crit_edge
        xorl    %ecx, %ecx
        xorw    %dx, %dx
        movw    %dx, %si
LBB1_2: # bb
        movl    L_X$non_lazy_ptr, %edi
        movw    %si, (%edi)
        movl    L_Y$non_lazy_ptr, %edi
        movw    %dx, (%edi)
		addw    $4, %dx
		incw    %si
		incl    %ecx
		cmpl    %eax, %ecx
		jne     LBB1_2  # bb
	
into

LBB1_1: # entry.bb_crit_edge
        xorl    %ecx, %ecx
        xorw    %dx, %dx
LBB1_2: # bb
        movl    L_X$non_lazy_ptr, %esi
        movw    %cx, (%esi)
        movl    L_Y$non_lazy_ptr, %esi
        movw    %dx, (%esi)
        addw    $4, %dx
		incl    %ecx
        cmpl    %eax, %ecx
        jne     LBB1_2  # bb

llvm-svn: 43375
2007-10-26 01:56:11 +00:00
Hartmut Kaiser 1207cd6b1b Silenced a VC++ warning.
llvm-svn: 43374
2007-10-25 23:49:14 +00:00
Ted Kremenek 542e5f29b7 Updated backpatching during object deserialization to support "smart"
pointers that employ unused bits in a pointer to store extra data.

llvm-svn: 43373
2007-10-25 23:40:35 +00:00
Hartmut Kaiser fc69d322f2 Clarified operator precedence.
Silenced VC++ warning.

llvm-svn: 43372
2007-10-25 23:15:31 +00:00
Hartmut Kaiser 7e16ce5270 Disambiguated variable name to comply with VC++'s archaic variable scoping rules.
llvm-svn: 43369
2007-10-25 22:57:48 +00:00
Hartmut Kaiser 3a0cda1cf7 Updated VC++ build system
llvm-svn: 43368
2007-10-25 22:56:13 +00:00
Evan Cheng 29e29e63bd Do not rewrite compare instruction using iv of a different stride if the new
stride may be rewritten using the stride of the compare instruction.

llvm-svn: 43367
2007-10-25 22:45:20 +00:00
Dale Johannesen 65e804a9c3 Support non-POSIX hosts by removing use of strncasecmp.
llvm-svn: 43364
2007-10-25 21:54:43 +00:00
Bill Wendling f73340efb9 Changed XXX to FIXME, and added comment to the README file
llvm-svn: 43359
2007-10-25 19:49:32 +00:00
Ted Kremenek a83e6bc246 Added special treatment of serializing NULL pointers.
llvm-svn: 43357
2007-10-25 18:42:52 +00:00
Evan Cheng 5a38108374 Remove code that's commented out.
llvm-svn: 43356
2007-10-25 18:38:24 +00:00
Bill Wendling 5f7ed00d44 Added comment explaining why we are doing this check.
llvm-svn: 43353
2007-10-25 18:23:45 +00:00
Ted Kremenek 0cf94e9c91 Created header file to include minimal forward references needed for
object serialization.

llvm-svn: 43352
2007-10-25 18:19:29 +00:00
Chris Lattner 991b6b9d0c typo
llvm-svn: 43351
2007-10-25 18:05:29 +00:00
Chris Lattner 76a2273f6e some minor edits, link to Passes.html, make one point
I forgot about yesterday.

llvm-svn: 43350
2007-10-25 17:52:39 +00:00
Ted Kremenek 93345274c2 Added Serialization.h, Serialize.h, Deserialize.h, Serialize.cpp, and
Deserialize.cpp to the XCode project.

llvm-svn: 43345
2007-10-25 16:09:09 +00:00
Duncan Sands d385f0759c Small formatting changes. Add a sanity check.
Use NVT rather than looking it up, since we have
it to hand.

llvm-svn: 43341
2007-10-25 12:35:51 +00:00
Duncan Sands a8f4ba6eb9 Promote SETCC operands.
llvm-svn: 43340
2007-10-25 12:32:31 +00:00
Duncan Sands cf0da03312 Correctly extract the ValueType from a VTSDNode.
llvm-svn: 43339
2007-10-25 12:30:51 +00:00
Duncan Sands 7e6e33beab Fix comment typos.
llvm-svn: 43338
2007-10-25 12:28:12 +00:00
Gordon Henriksen 77d27523b1 Fleshing out docs/Passes.html for some analyses.
llvm-svn: 43337
2007-10-25 10:18:27 +00:00
Evan Cheng 133694db06 If a loop termination compare instruction is the only use of its stride,
and the compaison is against a constant value, try eliminate the stride
by moving the compare instruction to another stride and change its
constant operand accordingly. e.g.

loop:
...
v1 = v1 + 3
v2 = v2 + 1
if (v2 < 10) goto loop
=>
loop:
...
v1 = v1 + 3
if (v1 < 30) goto loop

llvm-svn: 43336
2007-10-25 09:11:16 +00:00
Gordon Henriksen ac72db5dbe Passes.html now 'passes' validation.
llvm-svn: 43335
2007-10-25 08:58:56 +00:00
Gordon Henriksen 50768f89d9 Bringing Passes.html structurally up-to-date, and enabling
semi-automated maintenance.

llvm-svn: 43334
2007-10-25 08:46:12 +00:00
Owen Anderson 4cee0451f0 Fix an obvious typo.
llvm-svn: 43333
2007-10-25 06:50:30 +00:00
Owen Anderson 4c209da848 More tutorial cleanups.
llvm-svn: 43332
2007-10-25 06:49:29 +00:00
Owen Anderson af8059c1a7 Add proper footers.
llvm-svn: 43331
2007-10-25 06:45:01 +00:00