Evan Cheng [Fri, 26 Oct 2007 01:56:11 +0000 (01:56 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43375
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Thu, 25 Oct 2007 23:49:14 +0000 (23:49 +0000)]
Silenced a VC++ warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43374
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Oct 2007 23:40:35 +0000 (23:40 +0000)]
Updated backpatching during object deserialization to support "smart"
pointers that employ unused bits in a pointer to store extra data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43373
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Thu, 25 Oct 2007 23:15:31 +0000 (23:15 +0000)]
Clarified operator precedence.
Silenced VC++ warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43372
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Thu, 25 Oct 2007 22:57:48 +0000 (22:57 +0000)]
Disambiguated variable name to comply with VC++'s archaic variable scoping rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43369
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Thu, 25 Oct 2007 22:56:13 +0000 (22:56 +0000)]
Updated VC++ build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43368
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Oct 2007 22:45:20 +0000 (22:45 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43367
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 25 Oct 2007 21:54:43 +0000 (21:54 +0000)]
Support non-POSIX hosts by removing use of strncasecmp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43364
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2007 19:49:32 +0000 (19:49 +0000)]
Changed XXX to FIXME, and added comment to the README file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43359
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Oct 2007 18:42:52 +0000 (18:42 +0000)]
Added special treatment of serializing NULL pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43357
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Oct 2007 18:38:24 +0000 (18:38 +0000)]
Remove code that's commented out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43356
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2007 18:23:45 +0000 (18:23 +0000)]
Added comment explaining why we are doing this check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43353
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Oct 2007 18:19:29 +0000 (18:19 +0000)]
Created header file to include minimal forward references needed for
object serialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Oct 2007 18:05:29 +0000 (18:05 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Oct 2007 17:52:39 +0000 (17:52 +0000)]
some minor edits, link to Passes.html, make one point
I forgot about yesterday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43350
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Oct 2007 16:09:09 +0000 (16:09 +0000)]
Added Serialization.h, Serialize.h, Deserialize.h, Serialize.cpp, and
Deserialize.cpp to the XCode project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43345
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 25 Oct 2007 12:35:51 +0000 (12:35 +0000)]
Small formatting changes. Add a sanity check.
Use NVT rather than looking it up, since we have
it to hand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43341
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 25 Oct 2007 12:32:31 +0000 (12:32 +0000)]
Promote SETCC operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43340
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 25 Oct 2007 12:30:51 +0000 (12:30 +0000)]
Correctly extract the ValueType from a VTSDNode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43339
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 25 Oct 2007 12:28:12 +0000 (12:28 +0000)]
Fix comment typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43338
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 25 Oct 2007 10:18:27 +0000 (10:18 +0000)]
Fleshing out docs/Passes.html for some analyses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43337
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 25 Oct 2007 09:11:16 +0000 (09:11 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43336
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 25 Oct 2007 08:58:56 +0000 (08:58 +0000)]
Passes.html now 'passes' validation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43335
91177308-0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Thu, 25 Oct 2007 08:46:12 +0000 (08:46 +0000)]
Bringing Passes.html structurally up-to-date, and enabling
semi-automated maintenance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43334
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 25 Oct 2007 06:50:30 +0000 (06:50 +0000)]
Fix an obvious typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43333
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 25 Oct 2007 06:49:29 +0000 (06:49 +0000)]
More tutorial cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43332
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 25 Oct 2007 06:45:01 +0000 (06:45 +0000)]
Add proper footers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43331
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 25 Oct 2007 06:41:23 +0000 (06:41 +0000)]
Don't bother providing code samples. Maintaining zip files in the repository is a pain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43330
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Oct 2007 06:23:36 +0000 (06:23 +0000)]
Add chapter 4, feedback appreciated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43329
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Oct 2007 05:19:24 +0000 (05:19 +0000)]
remove unimplemented ctor, add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43328
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Oct 2007 04:30:35 +0000 (04:30 +0000)]
Run the verifier on generated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43327
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 25 Oct 2007 02:36:18 +0000 (02:36 +0000)]
Fix for PR1741.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43326
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 25 Oct 2007 00:50:14 +0000 (00:50 +0000)]
Testcase for PR 1397.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43323
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 25 Oct 2007 00:16:57 +0000 (00:16 +0000)]
Make it possible for DomTreeBase to be constructed from MachineFunction's as well as just Function's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43321
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Oct 2007 00:10:21 +0000 (00:10 +0000)]
Implemented prototype serialization of pointers, including support
for backpatching.
Added Deserialize::ReadVal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43319
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 24 Oct 2007 22:26:08 +0000 (22:26 +0000)]
Another expansion for i64 multiply, suitable for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43314
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 24 Oct 2007 20:58:14 +0000 (20:58 +0000)]
This was failing on Darwin, which defaults to PIC;
no lea was generated. I think this follows the intent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43312
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 24 Oct 2007 20:14:50 +0000 (20:14 +0000)]
Fix off by 1 bug in printf->puts lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43309
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 24 Oct 2007 19:06:40 +0000 (19:06 +0000)]
Split Serialization.h into separate headers: Serialize.h and
Deserialize.h Serialization.h now includes trait speciailizations for
unsigned long, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43307
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 18:54:45 +0000 (18:54 +0000)]
simplify some code by using the new isNaN predicate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43305
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 18:54:28 +0000 (18:54 +0000)]
add a nice predicate to check to see if nan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43304
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 24 Oct 2007 16:06:42 +0000 (16:06 +0000)]
Update Makefile to use simpler llvm-config parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43292
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 24 Oct 2007 16:04:08 +0000 (16:04 +0000)]
Update Makefile to use simpler llvm-config parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43291
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 06:25:09 +0000 (06:25 +0000)]
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 :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43290
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 05:38:08 +0000 (05:38 +0000)]
Implement a couple of foldings for ordered and unordered comparisons,
implementing cases related to PR1738.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 05:09:48 +0000 (05:09 +0000)]
further simplify run options, thanks to gordonh for pointing this out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43288
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 04:37:23 +0000 (04:37 +0000)]
Fix instructions now that PR1739 is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Oct 2007 04:35:54 +0000 (04:35 +0000)]
Fix PR1739.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43286
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Wed, 24 Oct 2007 00:13:40 +0000 (00:13 +0000)]
Added VC++ solution file allowing to build clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43279
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Wed, 24 Oct 2007 00:06:31 +0000 (00:06 +0000)]
Silenced a VC++ warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43276
91177308-0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Tue, 23 Oct 2007 23:57:01 +0000 (23:57 +0000)]
Updated VC++ build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43275
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 23 Oct 2007 23:36:57 +0000 (23:36 +0000)]
Fix comment and use the "Size" variable that's already provided.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43271
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 23 Oct 2007 23:32:40 +0000 (23:32 +0000)]
If there's an unaligned memcpy to/from the stack, don't lower it. Just call the
memcpy library function instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43270
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 23 Oct 2007 23:20:14 +0000 (23:20 +0000)]
Disable a couple more things for ppcf128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43267
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Oct 2007 22:17:03 +0000 (22:17 +0000)]
Added "ReadEnum" and "WriteEnum" to serialization classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43265
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 23 Oct 2007 22:04:26 +0000 (22:04 +0000)]
This broke lots. Reverting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43264
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 21:42:49 +0000 (21:42 +0000)]
Make DomTreeBase not a FunctionPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43263
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 23 Oct 2007 21:30:25 +0000 (21:30 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43262
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 23 Oct 2007 21:29:33 +0000 (21:29 +0000)]
Added preliminary implementation of generic object serialization to bitcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43261
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 21:04:37 +0000 (21:04 +0000)]
Unbreak the build. Forgot to commit this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43260
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 20:58:37 +0000 (20:58 +0000)]
Make DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43259
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 Oct 2007 20:14:40 +0000 (20:14 +0000)]
It's possible to commute instrctions with more than 3 operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43256
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 18:07:23 +0000 (18:07 +0000)]
new testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43252
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 17:56:04 +0000 (17:56 +0000)]
llvm/test programs should not be execution programs. This
will hopefully fix Gabor's Sparc problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43251
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 Oct 2007 06:51:50 +0000 (06:51 +0000)]
isSubRegOf() is a dup of isSubRegister.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43249
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 Oct 2007 06:42:42 +0000 (06:42 +0000)]
Temporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with right callee-saved defs set for ppc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 06:30:50 +0000 (06:30 +0000)]
Fix validation problems, which were somewhat ironically in the "valid html" button code :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43247
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 06:27:55 +0000 (06:27 +0000)]
add a skeleton for part 4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43246
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 06:23:57 +0000 (06:23 +0000)]
complete the codegen chapter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43245
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 06:22:21 +0000 (06:22 +0000)]
Now with valid HTML 4.01!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43244
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 06:17:39 +0000 (06:17 +0000)]
Add a link to the "writing an optimization" tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43243
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 06:05:37 +0000 (06:05 +0000)]
Add downloadable code sample for tutorial 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43242
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 06:03:24 +0000 (06:03 +0000)]
Add the second of the "basic topics" tutorials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43241
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 23 Oct 2007 06:02:14 +0000 (06:02 +0000)]
Reorder the optimization and bitcode tutorials.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43240
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 05:43:01 +0000 (05:43 +0000)]
Fix up a broken #include, move code to its own section, add conclusions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43239
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 04:51:30 +0000 (04:51 +0000)]
Finish up expr codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43238
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Oct 2007 04:27:44 +0000 (04:27 +0000)]
several improvements suggested by Dan, thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43237
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 22 Oct 2007 22:11:27 +0000 (22:11 +0000)]
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43234
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 22 Oct 2007 20:44:10 +0000 (20:44 +0000)]
The #include <iterator> isn't needed in this header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43232
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 22 Oct 2007 20:40:42 +0000 (20:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43231
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 22 Oct 2007 20:22:24 +0000 (20:22 +0000)]
Fix the folding of multiplication into addresses on x86, which was broken
by the recent {U,S}MUL_LOHI changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43230
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 22 Oct 2007 19:46:19 +0000 (19:46 +0000)]
Use ptr type in the immediate field of a BxA instruction so we don't end up selecting 32-bit call instruction for ppc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43228
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 22 Oct 2007 19:42:28 +0000 (19:42 +0000)]
Add missing paratheses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43227
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 19:41:46 +0000 (19:41 +0000)]
add a 'don't use me' marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43226
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 22 Oct 2007 19:00:05 +0000 (19:00 +0000)]
Support for expanding extending loads of integers with
funky bit-widths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43225
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 22 Oct 2007 18:31:58 +0000 (18:31 +0000)]
Move the SCEV object factors from being static members of the individual
SCEV subclasses to being non-static member functions of the ScalarEvolution
class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43224
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 22 Oct 2007 18:26:21 +0000 (18:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43223
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 16:44:31 +0000 (16:44 +0000)]
fit in 80 cols :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43222
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 07:01:42 +0000 (07:01 +0000)]
start of chapter 3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43221
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 22 Oct 2007 06:48:28 +0000 (06:48 +0000)]
Fix a few typos I noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43220
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 22 Oct 2007 06:35:07 +0000 (06:35 +0000)]
Add downloadable code samples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43219
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 06:34:15 +0000 (06:34 +0000)]
Check in part 2: parser and ast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43218
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 22 Oct 2007 06:29:31 +0000 (06:29 +0000)]
Fix some code to make it actually work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43217
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 22 Oct 2007 05:10:05 +0000 (05:10 +0000)]
Put correct link in example
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 04:32:37 +0000 (04:32 +0000)]
add part 1, review appreciated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 03:19:07 +0000 (03:19 +0000)]
add an outline for "part 2".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 03:12:24 +0000 (03:12 +0000)]
rename tutorial 1 -> JITTutorial1, make unimplemented links not be dead links.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43213
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 22 Oct 2007 03:03:20 +0000 (03:03 +0000)]
Fix an unfolding bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43212
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 22 Oct 2007 03:01:44 +0000 (03:01 +0000)]
- Only perform the unfolding optimization when the folding in question is modref.
- Remove a bogus assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43211
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 22 Oct 2007 02:50:12 +0000 (02:50 +0000)]
add a mechanism for the JIT to invoke a function to lazily create functions as they are referenced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43210
91177308-0d34-0410-b5e6-
96231b3b80d8