oota-llvm.git
14 years agoRemove isTwoAddress from here too.
Eric Christopher [Fri, 18 Jun 2010 23:56:07 +0000 (23:56 +0000)]
Remove isTwoAddress from here too.

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

14 years agoFix typo, SSE1 should be used by XS, not SSE2
Bruno Cardoso Lopes [Fri, 18 Jun 2010 23:53:27 +0000 (23:53 +0000)]
Fix typo, SSE1 should be used by XS, not SSE2

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

14 years agoRemove isTwoAddress from 64-bit files.
Eric Christopher [Fri, 18 Jun 2010 23:51:21 +0000 (23:51 +0000)]
Remove isTwoAddress from 64-bit files.

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

14 years agoMove ARM if-conversion before post-ra scheduling.
Evan Cheng [Fri, 18 Jun 2010 23:32:07 +0000 (23:32 +0000)]
Move ARM if-conversion before post-ra scheduling.

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

14 years agoTeach regular and fast isel to set dead flags on unused implicit defs
Dan Gohman [Fri, 18 Jun 2010 23:28:01 +0000 (23:28 +0000)]
Teach regular and fast isel to set dead flags on unused implicit defs
on calls and similar instructions.

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

14 years agoApply some refactor to packed instructions
Bruno Cardoso Lopes [Fri, 18 Jun 2010 23:13:35 +0000 (23:13 +0000)]
Apply some refactor to packed instructions

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

14 years agoUpdate cmake list.
Evan Cheng [Fri, 18 Jun 2010 23:12:10 +0000 (23:12 +0000)]
Update cmake list.

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

14 years agoThumb2 hazard recognizer.
Evan Cheng [Fri, 18 Jun 2010 23:11:35 +0000 (23:11 +0000)]
Thumb2 hazard recognizer.

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

14 years agoOnly run CoalesceExtSubRegs when we can expect LiveIntervalAnalysis to clean up
Jakob Stoklund Olesen [Fri, 18 Jun 2010 23:10:20 +0000 (23:10 +0000)]
Only run CoalesceExtSubRegs when we can expect LiveIntervalAnalysis to clean up
the inserted INSERT_SUBREGs after us.

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

14 years agoAllow ARM if-converter to be run after post allocation scheduling.
Evan Cheng [Fri, 18 Jun 2010 23:09:54 +0000 (23:09 +0000)]
Allow ARM if-converter to be run after post allocation scheduling.
- This fixed a number of bugs in if-converter, tail merging, and post-allocation
  scheduler. If-converter now runs branch folding / tail merging first to
  maximize if-conversion opportunities.
- Also changed the t2IT instruction slightly. It now defines the ITSTATE
  register which is read by instructions in the IT block.
- Added Thumb2 specific hazard recognizer to ensure the scheduler doesn't
  change the instruction ordering in the IT block (since IT mask has been
  finalized). It also ensures no other instructions can be scheduled between
  instructions in the IT block.

This is not yet enabled.

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

14 years agoback-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)
Jim Grosbach [Fri, 18 Jun 2010 23:03:10 +0000 (23:03 +0000)]
back-end libcall handling for ATOMIC_SWAP (__sync_lock_test_and_set)

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

14 years agoAnother typo.
Eric Christopher [Fri, 18 Jun 2010 22:51:25 +0000 (22:51 +0000)]
Another typo.

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

14 years agoEnable Expand handling of atomics for subtargets that can't do them inline.
Jim Grosbach [Fri, 18 Jun 2010 22:35:32 +0000 (22:35 +0000)]
Enable Expand handling of atomics for subtargets that can't do them inline.

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

14 years agoFix typo.
Eric Christopher [Fri, 18 Jun 2010 22:33:17 +0000 (22:33 +0000)]
Fix typo.

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

14 years agoTwoAddressInstructionPass::CoalesceExtSubRegs can insert INSERT_SUBREG
Jakob Stoklund Olesen [Fri, 18 Jun 2010 22:29:44 +0000 (22:29 +0000)]
TwoAddressInstructionPass::CoalesceExtSubRegs can insert INSERT_SUBREG
instructions, but it doesn't really understand live ranges, so the first
INSERT_SUBREG uses an implicitly defined register.

Fix it in LiveVariableAnalysis by adding the <undef> flag.

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

14 years agoFix an inverted condition.
Evan Cheng [Fri, 18 Jun 2010 22:17:13 +0000 (22:17 +0000)]
Fix an inverted condition.

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

14 years agoUse the new 'defm' class inheritance in SSE
Bruno Cardoso Lopes [Fri, 18 Jun 2010 22:10:11 +0000 (22:10 +0000)]
Use the new 'defm' class inheritance in SSE

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

14 years agoFix cross initialization compilation error.
Evan Cheng [Fri, 18 Jun 2010 22:01:37 +0000 (22:01 +0000)]
Fix cross initialization compilation error.

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

14 years agoTeach iff-converter to properly count # of dups. It was not skipping over dbg_value...
Evan Cheng [Fri, 18 Jun 2010 21:52:57 +0000 (21:52 +0000)]
Teach iff-converter to properly count # of dups. It was not skipping over dbg_value's which resulted in non-duplicated instructions being deleted. rdar://8104384.

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

14 years agoAdd Expand-to-libcall support for additional atomics. This covers the usual
Jim Grosbach [Fri, 18 Jun 2010 21:43:38 +0000 (21:43 +0000)]
Add Expand-to-libcall support for additional atomics. This covers the usual
entries used by llvm-gcc. *_[U]MIN and such can be added later if needed.

This enables the front ends to simplify handling of the atomic intrinsics by
removing the target-specific decision about which targets can handle the
intrinsics.

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

14 years agoRewrite chained if's as switches and replace assertions with llvm_unreachable
Bob Wilson [Fri, 18 Jun 2010 21:32:42 +0000 (21:32 +0000)]
Rewrite chained if's as switches and replace assertions with llvm_unreachable
(as suggested in radar 8104405).

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

14 years agoFix ARM/Thumb reversal in previous attempt.
Dale Johannesen [Fri, 18 Jun 2010 21:07:47 +0000 (21:07 +0000)]
Fix ARM/Thumb reversal in previous attempt.

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

14 years agoWhen using ADDri to get the address of a stack object, 255 is a conservative
Jakob Stoklund Olesen [Fri, 18 Jun 2010 20:59:25 +0000 (20:59 +0000)]
When using ADDri to get the address of a stack object, 255 is a conservative
limit on the offset that can be materialized without using the register
scavenger.

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

14 years agoMake this comment less specific.
Dan Gohman [Fri, 18 Jun 2010 20:45:41 +0000 (20:45 +0000)]
Make this comment less specific.

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

14 years agoFix X86FastISel's address-mode folding to stay within the
Dan Gohman [Fri, 18 Jun 2010 20:44:47 +0000 (20:44 +0000)]
Fix X86FastISel's address-mode folding to stay within the
original basic block. This avoids trouble with examining
instructions in other basic blocks which haven't been
assigned registers yet.

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

14 years agoAn attempt to fix the problem Anton reported with
Dale Johannesen [Fri, 18 Jun 2010 20:44:28 +0000 (20:44 +0000)]
An attempt to fix the problem Anton reported with
ARM tail calls.  Don't know if it works, but it
doesn't break Darwin.

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

14 years agoRevert r106304 (105548 and friends), which are the SCEVComplexityCompare
Dan Gohman [Fri, 18 Jun 2010 19:54:20 +0000 (19:54 +0000)]
Revert r106304 (105548 and friends), which are the SCEVComplexityCompare
optimizations. There is still some nondeterminism remaining.

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

14 years agoTeach tablegen how to inherit from classes in 'defm' definitions.
Bruno Cardoso Lopes [Fri, 18 Jun 2010 19:53:41 +0000 (19:53 +0000)]
Teach tablegen how to inherit from classes in 'defm' definitions.
The rule is simple: only inherit from a class list if they come
in the end, after the last multiclass.

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

14 years agoReapply 105540, 105542, and 105548, and revert r105732.
Dan Gohman [Fri, 18 Jun 2010 19:26:04 +0000 (19:26 +0000)]
Reapply 105540, 105542, and 105548, and revert r105732.

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

14 years agoAdd a pass-through option to the plugin. The use case for this option is to
Rafael Espindola [Fri, 18 Jun 2010 19:18:58 +0000 (19:18 +0000)]
Add a pass-through option to the plugin. The use case for this option is to
ask the linker to take another look into some library or object. The case when
one might want to do this is when codegen introduces a new undefined reference.
The canonical example is libgcc.

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

14 years agoReapply 105546.
Dan Gohman [Fri, 18 Jun 2010 19:12:32 +0000 (19:12 +0000)]
Reapply 105546.

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

14 years agoReapply 105544.
Dan Gohman [Fri, 18 Jun 2010 19:09:27 +0000 (19:09 +0000)]
Reapply 105544.

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

14 years agoAdd explicit keywords.
Dan Gohman [Fri, 18 Jun 2010 19:04:37 +0000 (19:04 +0000)]
Add explicit keywords.

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

14 years agoEnable tail calls on ARM by default, with some
Dale Johannesen [Fri, 18 Jun 2010 19:00:18 +0000 (19:00 +0000)]
Enable tail calls on ARM by default, with some
basic tests.

This has been well tested on Darwin but not elsewhere.
It should work provided the linker correctly resolves
  B.W  <label in other function>
which it has not seen before, at least from llvm-based
compilers.  I'm leaving the arm-tail-calls switch in
until I see if there's any problems because of that;
it might need to be disabled for some environments.

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

14 years agoDon't leak RegClass2VRegMap, which is now a new[] array instead of a
Dan Gohman [Fri, 18 Jun 2010 18:54:05 +0000 (18:54 +0000)]
Don't leak RegClass2VRegMap, which is now a new[] array instead of a
std::vector.

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

14 years agoStart TargetRegisterClass indices at 0 instead of 1, so that
Dan Gohman [Fri, 18 Jun 2010 18:13:55 +0000 (18:13 +0000)]
Start TargetRegisterClass indices at 0 instead of 1, so that
MachineRegisterInfo doesn't have to confusingly allocate an extra
entry.

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

14 years agoLast round of changes for ARM tail calls.
Dale Johannesen [Fri, 18 Jun 2010 18:13:11 +0000 (18:13 +0000)]
Last round of changes for ARM tail calls.
Not turning them on yet.

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

14 years agoGrammar.
Jim Grosbach [Fri, 18 Jun 2010 17:40:42 +0000 (17:40 +0000)]
Grammar.

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

14 years agoFix PR7372: Conditional branches (at least on ARM) are treated as predicated,
Bob Wilson [Fri, 18 Jun 2010 17:07:23 +0000 (17:07 +0000)]
Fix PR7372: Conditional branches (at least on ARM) are treated as predicated,
so when IfConverter::CopyAndPredicateBlock checks to see if it should ignore
an instruction because it is a branch, it should not check if the branch is
predicated.

This case (when IgnoreBr is true) is only relevant from IfConvertTriangle,
where new branches are inserted after the block has been copied and predicated.
If the original branch is not removed, we end up with multiple conditional
branches (possibly conflicting) at the end of the block.  Aside from any
immediate errors resulting from that, this confuses the AnalyzeBranch functions
so that the branches are not analyzable.  That in turn causes the IfConverter to
think that the "Simple" pattern can be applied, and things go downhill fast
because the "Simple" pattern does _not_ apply if the block can fall through.

This is pretty fragile.  If there are other degenerate cases where AnalyzeBranch
fails, but where the block may still fall through, the IfConverter should not
perform its "Simple" if-conversion.  But, I don't know how to do that with the
current AnalyzeBranch interface, so for now, the best thing seems to be to
avoid creating branches that AnalyzeBranch cannot handle.

Evan, please review!

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

14 years agoTreat the ARM inline asm {cc} constraint as a physreg (%CPSR), just like X86
Jakob Stoklund Olesen [Fri, 18 Jun 2010 16:49:33 +0000 (16:49 +0000)]
Treat the ARM inline asm {cc} constraint as a physreg (%CPSR), just like X86
does for {flags}. If we create virtual registers of the CCR class, RegAllocFast
may try to spill them, and we can't do that.

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

14 years agoDon't bother calling releaseMemory before destroying the DominatorTreeBase.
Dan Gohman [Fri, 18 Jun 2010 16:09:11 +0000 (16:09 +0000)]
Don't bother calling releaseMemory before destroying the DominatorTreeBase.

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

14 years agoMinor code simplifications.
Dan Gohman [Fri, 18 Jun 2010 16:00:29 +0000 (16:00 +0000)]
Minor code simplifications.

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

14 years agoGive NamedRegionTimer an Enabled flag, allowing all its clients to
Dan Gohman [Fri, 18 Jun 2010 15:56:31 +0000 (15:56 +0000)]
Give NamedRegionTimer an Enabled flag, allowing all its clients to
switch from this:

  if (TimePassesIsEnabled) {
    NamedRegionTimer T(Name, GroupName);
    do_something();
  } else {
    do_something(); // duplicate the code, this time without a timer!
  }

to this:

  {
    NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled);
    do_something();
  }

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

14 years agoDon't replace the old Ordering object with a new one; just clear()
Dan Gohman [Fri, 18 Jun 2010 15:40:58 +0000 (15:40 +0000)]
Don't replace the old Ordering object with a new one; just clear()
the old one.

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

14 years agoDon't call clear() on DbgInfo when it's going to be deleted anyway.
Dan Gohman [Fri, 18 Jun 2010 15:36:18 +0000 (15:36 +0000)]
Don't call clear() on DbgInfo when it's going to be deleted anyway.

Don't replace the old DbgInfo with a new one when clear() on the
old one is sufficient.

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

14 years agoChange UpdateNodeOperands' operand and return value from SDValue to
Dan Gohman [Fri, 18 Jun 2010 15:30:29 +0000 (15:30 +0000)]
Change UpdateNodeOperands' operand and return value from SDValue to
SDNode *, since it doesn't care about the ResNo value.

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

14 years agoRemove getIntegerSCEV; it's redundant with getConstant, and getConstant
Dan Gohman [Fri, 18 Jun 2010 14:33:50 +0000 (14:33 +0000)]
Remove getIntegerSCEV; it's redundant with getConstant, and getConstant
is more consistent with the ConstantInt API.

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

14 years agoDelete unused variables.
Dan Gohman [Fri, 18 Jun 2010 14:32:32 +0000 (14:32 +0000)]
Delete unused variables.

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

14 years agoEliminate unnecessary uses of getZExtValue().
Dan Gohman [Fri, 18 Jun 2010 14:22:04 +0000 (14:22 +0000)]
Eliminate unnecessary uses of getZExtValue().

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

14 years agoisValueValidForType can be a static member function.
Dan Gohman [Fri, 18 Jun 2010 14:01:07 +0000 (14:01 +0000)]
isValueValidForType can be a static member function.

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

14 years agoSome assorted isTwoAddress -> Constraints cleanup.
Eric Christopher [Fri, 18 Jun 2010 02:41:19 +0000 (02:41 +0000)]
Some assorted isTwoAddress -> Constraints cleanup.

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

14 years agoHandle execution entrypoints with non-integer return types.
Dan Gohman [Fri, 18 Jun 2010 02:01:10 +0000 (02:01 +0000)]
Handle execution entrypoints with non-integer return types.
Fix from Russel Power in PR7284.

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

14 years agoDon't write a file named "&1".
Dan Gohman [Fri, 18 Jun 2010 01:49:17 +0000 (01:49 +0000)]
Don't write a file named "&1".

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

14 years agoDisable indvars on loops when LoopSimplify form is not available.
Dan Gohman [Fri, 18 Jun 2010 01:35:11 +0000 (01:35 +0000)]
Disable indvars on loops when LoopSimplify form is not available.
This fixes PR7333.

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

14 years agoDon't maintain a set of deleted nodes; instead, use a HandleSDNode
Dan Gohman [Fri, 18 Jun 2010 01:24:29 +0000 (01:24 +0000)]
Don't maintain a set of deleted nodes; instead, use a HandleSDNode
to track a node over CSE events. This fixes PR7368.

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

14 years agoAdd {mix,max}{ss,sd}{rr,rm} AVX forms.
Bruno Cardoso Lopes [Fri, 18 Jun 2010 01:12:56 +0000 (01:12 +0000)]
Add {mix,max}{ss,sd}{rr,rm} AVX forms.

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

14 years agoFold the ShrinkDemandedOps pass into the regular DAGCombiner pass,
Dan Gohman [Fri, 18 Jun 2010 01:05:21 +0000 (01:05 +0000)]
Fold the ShrinkDemandedOps pass into the regular DAGCombiner pass,
which is faster, simpler, and less surprising.

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

14 years agoFix a typo in a comment.
Dan Gohman [Fri, 18 Jun 2010 00:53:08 +0000 (00:53 +0000)]
Fix a typo in a comment.

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

14 years agoimprove portability to solaris 10, PR7380, patch by Simon Billingsley!
Chris Lattner [Fri, 18 Jun 2010 00:35:32 +0000 (00:35 +0000)]
improve portability to solaris 10, PR7380, patch by Simon Billingsley!

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

14 years agoHandle ext(ext(x)) -> ext(x) immediately, since it's simple.
Dan Gohman [Fri, 18 Jun 2010 00:08:30 +0000 (00:08 +0000)]
Handle ext(ext(x)) -> ext(x) immediately, since it's simple.

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

14 years agoMake this test less fragile.
Dan Gohman [Fri, 18 Jun 2010 00:06:03 +0000 (00:06 +0000)]
Make this test less fragile.

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

14 years agoSimplify this code.
Dan Gohman [Thu, 17 Jun 2010 23:34:09 +0000 (23:34 +0000)]
Simplify this code.

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

14 years agoUse new tablegen resources in SSE tablegen code. This will
Bruno Cardoso Lopes [Thu, 17 Jun 2010 23:05:30 +0000 (23:05 +0000)]
Use new tablegen resources in SSE tablegen code. This will
be done incrementally and intermixed with the adding of more
AVX instructions. This is a first step in that direction

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

14 years agoIn case Rec is a definition and not a class, do the proper comparison!
Bruno Cardoso Lopes [Thu, 17 Jun 2010 23:00:16 +0000 (23:00 +0000)]
In case Rec is a definition and not a class, do the proper comparison!

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

14 years agoAdd a DebugLoc parameter to TargetInstrInfo::InsertBranch(). This
Stuart Hastings [Thu, 17 Jun 2010 22:43:56 +0000 (22:43 +0000)]
Add a DebugLoc parameter to TargetInstrInfo::InsertBranch().  This
addresses a longstanding deficiency noted in many FIXMEs scattered
across all the targets.

This effectively moves the problem up one level, replacing eleven
FIXMEs in the targets with eight FIXMEs in CodeGen, plus one path
through FastISel where we actually supply a DebugLoc, fixing Radar
7421831.

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

14 years agoMinor clarification.
Dan Gohman [Thu, 17 Jun 2010 19:23:50 +0000 (19:23 +0000)]
Minor clarification.

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

14 years agoadd missing break. inconsequential as the code shouldn't be reached, but
Jim Grosbach [Thu, 17 Jun 2010 17:58:54 +0000 (17:58 +0000)]
add missing break. inconsequential as the code shouldn't be reached, but
for correctness' sake, it should be there.

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

14 years agoAdd entries for Expanding atomic intrinsics to libcalls. Just a placeholder
Jim Grosbach [Thu, 17 Jun 2010 17:50:54 +0000 (17:50 +0000)]
Add entries for Expanding atomic intrinsics to libcalls. Just a placeholder
for the moment. The implementation of the libcall will follow.

Currently, the llvm-gcc knows when the intrinsics can be correctly handled by
the back end and only generates them in those cases, issuing libcalls directly
otherwise. That's too much coupling. The intrinsics should always be
generated and the back end decide how to handle them, be it with a libcall,
inline code, or whatever. This patch is a step in that direction.

rdar://8097623

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

14 years agoTestcase for llvm-gcc 106225.
Dale Johannesen [Thu, 17 Jun 2010 17:43:14 +0000 (17:43 +0000)]
Testcase for llvm-gcc 106225.

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

14 years agoRemove arm_apcscc from the test files. It is the default and doing this
Rafael Espindola [Thu, 17 Jun 2010 15:18:27 +0000 (15:18 +0000)]
Remove arm_apcscc from the test files. It is the default and doing this
matches what llvm-gcc and clang now produce.

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

14 years agoAllow absolute paths in LLVM_TARGET_DEFINITIONS for CMake's TableGen rule
Douglas Gregor [Thu, 17 Jun 2010 15:17:07 +0000 (15:17 +0000)]
Allow absolute paths in LLVM_TARGET_DEFINITIONS for CMake's TableGen rule

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

14 years agoModify tablegen to support generating all NEON code used by clang at once.
Nate Begeman [Thu, 17 Jun 2010 04:15:13 +0000 (04:15 +0000)]
Modify tablegen to support generating all NEON code used by clang at once.

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

14 years agoThumb1 and any pre-v6 ARM target should use the libcall expansion of
Jim Grosbach [Thu, 17 Jun 2010 02:02:03 +0000 (02:02 +0000)]
Thumb1 and any pre-v6 ARM target should use the libcall expansion of
ISD::MEMBARRIER. v7 and v7 ARM mode continue to use the custom lowering.

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

14 years agoISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the target
Jim Grosbach [Thu, 17 Jun 2010 02:00:53 +0000 (02:00 +0000)]
ISD::MEMBARRIER should lower to a libcall (__sync_synchronize) if the target
sets the legalize action to Expand.

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

14 years agoFix the handling of !if result, avoiding null results for non 'int'.
Bruno Cardoso Lopes [Thu, 17 Jun 2010 01:50:39 +0000 (01:50 +0000)]
Fix the handling of !if result, avoiding null results for non 'int'.

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

14 years agosimplify code a bit and add a more explanatory assert for cases that
Jim Grosbach [Thu, 17 Jun 2010 01:37:00 +0000 (01:37 +0000)]
simplify code a bit and add a more explanatory assert for cases that
previously would result in 'cannot yet select' errors.

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

14 years agoAdd the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and
Jason Molenda [Thu, 17 Jun 2010 01:23:24 +0000 (01:23 +0000)]
Add the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and
DW_OP_breg[0..31] to Dwarf.h.

Add "DW_" prefix to the llvm::dwarf::*String methods which did not
already have them in Dwarf.cpp.

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

14 years agoHack to let the move lowering handle dynamic-no-pic absolute moves of
Eric Christopher [Thu, 17 Jun 2010 00:51:48 +0000 (00:51 +0000)]
Hack to let the move lowering handle dynamic-no-pic absolute moves of
TLVP:

movl _a@TLVP, %eax

Daniel: Please review if you get a chance.

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

14 years agoUpdate comment.
Eric Christopher [Thu, 17 Jun 2010 00:49:46 +0000 (00:49 +0000)]
Update comment.

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

14 years agoFor a tablegen expression such as !if(a,b,c), let 'a'
Bruno Cardoso Lopes [Thu, 17 Jun 2010 00:31:36 +0000 (00:31 +0000)]
For a tablegen expression such as !if(a,b,c), let 'a'
be evaluated for 'bit' operators

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

14 years agoFix the typo in my previous one-line commit.
Sean Hunt [Thu, 17 Jun 2010 00:10:16 +0000 (00:10 +0000)]
Fix the typo in my previous one-line commit.

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

14 years agoMake sure CMake can build the files added by my previous commit.
Sean Hunt [Wed, 16 Jun 2010 23:52:37 +0000 (23:52 +0000)]
Make sure CMake can build the files added by my previous commit.

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

14 years agoAdd preliminary clang attribute generation support.
Sean Hunt [Wed, 16 Jun 2010 23:45:50 +0000 (23:45 +0000)]
Add preliminary clang attribute generation support.

The attribute class generation support is still somewhat limited.
See the accompanying clang commit for more details.

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

14 years agoformat and 80-column cleanup
Jim Grosbach [Wed, 16 Jun 2010 23:45:49 +0000 (23:45 +0000)]
format and 80-column cleanup

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

14 years agolet the '!eq' expression support 'int' and 'bit' types
Bruno Cardoso Lopes [Wed, 16 Jun 2010 23:24:12 +0000 (23:24 +0000)]
let the '!eq' expression support 'int' and 'bit' types

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

14 years agoremove trailing whitespace
Jim Grosbach [Wed, 16 Jun 2010 22:41:09 +0000 (22:41 +0000)]
remove trailing whitespace

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

14 years agoRevert r106117, which was the result of me misreading the C++98/03
Douglas Gregor [Wed, 16 Jun 2010 22:32:18 +0000 (22:32 +0000)]
Revert r106117, which was the result of me misreading the C++98/03
specification.

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

14 years agoDon't attempt preserving conservative kill flags. We were doing it wrong.
Jakob Stoklund Olesen [Wed, 16 Jun 2010 22:11:08 +0000 (22:11 +0000)]
Don't attempt preserving conservative kill flags. We were doing it wrong.
This is before LiveVariables anyway, where these kill flags are recalculated.

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

14 years agoRemove the hidden "neon-reg-sequence" option. The reg sequences are working
Bob Wilson [Wed, 16 Jun 2010 21:34:01 +0000 (21:34 +0000)]
Remove the hidden "neon-reg-sequence" option.  The reg sequences are working
now, so there's no need to disable them.

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

14 years agoIn progress on 32-bit addends.
Eric Christopher [Wed, 16 Jun 2010 21:32:38 +0000 (21:32 +0000)]
In progress on 32-bit addends.

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

14 years agoAllow a register to be redefined multiple times in a basic block.
Jakob Stoklund Olesen [Wed, 16 Jun 2010 21:29:40 +0000 (21:29 +0000)]
Allow a register to be redefined multiple times in a basic block.

LiveVariableAnalysis was a bit picky about a register only being redefined once,
but that really isn't necessary.

Here is an example of chained INSERT_SUBREGs that we can handle now:

68      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1028<kill>, 14
                register: %reg1040 +[70,134:0)
76      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1029<kill>, 13
                register: %reg1040 replace range with [70,78:1) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,134:0)  0@78-(134) 1@70-(78)
84      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1030<kill>, 12
                register: %reg1040 replace range with [78,86:2) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,86:2)[86,134:0)  0@86-(134) 1@70-(78) 2@78-(86)
92      %reg1040<def> = INSERT_SUBREG %reg1040, %reg1031<kill>, 11
                register: %reg1040 replace range with [86,94:3) RESULT: %reg1040,0.000000e+00 = [70,78:1)[78,86:2)[86,94:3)[94,134:0)  0@94-(134) 1@70-(78) 2@78-(86) 3@86-(94)

rdar://problem/8096390

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

14 years agoA few more places where SCEVExpander bits need to skip over debug intrinsics
Jim Grosbach [Wed, 16 Jun 2010 21:13:38 +0000 (21:13 +0000)]
A few more places where SCEVExpander bits need to skip over debug intrinsics
when iterating through instructions. Yet more work for rdar://7797940

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

14 years agomodify so the test doesn't drop an output file in the test source directory.
Jim Grosbach [Wed, 16 Jun 2010 21:07:06 +0000 (21:07 +0000)]
modify so the test doesn't drop an output file in the test source directory.

The test should also likely have some FileCheck bits to validate the
output(?).

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

14 years agoMC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead...
Daniel Dunbar [Wed, 16 Jun 2010 20:04:32 +0000 (20:04 +0000)]
MC/Mach-O: Rewrite atom association to be a final pass we do in Finish(), instead of tracking as part of emission.
 - This allows sharing more code with the MCObjectStreamer.

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

14 years agoMC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.
Daniel Dunbar [Wed, 16 Jun 2010 20:04:29 +0000 (20:04 +0000)]
MC: Simplify MCAssembler::isSymbolLinkerVisible to only take an MCSymbol.

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

14 years agoMC: Lift SwitchSection() and Finish() into MCObjectStreamer.
Daniel Dunbar [Wed, 16 Jun 2010 20:04:25 +0000 (20:04 +0000)]
MC: Lift SwitchSection() and Finish() into MCObjectStreamer.

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

14 years agoMC: Factor out an MCObjectStreamer class, which will be shared by the concrete
Daniel Dunbar [Wed, 16 Jun 2010 20:04:22 +0000 (20:04 +0000)]
MC: Factor out an MCObjectStreamer class, which will be shared by the concrete
object file format writers.

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

14 years agoBe specific. Use FileCheck.
Devang Patel [Wed, 16 Jun 2010 19:39:45 +0000 (19:39 +0000)]
Be specific. Use FileCheck.

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

14 years agoMake sure that simplify libcalls does not replace a call with one calling
Rafael Espindola [Wed, 16 Jun 2010 19:34:01 +0000 (19:34 +0000)]
Make sure that simplify libcalls does not replace a call with one calling
convention with a new call with a different calling convention.

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

14 years agoadd FIXME
Jim Grosbach [Wed, 16 Jun 2010 18:45:08 +0000 (18:45 +0000)]
add FIXME

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