oota-llvm.git
17 years agoReverted patch 44199:
Ted Kremenek [Sat, 17 Nov 2007 03:34:33 +0000 (03:34 +0000)]
Reverted patch 44199:

http://llvm.org/viewvc/llvm-project?rev=44199&view=rev

This patch completely broke serialization due to an invariant I assumed but
did not hold. The assumed invariant was that all pointer IDs emitted by a call
to BatchEmitOwnedPtrs would be consecutive. This is only the case if there has
been no forward references to an owned pointer (and hence already registered
with the Serializer object).

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

17 years agoRemove indeterminism from a loop. We think this will
Dale Johannesen [Sat, 17 Nov 2007 02:48:01 +0000 (02:48 +0000)]
Remove indeterminism from a loop.  We think this will
fix an occasional nonrepeatable bootstrap failure we've
been seeing on Darwin.

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

17 years agoFix denormal check in float->APInt conversion.
Dale Johannesen [Sat, 17 Nov 2007 01:02:27 +0000 (01:02 +0000)]
Fix denormal check in float->APInt conversion.
PR 1804.

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

17 years agoChanged implementation of Serialize::EmitDiffPtrID and
Ted Kremenek [Sat, 17 Nov 2007 00:45:37 +0000 (00:45 +0000)]
Changed implementation of Serialize::EmitDiffPtrID and
Deserialize::ReadDiffPtrID to read and emit bools instead of unsigned
integers. This should result in a nice space optimization once we have
"auto-abbreviation" generation in place.

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

17 years agoImplemented optimization for BatchEmitOwnedPtrs that we only emit one complete
Ted Kremenek [Sat, 17 Nov 2007 00:40:45 +0000 (00:40 +0000)]
Implemented optimization for BatchEmitOwnedPtrs that we only emit one complete
SerializedPtrID, followed by the *differences* in IDs. The big idea is that
most IDs will be just be 1 off from the previous (either that or NULL, which
we encode as a difference if 0), so this will greatly reduce the encoding
space for extra IDs to just 1 bit per pointer.

So far this optimization reduces serialization of Carbon.h by only 1%, but
we aren't using any abbreviations now in the Bitcode file to properly take
advantage of this optimization.

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

17 years agoLive interval splitting:
Evan Cheng [Sat, 17 Nov 2007 00:40:40 +0000 (00:40 +0000)]
Live interval splitting:

When a live interval is being spilled, rather than creating short, non-spillable
intervals for every def / use, split the interval at BB boundaries. That is, for
every BB where the live interval is defined or used, create a new interval that
covers all the defs and uses in the BB.

This is designed to eliminate one common problem: multiple reloads of the same
value in a single basic block. Note, it does *not* decrease the number of spills
since no copies are inserted so the split intervals are *connected* through
spill and reloads (or rematerialization). The newly created intervals can be
spilled again, in that case, since it does not span multiple basic blocks, it's
spilled in the usual manner. However, it can reuse the same stack slot as the
previously split interval.

This is currently controlled by -split-intervals-at-bb.

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

17 years agoShrinkfy.
Evan Cheng [Sat, 17 Nov 2007 00:31:16 +0000 (00:31 +0000)]
Shrinkfy.

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

17 years agoTypo.
Evan Cheng [Fri, 16 Nov 2007 23:55:08 +0000 (23:55 +0000)]
Typo.

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

17 years agoTestcase from PR 1508 (although its's somewhat
Dale Johannesen [Fri, 16 Nov 2007 23:16:35 +0000 (23:16 +0000)]
Testcase from PR 1508 (although its's somewhat
orthogonal to the main problem there)

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

17 years agoFix for PR1801
Tanya Lattner [Fri, 16 Nov 2007 22:44:50 +0000 (22:44 +0000)]
Fix for PR1801

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

17 years agoThese were implemented
Anton Korobeynikov [Fri, 16 Nov 2007 11:12:01 +0000 (11:12 +0000)]
These were implemented

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

17 years agoFix PR1800 by correcting mistaken logic.
Chris Lattner [Fri, 16 Nov 2007 06:04:17 +0000 (06:04 +0000)]
Fix PR1800 by correcting mistaken logic.

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

17 years agofix a typo
Chris Lattner [Fri, 16 Nov 2007 05:32:05 +0000 (05:32 +0000)]
fix a typo

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

17 years agoImplement codegen for flt_rounds on x86
Anton Korobeynikov [Fri, 16 Nov 2007 01:31:51 +0000 (01:31 +0000)]
Implement codegen for flt_rounds on x86

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

17 years agoImplement necessary bits for flt_rounds gcc builtin.
Anton Korobeynikov [Thu, 15 Nov 2007 23:25:33 +0000 (23:25 +0000)]
Implement necessary bits for flt_rounds gcc builtin.
Codegen bits and llvm-gcc support will follow.

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

17 years agoBasic non-power-of-2 vector support
Nate Begeman [Thu, 15 Nov 2007 21:15:26 +0000 (21:15 +0000)]
Basic non-power-of-2 vector support

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

17 years agoReverted r44163 per request
Anton Korobeynikov [Thu, 15 Nov 2007 18:33:16 +0000 (18:33 +0000)]
Reverted r44163 per request

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

17 years agoFix bugs in iterator invalidation
Daniel Berlin [Thu, 15 Nov 2007 18:06:49 +0000 (18:06 +0000)]
Fix bugs in iterator invalidation

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

17 years agoThis assertion was bogus.
Duncan Sands [Thu, 15 Nov 2007 09:54:37 +0000 (09:54 +0000)]
This assertion was bogus.

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

17 years agoFix a thinko in post-allocation coalescer.
Evan Cheng [Thu, 15 Nov 2007 08:13:29 +0000 (08:13 +0000)]
Fix a thinko in post-allocation coalescer.

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

17 years agoFix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
Nick Lewycky [Thu, 15 Nov 2007 06:30:50 +0000 (06:30 +0000)]
Fix handling of overflow in loop calculation by adding new UDiv SCEV. This SCEV
is disabled in the sense that it will refuse to create one from a UDiv
instruction, until the code is better tested.

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

17 years agoFix PR1788 by taking the approach suggested by Richard Smith.
Chris Lattner [Thu, 15 Nov 2007 06:10:55 +0000 (06:10 +0000)]
Fix PR1788 by taking the approach suggested by Richard Smith.
Thanks to him for his detailed analysis of the problem.

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

17 years agoImport the boost scoped_ptr class to LLVM. This patch was prepared by
Chris Lattner [Thu, 15 Nov 2007 05:57:06 +0000 (05:57 +0000)]
Import the boost scoped_ptr class to LLVM.  This patch was prepared by
Cédric Venet.

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

17 years agoMore templatization.
Owen Anderson [Thu, 15 Nov 2007 05:00:15 +0000 (05:00 +0000)]
More templatization.

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

17 years agomany edits, patch by Kelly Wilson!
Chris Lattner [Thu, 15 Nov 2007 04:51:31 +0000 (04:51 +0000)]
many edits, patch by Kelly Wilson!

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

17 years agoAdding debug output during coalescing.
Bill Wendling [Thu, 15 Nov 2007 02:06:30 +0000 (02:06 +0000)]
Adding debug output during coalescing.

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

17 years agoNeed to increment the iterator.
Bill Wendling [Thu, 15 Nov 2007 00:40:48 +0000 (00:40 +0000)]
Need to increment the iterator.

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

17 years agoFixed serious bug in BatchReadOwnedPtrs where in a chain of calls to
Ted Kremenek [Thu, 15 Nov 2007 00:05:03 +0000 (00:05 +0000)]
Fixed serious bug in BatchReadOwnedPtrs where in a chain of calls to
deserialize objects if BatchReadOwnedPtrs was called more than once in the
same call chain then the second call would overwrite the SerializedPtrIDs
being used by the first call. Solved this problem by making the vector that
holds the pointer IDs local to a function call. Now BatchReadOwnedPtrs is
reentrant.

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

17 years agoI discover array_lengthof, thanks to gabor on #llvm.
Duncan Sands [Wed, 14 Nov 2007 21:58:02 +0000 (21:58 +0000)]
I discover array_lengthof, thanks to gabor on #llvm.

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

17 years agoTweak the descriptions of the new 'const' and 'pure' attributes.
Duncan Sands [Wed, 14 Nov 2007 21:14:02 +0000 (21:14 +0000)]
Tweak the descriptions of the new 'const' and 'pure' attributes.

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

17 years agoOops. Debugging code shouldn't have been checked in.
Evan Cheng [Wed, 14 Nov 2007 19:08:32 +0000 (19:08 +0000)]
Oops. Debugging code shouldn't have been checked in.

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

17 years agoRemoved debug #define that was accidentally checked in while debugging
Ted Kremenek [Wed, 14 Nov 2007 17:42:09 +0000 (17:42 +0000)]
Removed debug #define that was accidentally checked in while debugging
the deserializer.

Fixed assertion when "stream jumping" in the deserializer to properly function
when we have reached the end of the stream.

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

17 years agoSimplify the attribute verification code.
Duncan Sands [Wed, 14 Nov 2007 14:02:11 +0000 (14:02 +0000)]
Simplify the attribute verification code.

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

17 years agoUn XFAIL these tests, now that Bill has backported
Duncan Sands [Wed, 14 Nov 2007 13:40:53 +0000 (13:40 +0000)]
Un XFAIL these tests, now that Bill has backported
the fix from 4.2.

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

17 years agoDocument pure/const parameter attributes
Anton Korobeynikov [Wed, 14 Nov 2007 10:30:13 +0000 (10:30 +0000)]
Document pure/const parameter attributes

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

17 years agoRegenerate
Anton Korobeynikov [Wed, 14 Nov 2007 09:53:48 +0000 (09:53 +0000)]
Regenerate

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

17 years agoAdd pure/const attributes. Documentation will follow.
Anton Korobeynikov [Wed, 14 Nov 2007 09:52:30 +0000 (09:52 +0000)]
Add pure/const attributes. Documentation will follow.

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

17 years agoFix PIC jump table codegen on x86-32/linux. In fact, such thing should be applied
Anton Korobeynikov [Wed, 14 Nov 2007 09:18:41 +0000 (09:18 +0000)]
Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be applied
to all targets uses GOT-relative offsets for PIC (Alpha?)

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

17 years agoEliminate the recently introduced CCAssignToStackABISizeAlign
Duncan Sands [Wed, 14 Nov 2007 08:29:13 +0000 (08:29 +0000)]
Eliminate the recently introduced CCAssignToStackABISizeAlign
in favour of teaching CCAssignToStack that size 0 and/or align
0 means to use the ABI values.  This seems a neater solution.
It is safe since no legal value type has size 0.

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

17 years agoAdded two new overloaded versions of BatchEmitOwnedPtrs and
Ted Kremenek [Wed, 14 Nov 2007 08:05:03 +0000 (08:05 +0000)]
Added two new overloaded versions of BatchEmitOwnedPtrs and
BatchReadOwnedPtrs.

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

17 years agoClean up sub-register implementation by moving subReg information back to
Evan Cheng [Wed, 14 Nov 2007 07:59:08 +0000 (07:59 +0000)]
Clean up sub-register implementation by moving subReg information back to
MachineOperand auxInfo. Previous clunky implementation uses an external map
to track sub-register uses. That works because register allocator uses
a new virtual register for each spilled use. With interval splitting (coming
soon), we may have multiple uses of the same register some of which are
of using different sub-registers from others. It's too fragile to constantly
update the information.

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

17 years agoXFAIL these tests until the fix gets backported
Duncan Sands [Wed, 14 Nov 2007 07:42:50 +0000 (07:42 +0000)]
XFAIL these tests until the fix gets backported
from llvm-gcc-4.2 to 4.0.

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

17 years agoDocument a limitation, patch contributed by George Russell
Chris Lattner [Wed, 14 Nov 2007 07:04:44 +0000 (07:04 +0000)]
Document a limitation, patch contributed by George Russell

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

17 years agoAllow the block extractor take to take a list of basic blocks to not extract
Nick Lewycky [Wed, 14 Nov 2007 06:47:06 +0000 (06:47 +0000)]
Allow the block extractor take to take a list of basic blocks to not extract
from a file containing Function/BasicBlock pairings. This is not safe against
anonymous or abnormally-named Funcs or BBs.

Make bugpoint use this interface to pass the BBs list to the child bugpoint.

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

17 years agoImplement PR1796 and Transforms/SimplifyCFG/noreturn-call.ll
Chris Lattner [Wed, 14 Nov 2007 06:19:25 +0000 (06:19 +0000)]
Implement PR1796 and Transforms/SimplifyCFG/noreturn-call.ll
by inserting unreachable after no-return calls.

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

17 years agoStart the process of making MachineLoopInfo possible by templating Loop.
Owen Anderson [Wed, 14 Nov 2007 02:33:58 +0000 (02:33 +0000)]
Start the process of making MachineLoopInfo possible by templating Loop.

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

17 years agoFixed a compilation error.
Hartmut Kaiser [Tue, 13 Nov 2007 23:04:28 +0000 (23:04 +0000)]
Fixed a compilation error.

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

17 years agoFixed a strange construct. Please review.
Hartmut Kaiser [Tue, 13 Nov 2007 23:04:06 +0000 (23:04 +0000)]
Fixed a strange construct. Please review.

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

17 years agoUpdated VC++ build system
Hartmut Kaiser [Tue, 13 Nov 2007 23:03:32 +0000 (23:03 +0000)]
Updated VC++ build system

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

17 years agoFix the regression on Transforms/GlobalOpt/deadglobal-2.ll from my
Chris Lattner [Tue, 13 Nov 2007 21:46:23 +0000 (21:46 +0000)]
Fix the regression on Transforms/GlobalOpt/deadglobal-2.ll from my
patch on friday.

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

17 years agoupgrade test
Chris Lattner [Tue, 13 Nov 2007 21:42:48 +0000 (21:42 +0000)]
upgrade test

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

17 years agoRun computeDomForest() on the set of registers that need to be tested for
Owen Anderson [Tue, 13 Nov 2007 20:13:24 +0000 (20:13 +0000)]
Run computeDomForest() on the set of registers that need to be tested for
interference.

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

17 years agoPreserve LiveVariables when doing critical edge splitting.
Owen Anderson [Tue, 13 Nov 2007 20:04:45 +0000 (20:04 +0000)]
Preserve LiveVariables when doing critical edge splitting.

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

17 years agoWow. I definitely shouldn't write code when I'm tird.
Owen Anderson [Tue, 13 Nov 2007 19:56:28 +0000 (19:56 +0000)]
Wow.  I definitely shouldn't write code when I'm tird.

Make my previous patch actually do what it was intended to do.

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

17 years agoRevert previous; these files aren't ready to go in yet.
Dale Johannesen [Tue, 13 Nov 2007 19:16:02 +0000 (19:16 +0000)]
Revert previous; these files aren't ready to go in yet.

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

17 years agoAdd parameter to getDwarfRegNum to permit targets
Dale Johannesen [Tue, 13 Nov 2007 19:13:01 +0000 (19:13 +0000)]
Add parameter to getDwarfRegNum to permit targets
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.

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

17 years agoMake llvm2cpp better, patch for PR1794, contributed by Zack Rusin.
Chris Lattner [Tue, 13 Nov 2007 18:22:33 +0000 (18:22 +0000)]
Make llvm2cpp better, patch for PR1794, contributed by Zack Rusin.

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

17 years agoFix x86-64 jit: remove reliance on Dwarf numbers.
Evan Cheng [Tue, 13 Nov 2007 17:54:34 +0000 (17:54 +0000)]
Fix x86-64 jit: remove reliance on Dwarf numbers.

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

17 years agoUnifacalize the CALLSEQ{START,END} stuff.
Bill Wendling [Tue, 13 Nov 2007 09:19:02 +0000 (09:19 +0000)]
Unifacalize the CALLSEQ{START,END} stuff.

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

17 years agoImplement PR1786 by iterating between dead cycle elimination
Chris Lattner [Tue, 13 Nov 2007 07:32:38 +0000 (07:32 +0000)]
Implement PR1786 by iterating between dead cycle elimination
and simplifycfg in the rare cases when it is needed.

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

17 years agoMany typos, grammaro, and wording fixes. Patch by
Chris Lattner [Tue, 13 Nov 2007 07:06:30 +0000 (07:06 +0000)]
Many typos, grammaro, and wording fixes.  Patch by
Kelly Wilson, thanks!

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

17 years agoUnify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
Bill Wendling [Tue, 13 Nov 2007 00:44:25 +0000 (00:44 +0000)]
Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).

This can only result in tears...

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

17 years agoRenamed serialization method "Materialize" to "Create". This is an API change.
Ted Kremenek [Tue, 13 Nov 2007 00:25:08 +0000 (00:25 +0000)]
Renamed serialization method "Materialize" to "Create".  This is an API change.

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

17 years agoFixed bug with inconsistent serialization/deserialization in matching
Ted Kremenek [Tue, 13 Nov 2007 00:13:57 +0000 (00:13 +0000)]
Fixed bug with inconsistent serialization/deserialization in matching
calls to BatchEmitOwnedPtrs and BatchReadOwnedPtrs.

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

17 years agoMove SYSCTL stuff close to where it's used.
Bill Wendling [Mon, 12 Nov 2007 23:55:19 +0000 (23:55 +0000)]
Move SYSCTL stuff close to where it's used.

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

17 years agoBuild universal llvm.
Devang Patel [Mon, 12 Nov 2007 23:53:43 +0000 (23:53 +0000)]
Build universal llvm.

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

17 years agoCompletely forgot, that we have some debug information emission on PPC. This should fix
Anton Korobeynikov [Mon, 12 Nov 2007 23:36:13 +0000 (23:36 +0000)]
Completely forgot, that we have some debug information emission on PPC. This should fix
some regressions on ppc nightly tests.

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

17 years agoAdded JumpTable support
Bruno Cardoso Lopes [Mon, 12 Nov 2007 19:49:57 +0000 (19:49 +0000)]
Added JumpTable support
Fixed some AsmPrinter issues
Added GLOBAL_OFFSET_TABLE Node handle.

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

17 years agoAdded versions of ReadPtr that takes an explicit SerializedPtrID. This allows
Ted Kremenek [Mon, 12 Nov 2007 19:11:15 +0000 (19:11 +0000)]
Added versions of ReadPtr that takes an explicit SerializedPtrID.  This allows
clients of the Deserializer to read the pointer ID before they are ready
to deserialize the object (which can mean registering a pointer reference
with the backpatcher).

Changed some methods that took an argument "SerializedPtrID" to "const SerializedPtrID&" (pass-by-reference).  This is to accommodate a future
revision of SerializedPtrID where it may be much fatter than an unsigned
integer.

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

17 years agoBreak critical edges coming into blocks with PHI nodes.
Owen Anderson [Mon, 12 Nov 2007 17:27:27 +0000 (17:27 +0000)]
Break critical edges coming into blocks with PHI nodes.

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

17 years agoTypo fix in the tutorial.
Gordon Henriksen [Mon, 12 Nov 2007 13:46:21 +0000 (13:46 +0000)]
Typo fix in the tutorial.

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

17 years agoCompile fix.
Duncan Sands [Mon, 12 Nov 2007 13:43:23 +0000 (13:43 +0000)]
Compile fix.

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

17 years agoAdd a flag for indirect branch instructions.
Owen Anderson [Mon, 12 Nov 2007 07:39:39 +0000 (07:39 +0000)]
Add a flag for indirect branch instructions.

Target maintainers: please check that the instructions for your target are correctly marked.

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

17 years agoRefactor some code.
Evan Cheng [Mon, 12 Nov 2007 06:35:08 +0000 (06:35 +0000)]
Refactor some code.

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

17 years agoFix rewriting of PHI nodes.
Owen Anderson [Mon, 12 Nov 2007 02:13:07 +0000 (02:13 +0000)]
Fix rewriting of PHI nodes.

Could someone more familiar with machine-level stuff review this for me?

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

17 years agoUpdated VC++ build system
Hartmut Kaiser [Mon, 12 Nov 2007 01:24:50 +0000 (01:24 +0000)]
Updated VC++ build system

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

17 years agoRemove unnecessary #include's.
Owen Anderson [Mon, 12 Nov 2007 01:19:28 +0000 (01:19 +0000)]
Remove unnecessary #include's.

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

17 years agoAs Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really need
Owen Anderson [Mon, 12 Nov 2007 01:05:09 +0000 (01:05 +0000)]
As Chris and Evan pointed out, BreakCriticalMachineEdges doesn't really need
to be a pass of its own.  Instead, move it out into a helper method.

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

17 years agoFix on 64-bit machines.
Owen Anderson [Mon, 12 Nov 2007 00:56:04 +0000 (00:56 +0000)]
Fix on 64-bit machines.

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

17 years agoClarify the meaning of '-2' register number
Anton Korobeynikov [Sun, 11 Nov 2007 19:53:50 +0000 (19:53 +0000)]
Clarify the meaning of '-2' register number

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

17 years agoUse TableGen to emit information for dwarf register numbers.
Anton Korobeynikov [Sun, 11 Nov 2007 19:50:10 +0000 (19:50 +0000)]
Use TableGen to emit information for dwarf register numbers.
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,

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

17 years agoAdd convenient helper to obtain list of ints
Anton Korobeynikov [Sun, 11 Nov 2007 11:19:37 +0000 (11:19 +0000)]
Add convenient helper to obtain list of ints

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

17 years agoAdd CCAssignToStackABISizeAlign for convenience in
Dale Johannesen [Sat, 10 Nov 2007 22:07:15 +0000 (22:07 +0000)]
Add CCAssignToStackABISizeAlign for convenience in
dealing with types whose size & alignment are
different on different subtargets.  Use it for x86 f80.

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

17 years agoFixed a bug introduced by my last patch. Now we properly clear out the BatchIDVec
Ted Kremenek [Sat, 10 Nov 2007 19:33:26 +0000 (19:33 +0000)]
Fixed a bug introduced by my last patch.  Now we properly clear out the BatchIDVec
vector before reusing it.

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

17 years agoFixed hack in BatchReadOwnedPtrs to no longer use the array of pointers passed in for
Ted Kremenek [Sat, 10 Nov 2007 19:28:49 +0000 (19:28 +0000)]
Fixed hack in BatchReadOwnedPtrs to no longer use the array of pointers passed in for
deserialization as a temporary location for storing serialized pointer identifiers. The
definition of SerializedPtrID will likely change significantly in the future, and the
current implementation caused compilation errors on some 64-bit machines.

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

17 years agoUpdated method signature to conform with the typedef in the method prototype.
Ted Kremenek [Sat, 10 Nov 2007 19:19:32 +0000 (19:19 +0000)]
Updated method signature to conform with the typedef in the method prototype.

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

17 years agoUpdate tailcall code to include inline attribute operand for memcpy.
Arnold Schwaighofer [Sat, 10 Nov 2007 10:48:01 +0000 (10:48 +0000)]
Update tailcall code to include inline attribute operand for memcpy.

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

17 years agoAdded "random access" to the Deserializer to allow a client to jump to any
Ted Kremenek [Sat, 10 Nov 2007 02:02:34 +0000 (02:02 +0000)]
Added "random access" to the Deserializer to allow a client to jump to any
serialized block in the bitstream, including a block in an entirely different
nesting than the current block. This is useful for deserializing objects from
a bitstream in an order different from the order that they were serialized.

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

17 years agoMade Deserializer a friend class of BitstreamReader.
Ted Kremenek [Sat, 10 Nov 2007 02:00:38 +0000 (02:00 +0000)]
Made Deserializer a friend class of BitstreamReader.

Moved some of the logic in BitstreamReader::ExitBlock into a utility function
BitstreamReader::PopBlockScope. The latter is a private method. It will also
be called by Deserializer to manipulate the current "block scope."

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

17 years agoAdded -test-opts to specify test options.
Evan Cheng [Sat, 10 Nov 2007 01:33:27 +0000 (01:33 +0000)]
Added -test-opts to specify test options.

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

17 years agoUpdate links.
Chris Lattner [Fri, 9 Nov 2007 21:49:08 +0000 (21:49 +0000)]
Update links.

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

17 years agoFix tests.
Evan Cheng [Fri, 9 Nov 2007 20:46:00 +0000 (20:46 +0000)]
Fix tests.

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

17 years agoFixed a strange construct. Please review.
Hartmut Kaiser [Fri, 9 Nov 2007 19:59:00 +0000 (19:59 +0000)]
Fixed a strange construct. Please review.

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

17 years agoUpdated VC++ build system
Hartmut Kaiser [Fri, 9 Nov 2007 19:54:59 +0000 (19:54 +0000)]
Updated VC++ build system

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

17 years agotry again
Chris Lattner [Fri, 9 Nov 2007 19:24:54 +0000 (19:24 +0000)]
try again

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

17 years agoUnbreak x86-64 jumptable.
Evan Cheng [Fri, 9 Nov 2007 19:11:23 +0000 (19:11 +0000)]
Unbreak x86-64 jumptable.

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

17 years agoSilence a warning
Anton Korobeynikov [Fri, 9 Nov 2007 19:06:14 +0000 (19:06 +0000)]
Silence a warning

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

17 years agoRevert previous rewrite per chris's comments.
Dale Johannesen [Fri, 9 Nov 2007 18:07:11 +0000 (18:07 +0000)]
Revert previous rewrite per chris's comments.

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

17 years agoTighten up a check for folding away loads from (newly constant) globals. This
Chris Lattner [Fri, 9 Nov 2007 17:33:02 +0000 (17:33 +0000)]
Tighten up a check for folding away loads from (newly constant) globals.  This
fixes a crash on Transforms/GlobalOpt/2007-11-09-GEP-GEP-Crash.ll and
rdar://5585488.

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

17 years agoThanks to the XTARGET line, this test should still
Duncan Sands [Fri, 9 Nov 2007 13:50:25 +0000 (13:50 +0000)]
Thanks to the XTARGET line, this test should still
be run on darwin, but I have no way of checking...

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