oota-llvm.git
12 years agoFix comment.
Evan Cheng [Fri, 8 Jul 2011 22:49:42 +0000 (22:49 +0000)]
Fix comment.

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

12 years agoAdd an fma TableGen node.
Cameron Zwarich [Fri, 8 Jul 2011 22:49:34 +0000 (22:49 +0000)]
Add an fma TableGen node.

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

12 years agoAdd support for ARM / Thumb mode switching with .code 16 and .code 32.
Evan Cheng [Fri, 8 Jul 2011 22:36:29 +0000 (22:36 +0000)]
Add support for ARM / Thumb mode switching with .code 16 and .code 32.

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

12 years agoUpdate comments for SandyBridge CPU identifiers.
Bob Wilson [Fri, 8 Jul 2011 22:33:59 +0000 (22:33 +0000)]
Update comments for SandyBridge CPU identifiers.

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

12 years agoMark tBRIND as predicable.
Jim Grosbach [Fri, 8 Jul 2011 22:33:49 +0000 (22:33 +0000)]
Mark tBRIND as predicable.

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

12 years agoRestore old behavior. Always auto-detect features unless cpu or features are specified.
Evan Cheng [Fri, 8 Jul 2011 22:30:25 +0000 (22:30 +0000)]
Restore old behavior. Always auto-detect features unless cpu or features are specified.

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

12 years agoFix broken x86_64 tests which specify non-64-bit cpu's.
Evan Cheng [Fri, 8 Jul 2011 22:29:33 +0000 (22:29 +0000)]
Fix broken x86_64 tests which specify non-64-bit cpu's.

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

12 years agoPseudo-ize tBRIND.
Jim Grosbach [Fri, 8 Jul 2011 22:25:23 +0000 (22:25 +0000)]
Pseudo-ize tBRIND.

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

12 years agoDefault 64-bit target features and SSE2 on when a triple specifies x86-64. Clean...
Eli Friedman [Fri, 8 Jul 2011 22:16:47 +0000 (22:16 +0000)]
Default 64-bit target features and SSE2 on when a triple specifies x86-64.  Clean up all the other hacks which are now unnecessary.

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

12 years agoUse add instead of accumulate.
Cameron Zwarich [Fri, 8 Jul 2011 22:13:55 +0000 (22:13 +0000)]
Use add instead of accumulate.

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

12 years agoRecognize Intel CPUs with Family=6 and Model=44.
Bob Wilson [Fri, 8 Jul 2011 22:09:35 +0000 (22:09 +0000)]
Recognize Intel CPUs with Family=6 and Model=44.
According to Intel Application Note 485, this value is used for
"Intel Core i7 and Intel Xeon processor".  Just include it with the other
"corei7-avx" entries.

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

12 years agoReapply a fixed version of r133285.
Bob Wilson [Fri, 8 Jul 2011 22:09:33 +0000 (22:09 +0000)]
Reapply a fixed version of r133285.
This tightens up checking for overflow in alloca sizes, based on feedback
from Duncan and John about the change in r132926.

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

12 years agoMake tBX_RET and tBX_RET_vararg predicable.
Jim Grosbach [Fri, 8 Jul 2011 21:50:04 +0000 (21:50 +0000)]
Make tBX_RET and tBX_RET_vararg predicable.

The normal tBX instruction is predicable, so there's no reason the
pseudos for using it as a return shouldn't be. Gives us some nice code-gen
improvements as can be seen by the test changes. In particular, several
tests now have to disable if-conversion because it works too well and defeats
the test.

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

12 years agoAdd _allrem, _aullrem and _allmul to the runtime for MSVC.
Julien Lerouge [Fri, 8 Jul 2011 21:40:25 +0000 (21:40 +0000)]
Add _allrem, _aullrem and _allmul to the runtime for MSVC.
http://llvm.org/bugs/show_bug.cgi?id=10305

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

12 years agoAdd an intrinsic and codegen support for fused multiply-accumulate. The intent
Cameron Zwarich [Fri, 8 Jul 2011 21:39:21 +0000 (21:39 +0000)]
Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

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

12 years agoFor non-x86 host, used generic as CPU name.
Evan Cheng [Fri, 8 Jul 2011 21:14:14 +0000 (21:14 +0000)]
For non-x86 host, used generic as CPU name.

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

12 years agoPseudo-ize tBX_RET and tBX_RET_vararg.
Jim Grosbach [Fri, 8 Jul 2011 21:10:35 +0000 (21:10 +0000)]
Pseudo-ize tBX_RET and tBX_RET_vararg.

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

12 years agoPlug a leak by giving the AsmParser ownership of the MCSubtargetInfo.
Benjamin Kramer [Fri, 8 Jul 2011 21:06:23 +0000 (21:06 +0000)]
Plug a leak by giving the AsmParser ownership of the MCSubtargetInfo.

Found by valgrind.

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

12 years agoShuffle productions around a bit.
Jim Grosbach [Fri, 8 Jul 2011 21:04:05 +0000 (21:04 +0000)]
Shuffle productions around a bit.

No functional change.

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

12 years agoBe more aggressive about following hints.
Jakob Stoklund Olesen [Fri, 8 Jul 2011 20:46:18 +0000 (20:46 +0000)]
Be more aggressive about following hints.

RAGreedy::tryAssign will now evict interference from the preferred
register even when another register is free.

To support this, add the EvictionCost struct that counts how many hints
are broken by an eviction. We don't want to break one hint just to
satisfy another.

Rename canEvict to shouldEvict, and add the first bit of eviction policy
that doesn't depend on spill weights: Always make room in the preferred
register as long as the evictees can be split and aren't already
assigned to their preferred register.

Also make the CSR avoidance more accurate. When looking for a cheaper
register it is OK to use a new volatile register. Only CSR aliases that
have never been used before should be avoided.

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

12 years agoUse tPseudoExpand for tTAILJMPrND and tTAILJMPr.
Jim Grosbach [Fri, 8 Jul 2011 20:39:19 +0000 (20:39 +0000)]
Use tPseudoExpand for tTAILJMPrND and tTAILJMPr.

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

12 years agoUse tPseudoExpand for tTAILJMPd and tTAILJMPdND.
Jim Grosbach [Fri, 8 Jul 2011 20:32:21 +0000 (20:32 +0000)]
Use tPseudoExpand for tTAILJMPd and tTAILJMPdND.

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

12 years agoSilence compiler warning.
Benjamin Kramer [Fri, 8 Jul 2011 20:18:13 +0000 (20:18 +0000)]
Silence compiler warning.

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

12 years agoAdd more info to FIXME.
Jim Grosbach [Fri, 8 Jul 2011 20:18:11 +0000 (20:18 +0000)]
Add more info to FIXME.

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

12 years agoMove Thumb tail call pseudos to Thumb.td file.
Jim Grosbach [Fri, 8 Jul 2011 20:13:35 +0000 (20:13 +0000)]
Move Thumb tail call pseudos to Thumb.td file.

Fix a FIXME.

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

12 years agoFix dangling pointer.
Eli Friedman [Fri, 8 Jul 2011 20:07:05 +0000 (20:07 +0000)]
Fix dangling pointer.

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

12 years agoTargetAsmParser doesn't need reference to Target.
Evan Cheng [Fri, 8 Jul 2011 19:33:14 +0000 (19:33 +0000)]
TargetAsmParser doesn't need reference to Target.

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

12 years agoRemove unused copy of UpdateInlinedAtInfo.
Benjamin Kramer [Fri, 8 Jul 2011 19:32:06 +0000 (19:32 +0000)]
Remove unused copy of UpdateInlinedAtInfo.

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

12 years agoUse ARMPseudoExpand for ARM tail calls.
Jim Grosbach [Fri, 8 Jul 2011 18:50:22 +0000 (18:50 +0000)]
Use ARMPseudoExpand for ARM tail calls.

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

12 years agoShuffle productions around a bit.
Jim Grosbach [Fri, 8 Jul 2011 18:26:27 +0000 (18:26 +0000)]
Shuffle productions around a bit.

No functional change.

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

12 years agoUse ARMPseudoExpand for BLr9, BLr9_pred, BXr9, and BXr9_pred.
Jim Grosbach [Fri, 8 Jul 2011 18:15:12 +0000 (18:15 +0000)]
Use ARMPseudoExpand for BLr9, BLr9_pred, BXr9, and BXr9_pred.

TableGen'erated MC lowering pseudo-expansion.

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

12 years agoFix a dangling reference. Patch by Dave Abrahams. pr10311
Evan Cheng [Fri, 8 Jul 2011 18:04:22 +0000 (18:04 +0000)]
Fix a dangling reference. Patch by Dave Abrahams. pr10311

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

12 years agoRefactor. It is inliner's responsibility to update line number information.
Devang Patel [Fri, 8 Jul 2011 18:01:31 +0000 (18:01 +0000)]
Refactor. It is inliner's responsibility to update line number information.

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

12 years agoAdd CMake support for the new TableGen file introduced in r134705.
Chandler Carruth [Fri, 8 Jul 2011 17:54:08 +0000 (17:54 +0000)]
Add CMake support for the new TableGen file introduced in r134705.

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

12 years agoUse TableGen'erated pseudo lowering for ARM.
Jim Grosbach [Fri, 8 Jul 2011 17:40:42 +0000 (17:40 +0000)]
Use TableGen'erated pseudo lowering for ARM.

Hook up the TableGen lowering for simple pseudo instructions for ARM and
use it for a subset of the many pseudos the backend has as proof of concept.

More conversions to come.

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

12 years agoTableGen'erated MC lowering for simple pseudo-instructions.
Jim Grosbach [Fri, 8 Jul 2011 17:36:35 +0000 (17:36 +0000)]
TableGen'erated MC lowering for simple pseudo-instructions.

This allows the (many) pseudo-instructions we have that map onto a single
real instruction to have their expansion during MC lowering handled
automatically instead of the current cumbersome manual expansion required.
These sorts of pseudos are common when an instruction is used in situations
that require different MachineInstr flags (isTerminator, isBranch, et. al.)
than the generic instruction description has. For example, using a move
to the PC to implement a branch.

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

12 years agoRefactor.
Devang Patel [Fri, 8 Jul 2011 17:09:57 +0000 (17:09 +0000)]
Refactor.

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

12 years agoMake provision to have floating point constants in .debug_loc expressions.
Devang Patel [Fri, 8 Jul 2011 16:49:43 +0000 (16:49 +0000)]
Make provision to have floating point constants in .debug_loc expressions.

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

12 years agoApparently we can't expect a BinaryOperator here.
Benjamin Kramer [Fri, 8 Jul 2011 12:08:24 +0000 (12:08 +0000)]
Apparently we can't expect a BinaryOperator here.

Should fix llvm-gcc selfhost.

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

12 years agocmake/modules/LLVMLibDeps.cmake: Update to appease cmake builds.
NAKAMURA Takumi [Fri, 8 Jul 2011 10:45:15 +0000 (10:45 +0000)]
cmake/modules/LLVMLibDeps.cmake: Update to appease cmake builds.

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

12 years agoEmit a more efficient magic number multiplication for exact sdivs.
Benjamin Kramer [Fri, 8 Jul 2011 10:31:30 +0000 (10:31 +0000)]
Emit a more efficient magic number multiplication for exact sdivs.

We have to do this in DAGBuilder instead of DAGCombiner, because the exact bit is lost after building.

  struct foo { char x[24]; };
  long bar(struct foo *a, struct foo *b) { return a-b; }
is now compiled into
  movl 4(%esp), %eax
  subl 8(%esp), %eax
  sarl $3, %eax
  imull $-1431655765, %eax, %eax
instead of
  movl 4(%esp), %eax
  subl 8(%esp), %eax
  movl $715827883, %ecx
  imull %ecx
  movl %edx, %eax
  shrl $31, %eax
  sarl $2, %edx
  addl %eax, %edx
  movl %edx, %eax

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

12 years agoEliminate asm parser's dependency on TargetMachine:
Evan Cheng [Fri, 8 Jul 2011 01:53:10 +0000 (01:53 +0000)]
Eliminate asm parser's dependency on TargetMachine:
- Each target asm parser now creates its own MCSubtatgetInfo (if needed).
- Changed AssemblerPredicate to take subtarget features which tablegen uses
  to generate asm matcher subtarget feature queries. e.g.
  "ModeThumb,FeatureThumb2" is translated to
  "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0".

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

12 years agoMake GVN look through extractvalues for recognised intrinsics. GVN can then CSE ops...
Lang Hames [Fri, 8 Jul 2011 01:50:54 +0000 (01:50 +0000)]
Make GVN look through extractvalues for recognised intrinsics. GVN can then CSE ops that match values produced by the intrinsics.

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

12 years agoRaise assertion when MachineOperand has unexpected target flag.
Akira Hatanaka [Fri, 8 Jul 2011 00:42:35 +0000 (00:42 +0000)]
Raise assertion when MachineOperand has unexpected target flag.

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

12 years agoMake sure variable Kind is assigned a value to suppress warning.
Akira Hatanaka [Fri, 8 Jul 2011 00:26:25 +0000 (00:26 +0000)]
Make sure variable Kind is assigned a value to suppress warning.

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

12 years agoFix more register allocation sensitive tests.
Jakob Stoklund Olesen [Fri, 8 Jul 2011 00:24:06 +0000 (00:24 +0000)]
Fix more register allocation sensitive tests.

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

12 years agoRemove a test that no longer makes sense.
Jakob Stoklund Olesen [Fri, 8 Jul 2011 00:24:03 +0000 (00:24 +0000)]
Remove a test that no longer makes sense.

It was testing a linear scan feature:

  Test if linearscan is unfavoring registers for allocation to allow
  more reuse of reloads from stack slots.

The greedy register allocator doesn't access any stack slots in this
function, so the linear scan feature was not being tested.

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

12 years agoLet the inline asm 'q' constraint match float, and on 64-bit double too.
Nick Lewycky [Fri, 8 Jul 2011 00:19:27 +0000 (00:19 +0000)]
Let the inline asm 'q' constraint match float, and on 64-bit double too.
Fixes PR9602!

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

12 years agoGo ahead and emit the barrier on x86-64 even without sse2. The
Eric Christopher [Fri, 8 Jul 2011 00:04:56 +0000 (00:04 +0000)]
Go ahead and emit the barrier on x86-64 even without sse2. The
processor supports it just fine.

Fixes PR9675 and rdar://9740801

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

12 years agoLower MachineInstr to MC Inst and print to .s files.
Akira Hatanaka [Thu, 7 Jul 2011 23:56:50 +0000 (23:56 +0000)]
Lower MachineInstr to MC Inst and print to .s files.

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

12 years agoFix CMake build's library dependencies.
Chandler Carruth [Thu, 7 Jul 2011 23:45:45 +0000 (23:45 +0000)]
Fix CMake build's library dependencies.

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

12 years agoHandle fpcr register.
Eric Christopher [Thu, 7 Jul 2011 22:54:12 +0000 (22:54 +0000)]
Handle fpcr register.

Part of PR10299 and rdar://9740322

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

12 years agoAdd support for the X86 'l' constraint.
Eric Christopher [Thu, 7 Jul 2011 22:29:07 +0000 (22:29 +0000)]
Add support for the X86 'l' constraint.

Fixes PR10149 and rdar://9738585

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

12 years agoRemove a FIXME. All of the standard ones are in the list.
Eric Christopher [Thu, 7 Jul 2011 22:29:03 +0000 (22:29 +0000)]
Remove a FIXME. All of the standard ones are in the list.

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

12 years agoRemove unnecessary newline.
Akira Hatanaka [Thu, 7 Jul 2011 22:06:18 +0000 (22:06 +0000)]
Remove unnecessary newline.

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

12 years agoAdd DEBUG message.
Devang Patel [Thu, 7 Jul 2011 21:44:42 +0000 (21:44 +0000)]
Add DEBUG message.

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

12 years agoAdd Mode64Bit feature and sink it down to MC layer.
Evan Cheng [Thu, 7 Jul 2011 21:06:52 +0000 (21:06 +0000)]
Add Mode64Bit feature and sink it down to MC layer.

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

12 years agoMove a function out-of-line.
Bill Wendling [Thu, 7 Jul 2011 21:05:13 +0000 (21:05 +0000)]
Move a function out-of-line.

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

12 years agoRather than having printMemOperand change the way memory operands are printed
Akira Hatanaka [Thu, 7 Jul 2011 20:54:20 +0000 (20:54 +0000)]
Rather than having printMemOperand change the way memory operands are printed
based on a modifier, split it into two functions.

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

12 years agoThis patch adds a flag in MCAsmInfo that indicates whether dwarf register
Akira Hatanaka [Thu, 7 Jul 2011 20:30:33 +0000 (20:30 +0000)]
This patch adds a flag in MCAsmInfo that indicates whether dwarf register
numbers should be printed instead of symbolic register names in
MCAsmStreamer::EmitRegisterName. This is necessary because some versions of
GNU assembler won't accept code in which symbolic register names are used in
cfi directives. There is no change in behavior unless the flag is explicitly
set to true by a backend.

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

12 years agoDefine class MipsMCInstLower.
Akira Hatanaka [Thu, 7 Jul 2011 20:24:54 +0000 (20:24 +0000)]
Define class MipsMCInstLower.

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

12 years agoChange visibility of MipsAsmPrinter.
Akira Hatanaka [Thu, 7 Jul 2011 20:10:52 +0000 (20:10 +0000)]
Change visibility of MipsAsmPrinter.

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

12 years agoDefine class MipsMCSymbolRefExpr.
Akira Hatanaka [Thu, 7 Jul 2011 19:27:22 +0000 (19:27 +0000)]
Define class MipsMCSymbolRefExpr.

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

12 years agoSimplify MipsRegisterInfo::eliminateFrameIndex.
Akira Hatanaka [Thu, 7 Jul 2011 19:13:09 +0000 (19:13 +0000)]
Simplify MipsRegisterInfo::eliminateFrameIndex.

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

12 years agoRewrite comment in English.
Evan Cheng [Thu, 7 Jul 2011 19:09:06 +0000 (19:09 +0000)]
Rewrite comment in English.

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

12 years agoRename attribute 'thumb' to a more descriptive 'thumb-mode'.
Evan Cheng [Thu, 7 Jul 2011 19:05:12 +0000 (19:05 +0000)]
Rename attribute 'thumb' to a more descriptive 'thumb-mode'.

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

12 years agoReverse order of operands of address operand mem so that the base operand comes
Akira Hatanaka [Thu, 7 Jul 2011 18:57:00 +0000 (18:57 +0000)]
Reverse order of operands of address operand mem so that the base operand comes
before the offset. This change will enable simplification of function
MipsRegisterInfo::eliminateFrameIndex.

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

12 years agoAdd missing return statement.
Akira Hatanaka [Thu, 7 Jul 2011 18:27:36 +0000 (18:27 +0000)]
Add missing return statement.

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

12 years agoIf known DebugLocs do not match then two DBG_VALUE machine instructions are not ident...
Devang Patel [Thu, 7 Jul 2011 17:45:33 +0000 (17:45 +0000)]
If known DebugLocs do not match then two DBG_VALUE machine instructions are not identical. For example,

        DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:32:10 ]
        DBG_VALUE 3.310000e+02, 0, !"ds"; dbg:sse.stepfft.c:138:18 @[ sse.stepfft.c:31:10 ]

These two MIs represent identical value, 3.31...,  for one variable, ds, but they are not identical because the represent two separate instances of inlined variable "ds".

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

12 years agoRecognize mipseb as alias for mips for symmetry with mipsel.
Joerg Sonnenberger [Thu, 7 Jul 2011 16:53:52 +0000 (16:53 +0000)]
Recognize mipseb as alias for mips for symmetry with mipsel.

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

12 years agoUpdate CMake library dependencies
Oscar Fuentes [Thu, 7 Jul 2011 16:33:00 +0000 (16:33 +0000)]
Update CMake library dependencies

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

12 years agoFix CMake build
Douglas Gregor [Thu, 7 Jul 2011 15:59:22 +0000 (15:59 +0000)]
Fix CMake build

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

12 years agoThe VMLA instruction and its friends are not actually fused; they're plain old
Cameron Zwarich [Thu, 7 Jul 2011 08:28:52 +0000 (08:28 +0000)]
The VMLA instruction and its friends are not actually fused; they're plain old
multiply-accumulate instructions with separate rounding steps.

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

12 years agoSink feature IsThumb into MC layer.
Evan Cheng [Thu, 7 Jul 2011 08:26:46 +0000 (08:26 +0000)]
Sink feature IsThumb into MC layer.

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

12 years agoFeature bits are 64-bits.
Evan Cheng [Thu, 7 Jul 2011 07:45:49 +0000 (07:45 +0000)]
Feature bits are 64-bits.

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

12 years agoCompute feature bits at time of MCSubtargetInfo initialization.
Evan Cheng [Thu, 7 Jul 2011 07:07:08 +0000 (07:07 +0000)]
Compute feature bits at time of MCSubtargetInfo initialization.

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

12 years agotype can be null
Chris Lattner [Thu, 7 Jul 2011 05:29:18 +0000 (05:29 +0000)]
type can be null

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

12 years agouse a more efficient check for 'is metadata'
Chris Lattner [Thu, 7 Jul 2011 05:12:37 +0000 (05:12 +0000)]
use a more efficient check for 'is metadata'

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

12 years agoUse ArrayRef instead of a std::vector&.
Bill Wendling [Thu, 7 Jul 2011 04:42:01 +0000 (04:42 +0000)]
Use ArrayRef instead of a std::vector&.

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

12 years agoAdd functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The
Lang Hames [Thu, 7 Jul 2011 04:31:51 +0000 (04:31 +0000)]
Add functions 'hasPredecessor' and 'hasPredecessorHelper' to SDNode. The
hasPredecessorHelper function allows predecessors to be cached to speed up
repeated invocations. This fixes PR10186.

X.isPredecessorOf(Y) now just calls Y.hasPredecessor(X)

Y.hasPredecessor(X) calls Y.hasPredecessorHelper(X, Visited, Worklist) with
empty Visited and Worklist sets (i.e. no caching over invocations).

Y.hasPredecessorHelper(X, Visited, Worklist) caches search state in Visited
and Worklist to speed up repeated calls. The Visited set is searched for X
before going to the worklist to further search the DAG if necessary.

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

12 years agoChange some ARM subtarget features to be single bit yes/no in order to sink them...
Evan Cheng [Thu, 7 Jul 2011 03:55:05 +0000 (03:55 +0000)]
Change some ARM subtarget features to be single bit yes/no in order to sink them down to MC layer. Also fix tests.

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

12 years agoAdd a target hook to encode the compact unwind information.
Bill Wendling [Thu, 7 Jul 2011 00:54:13 +0000 (00:54 +0000)]
Add a target hook to encode the compact unwind information.

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

12 years agoAdd isCodeGenOnly value to the CodeGenInstruction class.
Jim Grosbach [Thu, 7 Jul 2011 00:48:02 +0000 (00:48 +0000)]
Add isCodeGenOnly value to the CodeGenInstruction class.

So users of a CGI don't have to look up the value directly from the original
Record; just like the rest of the convenience values in the class.

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

12 years agoAdded a testcase for PR10220.
Lang Hames [Thu, 7 Jul 2011 00:36:02 +0000 (00:36 +0000)]
Added a testcase for PR10220.

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

12 years agoAdd DEBUG messages.
Devang Patel [Thu, 7 Jul 2011 00:14:27 +0000 (00:14 +0000)]
Add DEBUG messages.

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

12 years agoFactor ARM triple parsing out of ARMSubtarget. Another step towards making ARM subtar...
Evan Cheng [Thu, 7 Jul 2011 00:08:19 +0000 (00:08 +0000)]
Factor ARM triple parsing out of ARMSubtarget. Another step towards making ARM subtarget info available to MC.

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

12 years agoUse DBG_VALUE location while inserting DBG_VALUE during alloca promotion.
Devang Patel [Thu, 7 Jul 2011 00:05:58 +0000 (00:05 +0000)]
Use DBG_VALUE location while inserting DBG_VALUE during alloca promotion.

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

12 years agoFix a bug in the "expect" intrinsic lowering.
Jakub Staszak [Wed, 6 Jul 2011 23:50:16 +0000 (23:50 +0000)]
Fix a bug in the "expect" intrinsic lowering.

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

12 years agoWhen tail-merging multiple blocks, make sure to correctly update the live-in list...
Eli Friedman [Wed, 6 Jul 2011 23:41:48 +0000 (23:41 +0000)]
When tail-merging multiple blocks, make sure to correctly update the live-in list on the merged block to correctly account for the live-outs of all the predecessors.  They might not be the same in all cases (the testcase I have involves a PHI node where one of the operands is an IMPLICIT_DEF).

Unfortunately, the testcase I have is large and confidential, so I don't have a test to commit at the moment; I'll see if I can come up with something smaller where this issue reproduces.

<rdar://problem/9716278>

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

12 years agoTypo.
Jim Grosbach [Wed, 6 Jul 2011 23:38:13 +0000 (23:38 +0000)]
Typo.

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

12 years agoRemove dead code.
Devang Patel [Wed, 6 Jul 2011 23:26:18 +0000 (23:26 +0000)]
Remove dead code.

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

12 years agoTypo.
Devang Patel [Wed, 6 Jul 2011 23:09:51 +0000 (23:09 +0000)]
Typo.

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

12 years agoClean up the #includes.
Bill Wendling [Wed, 6 Jul 2011 22:52:32 +0000 (22:52 +0000)]
Clean up the #includes.

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

12 years agoGrammar and 80-col.
Eric Christopher [Wed, 6 Jul 2011 22:41:18 +0000 (22:41 +0000)]
Grammar and 80-col.

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

12 years agoFix a subtle issue in SmallVector. The following code did not work as expected:
Owen Anderson [Wed, 6 Jul 2011 22:36:59 +0000 (22:36 +0000)]
Fix a subtle issue in SmallVector.  The following code did not work as expected:
  vec.insert(vec.begin(), vec[3]);
The issue was that vec[3] returns a reference into the vector, which is invalidated when insert() memmove's the elements down to make space.  The method needs to specifically detect and handle this case to correctly match std::vector's semantics.

Thanks to Howard Hinnant for clarifying the correct behavior, and explaining how std::vector solves this problem.

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

12 years agoHandle cases where multiple dbg.declare and dbg.value intrinsics are tied to one...
Devang Patel [Wed, 6 Jul 2011 22:06:11 +0000 (22:06 +0000)]
Handle cases where multiple dbg.declare and dbg.value intrinsics are tied to one alloca.

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

12 years agoAdd ARM MC registry routines.
Evan Cheng [Wed, 6 Jul 2011 22:02:34 +0000 (22:02 +0000)]
Add ARM MC registry routines.

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

12 years agoRename files for consistency.
Evan Cheng [Wed, 6 Jul 2011 22:01:53 +0000 (22:01 +0000)]
Rename files for consistency.

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

12 years agoAdd ImmutableList::contains(). Patch by Rui Paulo!
Nick Lewycky [Wed, 6 Jul 2011 21:59:48 +0000 (21:59 +0000)]
Add ImmutableList::contains(). Patch by Rui Paulo!

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

12 years agoMark ARM pseudo-instructions as isPseudo.
Jim Grosbach [Wed, 6 Jul 2011 21:35:46 +0000 (21:35 +0000)]
Mark ARM pseudo-instructions as isPseudo.

This allows us to remove the (bogus and unneeded) encoding information from
the pseudo-instruction class definitions. All of the pseudos that haven't
been converted yet and still need encoding information instance from the normal
instruction classes and explicitly set isCodeGenOnly, and so are distinct
from this change.

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