oota-llvm.git
15 years agoReposition the DebugLoc field to reduce padding space
Dan Gohman [Mon, 2 Feb 2009 18:04:24 +0000 (18:04 +0000)]
Reposition the DebugLoc field to reduce padding space
on LP64 hosts.

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

15 years agoFix a bug which caused us to miscompile a couple of Ada
Chris Lattner [Mon, 2 Feb 2009 18:02:59 +0000 (18:02 +0000)]
Fix a bug which caused us to miscompile a couple of Ada
tests.  Thanks for the beautiful reduced testcase Duncan!

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

15 years agoDo not add redundant arguments in a method definition DIE.
Devang Patel [Mon, 2 Feb 2009 17:51:41 +0000 (17:51 +0000)]
Do not add redundant arguments in a method definition DIE.

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

15 years agoMake this test case smaller.
Devang Patel [Mon, 2 Feb 2009 17:50:43 +0000 (17:50 +0000)]
Make this test case smaller.

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

15 years agoDuncan's patch. Further to 64382. Takes care of illegal types for shift amount.
Sanjiv Gupta [Mon, 2 Feb 2009 17:19:39 +0000 (17:19 +0000)]
Duncan's patch. Further to 64382. Takes care of illegal types for shift amount.

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

15 years agoMade the common case of default address space directive as non-virtual for performanc...
Sanjiv Gupta [Mon, 2 Feb 2009 16:53:06 +0000 (16:53 +0000)]
Made the common case of default address space directive as non-virtual for performance reasons. Provide a single virtual interface for directives of all sizes in  non-default address spaces.

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

15 years agoFix a comment (bytes -> bits), reformat a comment
Duncan Sands [Mon, 2 Feb 2009 10:06:20 +0000 (10:06 +0000)]
Fix a comment (bytes -> bits), reformat a comment
and remove trailing whitespace.  No functionality
change.

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

15 years agoFix an obvious thinko.
Duncan Sands [Mon, 2 Feb 2009 09:53:14 +0000 (09:53 +0000)]
Fix an obvious thinko.

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

15 years agoADD / SUB / SMUL / UMUL with overflow second result top bits must be zero.
Evan Cheng [Mon, 2 Feb 2009 09:15:04 +0000 (09:15 +0000)]
ADD / SUB / SMUL / UMUL with overflow second result top bits must be zero.

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

15 years agoThis passes on x86-32 linux at least.
Duncan Sands [Mon, 2 Feb 2009 09:10:57 +0000 (09:10 +0000)]
This passes on x86-32 linux at least.

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

15 years agoMake the XFAIL line actually match x86-32 targets.
Duncan Sands [Mon, 2 Feb 2009 09:07:13 +0000 (09:07 +0000)]
Make the XFAIL line actually match x86-32 targets.

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

15 years agoAdd comment.
Evan Cheng [Mon, 2 Feb 2009 08:19:07 +0000 (08:19 +0000)]
Add comment.

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

15 years agoTeach LowerBRCOND to recognize (xor (setcc x), 1). The xor inverts the condition...
Evan Cheng [Mon, 2 Feb 2009 08:07:36 +0000 (08:07 +0000)]
Teach LowerBRCOND to recognize (xor (setcc x), 1). The xor inverts the condition. It's normally transformed by the dag combiner, unless the condition is set by a arithmetic op with overflow.

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

15 years agoreject things like: zext <4 x i32> %tmp to i256
Chris Lattner [Mon, 2 Feb 2009 07:40:17 +0000 (07:40 +0000)]
reject things like: zext <4 x i32> %tmp to i256

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

15 years agovalidation error fix.
Chris Lattner [Mon, 2 Feb 2009 07:33:15 +0000 (07:33 +0000)]
validation error fix.

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

15 years agoDocument type upreferences (PR3380), patch by Stein Roger Skafløtten
Chris Lattner [Mon, 2 Feb 2009 07:32:36 +0000 (07:32 +0000)]
Document type upreferences (PR3380), patch by Stein Roger Skafløtten
with enhancements and corrections by me.

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

15 years agoFix PR3372
Chris Lattner [Mon, 2 Feb 2009 07:24:28 +0000 (07:24 +0000)]
Fix PR3372

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

15 years agoreduce indentation, (~XorCST->getValue()).isSignBit() -> isMaxSignedValue()
Chris Lattner [Mon, 2 Feb 2009 07:15:30 +0000 (07:15 +0000)]
reduce indentation, (~XorCST->getValue()).isSignBit() -> isMaxSignedValue()

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

15 years agoreduce testcase.
Chris Lattner [Mon, 2 Feb 2009 06:55:45 +0000 (06:55 +0000)]
reduce testcase.

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

15 years agoPreserve more SourceValue information.
Mon P Wang [Mon, 2 Feb 2009 06:37:55 +0000 (06:37 +0000)]
Preserve more SourceValue information.

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

15 years agoadd 2 more testcases for -mattr=-sse (r63495).
Torok Edwin [Sun, 1 Feb 2009 18:24:20 +0000 (18:24 +0000)]
add 2 more testcases for -mattr=-sse (r63495).
--This line, and those below, will be ignaored--

A    test/CodeGen/X86/nosse-error1.ll
A    test/CodeGen/X86/nosse-error2.ll

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

15 years agoImplement -mno-sse: if SSE is disabled on x86-64, don't store XMM on stack for
Torok Edwin [Sun, 1 Feb 2009 18:15:56 +0000 (18:15 +0000)]
Implement -mno-sse: if SSE is disabled on x86-64, don't store XMM on stack for
var-args, and don't allow FP return values

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

15 years agoFix PR3453 and probably a bunch of other potential
Duncan Sands [Sun, 1 Feb 2009 18:06:53 +0000 (18:06 +0000)]
Fix PR3453 and probably a bunch of other potential
crashes or wrong code with codegen of large integers:
eliminate the legacy getIntegerVTBitMask and
getIntegerVTSignBit methods, which returned their
value as a uint64_t, so couldn't handle huge types.

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

15 years agoForgot some more DebugLoc propagations.
Bill Wendling [Sun, 1 Feb 2009 11:19:36 +0000 (11:19 +0000)]
Forgot some more DebugLoc propagations.

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

15 years agoFix test failures causes by my previous commit.
Owen Anderson [Sun, 1 Feb 2009 08:41:54 +0000 (08:41 +0000)]
Fix test failures causes by my previous commit.

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

15 years agoFix an issue in PHI construction that was exposed by GCC 4.2 producing a different...
Owen Anderson [Sun, 1 Feb 2009 07:06:00 +0000 (07:06 +0000)]
Fix an issue in PHI construction that was exposed by GCC 4.2 producing a different set iteration order for the reg_iterator.

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

15 years agoFix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.
Evan Cheng [Sun, 1 Feb 2009 06:42:27 +0000 (06:42 +0000)]
Fix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.

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

15 years agoDebugLoc propagation.
Dale Johannesen [Sat, 31 Jan 2009 22:04:51 +0000 (22:04 +0000)]
DebugLoc propagation.

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

15 years agoReinstate this optimization to fold icmp of xor when possible. Don't try to
Nick Lewycky [Sat, 31 Jan 2009 21:30:05 +0000 (21:30 +0000)]
Reinstate this optimization to fold icmp of xor when possible. Don't try to
turn icmp eq a+x, b+x into icmp eq a, b if a+x or b+x has other uses. This
may have been increasing register pressure leading to the bzip2 slowdown.

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

15 years agoDebugLoc propagation. Done with file.
Dale Johannesen [Sat, 31 Jan 2009 21:04:24 +0000 (21:04 +0000)]
DebugLoc propagation.  Done with file.

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

15 years agoDebugLoc propagation. Done with file.
Dale Johannesen [Sat, 31 Jan 2009 20:01:02 +0000 (20:01 +0000)]
DebugLoc propagation.  Done with file.

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

15 years agoFix PR3452 (an infinite loop bootstrapping) by disabling the recent
Chris Lattner [Sat, 31 Jan 2009 19:05:27 +0000 (19:05 +0000)]
Fix PR3452 (an infinite loop bootstrapping) by disabling the recent
improvements to the EvaluateInDifferentType code.  This code works
by just inserted a bunch of new code and then seeing if it is
useful.  Instcombine is not allowed to do this: it can only insert
new code if it is useful, and only when it is converging to a more
canonical fixed point.  Now that we iterate when DCE makes progress,
this causes an infinite loop when the code ends up not being used.

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

15 years agoFix PR3401: when using large integers, the type
Duncan Sands [Sat, 31 Jan 2009 15:50:11 +0000 (15:50 +0000)]
Fix PR3401: when using large integers, the type
returned by getShiftAmountTy may be too small
to hold shift values (it is an i8 on x86-32).
Before and during type legalization, use a large
but legal type for shift amounts: getPointerTy;
afterwards use getShiftAmountTy, fixing up any
shift amounts with a big type during operation
legalization.  Thanks to Dan for writing the
original patch (which I shamelessly pillaged).

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

15 years agonow that all the pieces are in place, teach instcombine's
Chris Lattner [Sat, 31 Jan 2009 08:40:03 +0000 (08:40 +0000)]
now that all the pieces are in place, teach instcombine's
simplifydemandedbits to simplify instructions with *multiple
uses* in contexts where it can get away with it.  This allows
it to simplify the code in multi-use-or.ll into a single 'add
double'.

This change is particularly interesting because it will cover
up for some common codegen bugs with large integers created due
to the recent SROA patch.  When working on fixing those bugs,
this should be disabled.

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

15 years agosimplify/clarify control flow and improve comments, no functionality change.
Chris Lattner [Sat, 31 Jan 2009 08:24:16 +0000 (08:24 +0000)]
simplify/clarify control flow and improve comments, no functionality change.

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

15 years agomake some fairly meaty internal changes to how SimplifyDemandedBits works.
Chris Lattner [Sat, 31 Jan 2009 08:15:18 +0000 (08:15 +0000)]
make some fairly meaty internal changes to how SimplifyDemandedBits works.
Now, if it detects that "V" is the same as some other value,
SimplifyDemandedBits returns the new value instead of RAUW'ing it immediately.
This has two benefits:
1) simpler code in the recursive SimplifyDemandedBits routine.
2) it allows future fun stuff in instcombine where an operation has multiple
   uses and can be simplified in one context, but not all.

#2 isn't implemented yet, this patch should have no functionality change.

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

15 years agoadd accessors
Chris Lattner [Sat, 31 Jan 2009 07:34:19 +0000 (07:34 +0000)]
add accessors

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

15 years agominor cleanups
Chris Lattner [Sat, 31 Jan 2009 07:26:06 +0000 (07:26 +0000)]
minor cleanups

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

15 years agomake sure to set Changed=true when instcombine hacks on the code,
Chris Lattner [Sat, 31 Jan 2009 07:04:22 +0000 (07:04 +0000)]
make sure to set Changed=true when instcombine hacks on the code,
not doing so prevents it from properly iterating and prevents it
from deleting the entire body of dce-iterate.ll

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

15 years agoUsed "-enable-unsafe-fp-math" to allow this transformation - (a * b -c) = c - a *b.
Mon P Wang [Sat, 31 Jan 2009 06:50:54 +0000 (06:50 +0000)]
Used "-enable-unsafe-fp-math" to allow this transformation - (a * b -c) = c - a *b.

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

15 years agoIf unsafe FP optimization is not set, don't allow -(A-B) => B-A because
Mon P Wang [Sat, 31 Jan 2009 06:07:45 +0000 (06:07 +0000)]
If unsafe FP optimization is not set, don't allow -(A-B) => B-A because
when A==B, -0.0 != +0.0.

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

15 years agoDon't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.
Bill Wendling [Sat, 31 Jan 2009 03:12:48 +0000 (03:12 +0000)]
Don't use DebugLoc::getUnknownLoc(). Default to something hopefully sensible.

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

15 years agoSimplify and generalize the SROA "convert to scalar" transformation to
Chris Lattner [Sat, 31 Jan 2009 02:28:54 +0000 (02:28 +0000)]
Simplify and generalize the SROA "convert to scalar" transformation to
be able to handle *ANY* alloca that is poked by loads and stores of
bitcasts and GEPs with constant offsets.  Before the code had a number
of annoying limitations and caused it to miss cases such as storing into
holes in structs and complex casts (as in bitfield-sroa) where we had
unions of bitfields etc.  This also handles a number of important cases
that are exposed due to the ABI lowering stuff we do to pass stuff by
value.

One case that is pretty great is that we compile
2006-11-07-InvalidArrayPromote.ll into:

define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind {
%tmp10 = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %v1)
%tmp105 = bitcast <4 x i32> %tmp10 to i128
%tmp1056 = zext i128 %tmp105 to i256
%tmp.upgrd.43 = lshr i256 %tmp1056, 96
%tmp.upgrd.44 = trunc i256 %tmp.upgrd.43 to i32
ret i32 %tmp.upgrd.44
}

which turns into:

_func:
subl $28, %esp
cvttps2dq %xmm1, %xmm0
movaps %xmm0, (%esp)
movl 12(%esp), %eax
addl $28, %esp
ret

Which is pretty good code all things considering :).

One effect of this is that SROA will start generating arbitrary bitwidth
integers that are a multiple of 8 bits.  In the case above, we got a
256 bit integer, but the codegen guys assure me that it can handle the
simple and/or/shift/zext stuff that we're doing on these operations.

This addresses rdar://6532315

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

15 years agoMove CurDebugLoc into SelectionDAGLowering.
Dale Johannesen [Sat, 31 Jan 2009 02:22:37 +0000 (02:22 +0000)]
Move CurDebugLoc into SelectionDAGLowering.

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

15 years agoback out my previous change, it exposes a latent bug. investigating
Gabor Greif [Sat, 31 Jan 2009 01:31:59 +0000 (01:31 +0000)]
back out my previous change, it exposes a latent bug. investigating

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

15 years agouse precise accessors
Gabor Greif [Sat, 31 Jan 2009 00:58:14 +0000 (00:58 +0000)]
use precise accessors

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

15 years agoPropagate debug info in LegalizeFloatTypes.
Dale Johannesen [Sat, 31 Jan 2009 00:43:08 +0000 (00:43 +0000)]
Propagate debug info in LegalizeFloatTypes.
Complete (modulo bugs).

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

15 years agoPropagate debug info. This file complete
Dale Johannesen [Sat, 31 Jan 2009 00:20:43 +0000 (00:20 +0000)]
Propagate debug info.  This file complete
(modulo bugs)

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

15 years agoPropagate debug info through MakeLibCall and a
Dale Johannesen [Sat, 31 Jan 2009 00:11:23 +0000 (00:11 +0000)]
Propagate debug info through MakeLibCall and a
couple of things that use it.

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

15 years agoMore DebugLoc propagation.
Bill Wendling [Fri, 30 Jan 2009 23:59:18 +0000 (23:59 +0000)]
More DebugLoc propagation.

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

15 years agoMore DebugLoc propagation.
Bill Wendling [Fri, 30 Jan 2009 23:36:47 +0000 (23:36 +0000)]
More DebugLoc propagation.

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

15 years agoMore DebugLoc propagation in LOAD etc. methods.
Bill Wendling [Fri, 30 Jan 2009 23:27:35 +0000 (23:27 +0000)]
More DebugLoc propagation in LOAD etc. methods.

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

15 years agoFix build on case-sensitive filesystems (i.e. everybody else)
Dale Johannesen [Fri, 30 Jan 2009 23:20:42 +0000 (23:20 +0000)]
Fix build on case-sensitive filesystems (i.e. everybody else)

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

15 years agoMore DebugLoc propagation in floating-point methods.
Bill Wendling [Fri, 30 Jan 2009 23:15:49 +0000 (23:15 +0000)]
More DebugLoc propagation in floating-point methods.

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

15 years agoMake LowerCallTo and LowerArguments take a DebugLoc
Dale Johannesen [Fri, 30 Jan 2009 23:10:59 +0000 (23:10 +0000)]
Make LowerCallTo and LowerArguments take a DebugLoc
argument.  Adjust all callers and overloaded versions.

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

15 years agoStandardize comments about folding xforms.
Bill Wendling [Fri, 30 Jan 2009 23:10:18 +0000 (23:10 +0000)]
Standardize comments about folding xforms.

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

15 years agoGet rid of the non-DebugLoc-ified getNOT() method.
Bill Wendling [Fri, 30 Jan 2009 23:03:19 +0000 (23:03 +0000)]
Get rid of the non-DebugLoc-ified getNOT() method.

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

15 years agoPropagate debug loc info for some FP arithmetic methods.
Bill Wendling [Fri, 30 Jan 2009 22:57:07 +0000 (22:57 +0000)]
Propagate debug loc info for some FP arithmetic methods.

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

15 years agoPropagate debug loc info for some FP arithmetic methods.
Bill Wendling [Fri, 30 Jan 2009 22:53:48 +0000 (22:53 +0000)]
Propagate debug loc info for some FP arithmetic methods.

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

15 years agoPropagate debug loc info for BIT_CONVERT.
Bill Wendling [Fri, 30 Jan 2009 22:44:24 +0000 (22:44 +0000)]
Propagate debug loc info for BIT_CONVERT.

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

15 years agoPropagate debug loc info for more *_EXTEND methods.
Bill Wendling [Fri, 30 Jan 2009 22:33:24 +0000 (22:33 +0000)]
Propagate debug loc info for more *_EXTEND methods.

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

15 years agoPropagate debug loc info for ANY_EXTEND.
Bill Wendling [Fri, 30 Jan 2009 22:27:33 +0000 (22:27 +0000)]
Propagate debug loc info for ANY_EXTEND.

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

15 years agoPropagate debug loc info for some of the *_EXTEND functions.
Bill Wendling [Fri, 30 Jan 2009 22:23:15 +0000 (22:23 +0000)]
Propagate debug loc info for some of the *_EXTEND functions.

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

15 years agoDebugLoc form of getNOT().
Bill Wendling [Fri, 30 Jan 2009 22:11:22 +0000 (22:11 +0000)]
DebugLoc form of getNOT().

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

15 years ago- Propagate debug loc info for SELECT.
Bill Wendling [Fri, 30 Jan 2009 22:02:18 +0000 (22:02 +0000)]
- Propagate debug loc info for SELECT.
- Added xform for (select X, 1, Y) and (select X, Y, 0), which was commented on,
  but missing.

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

15 years agoPropagate debug loc info for Shifts.
Bill Wendling [Fri, 30 Jan 2009 21:37:17 +0000 (21:37 +0000)]
Propagate debug loc info for Shifts.

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

15 years agoPropagate debug loc info for XOR and MatchRotate.
Bill Wendling [Fri, 30 Jan 2009 21:14:50 +0000 (21:14 +0000)]
Propagate debug loc info for XOR and MatchRotate.

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

15 years agoPropagate debug loc info for OR. Also clean up some comments.
Bill Wendling [Fri, 30 Jan 2009 20:59:34 +0000 (20:59 +0000)]
Propagate debug loc info for OR. Also clean up some comments.

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

15 years agoPerform obvious constant arithmetic folding.
Bill Wendling [Fri, 30 Jan 2009 20:50:00 +0000 (20:50 +0000)]
Perform obvious constant arithmetic folding.

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

15 years agoPropagate debug loc info for AND. Also clean up some comments.
Bill Wendling [Fri, 30 Jan 2009 20:43:18 +0000 (20:43 +0000)]
Propagate debug loc info for AND. Also clean up some comments.

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

15 years agoPropagate debug loc info in SimplifyBinOpWithSameOpcodeHands.
Bill Wendling [Fri, 30 Jan 2009 19:25:47 +0000 (19:25 +0000)]
Propagate debug loc info in SimplifyBinOpWithSameOpcodeHands.

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

15 years agouse precise getters
Gabor Greif [Fri, 30 Jan 2009 18:27:21 +0000 (18:27 +0000)]
use precise getters

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

15 years agouse precise getters
Gabor Greif [Fri, 30 Jan 2009 18:21:13 +0000 (18:21 +0000)]
use precise getters

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

15 years ago Each input file is encoded as a separate compile unit in LLVM debugging
Devang Patel [Fri, 30 Jan 2009 18:20:31 +0000 (18:20 +0000)]
 Each input file is encoded as a separate compile unit in LLVM debugging
information output. However, many target specific tool chains prefer to encode
only one compile unit in an object file. In this situation, the LLVM code
generator will include  debugging information entities in the compile unit
that is marked as main compile unit. The code generator accepts maximum one main
compile unit per module. If a module does not contain any main compile unit
then the code generator will emit multiple compile units in the output object
file.

[Part 1]

Update DebugInfo APIs to accept optional boolean value while creating DICompileUnit  to mark the unit as "main" unit. By defaults all units are considered  non-main.  Update SourceLevelDebugging.html to document "main" compile unit.

Update DebugInfo APIs to not accept and encode separate source file/directory entries while creating various llvm.dbg.* entities. There was a recent, yet to be documented, change to include this additional information so no documentation changes are required here.

Update DwarfDebug to handle "main" compile unit. If "main" compile unit is seen then all DIEs are inserted into "main" compile unit. All other compile units are used to find source location for llvm.dbg.* values. If there is not any "main" compile unit then create unique compile unit DIEs for each llvm.dbg.compile_unit.

[Part 2]

Create separate llvm.dbg.compile_unit for each input file. Mark compile unit create for main_input_filename as "main" compile unit. Use appropriate compile unit, based on source location information collected from the tree node, while creating llvm.dbg.* values using DebugInfo APIs.

---

This is Part 1.

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

15 years agoAs Duncan suggested, add braces for the one-line "else branch".
Zhou Sheng [Fri, 30 Jan 2009 09:44:49 +0000 (09:44 +0000)]
As Duncan suggested, add braces for the one-line "else branch".
Thanks, Duncan.

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

15 years agoThis is to fix the bug in IntrinsicLowering.cpp,
Zhou Sheng [Fri, 30 Jan 2009 09:02:50 +0000 (09:02 +0000)]
This is to fix the bug in IntrinsicLowering.cpp,
the LowerPartSet(). It didn't handle the situation correctly when
the low, high argument values are in reverse order (low > high)
with 'Val' type i32 (a corner case).

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

15 years agoFixed the comment. No functionality change.
Sanjiv Gupta [Fri, 30 Jan 2009 09:01:44 +0000 (09:01 +0000)]
Fixed the comment. No functionality change.

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

15 years agoThis is case is to uncover the bug in IntrinsicLowering.cpp,
Zhou Sheng [Fri, 30 Jan 2009 08:59:51 +0000 (08:59 +0000)]
This is case is to uncover the bug in IntrinsicLowering.cpp,
the LowerPartSet(). It didn't handle the situation correctly when
the low, high argument values are in reverse order (low > high)
with 'Val' type is i32 (a corner case).

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

15 years agoAdd opposite_of and inverse_opt to support -fno- style options. This
Mike Stump [Fri, 30 Jan 2009 08:19:46 +0000 (08:19 +0000)]
Add opposite_of and inverse_opt to support -fno- style options.  This
is necessary for eventual gcc commmand line compatibility.

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

15 years agoUse sublw for comparison with literals instead of subwf.
Sanjiv Gupta [Fri, 30 Jan 2009 07:55:25 +0000 (07:55 +0000)]
Use sublw for comparison with literals instead of subwf.

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

15 years agoWhen PerformBuildVectorCombine, avoid creating a X86ISD::VZEXT_LOAD of
Mon P Wang [Fri, 30 Jan 2009 07:07:40 +0000 (07:07 +0000)]
When PerformBuildVectorCombine, avoid creating a X86ISD::VZEXT_LOAD of
an illegal type.

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

15 years agoEnable emitting of constant values in non-default address space as well. The APIs...
Sanjiv Gupta [Fri, 30 Jan 2009 04:25:10 +0000 (04:25 +0000)]
Enable emitting of constant values in non-default address space as well. The APIs emitting constants now take an additional parameter signifying the address space in which to emit. The APIs like getData8BitsDirective() etc are made virtual enabling targets to be able to define appropirate directivers for various sizes and address spaces.

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

15 years agoPropagate debug loc info in SimplifyNodeWithTwoResults.
Bill Wendling [Fri, 30 Jan 2009 03:08:40 +0000 (03:08 +0000)]
Propagate debug loc info in SimplifyNodeWithTwoResults.

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

15 years agoPropagate debug loc info for MULHS.
Bill Wendling [Fri, 30 Jan 2009 03:00:18 +0000 (03:00 +0000)]
Propagate debug loc info for MULHS.

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

15 years agoPropagate debug loc info for SREM and UREM.
Bill Wendling [Fri, 30 Jan 2009 02:57:00 +0000 (02:57 +0000)]
Propagate debug loc info for SREM and UREM.

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

15 years agoPropagate debug loc info for UDIV.
Bill Wendling [Fri, 30 Jan 2009 02:55:25 +0000 (02:55 +0000)]
Propagate debug loc info for UDIV.

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

15 years agoPropagate debug loc info for SDIV.
Bill Wendling [Fri, 30 Jan 2009 02:52:17 +0000 (02:52 +0000)]
Propagate debug loc info for SDIV.

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

15 years agoForgot to propagate debug loc info here.
Bill Wendling [Fri, 30 Jan 2009 02:49:26 +0000 (02:49 +0000)]
Forgot to propagate debug loc info here.

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

15 years agoFix a post-RA scheduling dependency bug.
Dan Gohman [Fri, 30 Jan 2009 02:49:14 +0000 (02:49 +0000)]
Fix a post-RA scheduling dependency bug.

If a MachineInstr doesn't have a memoperand but has an opcode that
is known to load or store, assume its memory reference may alias
*anything*, including stack slots which the compiler completely
controls.

To partially compensate for this, teach the ScheduleDAG building
code to do basic getUnderlyingValue analysis. This greatly
reduces the number of instructions that require restrictive
dependencies. This code will need to be revisited when we start
doing real alias analysis, but it should suffice for now.

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

15 years agoPropagate debug loc info for MUL.
Bill Wendling [Fri, 30 Jan 2009 02:45:56 +0000 (02:45 +0000)]
Propagate debug loc info for MUL.

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

15 years agoPropagate debug loc info in SUB.
Bill Wendling [Fri, 30 Jan 2009 02:42:10 +0000 (02:42 +0000)]
Propagate debug loc info in SUB.

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

15 years agoPropagate debug loc info in ADDC and ADDE.
Bill Wendling [Fri, 30 Jan 2009 02:38:00 +0000 (02:38 +0000)]
Propagate debug loc info in ADDC and ADDE.

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

15 years agoPropagate debug loc info in DAG combine's "ADD".
Bill Wendling [Fri, 30 Jan 2009 02:31:17 +0000 (02:31 +0000)]
Propagate debug loc info in DAG combine's "ADD".

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

15 years ago- Propagate debug loc info in combineSelectAndUse().
Bill Wendling [Fri, 30 Jan 2009 02:23:43 +0000 (02:23 +0000)]
- Propagate debug loc info in combineSelectAndUse().
- Modify ReassociateOps so that the resulting SDValue is what the comment claims
  it is.

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

15 years agoAdd some comments.
Mikhail Glushenkov [Fri, 30 Jan 2009 02:12:57 +0000 (02:12 +0000)]
Add some comments.

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

15 years agoFix a bug in getMaxValue/getMinValue to pass the right signedness the
Chris Lattner [Fri, 30 Jan 2009 01:58:19 +0000 (01:58 +0000)]
Fix a bug in getMaxValue/getMinValue to pass the right signedness the
the constructed APSInt, patch suggested by Ben Laurie!

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

15 years agoEnable target tripple.
Devang Patel [Fri, 30 Jan 2009 01:40:58 +0000 (01:40 +0000)]
Enable target tripple.

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

15 years agoLinux and other target's encoding for DW_AT_declaration may not match.
Devang Patel [Fri, 30 Jan 2009 01:37:30 +0000 (01:37 +0000)]
Linux and other target's  encoding for DW_AT_declaration may not match.

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

15 years agoPropagate debug info when building SelectionDAG.
Dale Johannesen [Fri, 30 Jan 2009 01:34:22 +0000 (01:34 +0000)]
Propagate debug info when building SelectionDAG.

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

15 years agoRemove dead code, again.
Devang Patel [Fri, 30 Jan 2009 01:27:49 +0000 (01:27 +0000)]
Remove dead code, again.

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