Commit Graph

36620 Commits

Author SHA1 Message Date
Scott Michel
7f9ba9bb3c More cleanups for CellSPU:
- Expand tabs... (poss 80-col violations, will get them later...)
- Consolidate logic for SelectDFormAddr and SelectDForm2Addr into a single
  function, simplifying maintenance. Also reduced custom instruction
  generation for SPUvecinsert/INSERT_MASK.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46544 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 02:55:46 +00:00
Owen Anderson
772601a885 Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46542 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 01:24:47 +00:00
Owen Anderson
9a8ff8cd0f Fix an issue where, under very specific circumstances, memdep could end up dereferencing the end
of one of its internal maps.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46541 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 01:24:05 +00:00
Chris Lattner
b10e0da065 Fix a bug where scalarrepl would discard offset if type would match.
In practice this can only happen on code with already undefined behavior, 
but this is still a good thing to handle correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46539 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 00:39:15 +00:00
Dan Gohman
b625f2f896 Factor the addressing mode and the load/store VT out of LoadSDNode
and StoreSDNode into their common base class LSBaseSDNode. Member
functions getLoadedVT and getStoredVT are replaced with the common
getMemoryVT to simplify code that will handle both loads and stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30 00:15:11 +00:00
Evan Cheng
0d9e976ad2 Work in progress. This patch *fixes* x86-64 calls which are modelled as StructRet but really should be return in registers, e.g. _Complex long double, some 128-bit aggregates. This is a short term solution that is necessary only because llvm, for now, cannot model i128 nor call's with multiple results.
Status: This only works for direct calls, and only the caller side is done. Disabled for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46527 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:34:22 +00:00
Evan Cheng
c748412c42 Update this test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:30:05 +00:00
Duncan Sands
648f880dc9 When expanding an operand, it's not the result value
type that matters but the operand type.  This fixes
2008-01-08-IllegalCMP.ll which crashed with the new
legalize infrastructure because SETCC with result
type i8 and operand type i64 was being custom expanded
by the X86 backend.  With this fix, the gcc build gets
as far as the first libcall.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46525 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:29:08 +00:00
Chris Lattner
c69d3c9442 Don't let globalopt hack on volatile loads or stores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46523 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 19:01:37 +00:00
Ted Kremenek
d25c9cd3ff Altered ctor for APSInt to accept an optional "isUnsigned" flag. Default
behavior is unchanged.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 18:55:14 +00:00
Dan Gohman
3035959425 Use empty() instead of comparing size() with zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46514 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 13:02:09 +00:00
Dan Gohman
9f65c39f80 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:43:50 +00:00
Dan Gohman
0e9dfb0900 Update this file for 2.0 syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46512 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:35:50 +00:00
Dan Gohman
ba42d2b937 Add comments describing what the loop depth values mean. Also, make a
minor simplification to the loop depth calculation code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:12:40 +00:00
Dan Gohman
97cf759b82 Fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46510 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:09:55 +00:00
Dan Gohman
b10abe1e8c Remove top-level const qualifiers from casts, avoiding associated
compiler warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46509 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:08:20 +00:00
Dan Gohman
6ee9661390 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:07:11 +00:00
Dan Gohman
6326b0d0f8 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46507 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 12:06:33 +00:00
Dan Gohman
1327f69d98 Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46506 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 11:36:12 +00:00
Chris Lattner
103e2d760f llvm.sqrt(-0.0) is defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46500 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 07:00:44 +00:00
Chris Lattner
2454a2e0c3 eliminate additions of 0.0 when they are obviously dead. This has to be careful to
avoid turning -0.0 + 0.0 -> -0.0 which is incorrect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46499 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:52:45 +00:00
Owen Anderson
cca1867ab7 Add a testcase for eliminating memcpy's at the end of functions. Forgot to commit this with my last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46497 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:40:32 +00:00
Chris Lattner
7cf9abff23 Add target triples to these so they don't fail on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46496 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:26:07 +00:00
Duncan Sands
d102593b42 Use getPreferredAlignmentLog or getPreferredAlignment
to get the alignment of global variables, rather than
using hand-made versions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46495 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:23:44 +00:00
Owen Anderson
a34d8a0d83 Add support for eliminating memcpy's at the end of functions. Also fix some errors I noticed in
the handling of eliminating stores to byval arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46494 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:18:36 +00:00
Duncan Sands
b7cbab8b28 This would be better done as an executable test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46493 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 06:04:54 +00:00
Duncan Sands
3cecb51cb3 After recent changes we fail to optimize this test
sufficiently to have it pass.  I'm removing it from
the testsuite and adding it to PR452 instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46492 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 05:57:23 +00:00
Owen Anderson
8822eabe36 RegAllocBigBlock doesn't need LiveVariables either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46488 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:32:13 +00:00
Scott Michel
6be48d49cf Fix to bug 1951: tblgen gratuitously renames variables when no temporary was
generated. This feature would only show up in fairly complex patterns, such
as this one in CellSPU:

  def : Pat<(add (SPUhi tconstpool:$in, 0), (SPUlo tconstpool:$in, 0)),
	    (IOHLlo (ILHUhi tconstpool:$in), tconstpool:$in)>;

which generated the following emit code:

SDNode *Emit_0(const SDOperand &N, unsigned Opc0, unsigned Opc1, MVT::ValueType VT0, MVT::ValueType VT1) DISABLE_INLINE {
  SDOperand N0 = N.getOperand(0);
  SDOperand N00 = N0.getOperand(0);
  SDOperand N01 = N0.getOperand(1);
  SDOperand N1 = N.getOperand(1);
  SDOperand N10 = N1.getOperand(0);
  SDOperand N11 = N1.getOperand(1);
  SDOperand Tmp3(CurDAG->getTargetNode(Opc0, VT0, N00), 0);
  return CurDAG->SelectNodeTo(N.Val, Opc1, VT1, Tmp3, Tmp2); /* Tmp2 s/b N00 */
}

Tested against the test suites without incident.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46487 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:29:31 +00:00
Nate Begeman
55030dc460 Properly expand extract-element for non-power-of-2 codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46486 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:24:00 +00:00
Dale Johannesen
ba2a0b960e Handle 'X' constraint in asm's better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46485 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:21:21 +00:00
Devang Patel
c840da14c6 Filter loops that subtract induction variables.
These loops are not yet handled.

Fix PR 1912.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46484 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:20:41 +00:00
Scott Michel
053c1da8d9 Overhaul Cell SPU's addressing mode internals so that there are now
only two addressing mode nodes, SPUaform and SPUindirect (vice the
three previous ones, SPUaform, SPUdform and SPUxform). This improves
code somewhat because we now avoid using reg+reg addressing when
it can be avoided. It also simplifies the address selection logic,
which was the main point for doing this.

Also, for various global variables that would be loaded using SPU's
A-form addressing, prefer D-form offs[reg] addressing, keeping the
base in a register if the variable is used more than once.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46483 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 02:16:57 +00:00
Devang Patel
2ff48bc492 New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46479 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 01:10:04 +00:00
Bill Wendling
fcd06cdc7b Add test to make sure that #pragma mark/error doesn't error if there are
unbalanced quotes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46476 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29 00:41:29 +00:00
Ted Kremenek
7afe973add Added destructor for template class FoldingSetNodeWrapper.
Added getValue() to FoldingSetNodeWrapper.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46465 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 22:05:23 +00:00
Lauro Ramos Venancio
42f6e455de Simplify the code and fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46458 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 20:02:51 +00:00
Duncan Sands
07d403e222 Pure/const functions with ByVal parameters cannot
be marked readonly either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46456 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 19:25:47 +00:00
Lauro Ramos Venancio
599ddf9a76 Fix fpcmp infinite loop when comparing "29-266" with "29-268".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46455 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 18:23:23 +00:00
Chris Lattner
349c72a35d this test is now compiled into the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46454 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 17:38:46 +00:00
Duncan Sands
095765e26d Unbreak builds with differing object and source
directories.  Patch by Sam Bishop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46453 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 17:38:30 +00:00
Duncan Sands
1f0315462b Make this more likely to be passed byval.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46451 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 10:35:11 +00:00
Bill Wendling
200e90c74b If the function has no machine instructions, then emit a "nop" so that
the function label isn't associated with something it shouldn't be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46449 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 09:15:03 +00:00
Chris Lattner
0818ea8317 Transform calls to memcpy into llvm.memcpy calls, patch by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46433 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 04:41:43 +00:00
Chris Lattner
2671fc390c reduce duplicate -I flags passed to the compiler, cleaning up the VERBOSE
output.  Patch contributed by Sam Bishop!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46432 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 04:18:41 +00:00
Nick Lewycky
4189a538e4 Handle some more combinations of extend and icmp. Fixes PR1940.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 03:48:02 +00:00
Chris Lattner
25feae555d Fix PR1932 by disabling an xform invalid for fdiv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46429 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 00:58:18 +00:00
Chris Lattner
5ec898399f make handling of overflow and undefined results much more clear.
Patch by Eli Friedman, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46428 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 00:36:27 +00:00
Chris Lattner
05bb789430 Fix PR1938 by forcing the code that uses an undefined value to branch one
way or the other.  Rewriting the code itself prevents subsequent analysis
passes from making contradictory conclusions about the code that could 
cause an infeasible path to be made feasible.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46427 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-28 00:32:30 +00:00
Chris Lattner
4d44d7a2dc Always for PACKAGEVERSION to 'mainline' for teh llvm web page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46425 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-27 23:43:26 +00:00