Commit Graph

45495 Commits

Author SHA1 Message Date
Duncan Sands
fe167c5a14 This has been implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125738 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 08:16:56 +00:00
Duncan Sands
a77243300b Transform "A + B >= A + C" into "B >= C" if the adds do not wrap. Likewise for some
variations (some of these were already present so I unified the code).  Spotted by my
auto-simplifier as occurring a lot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 07:46:37 +00:00
Cameron Zwarich
2598b1f4ac Switch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125728 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 06:52:07 +00:00
Cameron Zwarich
61a733434d Adjust indenting of arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125727 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 06:13:46 +00:00
Cameron Zwarich
688521ca6f Return Changed from SplitPHIEdges rather than always returning true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125726 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 06:13:43 +00:00
Chris Lattner
41429e3f1e preserve NUW/NSW when transforming add x,x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125711 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 02:23:02 +00:00
Chris Lattner
cb40195641 add some notes on compares + binops. Remove redundant entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125702 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 01:43:46 +00:00
Chris Lattner
de1d8a544c fix PR9215, preventing -reassociate from clearing nsw/nuw when
it swaps the LHS/RHS of a single binop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125700 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 01:29:24 +00:00
Chris Lattner
5653f1f904 Add a few missed xforms from GCC PR14753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125681 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 19:16:34 +00:00
Stuart Hastings
a901129169 Swap VT and DebugLoc operands of getExtLoad() for consistency with
other getNode() methods.  Radar 9002173.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 16:23:55 +00:00
Eli Friedman
eb1dc98aa7 Remove outdated README entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125660 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 07:41:19 +00:00
Eli Friedman
fd51e95171 Remove outdated README entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125659 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 07:18:18 +00:00
Eli Friedman
c5cb996e9c Update README entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125658 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 07:17:44 +00:00
Eric Christopher
7bccf6abdc Refactor zero folding slightly. Clean up todo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125651 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 04:50:12 +00:00
Rafael Espindola
908159b46a Gas is very inconsistent about when a relaxation/relocation is needed. Do
the right thing and stop trying to copy it. Fixes PR8944.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 03:25:55 +00:00
Eric Christopher
169e1552e7 The change for PR9190 wasn't quite right. We need to avoid making the
transformation if we can't legally create a build vector of the correct
type. Check that we can make the transformation first, and add a TODO to
refactor this code with similar cases.

Fixes: PR9223 and rdar://9000350


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125631 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 01:10:03 +00:00
Rafael Espindola
7768a9dce1 Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125629 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 01:08:29 +00:00
Evan Cheng
e32effb02f Remove a duplicated check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125625 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 00:37:02 +00:00
Evan Cheng
5eda282cd1 Some single precision VFP instructions may be executed on NEON pipeline, but not double precision ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125624 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 00:35:02 +00:00
Roman Divacky
738a00eb86 Add support for parsing [expr].
This is submitted by Joerg Sonnenberger and fixes his PR8685.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125595 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 20:43:39 +00:00
Jakob Stoklund Olesen
79bb6dd363 Teach ARMLoadStoreOptimizer to remove kill flags from merged instructions as well.
This is necessary to avoid a crash in certain tangled situations where a kill
flag is first correctly moved to a merged instruction, and then needs to be
moved again:

  STR %R0, a...
  STR %R0<kill>, b...

First becomes:

  STR %R0, b...
  STM a, %R0<kill>, ...

and then:

  STM a, %R0, ...
  STM b, %R0<kill>, ...

We can now remove the kill flag from the merged STM when needed. 8960050.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125591 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 19:51:58 +00:00
Devang Patel
d3526eab46 Ignore DBG_VALUE machine instructions while constructing instruction ranges based on location info.
Machine instruction range consisting of only DBG_VALUE MIs only contributes consecutive labels in assembly output, which is harmless, and empty scope entry in DebugInfo, which confuses debugger tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 17:56:09 +00:00
Argyrios Kyrtzidis
6e31b9b8c3 Implement a function from PathV2 whose definition is missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125574 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 17:51:19 +00:00
Devang Patel
fc0569e55a Move DbgInfoPrinter specific utlities inside DbgInfoPrinter.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125571 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 17:36:11 +00:00
Devang Patel
497acb91dc Print function info. Patch by Minjang Kim.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125567 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 17:24:56 +00:00
Duncan Sands
ab4c366274 Spelling fix: consequtive -> consecutive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125563 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 09:23:02 +00:00
Nadav Rotem
d9e087bbc3 Fix 9216 - Endless loop in InstCombine pass.
The pattern "A&(A^B) -> A & ~B" recreated itself because ~B is
actually a xor -1.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125557 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 07:13:48 +00:00
Evan Cheng
326d976eb2 Fix thinko. Cmp can be the first instruction in a MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125552 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 05:00:24 +00:00
Devang Patel
e7394ea9c6 Do not forget DebugLoc!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125547 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 02:02:30 +00:00
Chris Lattner
da1d660aa2 tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125546 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 01:56:08 +00:00
Chris Lattner
2ca5c8644e convert ConstantVector::get to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125537 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 00:14:00 +00:00
Bob Wilson
727961a1a3 Remove unused bitvectors that record ARM callee-saved registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125534 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 23:40:38 +00:00
Jakob Stoklund Olesen
eb9f040f0d Move more fragments of spill weight calculation into CalcSpillWeights.h
Simplify the spill weight calculation a bit by bypassing
getApproximateInstructionCount() and using LiveInterval::getSize() directly.
This changes the computed spill weights, but only by a constant factor in each
function. It should not affect how spill weights compare against each other, and
so it shouldn't affect code generation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125530 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 23:15:38 +00:00
Devang Patel
3fc178ffda Do not hoist @llvm.dbg.value. Here, @llvm.dbg.value is "referring" a value that is modified inside loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125529 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 23:03:23 +00:00
Rafael Espindola
5d618ef7f1 Switch llvm to using comdats. For now always use groups with a single
section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 22:23:49 +00:00
Evan Cheng
cf75ab5975 Fix PR8854. Track inserted copies to avoid read before write. Sorry, it's hard to reduce a sensible small test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125523 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 21:50:37 +00:00
Bruno Cardoso Lopes
e98d646b11 A fail to match coprocessor number and register number must fail instead of assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 21:10:33 +00:00
Chris Lattner
7583190422 revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125504 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 18:15:46 +00:00
Rafael Espindola
9de3a0701a Move broken HasCommonSymbols to ELFWriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125490 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 16:51:08 +00:00
Bruno Cardoso Lopes
a2b6e4151b Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125489 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 13:09:44 +00:00
Chris Lattner
283c8caccd Switch ConstantVector::get to use ArrayRef instead of a pointer+size
idiom.  Change various clients to simplify their code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125487 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 07:55:32 +00:00
Chris Lattner
593051b4e2 fix PR9210 by implementing some type legalization logic for
vector fp conversions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125482 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 06:30:45 +00:00
Chris Lattner
463b3c2a99 fix two comment thinkos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125481 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 06:14:42 +00:00
Cameron Zwarich
1a73cedca0 Add some statistics to StrongPHIElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125477 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 02:09:18 +00:00
Cameron Zwarich
117be03cc6 Add a statistic to PHIElimination tracking the number of critical edges split.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125476 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 02:09:11 +00:00
Chris Lattner
0a9481f44f Enhance ComputeMaskedBits to know that aligned frameindexes
have their low bits set to zero.  This allows us to optimize
out explicit stack alignment code like in stack-align.ll:test4 when
it is redundant.

Doing this causes the code generator to start turning FI+cst into
FI|cst all over the place, which is general goodness (that is the
canonical form) except that various pieces of the code generator
don't handle OR aggressively.  Fix this by introducing a new
SelectionDAG::isBaseWithConstantOffset predicate, and using it
in places that are looking for ADD(X,CST).  The ARM backend in
particular was missing a lot of addressing mode folding opportunities
around OR.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125470 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-13 22:25:43 +00:00
Chris Lattner
e075118489 Revisit my fix for PR9028: the issue is that DAGCombine was
generating i8 shift amounts for things like i1024 types.  Add
an assert in getNode to prevent this from occuring in the future,
fix the buggy transformation, revert my previous patch, and
document this gotcha in ISDOpcodes.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125465 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-13 19:09:16 +00:00
Chris Lattner
e5116f840e remove a now-unneccesary cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125464 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-13 18:30:09 +00:00
Duncan Sands
5380d28070 Remove pointless blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125463 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-13 18:11:05 +00:00
Duncan Sands
52fb846578 Teach instsimplify that X+Y>=X+Z is the same as Y>=Z if neither side overflows,
plus some variations of this.  According to my auto-simplifier this occurs a lot
but usually in combination with max/min idioms.  Because max/min aren't handled
yet this unfortunately doesn't have much effect in the testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125462 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-13 17:15:40 +00:00