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
Chris Lattner
d01b8ea4a5
Make use of TLI.ExpandOperation, remove softfloat stuff.
...
llvm-svn: 43167
2007-10-19 03:58:25 +00:00
Chris Lattner
3c7ee41c78
add expand support for bit_convert result, even allowing custom expansion.
...
llvm-svn: 43166
2007-10-19 03:33:14 +00:00
Chris Lattner
579db81f1c
add a new target hook.
...
llvm-svn: 43165
2007-10-19 03:31:45 +00:00
Chris Lattner
5d979d57ae
Add an easy microoptimization I noticed.
...
llvm-svn: 43164
2007-10-19 03:29:26 +00:00
Devang Patel
e1b7fa3410
New test.
...
llvm-svn: 43162
2007-10-19 01:28:02 +00:00
Bill Wendling
de16ad1446
Negative indices aren't allowed here.
...
llvm-svn: 43161
2007-10-19 01:10:49 +00:00
Dale Johannesen
10432e5a67
More ppcf128 issues (maybe the last)?
...
llvm-svn: 43160
2007-10-19 00:59:18 +00:00
Evan Cheng
463e2ab0ac
- Added getOpcodeAfterMemoryUnfold(). It doesn't unfold an instruction, but only returns the opcode of the instruction post unfolding.
...
- Fix some copy+paste bugs.
llvm-svn: 43153
2007-10-18 22:40:57 +00:00
Evan Cheng
aa9a225699
Use SmallVectorImpl instead of SmallVector with hardcoded size in MRegister public interface.
...
llvm-svn: 43150
2007-10-18 21:29:24 +00:00
Devang Patel
df49cf52e2
Try again.
...
Instead of loading small global string from memory, use
integer constant.
llvm-svn: 43148
2007-10-18 19:52:32 +00:00
Owen Anderson
09b83ba6f1
Allow GVN to eliminate redundant calls to functions without side effects.
...
llvm-svn: 43147
2007-10-18 19:39:33 +00:00
Christopher Lamb
64035f3b8e
Add an uppercase conversion utility function.
...
llvm-svn: 43146
2007-10-18 19:31:38 +00:00
Christopher Lamb
79dfbed6f6
Fix a misnamed parameter.
...
llvm-svn: 43145
2007-10-18 19:29:45 +00:00
Christopher Lamb
7f68cf0d57
Fix a typo
...
llvm-svn: 43144
2007-10-18 19:28:55 +00:00
Chris Lattner
9715d9fb59
Fix PR1735 and Transforms/DeadArgElim/2007-10-18-VarargsReturn.ll by
...
fixing some obviously broken code :(
llvm-svn: 43141
2007-10-18 18:49:29 +00:00
Bill Wendling
5616a608df
Fix the command line.
...
llvm-svn: 43140
2007-10-18 18:26:40 +00:00
Devang Patel
371a5ef1de
Fix test.
...
llvm-svn: 43136
2007-10-18 17:54:49 +00:00
Chris Lattner
ef6500992f
this doesn't need dynamic_cast.
...
llvm-svn: 43133
2007-10-18 16:26:24 +00:00
Chris Lattner
7813cec0d0
remove dead file
...
llvm-svn: 43131
2007-10-18 16:12:54 +00:00
Chris Lattner
9afb8e4e29
Reduce reliance on rtti info
...
llvm-svn: 43130
2007-10-18 16:11:18 +00:00
Chris Lattner
9b6ec77647
fix typo
...
llvm-svn: 43129
2007-10-18 16:10:48 +00:00
Chris Lattner
b12dce4bce
update comment.
...
llvm-svn: 43128
2007-10-18 16:10:17 +00:00
Chris Lattner
1b88e3c2dd
This requires rtti info because tblgen uses commandline,
...
and tblgen requires rtti.
llvm-svn: 43127
2007-10-18 15:57:29 +00:00
Chris Lattner
604b2314c8
tblgen uses dynamic_cast heavily, so it needs rtti info
...
llvm-svn: 43126
2007-10-18 15:54:45 +00:00
Hartmut Kaiser
a420cf3f77
Updated VC++ build system
...
llvm-svn: 43123
2007-10-18 12:31:51 +00:00
Gordon Henriksen
ea31de8dc1
Work around downrev gccs which do not inherit visibility of the
...
Registry<>::iterator member class.
llvm-svn: 43122
2007-10-18 11:53:05 +00:00
Gordon Henriksen
03368e85b8
Missing 'public' keyword.
...
llvm-svn: 43121
2007-10-18 11:31:21 +00:00
Bill Wendling
070aca5d25
Pointer arithmetic should be done with the index the same size as the pointer.
...
llvm-svn: 43120
2007-10-18 08:32:37 +00:00
Duncan Sands
cb7aca0dcb
Support for ADDC/SUBC.
...
llvm-svn: 43119
2007-10-18 08:22:16 +00:00
Evan Cheng
e6a41c066a
Really fix PR1734. Carefully track which register uses are sub-register uses by
...
traversing inverse register coalescing map.
llvm-svn: 43118
2007-10-18 07:49:59 +00:00
Evan Cheng
0b18ddf55a
Remove unnecessary include.
...
llvm-svn: 43117
2007-10-18 07:47:55 +00:00
Chris Lattner
84f3461c49
legalizing the ret operation on f64 shouldn't introduce a new
...
i64 bit convert needlessly.
llvm-svn: 43116
2007-10-18 06:17:07 +00:00
Owen Anderson
ca831a829d
Move Split<...>() into DomTreeBase. This should make the #include's of DominatorInternals.h
...
in CodeExtractor and LoopSimplify unnecessary.
Hartmut, could you confirm that this fixes the issues you were seeing?
llvm-svn: 43115
2007-10-18 05:13:52 +00:00
Devang Patel
9497767458
XFAIL for now.
...
llvm-svn: 43111
2007-10-18 00:48:43 +00:00
Ted Kremenek
da9639d1a7
Changed the return type of type-specific Allocate() methods to return
...
void*. This is hint that we are returning uninitialized memory rather
than a constructed object.
Patched ImutAVLTree to conform to this new interface.
llvm-svn: 43106
2007-10-18 00:30:14 +00:00
Evan Cheng
cdcc1d0444
Reverting r43070 for now. It's causing llc test failures.
...
llvm-svn: 43103
2007-10-17 23:51:13 +00:00
Bill Wendling
37f888e6e8
Test to make sure we don't generate unwind info for non-64-bit Objective-C.
...
llvm-svn: 43102
2007-10-17 23:14:56 +00:00
Ted Kremenek
603fbbfcb7
ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using
...
the new type-aligned Allocate() method.
llvm-svn: 43100
2007-10-17 22:17:01 +00:00
Ted Kremenek
3830606dee
Removed inclusion of cassert, which is no longer needed.
...
llvm-svn: 43099
2007-10-17 22:12:14 +00:00
Ted Kremenek
27d207d2e7
Minor cosmetic cleanups in the calculation of alignments for
...
StringMapEntry objects. No functionality change.
llvm-svn: 43097
2007-10-17 22:09:45 +00:00
Ted Kremenek
02c3267039
Added template function alignof() which provides a clean
...
function-based interface to getting the alignment of a type.
llvm-svn: 43096
2007-10-17 22:08:55 +00:00
Gordon Henriksen
0ab3d27641
Reverting unnecessary commit of generated files.
...
llvm-svn: 43095
2007-10-17 21:36:08 +00:00
Gordon Henriksen
ef5d08f4ea
Switching TargetMachineRegistry to use the new generic Registry.
...
llvm-svn: 43094
2007-10-17 21:28:48 +00:00
Ted Kremenek
dbc8e043c2
Updated StringMap to use llvm::AlignOf to compute the alignment of map
...
entries.
llvm-svn: 43089
2007-10-17 21:13:50 +00:00
Ted Kremenek
a26294201f
Added member template functions to MallocAllocator and
...
BumpPtrAllocator that implement allocations that return a properly
typed pointer. For BumpPtrAllocator, the allocated memory is
automatically aligned to the minimum alignment of the type (as
calculated by llvm::AlignOf::Alignment).
llvm-svn: 43087
2007-10-17 21:10:21 +00:00
Ted Kremenek
391b728a99
Added llvm::AlignOf, a template class whose purpose is to portably
...
compute the minimum memory alignment of arbitrary types.
llvm-svn: 43086
2007-10-17 20:56:47 +00:00
Devang Patel
b3dac3f5d9
Do not raise free() call that is called through invoke instruction.
...
llvm-svn: 43083
2007-10-17 20:12:58 +00:00
Hartmut Kaiser
2f842e613f
Fixed linker errors (unresolved externals: split<>(...)) when compiling with VC++. Please review.
...
llvm-svn: 43081
2007-10-17 18:37:09 +00:00
Dan Gohman
d0806a0508
Don't mention -enable-unsafe-fp-math in LangRef.html, as that option is
...
assumed to globally mutate the spec.
llvm-svn: 43078
2007-10-17 18:05:13 +00:00
Dan Gohman
07159205dd
Define a helper function ConstantVector::getSplatValue for testing for
...
and working with broadcasted constants.
llvm-svn: 43076
2007-10-17 17:51:30 +00:00
Hartmut Kaiser
ec8a8d1f51
Updated VC++ build system.
...
Silenced some VC warnings.
I'm getting linker errors, though: unresolved externals:
llvm::Split<class llvm::BasicBlock *,struct llvm::GraphTraits<class llvm::BasicBlock *> >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
and
llvm::Split<struct llvm::Inverse<class llvm::BasicBlock *>,struct llvm::GraphTraits<struct llvm::Inverse<class llvm::BasicBlock *> > >(class llvm::DominatorTreeBase<class llvm::BasicBlock> &,class llvm::BasicBlock *)
Where are these defined?
llvm-svn: 43073
2007-10-17 14:56:40 +00:00
Dan Gohman
8f518b9875
Add support for ISD::SELECT in SplitVectorOp.
...
llvm-svn: 43072
2007-10-17 14:48:28 +00:00
Duncan Sands
d42c812f4a
Return Expand from getOperationAction for all extended
...
types. This is needed for SIGN_EXTEND_INREG at least.
It is not clear if this is correct for other operations.
On the other hand, for the various load/store actions
it seems to correct to return the type action, as is
currently done.
Also, it seems that SelectionDAG::getValueType can be
called for extended value types; introduce a map for
holding these, since we don't really want to extend
the vector to be 2^32 pointers long!
Generalize DAGTypeLegalizer::PromoteResult_TRUNCATE
and DAGTypeLegalizer::PromoteResult_INT_EXTEND to handle
the various funky possibilities that apints introduce,
for example that you can promote to a type that needs
to be expanded.
llvm-svn: 43071
2007-10-17 13:49:58 +00:00
Devang Patel
91ff13edcc
Apply "Instead of loading small c string constant, use integer constant directly" transformation while processing load instruction.
...
llvm-svn: 43070
2007-10-17 07:24:40 +00:00
Evan Cheng
0dde6e5761
Apply Chris' suggestions.
...
llvm-svn: 43069
2007-10-17 06:53:44 +00:00
Chris Lattner
12d5da49d3
Change fp to sint legalization on x86-32 to do 2 x i32
...
loads instead of 1 x i64 loads. This doesn't change any functionality yet.
llvm-svn: 43068
2007-10-17 06:17:29 +00:00
Chris Lattner
693cbeadff
fix some funny indentation, add comments.
...
llvm-svn: 43066
2007-10-17 06:02:13 +00:00
Evan Cheng
c8b5397000
One more extract_subreg coalescing bug fix.
...
llvm-svn: 43065
2007-10-17 05:29:37 +00:00
Evan Cheng
5cfc2c640f
Update comments.
...
llvm-svn: 43064
2007-10-17 02:16:40 +00:00
Evan Cheng
7587d1bd19
Yet another test case for extract_subreg coalescing crash.
...
llvm-svn: 43063
2007-10-17 02:15:06 +00:00
Evan Cheng
9b0a44a2ce
Fix MergeValueInAsValue(). It allows overlapping live ranges but should replace
...
their value numbers with the specified value number.
llvm-svn: 43062
2007-10-17 02:13:29 +00:00
Evan Cheng
a6fd8bc97e
Clean up code that calculate MBB live-in's.
...
llvm-svn: 43061
2007-10-17 02:12:22 +00:00
Evan Cheng
8b8c7c9927
Clean up code that calculate MBB live-in's.
...
llvm-svn: 43060
2007-10-17 02:10:22 +00:00
Owen Anderson
84490d44ec
Move splitBlock into DomTreeBase from DomTree.
...
llvm-svn: 43059
2007-10-17 02:03:17 +00:00
Devang Patel
8d818f5e80
Use immediate stores.
...
llvm-svn: 43055
2007-10-16 23:44:18 +00:00
Dale Johannesen
e5facd51cb
Disable attempts to constant fold PPC f128.
...
Remove the assumption that this will happen from
various places.
llvm-svn: 43053
2007-10-16 23:38:29 +00:00
Owen Anderson
7bcc28bf6c
Fix some formatting.
...
llvm-svn: 43049
2007-10-16 22:59:15 +00:00
Evan Cheng
8f644cef0f
Some clean up.
...
llvm-svn: 43043
2007-10-16 21:09:14 +00:00
Owen Anderson
4187801f85
Template DominatorTreeBase by node type. This is the next major step towards
...
having dominator information on MBB's.
llvm-svn: 43036
2007-10-16 19:59:25 +00:00
Evan Cheng
fab7ca89d5
Fix PR1734.
...
llvm-svn: 43035
2007-10-16 19:29:47 +00:00
Dale Johannesen
e43b960d3b
New test for svn rev 43033, radar 5538745.
...
llvm-svn: 43034
2007-10-16 18:10:14 +00:00
Dale Johannesen
e5530a35d4
Check for invalid cc's in f80 select.
...
llvm-svn: 43033
2007-10-16 18:09:08 +00:00
Chris Lattner
1366653e2f
Fix a bug handling frame references in ppc inline asm when the frame offset
...
doesn't fit into 16 bits.
llvm-svn: 43032
2007-10-16 18:00:18 +00:00
Duncan Sands
ce042d0bc0
Document the fact that the verifier currently requires the
...
top bit of a ValueType to be zero. Enforce this by ensuring
an assertion failure if someone tries to create a ValueType
without this property. I chose this minimal approach rather
than a more official integration of the notion of reserved
bits into ValueType because I'm hoping that the verifier will
be changed to no longer require this :)
llvm-svn: 43031
2007-10-16 13:34:11 +00:00
Duncan Sands
bbbfbe95f7
Initial infrastructure for arbitrary precision integer
...
codegen support. This should have no effect on codegen
for other types. Debatable bits: (1) the use (abuse?)
of a set in SDNode::getValueTypeList; (2) the length of
getTypeToTransformTo, which maybe should be refactored
with a non-inline part for extended value types.
llvm-svn: 43030
2007-10-16 09:56:48 +00:00
Duncan Sands
052c843559
Fixes due to lack of type-safety for ValueType: (1) ValueType
...
being passed instead of an opcode; (2) ValueType being passed
for isVolatile (!) in getLoad.
llvm-svn: 43028
2007-10-16 09:07:20 +00:00
Arnold Schwaighofer
b3d58b98d0
Correction to tail call optimization code. The new return address
...
was stored to the acutal stack slot before the parameters were
lowered to their stack slot. This could cause arguments to be
overwritten by the return address if the called function had less
parameters than the caller function. The update should remove the
last failing test case of llc-beta: SPASS.
llvm-svn: 43027
2007-10-16 09:05:00 +00:00
Evan Cheng
ecf62cb763
Code clean up.
...
llvm-svn: 43026
2007-10-16 08:04:24 +00:00
Chris Lattner
cece03dd89
implement promotion of select and select_cc, allowing MallocBench/gs to
...
work with type promotion on x86.
llvm-svn: 43025
2007-10-16 03:00:22 +00:00
Dan Gohman
9aa4fc5cd6
Teach IntrinsicLowering.cpp about the sin, cos, and pow intrinsics.
...
llvm-svn: 43020
2007-10-15 22:07:31 +00:00
Evan Cheng
04c44712d3
Make CalcLatency() non-recursive.
...
llvm-svn: 43017
2007-10-15 21:33:22 +00:00
Dan Gohman
a8656d4798
Fix a typo in a comment.
...
llvm-svn: 43016
2007-10-15 21:10:03 +00:00
Dan Gohman
d4f2165007
Document the -view-sunit-dags option.
...
llvm-svn: 43015
2007-10-15 21:07:59 +00:00
Dan Gohman
b6324c1243
Document the new llvm.sin, llvm.cos, and llvm.pow intrinsics. Feedback
...
is welcome!
llvm-svn: 43007
2007-10-15 20:30:11 +00:00
Chris Lattner
06a4954e6e
Change LowerFP_TO_SINT to create the specific code it needs instead of
...
unconditionally creating an i64 bitcast. With the future legalizer
design, operation legalization can't introduce new nodes with illegal
types.
This fixes the rest of olden on ppc32.
llvm-svn: 43005
2007-10-15 20:14:52 +00:00
Evan Cheng
7bcfd8f880
LowerFP_TO_SINT must not create a stack object if it's not needed.
...
llvm-svn: 43004
2007-10-15 20:11:21 +00:00
Devang Patel
324fe8904f
Add removeModuleProvider()
...
llvm-svn: 43002
2007-10-15 19:56:32 +00:00
Dan Gohman
e862243e1c
Reapply the fix in 42908 for this file. This changes the function names
...
from "test" to "foo" so that they don't match the grep -i ST.
llvm-svn: 43001
2007-10-15 19:22:17 +00:00
Ted Kremenek
7bbc582bb3
Fixed incorrect renaming of method name (forgot two characters).
...
llvm-svn: 42999
2007-10-15 19:15:48 +00:00
Ted Kremenek
fcce4f378f
Added more doxygen comments.
...
Renamed internal method of ImutAVLTree::RemoveMutableFlag to MarkImmutable.
Added enum for bit manipulation (more self-documentating).
llvm-svn: 42998
2007-10-15 18:52:34 +00:00
Evan Cheng
a5abba65b6
Fix PR1729: watch out for val# with no def.
...
llvm-svn: 42996
2007-10-15 18:33:50 +00:00
Chris Lattner
d6f7d44eae
Move CreateStackTemporary out to SelectionDAG
...
llvm-svn: 42995
2007-10-15 17:48:57 +00:00
Chris Lattner
9eb7a829e6
add a new CreateStackTemporary helper method.
...
llvm-svn: 42994
2007-10-15 17:47:20 +00:00
Chris Lattner
9d5b131e70
implement promotion of BR_CC operands, fixing bisort on ppc.
...
llvm-svn: 42992
2007-10-15 17:16:12 +00:00
Chris Lattner
8555e69def
updates from duncan
...
llvm-svn: 42991
2007-10-15 16:46:29 +00:00
Tanya Lattner
9486b19066
Fix run line.
...
llvm-svn: 42990
2007-10-15 16:35:13 +00:00
Devang Patel
80b1222274
New test.
...
llvm-svn: 42986
2007-10-15 15:41:07 +00:00
Devang Patel
bff4aea328
Achieve same result but use fewer lines of code.
...
llvm-svn: 42985
2007-10-15 15:31:35 +00:00
Neil Booth
9130551996
Fast-track obviously over-large and over-small exponents during decimal->
...
integer conversion. In some such cases this makes us one or two orders
of magnitude faster than NetBSD's libc. Glibc seems to have a similar
fast path.
Also, tighten up some upper bounds to save a bit of memory.
llvm-svn: 42984
2007-10-15 15:00:55 +00:00
Duncan Sands
f6977d9842
Fix some typos. Call getTypeToTransformTo rather than
...
getTypeToExpandTo. The difference is that
getTypeToExpandTo gives the final result of expansion
(eg: i128 -> i32 on a 32 bit machine) while
getTypeToTransformTo does just one step (i128 -> i64).
llvm-svn: 42982
2007-10-15 13:30:18 +00:00