oota-llvm.git
15 years agoNew feature: add support for target intrinsics being defined in the
Nate Begeman [Wed, 4 Feb 2009 19:47:21 +0000 (19:47 +0000)]
New feature: add support for target intrinsics being defined in the
target directories themselves.  This also means that VMCore no longer
needs to know about every target's list of intrinsics.  Future work
will include converting the PowerPC target to this interface as an
example implementation.

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

15 years agoAvoids generating a legalization assert for the case where a vector type is legal
Mon P Wang [Wed, 4 Feb 2009 19:38:14 +0000 (19:38 +0000)]
Avoids generating a legalization assert for the case where a vector type is legal
but when legalizing the operation, we split the vector type and generate a library
call whose type needs to be promoted. For example, X86 with SSE on but MMX off,
a divide v2i64 will be scalarized to 2 calls to a library using i64.

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

15 years agomention that PIC is needed for libLTO and libLLVMgold
Torok Edwin [Wed, 4 Feb 2009 19:12:25 +0000 (19:12 +0000)]
mention that PIC is needed for libLTO and libLLVMgold

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

15 years agoBill implemented this.
Chris Lattner [Wed, 4 Feb 2009 19:09:07 +0000 (19:09 +0000)]
Bill implemented this.

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

15 years agoadd a note, this is why we're faster at SciMark-MonteCarlo with
Chris Lattner [Wed, 4 Feb 2009 19:08:01 +0000 (19:08 +0000)]
add a note, this is why we're faster at SciMark-MonteCarlo with
SSE disabled.

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

15 years agoSkip over zero registers.
Evan Cheng [Wed, 4 Feb 2009 18:18:58 +0000 (18:18 +0000)]
Skip over zero registers.

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

15 years agoallow main to have any integer type.
Chris Lattner [Wed, 4 Feb 2009 17:48:18 +0000 (17:48 +0000)]
allow main to have any integer type.

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

15 years agoremove printf - it was there only for debugging!
Torok Edwin [Wed, 4 Feb 2009 17:40:28 +0000 (17:40 +0000)]
remove printf - it was there only for debugging!

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

15 years agoadd support for .a files containing LLVM IR to the gold plugin
Torok Edwin [Wed, 4 Feb 2009 17:39:30 +0000 (17:39 +0000)]
add support for .a files containing LLVM IR to the gold plugin

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

15 years agoMinor code cleanups; no functionality change.
Dan Gohman [Wed, 4 Feb 2009 17:28:58 +0000 (17:28 +0000)]
Minor code cleanups; no functionality change.

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

15 years agoSince I'm obliged to work with a development OS that currently doesn't
Stuart Hastings [Wed, 4 Feb 2009 16:46:19 +0000 (16:46 +0000)]
Since I'm obliged to work with a development OS that currently doesn't
support GraphViz, I've been using the foo->dump() facility.  This
patch is a minor rewrite to the SelectionDAG dump() stuff to make it a
little more helpful.  The existing foo->dump() functionality does not
change; this patch adds foo->dumpr().  All of this is only useful when
running LLVM under a debugger.

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

15 years agoAllow the inverse transform x86_fp80 -> i80 (also
Duncan Sands [Wed, 4 Feb 2009 11:17:06 +0000 (11:17 +0000)]
Allow the inverse transform x86_fp80 -> i80 (also
fires during the Ada build).

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

15 years agoFix PR3468: a crash when constant folding a bitcast of
Duncan Sands [Wed, 4 Feb 2009 10:17:14 +0000 (10:17 +0000)]
Fix PR3468: a crash when constant folding a bitcast of
i80 to x86 long double (this was presumably generated
by sroa).

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

15 years agoDon't call isInvariantLoad twice.
Evan Cheng [Wed, 4 Feb 2009 09:21:58 +0000 (09:21 +0000)]
Don't call isInvariantLoad twice.

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

15 years agoDon't bother hoisting out a "cheap" instruction if all of its uses are PHIs. LICM...
Evan Cheng [Wed, 4 Feb 2009 09:19:56 +0000 (09:19 +0000)]
Don't bother hoisting out a "cheap" instruction if all of its uses are PHIs. LICM "cheap" instructions are not particularly beneficial to start with. This will just end up making the copies harder to coalesce.

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

15 years agoFor now, only hoist re-materilizable instructions. LICM will increase register pressu...
Evan Cheng [Wed, 4 Feb 2009 07:17:49 +0000 (07:17 +0000)]
For now, only hoist re-materilizable instructions. LICM will increase register pressure. We want to avoid spilling more instructions if it's possible.

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

15 years agoRegenerate.
Nick Lewycky [Wed, 4 Feb 2009 06:27:44 +0000 (06:27 +0000)]
Regenerate.

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

15 years agoReapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't
Nick Lewycky [Wed, 4 Feb 2009 06:26:47 +0000 (06:26 +0000)]
Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't
there.

This changes the interpreter to use libffi. After this patch, the interpreter
will barely be able to call any external functions if built on a system without
libffi installed (just enough to pass 'make check' really). But with libffi,
we can now call any function that isn't variadic or taking a struct or vector
parameter (but pointer to struct is fine). Patch by Alexei Svitkine!

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

15 years agoFinish making AliasAnalysis aware of the fact that most atomic intrinsics only derefe...
Owen Anderson [Wed, 4 Feb 2009 05:16:46 +0000 (05:16 +0000)]
Finish making AliasAnalysis aware of the fact that most atomic intrinsics only dereference their arguments, and enhance
BasicAA to make use of this fact when computing ModRef info.

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

15 years agoRemove non-DebugLoc forms of the exotic forms
Dale Johannesen [Wed, 4 Feb 2009 02:34:38 +0000 (02:34 +0000)]
Remove non-DebugLoc forms of the exotic forms
of Lod and Sto; patch uses.

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

15 years agofix a pretty serious bug in StringMap where GetOrCreate(strstart,strend, z)
Chris Lattner [Wed, 4 Feb 2009 01:54:10 +0000 (01:54 +0000)]
fix a pretty serious bug in StringMap where GetOrCreate(strstart,strend, z)
would not set new values to Z.

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

15 years agoadd a friend needed by a stringmap change.
Chris Lattner [Wed, 4 Feb 2009 01:51:53 +0000 (01:51 +0000)]
add a friend needed by a stringmap change.

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

15 years agoRemove some more non-DebugLoc versions of construction
Dale Johannesen [Wed, 4 Feb 2009 01:48:28 +0000 (01:48 +0000)]
Remove some more non-DebugLoc versions of construction
functions, with callers adjusted to fit.

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

15 years agoCheck in file I forgot.
Dale Johannesen [Wed, 4 Feb 2009 01:33:20 +0000 (01:33 +0000)]
Check in file I forgot.

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

15 years agoRemove a few non-DebugLoc versions of node creation
Dale Johannesen [Wed, 4 Feb 2009 01:17:06 +0000 (01:17 +0000)]
Remove a few non-DebugLoc versions of node creation
functions.

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

15 years agoFixes a case where we generate an incorrect mask for pshfhw in the presence
Mon P Wang [Wed, 4 Feb 2009 01:16:59 +0000 (01:16 +0000)]
Fixes a case where we generate an incorrect mask for pshfhw in the presence
of undefs and incorrectly determining if we have punpckldq.

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

15 years agoWhile folding vallue comparison terminators ignore dbg intrinsics.
Devang Patel [Wed, 4 Feb 2009 01:06:11 +0000 (01:06 +0000)]
While folding vallue comparison terminators ignore dbg intrinsics.

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

15 years agoPatch up omissions in DebugLoc propagation.
Dale Johannesen [Wed, 4 Feb 2009 00:33:20 +0000 (00:33 +0000)]
Patch up omissions in DebugLoc propagation.

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

15 years agoFill in more omissions in DebugLog propagation.
Dale Johannesen [Wed, 4 Feb 2009 00:13:36 +0000 (00:13 +0000)]
Fill in more omissions in DebugLog propagation.
I think that's it for this directory.

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

15 years agoConstify and don't return a reference.
Bill Wendling [Wed, 4 Feb 2009 00:05:34 +0000 (00:05 +0000)]
Constify and don't return a reference.

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

15 years agoIgnore dbg intrinsics while hoisting common code in the two blocks up into the branch...
Devang Patel [Wed, 4 Feb 2009 00:03:08 +0000 (00:03 +0000)]
Ignore dbg intrinsics while hoisting common code in the two blocks up into the branch block.

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

15 years agoDebugLoc propagation; adjustment to things omitted
Dale Johannesen [Tue, 3 Feb 2009 23:04:43 +0000 (23:04 +0000)]
DebugLoc propagation; adjustment to things omitted
from SelectionDagBuild.

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

15 years agoErm. Would be nice to initialize this variable. . .
Bill Wendling [Tue, 3 Feb 2009 22:55:54 +0000 (22:55 +0000)]
Erm. Would be nice to initialize this variable. . .

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

15 years agoAdd getDebugLocTuple to retrieve the DebugLocTuple for a given DebugLoc object.
Bill Wendling [Tue, 3 Feb 2009 22:49:58 +0000 (22:49 +0000)]
Add getDebugLocTuple to retrieve the DebugLocTuple for a given DebugLoc object.

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

15 years agoAdd getter for the index.
Bill Wendling [Tue, 3 Feb 2009 22:49:14 +0000 (22:49 +0000)]
Add getter for the index.

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

15 years agoNeed this file too.
Dale Johannesen [Tue, 3 Feb 2009 22:26:34 +0000 (22:26 +0000)]
Need this file too.

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

15 years agoAdd some DL propagation to places that didn't
Dale Johannesen [Tue, 3 Feb 2009 22:26:09 +0000 (22:26 +0000)]
Add some DL propagation to places that didn't
have it yet.  More coming.

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

15 years agoDo not let dbg intrinsic block folding of two entry phi node.
Devang Patel [Tue, 3 Feb 2009 22:12:02 +0000 (22:12 +0000)]
Do not let dbg intrinsic block folding of two entry phi node.

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

15 years agoIf "optimize for size" attribute is set then block non-trivial loop unswitches but...
Devang Patel [Tue, 3 Feb 2009 22:04:27 +0000 (22:04 +0000)]
If "optimize for size" attribute is set then block non-trivial loop unswitches but allow trivial loop unswitches.

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

15 years agoDebugLoc propgation
Dale Johannesen [Tue, 3 Feb 2009 21:48:12 +0000 (21:48 +0000)]
DebugLoc propgation

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

15 years agoMore whitespace fixin'.
Bill Wendling [Tue, 3 Feb 2009 21:38:21 +0000 (21:38 +0000)]
More whitespace fixin'.

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

15 years agoWhitespace and comment changes. No functionality change.
Bill Wendling [Tue, 3 Feb 2009 21:17:20 +0000 (21:17 +0000)]
Whitespace and comment changes. No functionality change.

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

15 years agoteach "convert from scalar" to handle loads of fca's.
Chris Lattner [Tue, 3 Feb 2009 21:08:45 +0000 (21:08 +0000)]
teach "convert from scalar" to handle loads of fca's.

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

15 years agorefactor the interface to ConvertUsesOfLoadToScalar,
Chris Lattner [Tue, 3 Feb 2009 21:01:03 +0000 (21:01 +0000)]
refactor the interface to ConvertUsesOfLoadToScalar,
renaming it to ConvertScalar_ExtractValue

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

15 years agoDebugLoc propagation. done with file.
Dale Johannesen [Tue, 3 Feb 2009 20:21:25 +0000 (20:21 +0000)]
DebugLoc propagation.  done with file.

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

15 years agoRemove dead code.
Devang Patel [Tue, 3 Feb 2009 19:46:28 +0000 (19:46 +0000)]
Remove dead code.

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

15 years agoconvert ConvertUsesOfLoadToScalar to use IRBuilder,
Chris Lattner [Tue, 3 Feb 2009 19:45:44 +0000 (19:45 +0000)]
convert ConvertUsesOfLoadToScalar to use IRBuilder,
no functionality change.

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

15 years agoswitch ConvertScalar_InsertValue to use an IRBuilder, no
Chris Lattner [Tue, 3 Feb 2009 19:41:50 +0000 (19:41 +0000)]
switch ConvertScalar_InsertValue to use an IRBuilder, no
functionality change.

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

15 years agoDebugLoc propagation. 2/3 through file.
Dale Johannesen [Tue, 3 Feb 2009 19:33:06 +0000 (19:33 +0000)]
DebugLoc propagation.  2/3 through file.

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

15 years agomake scalar conversion handle stores of first class
Chris Lattner [Tue, 3 Feb 2009 19:30:11 +0000 (19:30 +0000)]
make scalar conversion handle stores of first class
aggregate values.  loads are not yet handled (coming
soon to an sroa near you).

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

15 years agoChange the post-RA scheduler to iterate through the
Dan Gohman [Tue, 3 Feb 2009 18:57:45 +0000 (18:57 +0000)]
Change the post-RA scheduler to iterate through the
basic-block segments bottom-up instead of top down. This
is the first step in a general restructuring of the way
register liveness is tracked in the post-RA scheduler.

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

15 years agoTevert part of the x86 subtarget logic changes: when -march=x86-64
Dan Gohman [Tue, 3 Feb 2009 18:53:21 +0000 (18:53 +0000)]
Tevert part of the x86 subtarget logic changes: when -march=x86-64
is given, override the subtarget settings and enable 64-bit support.
This restores the earlier behavior, and fixes regressions on
Non-64-bit-capable x86-32 hosts.

This isn't necessarily the best approach, but the most obvious
alternative is to require -mcpu=x86-64 or -mattr=+64bit to be used
with -march=x86-64 when the host doesn't have 64-bit support. This
makes things little more consistent, but it's less convenient, and
it has the practical drawback of requiring lots of test changes, so
I opted for the above approach for now.

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

15 years agoFirst initialize DAG otherwise dwarf writer is used uninitialized.
Devang Patel [Tue, 3 Feb 2009 18:46:32 +0000 (18:46 +0000)]
First initialize DAG otherwise dwarf writer is used uninitialized.
Duncan spotted this. Thanks!

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

15 years agoMake SROA produce a vector only when the alloca is actually
Chris Lattner [Tue, 3 Feb 2009 18:15:05 +0000 (18:15 +0000)]
Make SROA produce a vector only when the alloca is actually
accessed at least once as a vector.  This prevents it from
compiling the example in not-a-vector into:

define double @test(double %A, double %B) {
%tmp4 = insertelement <7 x double> undef, double %A, i32 0
%tmp = insertelement <7 x double> %tmp4, double %B, i32 4
%tmp2 = extractelement <7 x double> %tmp, i32 4
ret double %tmp2
}

instead, producing the integer code.  Producing vectors when they
aren't otherwise in the program is dangerous because a lot of other
code treats them carefully and doesn't want to break them down.
OTOH, many things want to break down tasty i448's.

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

15 years agothis produces an undefined result, just check that the alloca is gone
Chris Lattner [Tue, 3 Feb 2009 18:13:00 +0000 (18:13 +0000)]
this produces an undefined result, just check that the alloca is gone
and that sroa doesn't crash.

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

15 years agoFix PR3411. When replacing values, nodes are analyzed
Duncan Sands [Tue, 3 Feb 2009 10:23:33 +0000 (10:23 +0000)]
Fix PR3411.  When replacing values, nodes are analyzed
in any old order.  Since analyzing a node analyzes its
operands also, this can mean that when we pop a node
off the list of nodes to be analyzed, it may already
have been analyzed.

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

15 years agoAPInt'fy SimplifyDemandedVectorElts so it can analyze vectors with more than 64 elements.
Evan Cheng [Tue, 3 Feb 2009 10:05:09 +0000 (10:05 +0000)]
APInt'fy SimplifyDemandedVectorElts so it can analyze vectors with more than 64 elements.

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

15 years agoadd a method to BumpPtrAllocator that allows allocating elements
Chris Lattner [Tue, 3 Feb 2009 07:39:50 +0000 (07:39 +0000)]
add a method to BumpPtrAllocator that allows allocating elements
with a specified alignment.

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

15 years agoAdd LLVM plugin for gold.
Nick Lewycky [Tue, 3 Feb 2009 07:13:24 +0000 (07:13 +0000)]
Add LLVM plugin for gold.

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

15 years agoRegenerate configure.
Nick Lewycky [Tue, 3 Feb 2009 07:10:30 +0000 (07:10 +0000)]
Regenerate configure.

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

15 years agoAdd the ability to pass the path to binutils source to configure. This is
Nick Lewycky [Tue, 3 Feb 2009 07:10:08 +0000 (07:10 +0000)]
Add the ability to pass the path to binutils source to configure. This is
needed to build the LLVM gold plugin.

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

15 years agoadd another case of undefined behavior without crashing, PR3466.
Chris Lattner [Tue, 3 Feb 2009 07:08:57 +0000 (07:08 +0000)]
add another case of undefined behavior without crashing, PR3466.

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

15 years agoRevert r63600. It didn't fix the bug, it just moved it a bit.
Nick Lewycky [Tue, 3 Feb 2009 06:30:37 +0000 (06:30 +0000)]
Revert r63600. It didn't fix the bug, it just moved it a bit.

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

15 years agoTeach AliasAnalysis that a bunch of the atomic intrinsics only dereference their...
Owen Anderson [Tue, 3 Feb 2009 06:27:22 +0000 (06:27 +0000)]
Teach AliasAnalysis that a bunch of the atomic intrinsics only dereference their arguments.

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

15 years agoUpdate the callgraph when replacing InvokeInst with CallInst when inlining.
Nick Lewycky [Tue, 3 Feb 2009 04:34:40 +0000 (04:34 +0000)]
Update the callgraph when replacing InvokeInst with CallInst when inlining.

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

15 years agoExplicitly pass in debug location information to BuildMI.
Bill Wendling [Tue, 3 Feb 2009 02:29:34 +0000 (02:29 +0000)]
Explicitly pass in debug location information to BuildMI.

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

15 years agoPass in something sensible for the debug location information when creating the
Bill Wendling [Tue, 3 Feb 2009 02:20:52 +0000 (02:20 +0000)]
Pass in something sensible for the debug location information when creating the
initial PHI nodes of the machine function.

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

15 years agofix a bitcode reader bug where it can't handle extractelement correctly:
Chris Lattner [Tue, 3 Feb 2009 02:11:28 +0000 (02:11 +0000)]
fix a bitcode reader bug where it can't handle extractelement correctly:
the index of the value being extracted is always an i32.  This fixes PR3465

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

15 years agoTeach ConvertUsesToScalar to handle memset, allowing it to handle
Chris Lattner [Tue, 3 Feb 2009 02:01:43 +0000 (02:01 +0000)]
Teach ConvertUsesToScalar to handle memset, allowing it to handle
crazy cases like:

struct f {  int A, B, C, D, E, F; };
short test4() {
  struct f A;
  A.A = 1;
  memset(&A.B, 2, 12);
  return A.C;
}

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

15 years agoFill in some missing DL propagation in getNode()s.
Dale Johannesen [Tue, 3 Feb 2009 01:55:44 +0000 (01:55 +0000)]
Fill in some missing DL propagation in getNode()s.

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

15 years agoUse SDL->getCurDebugLoc() instead of unknown loc for landing pads.
Bill Wendling [Tue, 3 Feb 2009 01:55:42 +0000 (01:55 +0000)]
Use SDL->getCurDebugLoc() instead of unknown loc for landing pads.

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

15 years agoExplicitly pass in the "unknown" debug location. This is probably not
Bill Wendling [Tue, 3 Feb 2009 01:33:28 +0000 (01:33 +0000)]
Explicitly pass in the "unknown" debug location. This is probably not
correct. We need more infrastructure before we can get the DebugLoc info for
these instructions.

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

15 years agoDelete these two tests. They are specific to x86-64, and there's no
Dan Gohman [Tue, 3 Feb 2009 01:33:26 +0000 (01:33 +0000)]
Delete these two tests. They are specific to x86-64, and there's no
reliable way to do this with the current dejagnu infrastructure.
If someone can figure out how to fix these tests so that they test
what they are intended to test without spuriously failing on any
popular platforms, they are invited to reinstate them.

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

15 years agoAlphabetize includes.
Bill Wendling [Tue, 3 Feb 2009 01:32:22 +0000 (01:32 +0000)]
Alphabetize includes.

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

15 years agorearrange how SRoA handles promotion of allocas to vectors.
Chris Lattner [Tue, 3 Feb 2009 01:30:09 +0000 (01:30 +0000)]
rearrange how SRoA handles promotion of allocas to vectors.
With the new world order, it can handle cases where the first
store into the alloca is an element of the vector, instead of
requiring the first analyzed store to have the vector type
itself.  This allows us to un-xfail
test/CodeGen/X86/vec_ins_extract.ll.

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

15 years agoMove isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp since
Dan Gohman [Tue, 3 Feb 2009 01:28:32 +0000 (01:28 +0000)]
Move isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp since
they are useful to analyses other than BasicAliasAnalysis.cpp. Include
the full comment for isIdentifiedObject in the header file. Thanks to
Chris for suggeseting this.

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

15 years agothis test produces an undefined value, we don't care
Chris Lattner [Tue, 3 Feb 2009 01:13:52 +0000 (01:13 +0000)]
this test produces an undefined value, we don't care
what it is, but we do want the alloca promoted.

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

15 years agoPropagate debug loc info during SDNode -> machine instr creation.
Bill Wendling [Tue, 3 Feb 2009 01:02:39 +0000 (01:02 +0000)]
Propagate debug loc info during SDNode -> machine instr creation.

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

15 years agoCreate DebugLoc information in FastISel. Several temporary methods were
Bill Wendling [Tue, 3 Feb 2009 00:55:04 +0000 (00:55 +0000)]
Create DebugLoc information in FastISel. Several temporary methods were
created. Specifically, those BuildMIs which use
"DebugLoc::getUnknownLoc()". I'll remove them soon.

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

15 years agoPropagation in TargetLowering. Includes passing a DL
Dale Johannesen [Tue, 3 Feb 2009 00:47:48 +0000 (00:47 +0000)]
Propagation in TargetLowering.  Includes passing a DL
into SimplifySetCC which gets called elsewhere.

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

15 years agoIt fails on Linux. XFAIL that machine.
Bill Wendling [Tue, 3 Feb 2009 00:35:11 +0000 (00:35 +0000)]
It fails on Linux. XFAIL that machine.

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

15 years agoThis is passing for us. Should it have been reenabled?
Bill Wendling [Tue, 3 Feb 2009 00:27:09 +0000 (00:27 +0000)]
This is passing for us. Should it have been reenabled?

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

15 years agoAdd explicit -march=x86 to these tests so that they don't
Dan Gohman [Tue, 3 Feb 2009 00:20:22 +0000 (00:20 +0000)]
Add explicit -march=x86 to these tests so that they don't
default to -march=x86-64 on 64-bit hosts.

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

15 years agoUse the SubclassData field to hold ExtType, isTrunc, and MemIndexedMode
Dan Gohman [Tue, 3 Feb 2009 00:08:45 +0000 (00:08 +0000)]
Use the SubclassData field to hold ExtType, isTrunc, and MemIndexedMode
information. This eliminates the need for the Flags field in MemSDNode,
so this makes LoadSDNode and StoreSDNode smaller. Also, it makes
FoldingSetNodeIDs for loads and stores two AddIntegers smaller.

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

15 years agoChange Feature64Bit to not imply FeatureSSE2. All x86-64 hardware has
Dan Gohman [Tue, 3 Feb 2009 00:04:43 +0000 (00:04 +0000)]
Change Feature64Bit to not imply FeatureSSE2. All x86-64 hardware has
SSE2, however it's possible to disable SSE2, and the subtarget support
code thinks that if 64-bit implies SSE2 and SSE2 is disabled then
64-bit should also be disabled. Instead, just mark all the 64-bit
subtargets as explicitly supporting SSE2.

Also, move the code that makes -march=x86-64 enable 64-bit support by
default to only apply when there is no explicit subtarget. If you
need to specify a subtarget and you want 64-bit code, you'll need to
select a subtarget that supports 64-bit code.

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

15 years agoLast DebugLoc propagation for this file.
Dale Johannesen [Mon, 2 Feb 2009 23:46:53 +0000 (23:46 +0000)]
Last DebugLoc propagation for this file.

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

15 years agoFix another test to not use -mcpu=yonah with 64-bit code.
Dan Gohman [Mon, 2 Feb 2009 23:43:59 +0000 (23:43 +0000)]
Fix another test to not use -mcpu=yonah with 64-bit code.

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

15 years agoYonah does not support x86-64. Change the -mcpu value to one that does.
Dan Gohman [Mon, 2 Feb 2009 22:50:08 +0000 (22:50 +0000)]
Yonah does not support x86-64. Change the -mcpu value to one that does.

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

15 years agoMore DebugLoc propagation. This should be everything
Dale Johannesen [Mon, 2 Feb 2009 22:49:46 +0000 (22:49 +0000)]
More DebugLoc propagation.  This should be everything
except LegalizeOp itself.

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

15 years agoImprove -fno-opt style option processing to not require an extra
Mike Stump [Mon, 2 Feb 2009 22:48:49 +0000 (22:48 +0000)]
Improve -fno-opt style option processing to not require an extra
option to make the -fno- form on the option.  We also document the new
form in the CommandLine documentation.

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

15 years agoMergeValueInto is too smart: it might choose to do the merge the opposite direction.
Owen Anderson [Mon, 2 Feb 2009 22:42:01 +0000 (22:42 +0000)]
MergeValueInto is too smart: it might choose to do the merge the opposite direction.
Live interval reconstruction needs to account for this, and scour its maps to
prevent dangling references.

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

15 years agoDebugLoc propagation. ExpandOp and PromoteOp,
Dale Johannesen [Mon, 2 Feb 2009 22:12:50 +0000 (22:12 +0000)]
DebugLoc propagation.  ExpandOp and PromoteOp,
among others.

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

15 years agoOnly force SSE level if it is not correct.
Torok Edwin [Mon, 2 Feb 2009 21:57:34 +0000 (21:57 +0000)]
Only force SSE level if it is not correct.
Add an assert to check HasX86_64 status.

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

15 years agoRun dsymutil on darwin, when it is expected, before running gdb test.
Devang Patel [Mon, 2 Feb 2009 21:09:36 +0000 (21:09 +0000)]
Run dsymutil on darwin, when it is expected, before running gdb test.

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

15 years agoCommit missing files.
Dale Johannesen [Mon, 2 Feb 2009 20:47:48 +0000 (20:47 +0000)]
Commit missing files.

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

15 years agoinline SROA::ConvertToScalar, no functionality change.
Chris Lattner [Mon, 2 Feb 2009 20:44:45 +0000 (20:44 +0000)]
inline SROA::ConvertToScalar, no functionality change.

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

15 years agoMore DebugLoc propagation.
Dale Johannesen [Mon, 2 Feb 2009 20:41:04 +0000 (20:41 +0000)]
More DebugLoc propagation.

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

15 years agoremove #if 0 code on Bill's request.
Torok Edwin [Mon, 2 Feb 2009 20:23:02 +0000 (20:23 +0000)]
remove #if 0 code on Bill's request.

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

15 years agoRemove trailing spaces.
Duncan Sands [Mon, 2 Feb 2009 19:46:41 +0000 (19:46 +0000)]
Remove trailing spaces.

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

15 years agoUpdate hand-crafted VC++ build.
Steve Naroff [Mon, 2 Feb 2009 19:22:02 +0000 (19:22 +0000)]
Update hand-crafted VC++ build.
- Add PACKAGE_STRING definition to Windows config.h.

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