oota-llvm.git
15 years agoAvoid a warning "'U' might be used uninitialized in
Duncan Sands [Wed, 3 Jun 2009 12:05:18 +0000 (12:05 +0000)]
Avoid a warning "'U' might be used uninitialized in
this function" when using a not-too-smart compiler.

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

15 years agoAt a newline at the end of this file.
Duncan Sands [Wed, 3 Jun 2009 11:54:28 +0000 (11:54 +0000)]
At a newline at the end of this file.

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

15 years agoDocument how phi and invoke instructions interact with SSA form.
Jay Foad [Wed, 3 Jun 2009 10:20:10 +0000 (10:20 +0000)]
Document how phi and invoke instructions interact with SSA form.

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

15 years agoFix for PR4225: When rewriter reuse a value in a physical register , it clear the...
Evan Cheng [Wed, 3 Jun 2009 09:00:27 +0000 (09:00 +0000)]
Fix for PR4225: When rewriter reuse a value in a physical register , it clear the register kill operand marker and its kill ops information. However, the cleared operand may be a def of a super-register. Clear the kill ops info for the super-register's sub-registers as well.

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

15 years agoTemporarily revert 72756 for now.
Evan Cheng [Wed, 3 Jun 2009 07:40:47 +0000 (07:40 +0000)]
Temporarily revert 72756 for now.

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

15 years agoFold preceding / trailing base inc / dec into the single load / store as well.
Evan Cheng [Wed, 3 Jun 2009 06:14:58 +0000 (06:14 +0000)]
Fold preceding / trailing base inc / dec into the single load / store as well.

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

15 years agoIf there is a def of a super-register followed by a use of a sub-register, do *not...
Evan Cheng [Wed, 3 Jun 2009 05:15:46 +0000 (05:15 +0000)]
If there is a def of a super-register followed by a use of a sub-register, do *not* add an implicit def of the sub-register. e.g.
EAX = ..., AX<imp-def>
...
    = AX

This creates a double-def. Apparently this used to be necessary but is no longer needed.

Thanks to Anton for pointing this out. Anton, I cannot create a test case without your uncommitted ARM patches. Please check in a test case for me.

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

15 years agoMove structures and classes into header files, providing two new headers and
Bruno Cardoso Lopes [Wed, 3 Jun 2009 03:43:31 +0000 (03:43 +0000)]
Move structures and classes into header files, providing two new headers and
one new .cpp file, in preparation for merging in the Direct Object Emission
changes we're working on. No functional changes.
Fixed coding style issues on the original patch. Patch by Aaron Gray

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

15 years agoRevert r72734. The Darwin assembler doesn't support the static
Dan Gohman [Wed, 3 Jun 2009 00:37:20 +0000 (00:37 +0000)]
Revert r72734. The Darwin assembler doesn't support the static
relocation model on x86-64. Higher level logic should override
the relocation model to PIC on x86_64-apple-darwin.

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

15 years agoChange TargetFolder's TD member from a reference to a
Dan Gohman [Wed, 3 Jun 2009 00:13:48 +0000 (00:13 +0000)]
Change TargetFolder's TD member from a reference to a
pointer, now that ConstantFoldConstantExpression can
accept a null TargetData pointer.

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

15 years agoChange ConstantFoldConstantExpression to accept a null
Dan Gohman [Tue, 2 Jun 2009 21:48:15 +0000 (21:48 +0000)]
Change ConstantFoldConstantExpression to accept a null
TargetData pointer. The only thing it's used for are
calls to ConstantFoldCompareInstOperands and
ConstantFoldInstOperands, which both already accept a
null TargetData pointer. This makes
ConstantFoldConstantExpression easier to use in clients
where TargetData is optional.

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

15 years agoDelete an unnecessary forward declaration.
Dan Gohman [Tue, 2 Jun 2009 21:37:43 +0000 (21:37 +0000)]
Delete an unnecessary forward declaration.

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

15 years agoFix CodeGenPrepare's address-mode sinking to handle unusual
Dan Gohman [Tue, 2 Jun 2009 21:29:13 +0000 (21:29 +0000)]
Fix CodeGenPrepare's address-mode sinking to handle unusual
addresses, involving Base values which do not have Pointer type.
This fixes PR4297.

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

15 years agoNightlyTest: Stop running a separate Olden pass during nightly test.
Daniel Dunbar [Tue, 2 Jun 2009 21:14:15 +0000 (21:14 +0000)]
NightlyTest: Stop running a separate Olden pass during nightly test.
 - Unless I'm mistaken, these results weren't even being reported and just
   served to clobber the previous build products and waste cycles.

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

15 years agofix build on VC++2k8.
Torok Edwin [Tue, 2 Jun 2009 20:32:59 +0000 (20:32 +0000)]
fix build on VC++2k8.

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

15 years agoFixed warning, removed some temporary validation code that snuck in during my last...
Lang Hames [Tue, 2 Jun 2009 20:30:03 +0000 (20:30 +0000)]
Fixed warning, removed some temporary validation code that snuck in during my last commit.

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

15 years agoOn Darwin x86_64 small code model doesn't guarantee code address fits in 32-bit.
Evan Cheng [Tue, 2 Jun 2009 20:09:31 +0000 (20:09 +0000)]
On Darwin x86_64 small code model doesn't guarantee code address fits in 32-bit.

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

15 years agoUndef MemoryFence when compiling on MSVC.
Owen Anderson [Tue, 2 Jun 2009 17:35:55 +0000 (17:35 +0000)]
Undef MemoryFence when compiling on MSVC.

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

15 years agoSimplify assertion message to avoid confusion.
Devang Patel [Tue, 2 Jun 2009 17:26:29 +0000 (17:26 +0000)]
Simplify assertion message to avoid confusion.

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

15 years agoUpdate to in-place spilling framework. Includes live interval scaling and trivial...
Lang Hames [Tue, 2 Jun 2009 16:53:25 +0000 (16:53 +0000)]
Update to in-place spilling framework. Includes live interval scaling and trivial rewriter.

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

15 years agoRevert 72707 and 72709, for the moment.
Dale Johannesen [Tue, 2 Jun 2009 03:12:52 +0000 (03:12 +0000)]
Revert 72707 and 72709, for the moment.

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

15 years agoAvoid infinite looping in AllGlobalLoadUsesSimpleEnoughForHeapSRA(). This can happen...
Evan Cheng [Tue, 2 Jun 2009 00:56:07 +0000 (00:56 +0000)]
Avoid infinite looping in AllGlobalLoadUsesSimpleEnoughForHeapSRA(). This can happen when PHI uses are recursively dependent on each other.

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

15 years agoAdd missing file.
Dale Johannesen [Mon, 1 Jun 2009 23:48:58 +0000 (23:48 +0000)]
Add missing file.

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

15 years agoupdate comments about .objc_ symbols being generated
Nick Kledzik [Mon, 1 Jun 2009 23:41:09 +0000 (23:41 +0000)]
update comments about .objc_ symbols being generated

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

15 years agoMake the implicit inputs and outputs of target-independent
Dale Johannesen [Mon, 1 Jun 2009 23:27:20 +0000 (23:27 +0000)]
Make the implicit inputs and outputs of target-independent
ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to)
instead of MVT::Flag.  Remove CARRY_FALSE in favor of 0; adjust
all target-independent code to use this format.

Most targets will still produce a Flag-setting target-dependent
version when selection is done.  X86 is converted to use i32
instead, which means TableGen needs to produce different code
in xxxGenDAGISel.inc.  This keys off the new supportsHasI1 bit
in xxxInstrInfo, currently set only for X86; in principle this
is temporary and should go away when all other targets have
been converted.  All relevant X86 instruction patterns are
modified to represent setting and using EFLAGS explicitly.  The
same can be done on other targets.

The immediate behavior change is that an ADC/ADD pair are no
longer tightly coupled in the X86 scheduler; they can be
separated by instructions that don't clobber the flags (MOV).
I will soon add some peephole optimizations based on using
other instructions that set the flags to feed into ADC.

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

15 years agoComment grammaro/clarification.
Dale Johannesen [Mon, 1 Jun 2009 23:13:42 +0000 (23:13 +0000)]
Comment grammaro/clarification.

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

15 years agoTrailing whitespace.
Dale Johannesen [Mon, 1 Jun 2009 23:12:52 +0000 (23:12 +0000)]
Trailing whitespace.

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

15 years agoDcoument that the opauque value used to construct QNaNs is truncated
Mike Stump [Mon, 1 Jun 2009 21:02:35 +0000 (21:02 +0000)]
Dcoument that the opauque value used to construct QNaNs is truncated
as necessary.

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

15 years ago<rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
Nick Kledzik [Mon, 1 Jun 2009 20:33:09 +0000 (20:33 +0000)]
<rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
Parse __OBJC data structures and synthesize magic .objc_ symbols.
Also, alter mangler so that objc method names are readable.

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

15 years agoAccidental commit. This isn't ready for prime time just yet.
Bill Wendling [Mon, 1 Jun 2009 20:18:46 +0000 (20:18 +0000)]
Accidental commit. This isn't ready for prime time just yet.

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

15 years agoImplement review feedback. Make thumb2 'normal' subtarget feature
Anton Korobeynikov [Mon, 1 Jun 2009 20:00:48 +0000 (20:00 +0000)]
Implement review feedback. Make thumb2 'normal' subtarget feature

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

15 years agoFix new CodeEmitter stuff to follow LLVM codying style. Patch by Aaron Gray
Bruno Cardoso Lopes [Mon, 1 Jun 2009 19:57:37 +0000 (19:57 +0000)]
Fix new CodeEmitter stuff to follow LLVM codying style. Patch by Aaron Gray

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

15 years agoDo not emit "generic" CPU string. This fixes PR4291.
Anton Korobeynikov [Mon, 1 Jun 2009 19:03:17 +0000 (19:03 +0000)]
Do not emit "generic" CPU string. This fixes PR4291.

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

15 years agoPR4286: Make RewriteLoadUserOfWholeAlloca and
Eli Friedman [Mon, 1 Jun 2009 09:14:32 +0000 (09:14 +0000)]
PR4286: Make RewriteLoadUserOfWholeAlloca and
RewriteStoreUserOfWholeAlloca deal with tail padding because
isSafeUseOfBitCastedAllocation expects them to.  Otherwise, we crash
trying to erase the bitcast.

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

15 years agoUpdate the bitcode reader to support reading .bc files where the embedded
Nick Lewycky [Mon, 1 Jun 2009 04:42:10 +0000 (04:42 +0000)]
Update the bitcode reader to support reading .bc files where the embedded
metadata references non-Constant values such as instructions.

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

15 years agoAdd missing codenames to the .bc analyzer.
Nick Lewycky [Mon, 1 Jun 2009 04:41:03 +0000 (04:41 +0000)]
Add missing codenames to the .bc analyzer.

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

15 years agoFix a grammaro and clarify a comment.
Dan Gohman [Sun, 31 May 2009 17:52:18 +0000 (17:52 +0000)]
Fix a grammaro and clarify a comment.

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

15 years agoDelete an obsolete sentance from a comment.
Dan Gohman [Sun, 31 May 2009 16:18:57 +0000 (16:18 +0000)]
Delete an obsolete sentance from a comment.

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

15 years agoFix the name of the function in this comment.
Dan Gohman [Sun, 31 May 2009 16:18:03 +0000 (16:18 +0000)]
Fix the name of the function in this comment.

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

15 years agoBe more aggressive in doing LoadPRE by tracing backwards when a block only has
Owen Anderson [Sun, 31 May 2009 09:03:40 +0000 (09:03 +0000)]
Be more aggressive in doing LoadPRE by tracing backwards when a block only has
a single predecessor.

Patch by Jakub Staszak.

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

15 years agoFix typo in error message.
Nick Lewycky [Sun, 31 May 2009 06:07:28 +0000 (06:07 +0000)]
Fix typo in error message.

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

15 years agoRename CustomLowerResults to CustomLowerNode, since
Duncan Sands [Sun, 31 May 2009 04:15:38 +0000 (04:15 +0000)]
Rename CustomLowerResults to CustomLowerNode, since
it is used both when a result is illegal and when an
operand is illegal.

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

15 years agoUse uint8_t and int32_t in {JIT,Machine}CodeEmiters
Bruno Cardoso Lopes [Sat, 30 May 2009 23:50:33 +0000 (23:50 +0000)]
Use uint8_t and int32_t in {JIT,Machine}CodeEmiters

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

15 years agoAdd AMD64 elf machine type
Bruno Cardoso Lopes [Sat, 30 May 2009 21:05:47 +0000 (21:05 +0000)]
Add AMD64 elf machine type

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

15 years agoFirst patch in the direction of splitting MachineCodeEmitter in two subclasses:
Bruno Cardoso Lopes [Sat, 30 May 2009 20:51:52 +0000 (20:51 +0000)]
First patch in the direction of splitting MachineCodeEmitter in two subclasses:
JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray

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

15 years agofix PR4284, a bug in simplifylibcalls handling memcmp. Patch by
Chris Lattner [Sat, 30 May 2009 18:43:04 +0000 (18:43 +0000)]
fix PR4284, a bug in simplifylibcalls handling memcmp.  Patch by
Benjamin Kramer!

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

15 years agoMetadata uses metadata type not empty struct.
Nick Lewycky [Sat, 30 May 2009 16:08:30 +0000 (16:08 +0000)]
Metadata uses metadata type not empty struct.

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

15 years agoAdd some documentation.
Mike Stump [Sat, 30 May 2009 15:19:29 +0000 (15:19 +0000)]
Add some documentation.

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

15 years agoAdjust these tests now that "extern inline"
Duncan Sands [Sat, 30 May 2009 13:57:05 +0000 (13:57 +0000)]
Adjust these tests now that "extern inline"
functions are being output with bodies and
available_externally linkage.

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

15 years ago(i64 (zext (srl GR32 8))) -> movzbl AH is not safe since srl 8 only clear the top...
Evan Cheng [Sat, 30 May 2009 08:43:27 +0000 (08:43 +0000)]
(i64 (zext (srl GR32 8))) -> movzbl AH is not safe since srl 8 only clear the top 8 bits.

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

15 years agoGive embedded metadata its own type instead of relying on EmptyStructTy.
Nick Lewycky [Sat, 30 May 2009 05:06:04 +0000 (05:06 +0000)]
Give embedded metadata its own type instead of relying on EmptyStructTy.

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

15 years agoAdd support for letting the client choose different flavors of NaNs. Testcase to be
Mike Stump [Sat, 30 May 2009 03:49:43 +0000 (03:49 +0000)]
Add support for letting the client choose different flavors of NaNs.  Testcase to be
added in clang.

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

15 years agoUntabification.
Bill Wendling [Sat, 30 May 2009 01:09:53 +0000 (01:09 +0000)]
Untabification.

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

15 years agoUntabify.
Bill Wendling [Sat, 30 May 2009 00:58:37 +0000 (00:58 +0000)]
Untabify.

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

15 years agoUntabify.
Evan Cheng [Sat, 30 May 2009 00:48:34 +0000 (00:48 +0000)]
Untabify.

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

15 years agoAdd placeholder for thumb2 stuff
Anton Korobeynikov [Fri, 29 May 2009 23:41:08 +0000 (23:41 +0000)]
Add placeholder for thumb2 stuff

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

15 years agoEnable GVN Load PRE.
Bill Wendling [Fri, 29 May 2009 20:38:16 +0000 (20:38 +0000)]
Enable GVN Load PRE.

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

15 years agoDan noticed that the verifier wasn't thoroughly checking uses of
Duncan Sands [Fri, 29 May 2009 19:39:36 +0000 (19:39 +0000)]
Dan noticed that the verifier wasn't thoroughly checking uses of
invoke results (see the testcases).  Tighten up the checking.

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

15 years agoFix some typos
Bruno Cardoso Lopes [Fri, 29 May 2009 17:08:57 +0000 (17:08 +0000)]
Fix some typos

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

15 years agojust show the instruction, its not that slow.
Torok Edwin [Fri, 29 May 2009 16:58:36 +0000 (16:58 +0000)]
just show the instruction, its not that slow.

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

15 years agofor instructions with void type we have no choice but print the instruction as
Torok Edwin [Fri, 29 May 2009 10:28:44 +0000 (10:28 +0000)]
for instructions with void type we have no choice but print the instruction as
is, otherwise we get a <badref>.

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

15 years agoAdd a DEBUG() output to GVN that prints the instruction clobbering a load.
Torok Edwin [Fri, 29 May 2009 09:46:03 +0000 (09:46 +0000)]
Add a DEBUG() output to GVN that prints the instruction clobbering a load.
This is useful when trying to figure out why GVN didn't eliminate redundant
loads.

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

15 years agoFix an issue where phiMap was not being updated properly when doing load PRE.
Owen Anderson [Fri, 29 May 2009 05:37:54 +0000 (05:37 +0000)]
Fix an issue where phiMap was not being updated properly when doing load PRE.

Diagnosis and patch thanks to Jakub Staszak.

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

15 years agoDefault isNarrowingProfitable to false.
Evan Cheng [Fri, 29 May 2009 05:31:40 +0000 (05:31 +0000)]
Default isNarrowingProfitable to false.

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

15 years agoRemove an accidental commit.
Evan Cheng [Fri, 29 May 2009 05:28:52 +0000 (05:28 +0000)]
Remove an accidental commit.

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

15 years agoMore h-registers tricks: folding zext nodes.
Evan Cheng [Fri, 29 May 2009 01:44:43 +0000 (01:44 +0000)]
More h-registers tricks: folding zext nodes.

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

15 years agoDo not try to create a MVT type of width 0.
Evan Cheng [Thu, 28 May 2009 23:52:18 +0000 (23:52 +0000)]
Do not try to create a MVT type of width 0.

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

15 years agoThe MONITOR and MWAIT instructions have insufficient information for
Bill Wendling [Thu, 28 May 2009 23:40:46 +0000 (23:40 +0000)]
The MONITOR and MWAIT instructions have insufficient information for
decoding. Essentially, they both map to the same column in the "opcode
extensions for one- and two-byte opcodes" table in the x86 manual. The RawFrm
complicates decoding this.

Instead, use opcode 0x01, prefix 0x01, and form MRM1r. Then have the code
emitter special case these, a la [SML]FENCE.

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

15 years agoNewNightlyTest.pl: Add a -parallel-jobs argument (set # of jobs for make with
Daniel Dunbar [Thu, 28 May 2009 22:45:24 +0000 (22:45 +0000)]
NewNightlyTest.pl: Add a -parallel-jobs argument (set # of jobs for make with
-parallel, instead of always using 2).

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

15 years agoAdd explicit test for PR4280.
Eli Friedman [Thu, 28 May 2009 21:04:35 +0000 (21:04 +0000)]
Add explicit test for PR4280.

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

15 years agoRe-commit r72514 and r72516 with a fixed version of BR_CC lowering.
Eli Friedman [Thu, 28 May 2009 20:40:34 +0000 (20:40 +0000)]
Re-commit r72514 and r72516 with a fixed version of BR_CC lowering.
This patch removes some special cases for opcodes and does a bit of
cleanup.

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

15 years agoFix MOVMSKPDrr encoding.
Evan Cheng [Thu, 28 May 2009 18:55:28 +0000 (18:55 +0000)]
Fix MOVMSKPDrr encoding.

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

15 years agoFix PSIGND encoding bug. Patch by Sean Callanan.
Evan Cheng [Thu, 28 May 2009 18:48:53 +0000 (18:48 +0000)]
Fix PSIGND encoding bug. Patch by Sean Callanan.

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

15 years agoIncorporate patch feedbacks.
Evan Cheng [Thu, 28 May 2009 18:41:02 +0000 (18:41 +0000)]
Incorporate patch feedbacks.

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

15 years agoNightlyTest: Write "sentdata.txt" files and run the -submit-aux script before
Daniel Dunbar [Thu, 28 May 2009 18:31:40 +0000 (18:31 +0000)]
NightlyTest: Write "sentdata.txt" files and run the -submit-aux script before
sending data to the server.
 - Otherwise if the server connection fails the external script never runs.

Also, create content before initiating connection to try and decrease time we
are connected to llvm.org.

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

15 years agoEmit debug info for locals with proper scope.
Sanjiv Gupta [Thu, 28 May 2009 18:24:11 +0000 (18:24 +0000)]
Emit debug info for locals with proper scope.

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

15 years agoTemporarily revert r72514 (and dependent patch r72516). It was causing this
Bill Wendling [Thu, 28 May 2009 18:18:59 +0000 (18:18 +0000)]
Temporarily revert r72514 (and dependent patch r72516). It was causing this
failure during llvm-gcc bootstrap:

Assertion failed: (!Tmp2.getNode() && "Can't legalize BR_CC with legal condition!"), function ExpandNode, file /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/src/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp, line 2923.
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/libgcc2.c:1727: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

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

15 years agoMark the branch insns correctly.
Sanjiv Gupta [Thu, 28 May 2009 17:32:56 +0000 (17:32 +0000)]
Mark the branch insns correctly.

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

15 years agoFixing problems that got exposed after the refactoring of LegalizeDAG done in 72447.
Sanjiv Gupta [Thu, 28 May 2009 06:59:57 +0000 (06:59 +0000)]
Fixing problems that got exposed after the refactoring of LegalizeDAG done in 72447.

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

15 years agoAdd a testcase which got fixed by recent legalization work.
Eli Friedman [Thu, 28 May 2009 05:10:20 +0000 (05:10 +0000)]
Add a testcase which got fixed by recent legalization work.

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

15 years agoRemove a couple of useless functions.
Eli Friedman [Thu, 28 May 2009 04:49:34 +0000 (04:49 +0000)]
Remove a couple of useless functions.

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

15 years agoRemove special cases for more opcodes.
Eli Friedman [Thu, 28 May 2009 04:39:57 +0000 (04:39 +0000)]
Remove special cases for more opcodes.

This is basically the end of this series of patches for LegalizeDAG; the
remaining special cases can't be removed without more infrastructure
work.  There's a FIXME for each relevant opcode near the beginning of
SelectionDAGLegalize::LegalizeOp.

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

15 years agoReturn the operand rather than a null SDValue when the given SELECT_CC
Eli Friedman [Thu, 28 May 2009 04:31:08 +0000 (04:31 +0000)]
Return the operand rather than a null SDValue when the given SELECT_CC
is actually legal.  Part of LegalizeDAG cleanups.

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

15 years agoUse Operands.data() instead of &Operands[0] where Operands is a potentially
Nick Lewycky [Thu, 28 May 2009 04:08:10 +0000 (04:08 +0000)]
Use Operands.data() instead of &Operands[0] where Operands is a potentially
empty SmallVector.

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

15 years agoRemove special case for SETCC opcode; add some comments explaining why
Eli Friedman [Thu, 28 May 2009 03:56:57 +0000 (03:56 +0000)]
Remove special case for SETCC opcode; add some comments explaining why
some special cases are necessary.

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

15 years agoThis patch brings the list of attributes in CPPBackend.cpp up to date with the
Jeffrey Yasskin [Thu, 28 May 2009 03:16:17 +0000 (03:16 +0000)]
This patch brings the list of attributes in CPPBackend.cpp up to date with the
list in Attributes.h. It also reorders the CPPBackend list to match so that
it's easier to see that it's complete.

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

15 years agoSome minor cleanups.
Eli Friedman [Thu, 28 May 2009 03:06:16 +0000 (03:06 +0000)]
Some minor cleanups.

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

15 years ago"The instructions MMX_PSADBWrm and MMX_PSADBWrr have opcode 0b11100000 (e0), but
Bill Wendling [Thu, 28 May 2009 02:04:00 +0000 (02:04 +0000)]
"The instructions MMX_PSADBWrm and MMX_PSADBWrr have opcode 0b11100000 (e0), but
the Intel manual (screenshot) says it should be 0b11110110 (f6).  The existing
encoding causes a disassembly conflict with MMX_PAVGBrm, which really should be
0f e0."

Patch by Sean Callanan!

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

15 years agoAdded optimization that narrow load / op / store and the 'op' is a bit twiddling...
Evan Cheng [Thu, 28 May 2009 00:35:15 +0000 (00:35 +0000)]
Added optimization that narrow load / op / store and the 'op' is a bit twiddling instruction and its second operand is an immediate. If bits that are touched by 'op' can be done with a narrower instruction, reduce the width of the load and store as well. This happens a lot with bitfield manipulation code.
e.g.
orl     $65536, 8(%rax)
=>
orb     $1, 10(%rax)

Since narrowing is not always a win, e.g. i32 -> i16 is a loss on x86, dag combiner consults with the target before performing the optimization.

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

15 years agoRevert 72493 and replace it with a more conservative fix, for now: don't
Dan Gohman [Wed, 27 May 2009 21:10:47 +0000 (21:10 +0000)]
Revert 72493 and replace it with a more conservative fix, for now: don't
rewrite the comparison if there is any implicit extension or truncation
on the induction variable. I'm planning for IVUsers to eventually take
over some of the work of this code, and for it to be generalized.

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

15 years agoGer rid of some dead code.
Eli Friedman [Wed, 27 May 2009 20:39:00 +0000 (20:39 +0000)]
Ger rid of some dead code.

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

15 years agoIn ChangeCompareStride, when the stride to be reused is truncated to
Dan Gohman [Wed, 27 May 2009 20:00:18 +0000 (20:00 +0000)]
In ChangeCompareStride, when the stride to be reused is truncated to
a smaller type, promoted its offset back up to the type of the new
comparison. This fixes PR4222.

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

15 years agoFix sfence jit encoding. Patch by Sean Callanan.
Evan Cheng [Wed, 27 May 2009 18:38:01 +0000 (18:38 +0000)]
Fix sfence jit encoding. Patch by Sean Callanan.

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

15 years agoThis looks like it passes now.
Bill Wendling [Wed, 27 May 2009 17:43:21 +0000 (17:43 +0000)]
This looks like it passes now.

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

15 years agoAdded support for fround, fextend and FP_TO_SINT
Bruno Cardoso Lopes [Wed, 27 May 2009 17:23:44 +0000 (17:23 +0000)]
Added support for fround, fextend and FP_TO_SINT

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

15 years agoMinor fix for CMake build system
Douglas Gregor [Wed, 27 May 2009 16:52:17 +0000 (16:52 +0000)]
Minor fix for CMake build system

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

15 years agoCMake: Set LIBS on llvm-config so we can query the system libraries
Oscar Fuentes [Wed, 27 May 2009 15:49:33 +0000 (15:49 +0000)]
CMake: Set LIBS on llvm-config so we can query the system libraries
used by CMake with --ldflags.

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

15 years agoMinor cleanups; add a better explanation for the issue with
Eli Friedman [Wed, 27 May 2009 12:42:55 +0000 (12:42 +0000)]
Minor cleanups; add a better explanation for the issue with
BUILD_VECTOR.

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

15 years agoRemove more special cases for opcodes.
Eli Friedman [Wed, 27 May 2009 12:20:41 +0000 (12:20 +0000)]
Remove more special cases for opcodes.

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

15 years agoRemove special cases for more opcodes.
Eli Friedman [Wed, 27 May 2009 07:58:35 +0000 (07:58 +0000)]
Remove special cases for more opcodes.

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