oota-llvm.git
17 years agoSupport non-POSIX hosts by removing use of strncasecmp.
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

17 years agoChanged XXX to FIXME, and added comment to the README file
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

17 years agoAdded special treatment of serializing NULL pointers.
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

17 years agoRemove code that's commented out.
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

17 years agoAdded comment explaining why we are doing this check.
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

17 years agoCreated header file to include minimal forward references needed for
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

17 years agotypo
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

17 years agosome minor edits, link to Passes.html, make one point
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

17 years agoAdded Serialization.h, Serialize.h, Deserialize.h, Serialize.cpp, and
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

17 years agoSmall formatting changes. Add a sanity check.
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

17 years agoPromote SETCC operands.
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

17 years agoCorrectly extract the ValueType from a VTSDNode.
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

17 years agoFix comment typos.
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

17 years agoFleshing out docs/Passes.html for some analyses.
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

17 years agoIf a loop termination compare instruction is the only use of its stride,
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

17 years agoPasses.html now 'passes' validation.
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

17 years agoBringing Passes.html structurally up-to-date, and enabling
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

17 years agoFix an obvious typo.
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

17 years agoMore tutorial cleanups.
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

17 years agoAdd proper footers.
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

17 years agoDon't bother providing code samples. Maintaining zip files in the repository is...
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

17 years agoAdd chapter 4, feedback appreciated.
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

17 years agoremove unimplemented ctor, add some comments.
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

17 years agoRun the verifier on generated code.
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

17 years agoFix for PR1741.
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

17 years agoTestcase for PR 1397.
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

17 years agoMake it possible for DomTreeBase to be constructed from MachineFunction's as well...
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

17 years agoImplemented prototype serialization of pointers, including support
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

17 years agoAnother expansion for i64 multiply, suitable for PPC.
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

17 years agoThis was failing on Darwin, which defaults to PIC;
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

17 years agoFix off by 1 bug in printf->puts lowering.
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

17 years agoSplit Serialization.h into separate headers: Serialize.h and
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

17 years agosimplify some code by using the new isNaN predicate
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

17 years agoadd a nice predicate to check to see if nan
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

17 years agoUpdate Makefile to use simpler llvm-config parameters.
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

17 years agoUpdate Makefile to use simpler llvm-config parameters.
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

17 years agoswitch some calls to SelectionDAG::getTargetNode to use
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

17 years agoImplement a couple of foldings for ordered and unordered comparisons,
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

17 years agofurther simplify run options, thanks to gordonh for pointing this out
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

17 years agoFix instructions now that PR1739 is fixed.
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

17 years agoFix PR1739.
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

17 years agoAdded VC++ solution file allowing to build clang.
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

17 years agoSilenced a VC++ warning.
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

17 years agoUpdated VC++ build system
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

17 years agoFix comment and use the "Size" variable that's already provided.
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

17 years agoIf there's an unaligned memcpy to/from the stack, don't lower it. Just call the
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

17 years agoDisable a couple more things for ppcf128.
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

17 years agoAdded "ReadEnum" and "WriteEnum" to serialization classes.
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

17 years agoThis broke lots. Reverting.
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

17 years agoMake DomTreeBase not a FunctionPass.
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

17 years agoLowering a memcpy to the stack is killing PPC. The ARM and X86 backends already
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

17 years agoAdded preliminary implementation of generic object serialization to bitcode.
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

17 years agoUnbreak the build. Forgot to commit this file.
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

17 years agoMake DomTree and PostDomTree thin wrappers around DomTreeBase, rather than inheriting...
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

17 years agoIt's possible to commute instrctions with more than 3 operands.
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

17 years agonew testcase
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

17 years agollvm/test programs should not be execution programs. This
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

17 years agoisSubRegOf() is a dup of isSubRegister.
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

17 years agoTemporary solution: added a different set of BCTRL_Macho / BCTRL_ELF with right calle...
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

17 years agoFix validation problems, which were somewhat ironically in the "valid html" button...
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

17 years agoadd a skeleton for part 4
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

17 years agocomplete the codegen chapter
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

17 years agoNow with valid HTML 4.01!
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

17 years agoAdd a link to the "writing an optimization" tutorial.
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

17 years agoAdd downloadable code sample for tutorial 2.
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

17 years agoAdd the second of the "basic topics" tutorials.
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

17 years agoReorder the optimization and bitcode tutorials.
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

17 years agoFix up a broken #include, move code to its own section, add conclusions.
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

17 years agoFinish up expr codegen.
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

17 years agoseveral improvements suggested by Dan, thanks!
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

17 years agoFix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
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

17 years agoThe #include <iterator> isn't needed in this header.
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

17 years agoStrength reduction improvements.
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

17 years agoFix the folding of multiplication into addresses on x86, which was broken
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

17 years agoUse ptr type in the immediate field of a BxA instruction so we don't end up selecting...
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

17 years agoAdd missing paratheses.
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

17 years agoadd a 'don't use me' marker.
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

17 years agoSupport for expanding extending loads of integers with
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

17 years agoMove the SCEV object factors from being static members of the individual
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

17 years agoFix up the logic for result expanding the various extension
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

17 years agofit in 80 cols :)
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

17 years agostart of chapter 3
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

17 years agoFix a few typos I noticed.
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

17 years agoAdd downloadable code samples.
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

17 years agoCheck in part 2: parser and ast.
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

17 years agoFix some code to make it actually work.
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

17 years agoPut correct link in example
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

17 years agoadd part 1, review appreciated.
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

17 years agoadd an outline for "part 2".
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

17 years agorename tutorial 1 -> JITTutorial1, make unimplemented links not be dead links.
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

17 years agoFix an unfolding bug.
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

17 years ago- Only perform the unfolding optimization when the folding in question is modref.
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

17 years agoadd a mechanism for the JIT to invoke a function to lazily create functions as they...
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

17 years agollvm-gcc3 is dead, along with it __main.
Chris Lattner [Mon, 22 Oct 2007 02:39:47 +0000 (02:39 +0000)]
llvm-gcc3 is dead, along with it __main.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43209 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoReg2Mem cleanup and optimizations:
Anton Korobeynikov [Sun, 21 Oct 2007 23:05:16 +0000 (23:05 +0000)]
Reg2Mem cleanup and optimizations:
 - enable phi instructions demotion to stack
 - create alloca instructions in the entry block

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43208 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoLoadLibraryPermanently doesn't throw.
Chris Lattner [Sun, 21 Oct 2007 22:58:11 +0000 (22:58 +0000)]
LoadLibraryPermanently doesn't throw.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43207 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd a convenience method for creating EE's.
Chris Lattner [Sun, 21 Oct 2007 22:57:11 +0000 (22:57 +0000)]
Add a convenience method for creating EE's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43206 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAllow for copysign having f80 second argument.
Dale Johannesen [Sun, 21 Oct 2007 01:07:44 +0000 (01:07 +0000)]
Allow for copysign having f80 second argument.
Fixes 5550319.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43205 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoAdd promote operand support for [su]int_to_fp.
Chris Lattner [Sat, 20 Oct 2007 22:57:56 +0000 (22:57 +0000)]
Add promote operand support for [su]int_to_fp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43204 91177308-0d34-0410-b5e6-96231b3b80d8

17 years agoSome improvements based on feedback from Anders.
Owen Anderson [Sat, 20 Oct 2007 06:12:33 +0000 (06:12 +0000)]
Some improvements based on feedback from Anders.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43203 91177308-0d34-0410-b5e6-96231b3b80d8