Chris Lattner
75045da563
fix validation
...
llvm-svn: 43549
2007-10-31 07:30:39 +00:00
Chris Lattner
1db6e89b7a
okay, fine, make me finish this chapter. :)
...
Feedback appreciated!
llvm-svn: 43548
2007-10-31 07:29:43 +00:00
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
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
Owen Anderson
a24e5d6996
Don't bother providing code samples. Maintaining zip files in the repository is a pain.
...
llvm-svn: 43330
2007-10-25 06:41:23 +00:00
Chris Lattner
8b59eafb89
Add chapter 4, feedback appreciated.
...
llvm-svn: 43329
2007-10-25 06:23:36 +00:00
Chris Lattner
f98427142c
remove unimplemented ctor, add some comments.
...
llvm-svn: 43328
2007-10-25 05:19:24 +00:00
Chris Lattner
46b4281b6a
Run the verifier on generated code.
...
llvm-svn: 43327
2007-10-25 04:30:35 +00:00
Owen Anderson
7827a3f366
Fix for PR1741.
...
llvm-svn: 43326
2007-10-25 02:36:18 +00:00
Dale Johannesen
ea839ef1f0
Testcase for PR 1397.
...
llvm-svn: 43323
2007-10-25 00:50:14 +00:00
Owen Anderson
00974dce68
Make it possible for DomTreeBase to be constructed from MachineFunction's as well as just Function's.
...
llvm-svn: 43321
2007-10-25 00:16:57 +00:00
Ted Kremenek
d5cb7b055d
Implemented prototype serialization of pointers, including support
...
for backpatching.
Added Deserialize::ReadVal.
llvm-svn: 43319
2007-10-25 00:10:21 +00:00
Dale Johannesen
a4a972e32d
Another expansion for i64 multiply, suitable for PPC.
...
llvm-svn: 43314
2007-10-24 22:26:08 +00:00
Dale Johannesen
52bbe1b171
This was failing on Darwin, which defaults to PIC;
...
no lea was generated. I think this follows the intent.
llvm-svn: 43312
2007-10-24 20:58:14 +00:00
Dale Johannesen
4d06391c47
Fix off by 1 bug in printf->puts lowering.
...
llvm-svn: 43309
2007-10-24 20:14:50 +00:00
Ted Kremenek
83610ae6f4
Split Serialization.h into separate headers: Serialize.h and
...
Deserialize.h Serialization.h now includes trait speciailizations for
unsigned long, etc.
llvm-svn: 43307
2007-10-24 19:06:40 +00:00
Chris Lattner
55b8302dfe
simplify some code by using the new isNaN predicate
...
llvm-svn: 43305
2007-10-24 18:54:45 +00:00
Chris Lattner
b6ed689722
add a nice predicate to check to see if nan
...
llvm-svn: 43304
2007-10-24 18:54:28 +00:00
Owen Anderson
544f860f59
Update Makefile to use simpler llvm-config parameters.
...
llvm-svn: 43292
2007-10-24 16:06:42 +00:00
Owen Anderson
4c9dbd1e9f
Update Makefile to use simpler llvm-config parameters.
...
llvm-svn: 43291
2007-10-24 16:04:08 +00:00
Chris Lattner
0083d8f38d
switch some calls to SelectionDAG::getTargetNode to use
...
the one that takes an operand list instead of explicit
operands. There is one left though, the more interesting
one :)
llvm-svn: 43290
2007-10-24 06:25:09 +00:00
Chris Lattner
c62877e9da
Implement a couple of foldings for ordered and unordered comparisons,
...
implementing cases related to PR1738.
llvm-svn: 43289
2007-10-24 05:38:08 +00:00
Chris Lattner
9a760ebf32
further simplify run options, thanks to gordonh for pointing this out
...
llvm-svn: 43288
2007-10-24 05:09:48 +00:00
Chris Lattner
1fb0d5df69
Fix instructions now that PR1739 is fixed.
...
llvm-svn: 43287
2007-10-24 04:37:23 +00:00
Chris Lattner
4c9ec1aaa2
Fix PR1739.
...
llvm-svn: 43286
2007-10-24 04:35:54 +00:00
Hartmut Kaiser
1759e27951
Added VC++ solution file allowing to build clang.
...
llvm-svn: 43279
2007-10-24 00:13:40 +00:00
Hartmut Kaiser
36309e56eb
Silenced a VC++ warning.
...
llvm-svn: 43276
2007-10-24 00:06:31 +00:00
Hartmut Kaiser
f8b2612b0c
Updated VC++ build system
...
llvm-svn: 43275
2007-10-23 23:57:01 +00:00
Bill Wendling
38ccabcae9
Fix comment and use the "Size" variable that's already provided.
...
llvm-svn: 43271
2007-10-23 23:36:57 +00:00
Bill Wendling
e3b859298a
If there's an unaligned memcpy to/from the stack, don't lower it. Just call the
...
memcpy library function instead.
llvm-svn: 43270
2007-10-23 23:32:40 +00:00
Dale Johannesen
10f4152471
Disable a couple more things for ppcf128.
...
llvm-svn: 43267
2007-10-23 23:20:14 +00:00
Ted Kremenek
97e3be7995
Added "ReadEnum" and "WriteEnum" to serialization classes.
...
llvm-svn: 43265
2007-10-23 22:17:03 +00:00
Bill Wendling
6f149c0571
This broke lots. Reverting.
...
llvm-svn: 43264
2007-10-23 22:04:26 +00:00
Owen Anderson
39b52ee00b
Make DomTreeBase not a FunctionPass.
...
llvm-svn: 43263
2007-10-23 21:42:49 +00:00
Bill Wendling
8971440e56
Lowering a memcpy to the stack is killing PPC. The ARM and X86 backends already
...
have their own custom memcpy lowering code. This code needs to be factored out
into a target-independent lowering method with hooks to the backend. In the
meantime, just call memcpy if we're trying to copy onto a stack.
llvm-svn: 43262
2007-10-23 21:30:25 +00:00
Ted Kremenek
bd3501887f
Added preliminary implementation of generic object serialization to bitcode.
...
llvm-svn: 43261
2007-10-23 21:29:33 +00:00
Owen Anderson
4ca0ca7e64
Unbreak the build. Forgot to commit this file.
...
llvm-svn: 43260
2007-10-23 21:04:37 +00:00
Owen Anderson
9c614117da
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
...
llvm-svn: 43259
2007-10-23 20:58:37 +00:00
Evan Cheng
5d7032bb08
It's possible to commute instrctions with more than 3 operands.
...
llvm-svn: 43256
2007-10-23 20:14:40 +00:00
Chris Lattner
07ae732cc4
new testcase
...
llvm-svn: 43252
2007-10-23 18:07:23 +00:00
Chris Lattner
788f0d340a
llvm/test programs should not be execution programs. This
...
will hopefully fix Gabor's Sparc problem.
llvm-svn: 43251
2007-10-23 17:56:04 +00:00
Evan Cheng
847d42a85c
isSubRegOf() is a dup of isSubRegister.
...
llvm-svn: 43249
2007-10-23 06:51:50 +00:00
Evan Cheng
ec271b104c
Temporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with right callee-saved defs set for ppc64.
...
llvm-svn: 43248
2007-10-23 06:42:42 +00:00
Chris Lattner
c3def1530a
Fix validation problems, which were somewhat ironically in the "valid html" button code :)
...
llvm-svn: 43247
2007-10-23 06:30:50 +00:00
Chris Lattner
e9b16ec28a
add a skeleton for part 4
...
llvm-svn: 43246
2007-10-23 06:27:55 +00:00
Chris Lattner
a02ab559a1
complete the codegen chapter
...
llvm-svn: 43245
2007-10-23 06:23:57 +00:00
Owen Anderson
b5d8904909
Now with valid HTML 4.01!
...
llvm-svn: 43244
2007-10-23 06:22:21 +00:00
Owen Anderson
3ee597e34a
Add a link to the "writing an optimization" tutorial.
...
llvm-svn: 43243
2007-10-23 06:17:39 +00:00
Owen Anderson
c4bb8c75ca
Add downloadable code sample for tutorial 2.
...
llvm-svn: 43242
2007-10-23 06:05:37 +00:00
Owen Anderson
299be453b5
Add the second of the "basic topics" tutorials.
...
llvm-svn: 43241
2007-10-23 06:03:24 +00:00
Owen Anderson
9e87698ec1
Reorder the optimization and bitcode tutorials.
...
llvm-svn: 43240
2007-10-23 06:02:14 +00:00
Chris Lattner
61353b41df
Fix up a broken #include, move code to its own section, add conclusions.
...
llvm-svn: 43239
2007-10-23 05:43:01 +00:00
Chris Lattner
93b76e0c60
Finish up expr codegen.
...
llvm-svn: 43238
2007-10-23 04:51:30 +00:00
Chris Lattner
61b4ec70aa
several improvements suggested by Dan, thanks!
...
llvm-svn: 43237
2007-10-23 04:27:44 +00:00
Evan Cheng
1f2dd35898
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
...
llvm-svn: 43234
2007-10-22 22:11:27 +00:00
Dan Gohman
d09f1c40a2
The #include <iterator> isn't needed in this header.
...
llvm-svn: 43232
2007-10-22 20:44:10 +00:00
Dan Gohman
e0c3d9f338
Strength reduction improvements.
...
- Avoid attempting stride-reuse in the case that there are users that
aren't addresses. In that case, there will be places where the
multiplications won't be folded away, so it's better to try to
strength-reduce them.
- Several SSE intrinsics have operands that strength-reduction can
treat as addresses. The previous item makes this more visible, as
any non-address use of an IV can inhibit stride-reuse.
- Make ValidStride aware of whether there's likely to be a base
register in the address computation. This prevents it from thinking
that things like stride 9 are valid on x86 when the base register is
already occupied.
Also, XFAIL the 2007-08-10-LEA16Use32.ll test; the new logic to avoid
stride-reuse elimintes the LEA in the loop, so the test is no longer
testing what it was intended to test.
llvm-svn: 43231
2007-10-22 20:40:42 +00:00
Dan Gohman
bf474959a3
Fix the folding of multiplication into addresses on x86, which was broken
...
by the recent {U,S}MUL_LOHI changes.
llvm-svn: 43230
2007-10-22 20:22:24 +00:00
Evan Cheng
bdbed66333
Use ptr type in the immediate field of a BxA instruction so we don't end up selecting 32-bit call instruction for ppc64.
...
llvm-svn: 43228
2007-10-22 19:46:19 +00:00
Evan Cheng
5163a8f53e
Add missing paratheses.
...
llvm-svn: 43227
2007-10-22 19:42:28 +00:00
Chris Lattner
fee916334a
add a 'don't use me' marker.
...
llvm-svn: 43226
2007-10-22 19:41:46 +00:00
Duncan Sands
941db4da0a
Support for expanding extending loads of integers with
...
funky bit-widths.
llvm-svn: 43225
2007-10-22 19:00:05 +00:00
Dan Gohman
a37eaf2bf9
Move the SCEV object factors from being static members of the individual
...
SCEV subclasses to being non-static member functions of the ScalarEvolution
class.
llvm-svn: 43224
2007-10-22 18:31:58 +00:00
Duncan Sands
8fc995069b
Fix up the logic for result expanding the various extension
...
operations so they work right for integers with funky
bit-widths. For example, consider extending i48 to i64
on a 32 bit machine. The i64 result is expanded to 2 x i32.
We know that the i48 operand will be promoted to i64, then
also expanded to 2 x i32. If we had the expanded promoted
operand to hand, then expanding the result would be trivial.
Unfortunately at this stage we can only get hold of the
promoted operand. So instead we kind of hand-expand, doing
explicit shifting and truncating to get the top and bottom
halves of the i64 operand into 2 x i32, which are then used
to expand the result. This is harmless, because when the
promoted operand is finally expanded all this bit fiddling
turns into trivial operations which are eliminated either
by the expansion code itself or the DAG combiner.
llvm-svn: 43223
2007-10-22 18:26:21 +00:00
Chris Lattner
ce2c3a456f
fit in 80 cols :)
...
llvm-svn: 43222
2007-10-22 16:44:31 +00:00
Chris Lattner
560762d118
start of chapter 3
...
llvm-svn: 43221
2007-10-22 07:01:42 +00:00
Owen Anderson
c2b2fc0a26
Fix a few typos I noticed.
...
llvm-svn: 43220
2007-10-22 06:48:28 +00:00
Owen Anderson
3295cfde98
Add downloadable code samples.
...
llvm-svn: 43219
2007-10-22 06:35:07 +00:00
Chris Lattner
3a48708c91
Check in part 2: parser and ast.
...
llvm-svn: 43218
2007-10-22 06:34:15 +00:00
Owen Anderson
bbed04336c
Fix some code to make it actually work.
...
llvm-svn: 43217
2007-10-22 06:29:31 +00:00
Bill Wendling
8830ffed4c
Put correct link in example
...
llvm-svn: 43216
2007-10-22 05:10:05 +00:00
Chris Lattner
5e0f459da6
add part 1, review appreciated.
...
llvm-svn: 43215
2007-10-22 04:32:37 +00:00
Chris Lattner
5e63999d71
add an outline for "part 2".
...
llvm-svn: 43214
2007-10-22 03:19:07 +00:00
Chris Lattner
c14c8cd1a7
rename tutorial 1 -> JITTutorial1, make unimplemented links not be dead links.
...
llvm-svn: 43213
2007-10-22 03:12:24 +00:00
Evan Cheng
c92446af1f
Fix an unfolding bug.
...
llvm-svn: 43212
2007-10-22 03:03:20 +00:00
Evan Cheng
8557603781
- Only perform the unfolding optimization when the folding in question is modref.
...
- Remove a bogus assertion.
llvm-svn: 43211
2007-10-22 03:01:44 +00:00
Chris Lattner
fd6f3257b8
add a mechanism for the JIT to invoke a function to lazily create functions as they are referenced.
...
llvm-svn: 43210
2007-10-22 02:50:12 +00:00
Chris Lattner
bf5e958ba0
llvm-gcc3 is dead, along with it __main.
...
llvm-svn: 43209
2007-10-22 02:39:47 +00:00
Anton Korobeynikov
7499a3b092
Reg2Mem cleanup and optimizations:
...
- enable phi instructions demotion to stack
- create alloca instructions in the entry block
llvm-svn: 43208
2007-10-21 23:05:16 +00:00
Chris Lattner
edaf0b4651
LoadLibraryPermanently doesn't throw.
...
llvm-svn: 43207
2007-10-21 22:58:11 +00:00
Chris Lattner
b5163bb9f0
Add a convenience method for creating EE's.
...
llvm-svn: 43206
2007-10-21 22:57:11 +00:00
Dale Johannesen
8ee70112ea
Allow for copysign having f80 second argument.
...
Fixes 5550319.
llvm-svn: 43205
2007-10-21 01:07:44 +00:00
Chris Lattner
36f06c80e6
Add promote operand support for [su]int_to_fp.
...
llvm-svn: 43204
2007-10-20 22:57:56 +00:00
Owen Anderson
18be874e67
Some improvements based on feedback from Anders.
...
llvm-svn: 43203
2007-10-20 06:12:33 +00:00
Owen Anderson
9f2be01f86
Fix some weird indenting in code.
...
llvm-svn: 43202
2007-10-20 05:41:39 +00:00
Owen Anderson
f747ab10fb
Use getOrInsertFunction() in tutorial 1. This makes for shorter, simpler, and better example code.
...
llvm-svn: 43201
2007-10-20 05:40:47 +00:00
Owen Anderson
b207ff2c18
Add the beginnings of an LLVM tutorial. If anyone has suggestions, comments,
...
or would like to contribute, let me know!
llvm-svn: 43200
2007-10-20 05:23:06 +00:00
Chris Lattner
2ba4b148f3
Add result promotion of FP_TO_*INT, fixing CodeGen/X86/trunc-to-bool.ll
...
with the new legalizer.
llvm-svn: 43199
2007-10-20 04:32:38 +00:00
Chris Lattner
1c87f0c620
simplify some code.
...
llvm-svn: 43198
2007-10-20 04:09:48 +00:00
Chris Lattner
2bcac640b7
Implement promote and expand for operands of memcpy and friends.
...
This fixes CodeGen/X86/mem*.ll.
llvm-svn: 43197
2007-10-20 04:07:07 +00:00
Evan Cheng
f12967124c
Added missing curly braces which renders the if clause useless in debug build.
...
llvm-svn: 43196
2007-10-20 04:01:47 +00:00
Dale Johannesen
771188cf60
Fix a few places vector operations were not getting
...
the operand's type from the right place.
llvm-svn: 43195
2007-10-20 00:07:52 +00:00
Evan Cheng
45e096c77e
Resolve unfold tables ambiguity.
...
llvm-svn: 43194
2007-10-19 23:50:58 +00:00
Evan Cheng
f52a6fc50c
New test case.
...
llvm-svn: 43193
2007-10-19 22:05:00 +00:00
Evan Cheng
35ff79370b
Local spiller optimization:
...
Turn a store folding instruction into a load folding instruction. e.g.
xorl %edi, %eax
movl %eax, -32(%ebp)
movl -36(%ebp), %eax
orl %eax, -32(%ebp)
=>
xorl %edi, %eax
orl -36(%ebp), %eax
mov %eax, -32(%ebp)
This enables the unfolding optimization for a subsequent instruction which will
also eliminate the newly introduced store instruction.
llvm-svn: 43192
2007-10-19 21:23:22 +00:00
Bill Wendling
ac5c93040f
Don't branch fold inline asm statements.
...
llvm-svn: 43191
2007-10-19 21:09:55 +00:00
Duncan Sands
a87c9e4b75
Add support for a few more nodes.
...
llvm-svn: 43190
2007-10-19 20:29:48 +00:00
Dale Johannesen
6802d0c96f
Redo "last ppc long double fix" as Chris wants.
...
llvm-svn: 43189
2007-10-19 20:29:00 +00:00
Bill Wendling
b5bc897864
Removed "-arch i386" by popular demand...
...
llvm-svn: 43186
2007-10-19 18:49:16 +00:00
Bill Wendling
5f1a253a3f
Now with RUN line!
...
llvm-svn: 43185
2007-10-19 18:40:53 +00:00
Bill Wendling
89151b1f0a
Remove the Foundation.h file because not everyone has that.
...
llvm-svn: 43184
2007-10-19 18:36:04 +00:00
Devang Patel
c0ced49a14
This test now passes.
...
llvm-svn: 43183
2007-10-19 17:11:01 +00:00
Anton Korobeynikov
f93fa13de7
Update this file for 2.0 syntax. Contributed by Jan Rehders
...
llvm-svn: 43182
2007-10-19 16:54:13 +00:00
Chris Lattner
064c31ebac
Fix a really nasty vector miscompilation bill recently introduced.
...
llvm-svn: 43181
2007-10-19 16:47:35 +00:00
Hartmut Kaiser
321be0cd86
Updated VC++ build system
...
llvm-svn: 43180
2007-10-19 15:51:20 +00:00
Chris Lattner
3ea519e56d
rename ExpandOperation to ExpandOperationResult, as suggested
...
by Duncan
llvm-svn: 43177
2007-10-19 15:28:47 +00:00
Rafael Espindola
18a831d783
split LowerMEMCPY into LowerMEMCPYCall and LowerMEMCPYInline in the ARM backend.
...
llvm-svn: 43176
2007-10-19 14:35:17 +00:00
Duncan Sands
a9953e4d0a
Support for expanding ADDE and SUBE.
...
llvm-svn: 43175
2007-10-19 13:06:17 +00:00
Duncan Sands
d9834b29dd
If the value types are equal then this routine
...
asserts in later checks rather than producing
the ordinary load it is supposed to. Avoid all
such hassles by directly returning an ordinary
load in this case.
llvm-svn: 43174
2007-10-19 13:05:40 +00:00
Rafael Espindola
813a0b1d29
Test byval with a 8 bit aligned struct
...
llvm-svn: 43173
2007-10-19 11:29:21 +00:00
Rafael Espindola
846c19dd70
Add support for byval function whose argument is not 32 bit aligned.
...
To do this it is necessary to add a "always inline" argument to the
memcpy node. For completeness I have also added this node to memmove
and memset. I have also added getMem* functions, because the extra
argument makes it cumbersome to use getNode and because I get confused
by it :-)
llvm-svn: 43172
2007-10-19 10:41:11 +00:00
Chris Lattner
e5a6448533
Implement a few new operations.
...
llvm-svn: 43171
2007-10-19 04:46:45 +00:00
Chris Lattner
e31365eecc
Implement expansion of SINT_TO_FP and UINT_TO_FP operands.
...
llvm-svn: 43170
2007-10-19 04:32:47 +00:00
Chris Lattner
9081d08083
implement support for custom expansion of any node type, in one place.
...
llvm-svn: 43169
2007-10-19 04:14:36 +00:00
Chris Lattner
b193576bc6
comment fixes
...
llvm-svn: 43168
2007-10-19 04:08:28 +00:00