oota-llvm.git
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

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

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

15 years agoAdd DW_AT_declaration for class methods.
Devang Patel [Fri, 30 Jan 2009 01:21:46 +0000 (01:21 +0000)]
Add DW_AT_declaration for class methods.

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

15 years agoPropagate debug location info for the token factor.
Bill Wendling [Fri, 30 Jan 2009 01:13:16 +0000 (01:13 +0000)]
Propagate debug location info for the token factor.

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

15 years agoAdd dump() routines to help debug debug info :)
Devang Patel [Fri, 30 Jan 2009 01:03:10 +0000 (01:03 +0000)]
Add dump() routines to help debug debug info :)

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

15 years agoAdd DebugLoc propagation to some of the methods in DAG combiner.
Bill Wendling [Fri, 30 Jan 2009 00:45:56 +0000 (00:45 +0000)]
Add DebugLoc propagation to some of the methods in DAG combiner.

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

15 years agoExplain why this is here.
Bill Wendling [Thu, 29 Jan 2009 23:19:43 +0000 (23:19 +0000)]
Explain why this is here.

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

15 years agoXFAIL this test. It only worked before because of a bug in the spill point selection...
Owen Anderson [Thu, 29 Jan 2009 22:27:56 +0000 (22:27 +0000)]
XFAIL this test.  It only worked before because of a bug in the spill point selection code.  Not deleting because
it should be possible to enhance the selection code to handle this in the future.

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

15 years agoCorrect the algorithms for choosing spill and restore points so that we don't try...
Owen Anderson [Thu, 29 Jan 2009 22:13:06 +0000 (22:13 +0000)]
Correct the algorithms for choosing spill and restore points so that we don't try to insert loads/stores between call frame setup and the actual call.

This fixes the last known failure for the pre-alloc-splitter.

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

15 years agoExplicitly add PseudoSourceValue information when lowering
Dan Gohman [Thu, 29 Jan 2009 21:02:43 +0000 (21:02 +0000)]
Explicitly add PseudoSourceValue information when lowering
BUILD_VECTOR and conversions to stack operations.

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

15 years agoMake a few things const, fix some comments, and simplify
Dan Gohman [Thu, 29 Jan 2009 19:49:27 +0000 (19:49 +0000)]
Make a few things const, fix some comments, and simplify
some assertions.

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

15 years agoFix windows build, patch by Marius Wachtler!
Chris Lattner [Thu, 29 Jan 2009 18:53:28 +0000 (18:53 +0000)]
Fix windows build, patch by Marius Wachtler!

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

15 years agoLocal register allocator shouldn't assume only the entry and landing pad basic blocks...
Evan Cheng [Thu, 29 Jan 2009 18:37:30 +0000 (18:37 +0000)]
Local register allocator shouldn't assume only the entry and landing pad basic blocks have live-ins.

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

15 years agoFix two typos that Duncan spotted in a comment.
Dan Gohman [Thu, 29 Jan 2009 16:18:12 +0000 (16:18 +0000)]
Fix two typos that Duncan spotted in a comment.

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

15 years agoIn the case of an extractelement on an insertelement value,
Dan Gohman [Thu, 29 Jan 2009 16:10:46 +0000 (16:10 +0000)]
In the case of an extractelement on an insertelement value,
the element indices may be equal if either one is not a
constant.

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

15 years agoAdd a always_inline test case.
Evan Cheng [Thu, 29 Jan 2009 09:31:54 +0000 (09:31 +0000)]
Add a always_inline test case.

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

15 years agoRevert r63273. This was already implemented by Dale. There's no need for my
Bill Wendling [Thu, 29 Jan 2009 09:01:55 +0000 (09:01 +0000)]
Revert r63273. This was already implemented by Dale. There's no need for my
change.

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

15 years agoAdd a test case for Chris lvalue alignment fixes.
Evan Cheng [Thu, 29 Jan 2009 08:59:46 +0000 (08:59 +0000)]
Add a test case for Chris lvalue alignment fixes.

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

15 years agoFix an issue where restores could be inserted after a terminator instruction,
Owen Anderson [Thu, 29 Jan 2009 08:22:06 +0000 (08:22 +0000)]
Fix an issue where restores could be inserted after a terminator instruction,
and an iterator invalidation issue.

FreeBench/pifft no longer miscompiles with these fixes!

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

15 years agoComments are good. :-)
Owen Anderson [Thu, 29 Jan 2009 05:41:02 +0000 (05:41 +0000)]
Comments are good. :-)

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

15 years agoAdd support for aggressive load-use-store folding. This takes care of the
Owen Anderson [Thu, 29 Jan 2009 05:28:55 +0000 (05:28 +0000)]
Add support for aggressive load-use-store folding.  This takes care of the
vast majority of code size regressions introduced by pre-alloc-splitting.

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

15 years ago- Add DebugLoc to getTargetNode().
Bill Wendling [Thu, 29 Jan 2009 05:27:31 +0000 (05:27 +0000)]
- Add DebugLoc to getTargetNode().
- Modify TableGen to add the DebugLoc when calling getTargetNode.

(The light-weight wrappers are only temporary. The non-DebugLoc version will be
removed once the whole debug info stuff is finished with.)

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

15 years agoFix PR3424, a static constructor ordering issue. Patch by Robert Schuster!
Chris Lattner [Thu, 29 Jan 2009 04:43:42 +0000 (04:43 +0000)]
Fix PR3424, a static constructor ordering issue.  Patch by Robert Schuster!

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

15 years agoExit with nice warnings when register allocator run out of registers.
Evan Cheng [Thu, 29 Jan 2009 02:20:59 +0000 (02:20 +0000)]
Exit with nice warnings when register allocator run out of registers.

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

15 years agoMake x86's BT instruction matching more thorough, and add some
Dan Gohman [Thu, 29 Jan 2009 01:59:02 +0000 (01:59 +0000)]
Make x86's BT instruction matching more thorough, and add some
dagcombines that help it match in several more cases. Add
several more cases to test/CodeGen/X86/bt.ll. This doesn't
yet include matching for BT with an immediate operand, it
just covers more register+register cases.

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

15 years agoMove the code that starts printing the Select_* functions
Dan Gohman [Thu, 29 Jan 2009 01:37:18 +0000 (01:37 +0000)]
Move the code that starts printing the Select_* functions
after the code that sorts the patterns. This doesn't
affect the output, but it makes the code a little easier
to follow.

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

15 years agoA slight compile time optimization. If the caller knows there isn't a free register...
Evan Cheng [Thu, 29 Jan 2009 01:13:00 +0000 (01:13 +0000)]
A slight compile time optimization. If the caller knows there isn't a free register getReg() should not call getFreeReg().

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

15 years agoAdd DebugLoc-sensitive versions of many node creation
Dale Johannesen [Thu, 29 Jan 2009 00:47:48 +0000 (00:47 +0000)]
Add DebugLoc-sensitive versions of many node creation
functions.  Currently omitted:  memcpy, memmove, memset.

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

15 years agoFix comment about removeRange.
Evan Cheng [Thu, 29 Jan 2009 00:06:09 +0000 (00:06 +0000)]
Fix comment about removeRange.

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

15 years agoFixed lowering of v816 shuffles.
Mon P Wang [Wed, 28 Jan 2009 23:11:14 +0000 (23:11 +0000)]
Fixed lowering of v816 shuffles.

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

15 years agoMake test platform agnostic.
Bill Wendling [Wed, 28 Jan 2009 22:20:56 +0000 (22:20 +0000)]
Make test platform agnostic.

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

15 years agoAdd DebugLoc to the getNode() methods.
Bill Wendling [Wed, 28 Jan 2009 22:17:52 +0000 (22:17 +0000)]
Add DebugLoc to the getNode() methods.

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

15 years agoGive this test an explicit target, to make it host-independent.
Dan Gohman [Wed, 28 Jan 2009 22:14:58 +0000 (22:14 +0000)]
Give this test an explicit target, to make it host-independent.

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

15 years agoSDOperand has been renamed to SDValue. SDNode::Val is now
Dan Gohman [Wed, 28 Jan 2009 21:36:46 +0000 (21:36 +0000)]
SDOperand has been renamed to SDValue. SDNode::Val is now
accessed via SDNode::getNode.

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

15 years agoAdd more comments describing SDNode operator codes.
Dan Gohman [Wed, 28 Jan 2009 21:34:36 +0000 (21:34 +0000)]
Add more comments describing SDNode operator codes.

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

15 years agoAdd DebugLoc-aware constructors for SDNode derived
Dale Johannesen [Wed, 28 Jan 2009 21:18:29 +0000 (21:18 +0000)]
Add DebugLoc-aware constructors for SDNode derived
classes (those that reasonably have a DebugLoc
associated with them).

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

15 years agoAdd some comments on ISD::NodeType.
Dan Gohman [Wed, 28 Jan 2009 21:13:08 +0000 (21:13 +0000)]
Add some comments on ISD::NodeType.

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

15 years agoDo not forget to derived type while constructing an array type.
Devang Patel [Wed, 28 Jan 2009 21:08:20 +0000 (21:08 +0000)]
Do not forget to derived type while constructing an array type.

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

15 years agoFix some issues with volatility, move "CanConvertToScalar" check
Chris Lattner [Wed, 28 Jan 2009 20:16:43 +0000 (20:16 +0000)]
Fix some issues with volatility, move "CanConvertToScalar" check
after the others.

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

15 years agostrengthen this test.
Chris Lattner [Wed, 28 Jan 2009 19:29:30 +0000 (19:29 +0000)]
strengthen this test.

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

15 years agoFixed extract element when the result needs to be promoted and the input widened.
Mon P Wang [Wed, 28 Jan 2009 18:53:39 +0000 (18:53 +0000)]
Fixed extract element when the result needs to be promoted and the input widened.

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

15 years agoDelete unnecessary elses.
Dan Gohman [Wed, 28 Jan 2009 18:03:09 +0000 (18:03 +0000)]
Delete unnecessary elses.

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

15 years agoEnable PACKAGE_VERSION in cmake builds, this unbreaks the clang build with cmake.
Chris Lattner [Wed, 28 Jan 2009 17:49:03 +0000 (17:49 +0000)]
Enable PACKAGE_VERSION in cmake builds, this unbreaks the clang build with cmake.
Patch by Piotr Rak!

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

15 years agoMake isOperationLegal do what its name suggests, and introduce a
Dan Gohman [Wed, 28 Jan 2009 17:46:25 +0000 (17:46 +0000)]
Make isOperationLegal do what its name suggests, and introduce a
new isOperationLegalOrCustom, which does what isOperationLegal
previously did.

Update a bunch of callers to use isOperationLegalOrCustom
instead of isOperationLegal. In some case it wasn't obvious
which behavior is desired; when in doubt I changed then to
isOperationLegalOrCustom as that preserves their previous
behavior.

This is for the second half of PR3376.

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

15 years agoFormatting.
Duncan Sands [Wed, 28 Jan 2009 14:42:54 +0000 (14:42 +0000)]
Formatting.

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

15 years agoRename getAnalysisToUpdate to getAnalysisIfAvailable.
Duncan Sands [Wed, 28 Jan 2009 13:14:17 +0000 (13:14 +0000)]
Rename getAnalysisToUpdate to getAnalysisIfAvailable.

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

15 years agoFix PR3415 (infinite loop in EscapeAnalysis) by
Duncan Sands [Wed, 28 Jan 2009 11:33:59 +0000 (11:33 +0000)]
Fix PR3415 (infinite loop in EscapeAnalysis) by
deleting the escape analysis pass.

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

15 years agoThe memory alignment requirement on some of the mov{h|l}p{d|s} patterns are 16-byte...
Evan Cheng [Wed, 28 Jan 2009 08:35:02 +0000 (08:35 +0000)]
The memory alignment requirement on some of the mov{h|l}p{d|s} patterns are 16-byte. That is overly strict. These instructions read / write f64 memory locations without alignment requirement.

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

15 years agoAdded sse test patterns for r62979 and r63193.
Mon P Wang [Wed, 28 Jan 2009 08:13:56 +0000 (08:13 +0000)]
Added sse test patterns for r62979 and r63193.

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

15 years agoAdd shuffle splat pattern for x86 sse shifts.
Mon P Wang [Wed, 28 Jan 2009 08:12:05 +0000 (08:12 +0000)]
Add shuffle splat pattern for x86 sse shifts.

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

15 years agoTypo.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:47:58 +0000 (03:47 +0000)]
Typo.

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

15 years agoUpdate the generated docs.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:47:38 +0000 (03:47 +0000)]
Update the generated docs.

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

15 years agoAdd three new option properties.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:47:20 +0000 (03:47 +0000)]
Add three new option properties.

Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.

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

15 years agoClarify comment.
Mikhail Glushenkov [Wed, 28 Jan 2009 03:46:22 +0000 (03:46 +0000)]
Clarify comment.

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

15 years agoUse ValueType::bitsLT to simplify some code.
Dan Gohman [Wed, 28 Jan 2009 03:10:52 +0000 (03:10 +0000)]
Use ValueType::bitsLT to simplify some code.

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

15 years agoUse ZERO_EXTEND instead of ANY_EXTEND when promoting
Dan Gohman [Wed, 28 Jan 2009 02:58:31 +0000 (02:58 +0000)]
Use ZERO_EXTEND instead of ANY_EXTEND when promoting
shift amounts, to avoid implicitly assuming that
target architectures will ignore the high bits.

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

15 years agoComment fixes.
Bill Wendling [Wed, 28 Jan 2009 01:19:52 +0000 (01:19 +0000)]
Comment fixes.

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

15 years agoSuppress a compile time warning.
Evan Cheng [Wed, 28 Jan 2009 00:53:34 +0000 (00:53 +0000)]
Suppress a compile time warning.

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

15 years agoEmbalm my ideas of how things should work. Not that
Dale Johannesen [Tue, 27 Jan 2009 23:32:10 +0000 (23:32 +0000)]
Embalm my ideas of how things should work.  Not that
anyone will pay attention.

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

15 years agoAdd type DIE into appropriate context DIE.
Devang Patel [Tue, 27 Jan 2009 23:22:55 +0000 (23:22 +0000)]
Add type DIE into appropriate context DIE.

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

15 years agoAdd a DebugLoc field and some simple accessors.
Dale Johannesen [Tue, 27 Jan 2009 23:20:29 +0000 (23:20 +0000)]
Add a DebugLoc field and some simple accessors.

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

15 years agoReorder args, constify.
Dale Johannesen [Tue, 27 Jan 2009 23:19:41 +0000 (23:19 +0000)]
Reorder args, constify.

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

15 years agoAdd testcase for r63142.
Bill Wendling [Tue, 27 Jan 2009 23:00:53 +0000 (23:00 +0000)]
Add testcase for r63142.

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

15 years agoTreat [1 x i8] zeroinitializer as a C string, placing such stuff into
Anton Korobeynikov [Tue, 27 Jan 2009 22:29:24 +0000 (22:29 +0000)]
Treat [1 x i8] zeroinitializer as a C string, placing such stuff into
mergeable string section. I don't see any bad impact of such decision
(rather then placing it into mergeable const section, as it was before),
but at least Darwin linker won't complain anymore.

The problem in LLVM is that we don't have special type for string constants
(like gcc does). Even more, we have two separate types: ConstatArray for non-null
strings and ConstantAggregateZero for null stuff.... It's a bit weird :)

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

15 years agoUse .empty() instead of comparing .size() with 0.
Dan Gohman [Tue, 27 Jan 2009 22:12:23 +0000 (22:12 +0000)]
Use .empty() instead of comparing .size() with 0.

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

15 years agoUpdate to latest spelling.
Dale Johannesen [Tue, 27 Jan 2009 22:09:11 +0000 (22:09 +0000)]
Update to latest spelling.

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

15 years agoAdd DebugLoc field and simple accessors.
Dale Johannesen [Tue, 27 Jan 2009 21:41:04 +0000 (21:41 +0000)]
Add DebugLoc field and simple accessors.

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

15 years agoRefine DebugLoc per review comments.
Evan Cheng [Tue, 27 Jan 2009 21:15:07 +0000 (21:15 +0000)]
Refine DebugLoc per review comments.

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

15 years agoAdd an assertion to the form of SelectionDAG::getConstant that takes
Dan Gohman [Tue, 27 Jan 2009 20:39:34 +0000 (20:39 +0000)]
Add an assertion to the form of SelectionDAG::getConstant that takes
a uint64_t to verify that the value is in range for the given type,
to help catch accidental overflow. Fix a few places that relied on
getConstant implicitly truncating the value.

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

15 years agoReformat the allocation-order arrays to a more conventional style.
Dan Gohman [Tue, 27 Jan 2009 19:25:38 +0000 (19:25 +0000)]
Reformat the allocation-order arrays to a more conventional style.

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

15 years agoDelete redundant return statements.
Dan Gohman [Tue, 27 Jan 2009 19:23:22 +0000 (19:23 +0000)]
Delete redundant return statements.

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

15 years agoRespect the DisableRedZone flag on PowerPC.
Dan Gohman [Tue, 27 Jan 2009 19:19:28 +0000 (19:19 +0000)]
Respect the DisableRedZone flag on PowerPC.

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

15 years agoSimplify findNonImmUse; return the result using the return value
Dan Gohman [Tue, 27 Jan 2009 19:04:30 +0000 (19:04 +0000)]
Simplify findNonImmUse; return the result using the return value
instead of via a by-reference argument. No functionality change.

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

15 years agoAPInt's countLeadingOnes() was broken for negative i128 values,
Torok Edwin [Tue, 27 Jan 2009 18:06:03 +0000 (18:06 +0000)]
APInt's countLeadingOnes() was broken for negative i128 values,
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.

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

15 years agoMake some comments doxygen-friendly.
Dan Gohman [Tue, 27 Jan 2009 17:28:23 +0000 (17:28 +0000)]
Make some comments doxygen-friendly.

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