Bob Wilson [Fri, 24 Apr 2009 16:55:25 +0000 (16:55 +0000)]
Remove unnecessary references to f32 types. After specifying that f32
should be bit-converted to i32, it is sufficient to list only i32 in
subsequent definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69973
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Apr 2009 16:55:21 +0000 (16:55 +0000)]
Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 24 Apr 2009 16:38:13 +0000 (16:38 +0000)]
Fixed spaces and the getelementpointer example with i16 type indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69971
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Apr 2009 12:59:40 +0000 (12:59 +0000)]
Fix PR 4004 by including the call to __tls_get_addr in X86tlsaddr. This is not
very elegant, but neither is the tls specification :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69968
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 24 Apr 2009 12:40:33 +0000 (12:40 +0000)]
Revert 69952. Causes testsuite failures on linux x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 24 Apr 2009 06:37:12 +0000 (06:37 +0000)]
fix a typo noticed by duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69962
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 24 Apr 2009 05:30:14 +0000 (05:30 +0000)]
"I got annoyed at the compiler warnings from ConstantInt::get(Ty, -1,
true), and casts make me nervous and are verbose anyway, so here's a
ConstantInt::getSigned(Ty, int64_t) method. Just overloading
ConstantInt::get() to take an int64_t too would cause ambiguous
overload errors."
Patch by Jeffrey Yasskin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69958
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Fri, 24 Apr 2009 03:42:54 +0000 (03:42 +0000)]
PR2957
ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle
mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes
as the shuffle mask. A value of -1 represents UNDEF.
In addition to eliminating the creation of illegal BUILD_VECTORS just to
represent shuffle masks, we are better about canonicalizing the shuffle mask,
resulting in substantially better code for some classes of shuffles.
A clean up of x86 shuffle code, and some canonicalizing in DAGCombiner is next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69952
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 24 Apr 2009 02:40:23 +0000 (02:40 +0000)]
Instead of requiring TLI.LowerCallTo to return an ISD::BUILD_PAIR,
use ISD::EXTRACT_ELEMENT. SelectionDAG has a special fast-path for
the cast of an EXTRACT_ELEMENT with a BUILD_PAIR operand, for the
common case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69948
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 24 Apr 2009 02:37:54 +0000 (02:37 +0000)]
Allow i16 type indices to gep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69946
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 23:13:24 +0000 (23:13 +0000)]
Factor out a bit of code that appears in several places into a
utility function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69937
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 22:50:03 +0000 (22:50 +0000)]
Handle Void types in ComputeValueVTs. This doesn't currently occur,
but this change makes the code more general and easier to adapt for
new purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69935
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 22:41:05 +0000 (22:41 +0000)]
Fix spurious indentation in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69934
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 23 Apr 2009 21:27:58 +0000 (21:27 +0000)]
Fix a documentation bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69923
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 23 Apr 2009 21:25:15 +0000 (21:25 +0000)]
Make BinOps typed and require a type specifier for !nameconcat. This
allows binops to be used in typed contexts such as when passing
arguments to classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69921
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 23 Apr 2009 20:39:31 +0000 (20:39 +0000)]
Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69919
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 23 Apr 2009 20:18:13 +0000 (20:18 +0000)]
Fix an obvious type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69918
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 19:39:41 +0000 (19:39 +0000)]
Explicitly pass -tailcallopt=false to these tests so that they
work as intended no matter what the default setting of that
option is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69911
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 23 Apr 2009 18:04:04 +0000 (18:04 +0000)]
Testcase for 69795.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69901
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 15:22:28 +0000 (15:22 +0000)]
Fix an error in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69893
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 15:16:49 +0000 (15:16 +0000)]
Change SCEVExpander's expandCodeFor to provide more flexibility
with the persistent insertion point, and change IndVars to make
use of it. This fixes a bug where IndVars was holding on to a
stale insertion point and forcing the SCEVExpander to continue to
use it.
This fixes PR4038.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69892
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 23 Apr 2009 10:34:58 +0000 (10:34 +0000)]
Banksel immediate constant will always immediately follow the GA/ES, so scan an insn from beginnin to find out the banksel operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69883
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 23 Apr 2009 05:15:08 +0000 (05:15 +0000)]
Simplify trunc(extend(x)) in SCEVs, just for completeness. Also fix some odd
whitespace in the same file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69870
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:33:42 +0000 (04:33 +0000)]
Testcase for PR3909.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69868
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:30:52 +0000 (04:30 +0000)]
Testcase for PR2639.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69867
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:26:42 +0000 (04:26 +0000)]
Testcase for PR2537.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69866
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:24:19 +0000 (04:24 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69865
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:21:14 +0000 (04:21 +0000)]
Testcase for PR3085.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69863
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 04:14:03 +0000 (04:14 +0000)]
Add testcase from PR3086.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69862
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 00:57:37 +0000 (00:57 +0000)]
Add support for printing MO_ExternalSymbol operands in
memory operand tuples. This doesn't ever come up in normal
code however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69848
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 23 Apr 2009 00:28:31 +0000 (00:28 +0000)]
Add more ulimit limits, to catch more kinds of runaway behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69847
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 23 Apr 2009 00:15:26 +0000 (00:15 +0000)]
Use the testcase from PR2791.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69846
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 22 Apr 2009 23:39:28 +0000 (23:39 +0000)]
Make sure both operands have binary instructions have the same type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69844
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 22 Apr 2009 23:09:16 +0000 (23:09 +0000)]
A few more places where the check of use_empty is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69842
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 22 Apr 2009 22:45:37 +0000 (22:45 +0000)]
Avoid deferencing use_begin() if value does not have a use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69836
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Apr 2009 22:17:51 +0000 (22:17 +0000)]
Allow defm to inherit from multiple multiclasses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69832
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Apr 2009 20:18:10 +0000 (20:18 +0000)]
Implement !nameconcat to concatenate strings and look up the resulting
name in the symbol table, returning an object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69822
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Apr 2009 18:55:17 +0000 (18:55 +0000)]
Testcase for PR2958.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69818
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 22 Apr 2009 18:51:05 +0000 (18:51 +0000)]
Fix cut-n-pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69816
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Apr 2009 16:42:54 +0000 (16:42 +0000)]
Implement multiclass inheritance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69810
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:20:48 +0000 (16:20 +0000)]
Simplify trivial cast-of-cast SCEVs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69809
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:11:16 +0000 (16:11 +0000)]
SCEVExpander's InsertCastOfTo knows how to move existing cast
instructions in order to avoid inserting new ones. However, if
the cast instruction is the SCEVExpander's InsertPt, this
causes subsequently emitted instructions to be inserted near
the cast, and not at the location of the original insert point.
Fix this by adjusting the insert point in such cases.
This fixes PR4009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69808
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:05:50 +0000 (16:05 +0000)]
Use BasicBlock::iterator instead of Instruction* for insert points,
to better handle inserting instructions at the end of a block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69807
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 16:00:36 +0000 (16:00 +0000)]
Make SCEVExpanders private methods private, instead of protected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69806
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 15:57:18 +0000 (15:57 +0000)]
Use CloneModule's ValueMap in more places, instead of looking
up functions by name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69805
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 22 Apr 2009 15:55:31 +0000 (15:55 +0000)]
ISD::ADD_PARTS is gone; use ISD::SMUL_LOHI as an example instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69804
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 22 Apr 2009 12:02:36 +0000 (12:02 +0000)]
Make the function begin label start after ther data pointer.
The address of data frame for function can be obtained by subtracting 2 from the function begin label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69801
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 22 Apr 2009 10:39:51 +0000 (10:39 +0000)]
These tests are x86 specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69798
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 08:50:12 +0000 (08:50 +0000)]
Real fix for PR3549, by using caching for predecessor counts in addition to the predecessors themselves. This halves the time
to optimize the testcase, beyond what my previous patch did.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69792
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 08:46:33 +0000 (08:46 +0000)]
Add caching of predecessor counts as well as predecessors themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69791
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 08:09:13 +0000 (08:09 +0000)]
Use PredIteratorCache in LCSSA, which gives a 37% overall speedup on the testcase from PR3549. More improvements to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69788
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 22 Apr 2009 07:16:54 +0000 (07:16 +0000)]
Fix for PR3946, in which SmallVector could behave strangely in corner cases.
Patch by Peter Johnson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69785
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Apr 2009 23:37:18 +0000 (23:37 +0000)]
use predicate instead of hand-rolled loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69752
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 23:15:49 +0000 (23:15 +0000)]
De-pImpl-ify ScalarEvolution. The pImpl pattern doesn't provide much
practical benefit in the case of ScalarEvolution, and it's otherwise
a nuisance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69749
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 21 Apr 2009 22:46:52 +0000 (22:46 +0000)]
It has finally happened. Spiller is now using live interval info.
This fixes a very subtle bug. vr defined by an implicit_def is allowed overlap with any register since it doesn't actually modify anything. However, if it's used as a two-address use, its live range can be extended and it can be spilled. The spiller must take care not to emit a reload for the vn number that's defined by the implicit_def. This is both a correctness and performance issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69743
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 20:18:36 +0000 (20:18 +0000)]
When turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of the
type to truncate to should be the number of bits of the value that are
preserved, not the number that are clobbered with sign-extension.
This fixes regressions in ldecod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69704
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 21 Apr 2009 19:46:10 +0000 (19:46 +0000)]
Support --with-llvmgccdir and friends in llvmc, take 2.
Should now work when building with objdir != srcdir and when llvm-gcc is not
available.
Thanks to Duncan Sands for testing and advice!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69700
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Apr 2009 17:21:01 +0000 (17:21 +0000)]
Test case for revision 69683.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69684
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 21 Apr 2009 16:52:12 +0000 (16:52 +0000)]
fix a crash on a pointless but valid zero-length memset, rdar://
6808691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69680
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 21 Apr 2009 16:04:56 +0000 (16:04 +0000)]
Silence warnings.
Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69679
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 21 Apr 2009 16:04:41 +0000 (16:04 +0000)]
Drop obsolete reference to __eprintf.
Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69678
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 21 Apr 2009 16:04:14 +0000 (16:04 +0000)]
'The "or die" is intended to catch the case where nm returned a
non-zero exit status, so nm will already have printed some error
messages.'
Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69677
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 21 Apr 2009 09:44:39 +0000 (09:44 +0000)]
Get rid of what looks like a copy-and-pasted typo.
Spotted by gcc-4.5.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69673
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Apr 2009 08:22:09 +0000 (08:22 +0000)]
TLS_addr64 and TLS_addr32 define RDI and EAX. They don't use them.
This fixes PR4002.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69672
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 21 Apr 2009 05:54:51 +0000 (05:54 +0000)]
Handle direct aggregate type arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69665
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 02:26:00 +0000 (02:26 +0000)]
Teach ScalarEvolution how to recognize zext-inreg and sext-inreg,
as they appear in LLVM IR. This isn't particularly interesting
on its own; this is just setting up some infrastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69655
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:41:18 +0000 (01:41 +0000)]
This FIXME is fixed, now that SCEV understands pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69651
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:25:57 +0000 (01:25 +0000)]
Factor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,
and SCEVSignExtendExpr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69649
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:11:19 +0000 (01:11 +0000)]
Usage getAnalysisToUpdate for TargetData, per PR760.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69645
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 01:07:12 +0000 (01:07 +0000)]
Introduce encapsulation for ScalarEvolution's TargetData object, and refactor
the code to minimize dependencies on TargetData.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69644
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 00:55:22 +0000 (00:55 +0000)]
Move some assertion checks so they can do more complete checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69643
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 21 Apr 2009 00:47:46 +0000 (00:47 +0000)]
Convert ScalarEvolution to use raw_ostream instead of OStream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69640
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 21 Apr 2009 00:08:56 +0000 (00:08 +0000)]
Fix Visual Studio 2008 build failure.
Patch by Marius Wachtler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69637
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 22:54:34 +0000 (22:54 +0000)]
Make X86's copyRegToReg able to handle copies to and from subclasses.
This makes the extra copyRegToReg calls in ScheduleDAGSDNodesEmit.cpp
unnecessary. Derived from a patch by Jakob Stoklund Olesen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69635
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 22:51:43 +0000 (22:51 +0000)]
Simplify this code. getConstant knows how to make
broadcasted vector constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69634
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 22:49:59 +0000 (22:49 +0000)]
No, we are not avoiding -O3, just -fstrict-aliasing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69633
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 20 Apr 2009 22:19:33 +0000 (22:19 +0000)]
Adjust loop size estimate for full unrolling;
GEP's don't usually become instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69631
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 22:16:40 +0000 (22:16 +0000)]
One Mac OS X, just build with -O3 but without -fstrict-aliasing (which is kinda broken).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69630
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 20:50:13 +0000 (20:50 +0000)]
Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:
clang: error: unable to make temporary file: /etc/cc: can't make
unique filename: Permission denied
instead of
clang: error: unable to make temporary file: /etc/cc: can't make
unique filenamePermission denied
for example.
Also, audited the uses of MakeErrMsg to make the prefix strings
consistent (not end with newline/punctuation/space/": ").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69626
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 20:34:38 +0000 (20:34 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69624
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 20 Apr 2009 18:36:57 +0000 (18:36 +0000)]
Move duplicated AddLiveIn function from X86 and ARM backends to be a method
in the MachineFunction class, renaming it to addLiveIn for consistency with
the same method in MachineBasicBlock. Thanks for Anton for suggesting this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69615
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 20 Apr 2009 18:07:22 +0000 (18:07 +0000)]
Match C backend only if it explicitly requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69613
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Mon, 20 Apr 2009 17:48:16 +0000 (17:48 +0000)]
Remove clang since its conditionally there already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69610
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 20 Apr 2009 17:27:09 +0000 (17:27 +0000)]
Revise my previous change 68996 as suggested by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69607
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 17:23:48 +0000 (17:23 +0000)]
- Remove an arbitrary spill weight tweak that should not have been there.
- Find more reloads from SS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69606
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 20 Apr 2009 16:59:35 +0000 (16:59 +0000)]
Emit the auto variables of a function into a different section than parameters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69605
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 16:26:25 +0000 (16:26 +0000)]
It's not necessary for PrintModulePass to flush the output streams
now that errs() is properly non-buffered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69602
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 16:19:02 +0000 (16:19 +0000)]
Use .empty() instead of .size().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69599
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 16:10:33 +0000 (16:10 +0000)]
Don't discard an AssemblyAnnotationWriter when writing GlobalValues,
which include Functions, where it can be quite useful to use an
AssemblyAnnotationWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69598
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 20 Apr 2009 16:03:21 +0000 (16:03 +0000)]
These bitfields were being miscompiled on some
64 bit platforms when building with optimization.
So replace them by a hand-coded implementation.
This fixes PR3822.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69597
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 20 Apr 2009 15:55:38 +0000 (15:55 +0000)]
Implement operator<<(raw_ostream &OS, const Type &T).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 20 Apr 2009 08:01:12 +0000 (08:01 +0000)]
Added a linearscan register allocation optimization. When the register allocator spill an interval with multiple uses in the same basic block, it creates a different virtual register for each of the reloads. e.g.
%reg1498<def> = MOV32rm %reg1024, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
%reg1506<def> = MOV32rm %reg1024, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
%reg1486<def> = MOV32rr %reg1506
%reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
%reg1510<def> = MOV32rm %reg1024, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]
=>
%reg1498<def> = MOV32rm %reg2036, 1, %reg0, 12, %reg0, Mem:LD(4,4) [sunkaddr39 + 0]
%reg1506<def> = MOV32rm %reg2037, 1, %reg0, 8, %reg0, Mem:LD(4,4) [sunkaddr42 + 0]
%reg1486<def> = MOV32rr %reg1506
%reg1486<def> = XOR32rr %reg1486, %reg1498, %EFLAGS<imp-def,dead>
%reg1510<def> = MOV32rm %reg2038, 1, %reg0, 4, %reg0, Mem:LD(4,4) [sunkaddr45 + 0]
From linearscan's point of view, each of reg2036, 2037, and 2038 are separate registers, each is "killed" after a single use. The reloaded register is available and it's often clobbered right away. e.g. In thise case reg1498 is allocated EAX while reg2036 is allocated RAX. This means we end up with multiple reloads from the same stack slot in the same basic block.
Now linearscan recognize there are other reloads from same SS in the same BB. So it'll "downgrade" RAX (and its aliases) after reg2036 is allocated until the next reload (reg2037) is done. This greatly increase the likihood reloads from SS are reused.
This speeds up sha1 from OpenSSL by 5.8%. It is also an across the board win for SPEC2000 and 2006.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69585
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 20 Apr 2009 07:34:17 +0000 (07:34 +0000)]
Make all raw_ostreams support the tell() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69583
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Mon, 20 Apr 2009 06:05:54 +0000 (06:05 +0000)]
Before trying to introduce/eliminate cast/ext/trunc to make indices type as
pointer type, make sure that the pointer size is a valid sequential index type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69574
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 19 Apr 2009 18:32:03 +0000 (18:32 +0000)]
Use an AssertingVH to detect the case where the Function was deleted but
freeMachineCodeForFunction was never called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69531
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 19 Apr 2009 18:20:21 +0000 (18:20 +0000)]
Fix missing text in doxygen documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69529
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 19 Apr 2009 06:40:30 +0000 (06:40 +0000)]
Now that BUILD_VECTOR operands are allowed to be
bigger than the vector element type, turn checking
of the operand type back on again, appropriately
adjusted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69516
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 19 Apr 2009 06:23:05 +0000 (06:23 +0000)]
Remove the SimpleTy enumerated type field from the MVT
value type union: this field was causing problems for
some compilers on 64 bit systems, presumably because
SimpleTy is 32 bits wide while the other fields are
64 bits wide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69515
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 19 Apr 2009 00:22:35 +0000 (00:22 +0000)]
Add some assertions.
Fixes segfaults in some corner cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69494
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 18 Apr 2009 21:45:27 +0000 (21:45 +0000)]
Revert 69474 and 69475. They are causing failures during a bootstrap on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69478
91177308-0d34-0410-b5e6-
96231b3b80d8