oota-llvm.git
15 years agoimprove documentation on build configurations, patch by
Chris Lattner [Sat, 25 Apr 2009 22:24:49 +0000 (22:24 +0000)]
improve documentation on build configurations, patch by
Josef Eisl!

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

15 years agoadd testcase for strange types of gep indices
Chris Lattner [Sat, 25 Apr 2009 22:20:49 +0000 (22:20 +0000)]
add testcase for strange types of gep indices

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

15 years agoAdd a new TypeBuilder helper class, which eases making LLVM IR types.
Chris Lattner [Sat, 25 Apr 2009 22:14:04 +0000 (22:14 +0000)]
Add a new TypeBuilder helper class, which eases making LLVM IR types.
Patch by Jeffrey Yasskin!

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

15 years agoimprove documentation around memory lifetimes,
Chris Lattner [Sat, 25 Apr 2009 22:10:06 +0000 (22:10 +0000)]
improve documentation around memory lifetimes,
patch by Jeffrey Yasskin!

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

15 years agoaDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!
Chris Lattner [Sat, 25 Apr 2009 22:08:52 +0000 (22:08 +0000)]
aDd support for building a subset of the llvm tools, patch by Jeffrey Yasskin!

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

15 years agotestcase and asmparser fix for PR4066
Chris Lattner [Sat, 25 Apr 2009 21:26:00 +0000 (21:26 +0000)]
testcase and asmparser fix for PR4066

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

15 years agoAllow aliasee to be a GEP or bitcast instead of just a bitcast.
Chris Lattner [Sat, 25 Apr 2009 21:23:19 +0000 (21:23 +0000)]
Allow aliasee to be a GEP or bitcast instead of just a bitcast.
The real fix for this whole mess is to require the operand of the
alias to be a *GlobalValue* (not a general constant, including
constant exprs) but allow the operand and the alias type to be
unrelated.

This fixes PR4066

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

15 years agoUpdate docs to not mention gcse/loadvn and mention memdep and
Chris Lattner [Sat, 25 Apr 2009 21:11:37 +0000 (21:11 +0000)]
Update docs to not mention gcse/loadvn and mention memdep and
new stuff.  PR3924.

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

15 years agoUse intptr_t.
Bill Wendling [Sat, 25 Apr 2009 21:06:53 +0000 (21:06 +0000)]
Use intptr_t.

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

15 years agosize() should return a size_t; avoids a warning for 64 bit machines.
Mon P Wang [Sat, 25 Apr 2009 20:46:59 +0000 (20:46 +0000)]
size() should return a size_t; avoids a warning for 64 bit machines.

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

15 years agoReuse unused val#'s to avoid running out of memory in extreme cases.
Evan Cheng [Sat, 25 Apr 2009 20:20:15 +0000 (20:20 +0000)]
Reuse unused val#'s to avoid running out of memory in extreme cases.

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

15 years agoDenseMap.h needs <new> because it explicitly calls operator new/delete.
Chris Lattner [Sat, 25 Apr 2009 19:50:14 +0000 (19:50 +0000)]
DenseMap.h needs <new> because it explicitly calls operator new/delete.
Patch by John McCall!

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

15 years agoFix PR4040: APInt's string constructor is too strict
Chris Lattner [Sat, 25 Apr 2009 18:34:04 +0000 (18:34 +0000)]
Fix PR4040: APInt's string constructor is too strict
patch by Jeff Yasskin!

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

15 years agoadd support for detecting process features on win64, patch by
Chris Lattner [Sat, 25 Apr 2009 18:27:23 +0000 (18:27 +0000)]
add support for detecting process features on win64, patch by
Nicolas Capens!

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

15 years agoRefactor the code to grab the low and high parts of a value
Dan Gohman [Sat, 25 Apr 2009 17:55:53 +0000 (17:55 +0000)]
Refactor the code to grab the low and high parts of a value
using EXTRACT_ELEMENT into a utility function.

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

15 years agoReturn null instead of false, as appropriate.
Dan Gohman [Sat, 25 Apr 2009 17:28:45 +0000 (17:28 +0000)]
Return null instead of false, as appropriate.

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

15 years agoAdd several more icmp simplifications. Transform signed comparisons
Dan Gohman [Sat, 25 Apr 2009 17:12:48 +0000 (17:12 +0000)]
Add several more icmp simplifications. Transform signed comparisons
into unsigned ones when the operands are known to have the same
sign bit value.

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

15 years agoAdd a top-level comment about DAGCombiner's role in the compiler.
Dan Gohman [Sat, 25 Apr 2009 17:09:45 +0000 (17:09 +0000)]
Add a top-level comment about DAGCombiner's role in the compiler.

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

15 years agoHandle ands with 0 and shifts by 0 correctly. These aren't
Dan Gohman [Sat, 25 Apr 2009 17:05:40 +0000 (17:05 +0000)]
Handle ands with 0 and shifts by 0 correctly. These aren't
common, but indvars shouldn't crash on them. This fixes PR4054.

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

15 years agoFix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:
Torok Edwin [Sat, 25 Apr 2009 10:25:12 +0000 (10:25 +0000)]
Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:
Path.cpp:59: warning: case label value exceeds maximum value for type
magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde).
When magic[0] was 0xde, the switch has taken the default branch instead of case
0xde branch.
Apparently this was the behaviour with older versions of gcc too, but not with g++.
Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed
range.

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

15 years agoDo not share a single unknown val# for all the live ranges merged into a physical...
Evan Cheng [Sat, 25 Apr 2009 09:25:19 +0000 (09:25 +0000)]
Do not share a single unknown val# for all the live ranges merged into a physical sub-register live interval. When coalescer is merging in clobbered virtaul register live interval into a physical register live interval, give each virtual register val# a separate val# in the physical register live interval. Otherwise, the coalescer would have lost track of the definitions   information it needs to make correct coalescing decisions.

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

15 years agoFixed the gep example for i16 type indices.
Sanjiv Gupta [Sat, 25 Apr 2009 07:27:44 +0000 (07:27 +0000)]
Fixed the gep example for i16 type indices.

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

15 years agoChange LowerCallResult method so that CCValAssign::BCvt can be used with
Bob Wilson [Sat, 25 Apr 2009 00:33:20 +0000 (00:33 +0000)]
Change LowerCallResult method so that CCValAssign::BCvt can be used with
f64 types.  This is not used for anything yet.

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

15 years agoFix PR 4057, a crash doing float->char const folding.
Dale Johannesen [Fri, 24 Apr 2009 21:34:13 +0000 (21:34 +0000)]
Fix PR 4057, a crash doing float->char const folding.
This particular one is undefined behavior (although this
isn't related to the crash), so it will no longer do it
at compile time, which seems better.

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

15 years agoAdjust a comment to reflect what the code does. Splitting a 64-bit argument
Bob Wilson [Fri, 24 Apr 2009 17:05:01 +0000 (17:05 +0000)]
Adjust a comment to reflect what the code does.  Splitting a 64-bit argument
between registers and the stack may be required with the APCS ABI, but it
isn't tied to using a particular version of the ARM architecture.

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

15 years agoFix up some problems with getCopyToReg and getCopyFromReg nodes being
Bob Wilson [Fri, 24 Apr 2009 17:00:36 +0000 (17:00 +0000)]
Fix up some problems with getCopyToReg and getCopyFromReg nodes being
chained and "flagged" together.  I also made a few changes to handle the
chain and flag values more consistently.  I found these problems by
inspection so I'm not aware of anything that breaks because of them
(thus no testcase).

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

15 years agoUse a bigger hammer to coerce subversion into english.
Gabor Greif [Fri, 24 Apr 2009 17:00:03 +0000 (17:00 +0000)]
Use a bigger hammer to coerce subversion into english.
Patch by Benjamin Kramer!

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

15 years agoFix multiclass inheritance to limit value resolution to new defs added
David Greene [Fri, 24 Apr 2009 16:55:41 +0000 (16:55 +0000)]
Fix multiclass inheritance to limit value resolution to new defs added
by base multiclasses.  Do not attempt to alter defs from previous base
multiclasses.  This fixes multiple multiclass inheritance.

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

15 years agoRemove unnecessary references to f32 types. After specifying that f32
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

15 years agoAdd LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.
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

15 years agoFixed spaces and the getelementpointer example with i16 type indices.
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

15 years agoFix PR 4004 by including the call to __tls_get_addr in X86tlsaddr. This is not
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

15 years agoRevert 69952. Causes testsuite failures on linux x86-64.
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

15 years agofix a typo noticed by duncan
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

15 years ago"I got annoyed at the compiler warnings from ConstantInt::get(Ty, -1,
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

15 years agoPR2957
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

15 years agoInstead of requiring TLI.LowerCallTo to return an ISD::BUILD_PAIR,
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

15 years agoAllow i16 type indices to gep.
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

15 years agoFactor out a bit of code that appears in several places into a
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

15 years agoHandle Void types in ComputeValueVTs. This doesn't currently occur,
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

15 years agoFix spurious indentation in a comment.
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

15 years agoFix a documentation bug.
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

15 years agoMake BinOps typed and require a type specifier for !nameconcat. This
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

15 years agoUpdate comments.
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

15 years agoFix an obvious type.
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

15 years agoExplicitly pass -tailcallopt=false to these tests so that they
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

15 years agoTestcase for 69795.
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

15 years agoFix an error in this test.
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

15 years agoChange SCEVExpander's expandCodeFor to provide more flexibility
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

15 years agoBanksel immediate constant will always immediately follow the GA/ES, so scan an insn...
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

15 years agoSimplify trunc(extend(x)) in SCEVs, just for completeness. Also fix some odd
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

15 years agoTestcase for PR3909.
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

15 years agoTestcase for PR2639.
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

15 years agoTestcase for PR2537.
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

15 years agoFix typo.
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

15 years agoTestcase for PR3085.
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

15 years agoAdd testcase from PR3086.
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

15 years agoAdd support for printing MO_ExternalSymbol operands in
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

15 years agoAdd more ulimit limits, to catch more kinds of runaway behavior.
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

15 years agoUse the testcase from PR2791.
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

15 years agoMake sure both operands have binary instructions have the same type.
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

15 years agoA few more places where the check of use_empty is needed.
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

15 years agoAvoid deferencing use_begin() if value does not have a use.
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

15 years agoAllow defm to inherit from multiple multiclasses.
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

15 years agoImplement !nameconcat to concatenate strings and look up the resulting
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

15 years agoTestcase for PR2958.
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

15 years agoFix cut-n-pasto.
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

15 years agoImplement multiclass inheritance.
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

15 years agoSimplify trivial cast-of-cast SCEVs.
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

15 years agoSCEVExpander's InsertCastOfTo knows how to move existing cast
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

15 years agoUse BasicBlock::iterator instead of Instruction* for insert points,
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

15 years agoMake SCEVExpanders private methods private, instead of protected.
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

15 years agoUse CloneModule's ValueMap in more places, instead of looking
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

15 years agoISD::ADD_PARTS is gone; use ISD::SMUL_LOHI as an example instead.
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

15 years agoMake the function begin label start after ther data pointer.
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

15 years agoThese tests are x86 specific.
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

15 years agoReal fix for PR3549, by using caching for predecessor counts in addition to the prede...
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

15 years agoAdd caching of predecessor counts as well as predecessors themselves.
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

15 years agoUse PredIteratorCache in LCSSA, which gives a 37% overall speedup on the testcase...
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

15 years agoFix for PR3946, in which SmallVector could behave strangely in corner cases.
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

15 years agouse predicate instead of hand-rolled loop
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

15 years agoDe-pImpl-ify ScalarEvolution. The pImpl pattern doesn't provide much
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

15 years agoIt has finally happened. Spiller is now using live interval info.
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

15 years agoWhen turning (ashr(shl(x, n), n)) into sext(trunc(x)), the width of the
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

15 years agoSupport --with-llvmgccdir and friends in llvmc, take 2.
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

15 years agoTest case for revision 69683.
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

15 years agofix a crash on a pointless but valid zero-length memset, rdar://6808691
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

15 years agoSilence warnings.
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

15 years agoDrop obsolete reference to __eprintf.
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

15 years ago'The "or die" is intended to catch the case where nm returned a
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

15 years agoGet rid of what looks like a copy-and-pasted typo.
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

15 years agoTLS_addr64 and TLS_addr32 define RDI and EAX. They don't use them.
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

15 years agoHandle direct aggregate type arguments.
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

15 years agoTeach ScalarEvolution how to recognize zext-inreg and sext-inreg,
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

15 years agoThis FIXME is fixed, now that SCEV understands pointers.
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

15 years agoFactor out a common base class from SCEVTruncateExpr, SCEVZeroExtendExpr,
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

15 years agoUsage getAnalysisToUpdate for TargetData, per PR760.
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

15 years agoIntroduce encapsulation for ScalarEvolution's TargetData object, and refactor
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

15 years agoMove some assertion checks so they can do more complete checking.
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

15 years agoConvert ScalarEvolution to use raw_ostream instead of OStream.
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