Commit Graph

36488 Commits

Author SHA1 Message Date
Chris Lattner 925ac71f26 Fix the xfail I added a couple of patches back. The issue
was that we weren't properly handling the case when interior
nodes of a matched pattern become dead after updating chain
and flag uses.  Now we handle this explicitly in 
UpdateChainsAndFlags.

llvm-svn: 97561
2010-03-02 07:50:03 +00:00
Chris Lattner 350bb062b2 I was confused about this, it turns out that MorphNodeTo
*does* delete ex-operands that become dead.

llvm-svn: 97559
2010-03-02 07:14:49 +00:00
Chris Lattner 9732ab6d86 factor node morphing out to its own helper method.
llvm-svn: 97558
2010-03-02 06:55:04 +00:00
Chris Lattner f98f124a73 Sink InstructionSelect() out of each target into SDISel, and rename it
DoInstructionSelection.  Inline "SelectRoot" into it from DAGISelHeader.
Sink some other stuff out of DAGISelHeader into SDISel.

Eliminate the various 'Indent' stuff from various targets, which dates
to when isel was recursive.

 17 files changed, 114 insertions(+), 430 deletions(-)

llvm-svn: 97555
2010-03-02 06:34:30 +00:00
Eric Christopher 118dc6a645 Only save vector registers if we've defined for the vector registers.
Fixes PR5309.

llvm-svn: 97554
2010-03-02 06:25:00 +00:00
Erick Tryzelaar 72a37135fb Fix looking up MD names to not need a module.
llvm-svn: 97550
2010-03-02 05:32:52 +00:00
Eric Christopher 1dd31c7814 Add file to CMakeLists.txt
llvm-svn: 97545
2010-03-02 02:49:43 +00:00
Evan Cheng 036aa49d2e Add skeleton of a machine level cse pass.
llvm-svn: 97543
2010-03-02 02:38:24 +00:00
Chris Lattner 2f846eeaca Use the right induction variable.
llvm-svn: 97541
2010-03-02 02:37:23 +00:00
Chris Lattner b884fe867e Rewrite chain handling validation and input TokenFactor handling
stuff now that we don't care about emulating the old broken 
behavior of the old isel.  This eliminates the 
'CheckChainCompatible' check (along with IsChainCompatible) which
did an incorrect and inefficient scan *up* the chain nodes which
happened as the pattern was being formed and does the validation
at the end in HandleMergeInputChains when it forms a structural 
pattern.  This scans "down" the graph, which means that it is
quickly bounded by nodes already selected.  This also handles
token factors that get "trapped" in the dag.

Removing the CheckChainCompatible nodes also shrinks the 
generated tables by about 6K for X86 (down to 83K).

There are two pieces remaining before I can nuke PreprocessRMW:
1. I xfailed a test because we're now producing worse code in a 
   case that has nothing to do with the change: it turns out that
   our use of MorphNodeTo will leave dead nodes in the graph
   which (depending on how the graph is walked) end up causing
   bogus uses of chains and blocking matches.  This is really 
   bad for other reasons, so I'll fix this in a follow-up patch.

2. CheckFoldableChainNode needs to be improved to handle the TF.

llvm-svn: 97539
2010-03-02 02:22:10 +00:00
Dan Gohman 4cec543952 Fix several places to handle vector operands properly.
Based on a patch by Micah Villmow for PR6438.

llvm-svn: 97538
2010-03-02 02:14:38 +00:00
Dan Gohman 52f5563973 Non-affine post-inc SCEV expansions have more code which must be
emitted after the increment. Make sure the insert position
reflects this. This fixes PR6453.

llvm-svn: 97537
2010-03-02 01:59:21 +00:00
Bill Wendling 78c5b7a76d Remove dead parameter passing.
llvm-svn: 97536
2010-03-02 01:55:18 +00:00
Devang Patel d0fa304dc7 Constructors and operators for anonymous aggregates does not names. Do not force empty AT_name attribute in such cases.
llvm-svn: 97533
2010-03-02 01:26:20 +00:00
Dan Gohman 6f34abd092 Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul,
respectively.

llvm-svn: 97531
2010-03-02 01:11:08 +00:00
Chris Lattner 7894ab3a99 remove dead code.
llvm-svn: 97529
2010-03-02 00:40:26 +00:00
Bob Wilson 0fd415820b Don't attempt load PRE when there is no real redundancy (i.e., the load is in
a loop and is itself the only dependency).

llvm-svn: 97526
2010-03-02 00:09:29 +00:00
Chris Lattner c1f2e15332 refactor some code out of OPC_EmitMergeInputChains into a
new helper function.

llvm-svn: 97525
2010-03-02 00:00:03 +00:00
Bob Wilson 892432b7ef When GVN needs to split critical edges for load PRE, check all of the
predecessors before returning.  Otherwise, if multiple predecessor edges need
splitting, we only get one of them per iteration.  This makes a small but
measurable compile time improvement with -enable-full-load-pre.

llvm-svn: 97521
2010-03-01 23:37:32 +00:00
Chris Lattner bd6e193f54 remove a little hack I did for the old isel, not needed
now that it is gone.

llvm-svn: 97516
2010-03-01 22:51:11 +00:00
Evan Cheng 7263cf8431 MemoryDepAnalysis is not used if redundant load processing is disabled.
llvm-svn: 97512
2010-03-01 22:23:12 +00:00
Chris Lattner 19c92aea01 remove all but one version of SelectionDAG::MorphNodeTo
(the most general) the others are dead.

llvm-svn: 97511
2010-03-01 22:20:05 +00:00
Evan Cheng 87d50aa18a Remove the optimize for code size limitation on r67917. Optimize 64-bit imul by constants into leas + shl regardless if optimizing for code size. The size saving from using imulq isn't worth it. Also, the lea and shl instructions may expose further optimization.
llvm-svn: 97507
2010-03-01 22:00:11 +00:00
Chris Lattner 55ef1ebe52 remove a terrible hack that disabled assertions from this file because of build time
problems.  rdar://7697850.

llvm-svn: 97500
2010-03-01 21:20:46 +00:00
Jakob Stoklund Olesen 115da88f01 Use methods to determine if a LiveInterval is spillable.
Don't accidentally produce unspillable intervals for deeply nested loops.

llvm-svn: 97496
2010-03-01 20:59:38 +00:00
Ted Kremenek 5c74a4b00b Update CMake build.
llvm-svn: 97488
2010-03-01 19:42:47 +00:00
Chris Lattner 3780ca6ef2 stop using generated sdnodexforms.
llvm-svn: 97485
2010-03-01 19:38:53 +00:00
Chris Lattner 5ea3e65929 remove anders-aa from mainline, it isn't maintained and is
tantalyzing enough that people keep trying to use it.

llvm-svn: 97483
2010-03-01 19:24:17 +00:00
Johnny Chen 718ed8a6d5 Added STRHT for disassembly only and fixed a bug in AI3sthpo class where the W
bit should be set to 0 instead of 1.

llvm-svn: 97481
2010-03-01 19:22:00 +00:00
Chris Lattner c1a3190870 Accelerate isel dispatch for tables that start with a top-level
OPC_SwitchOpcode to use a table lookup instead of having to go
through the interpreter for this.

llvm-svn: 97469
2010-03-01 18:47:11 +00:00
John McCall c6dbe30e88 Don't potentially read past the end of the fill data when making a NaN from
an APInt.

llvm-svn: 97467
2010-03-01 18:38:45 +00:00
Dan Gohman c3c3c6829f Fix optimization of ISD::TRUNCATE on vector operands. Based on a patch
by Micah Villmow for PR6335.

llvm-svn: 97461
2010-03-01 17:59:21 +00:00
Dan Gohman b0e07d53c1 Add explicit keywords.
llvm-svn: 97460
2010-03-01 17:56:46 +00:00
Dan Gohman 904d34c90f Add a comment.
llvm-svn: 97459
2010-03-01 17:56:04 +00:00
Dan Gohman 39917c7c81 Add some debug output to LoopSimplify.
llvm-svn: 97458
2010-03-01 17:55:27 +00:00
Dan Gohman 8b0a419eb1 Spelling fixes.
llvm-svn: 97453
2010-03-01 17:49:51 +00:00
Dan Gohman 312d604ee2 This is now done.
llvm-svn: 97450
2010-03-01 17:43:57 +00:00
Dan Gohman 96d45008a6 Fix a missing newline in debug output.
llvm-svn: 97449
2010-03-01 17:42:55 +00:00
Dan Gohman 0c39a35457 Prune #includes.
llvm-svn: 97448
2010-03-01 17:42:17 +00:00
Dan Gohman 74b189fcb2 Don't print "Modified" for passes which haven't modified anything.
llvm-svn: 97446
2010-03-01 17:34:28 +00:00
Nathan Keynes 42a5be5121 Add JIT support to the TODO list (test commit)
llvm-svn: 97443
2010-03-01 10:40:41 +00:00
Chris Lattner e89ca7c146 some trivial microoptimizations.
llvm-svn: 97441
2010-03-01 07:43:08 +00:00
Chris Lattner 053a28a397 eliminate the CheckMultiOpcodeMatcher code and have each
ComplexPattern at the root be generated multiple times, once
for each opcode they are part of.  This encourages factoring
because the opcode checks get treated just like everything
else in the matcher.

llvm-svn: 97439
2010-03-01 07:17:40 +00:00
Chris Lattner f4d1775263 add a new OPC_SwitchOpcode which is semantically equivalent
to a scope where every child starts with a CheckOpcode, but
executes more efficiently.  Enhance DAGISelMatcherOpt to 
form it.

This also fixes a bug in CheckOpcode: apparently the SDNodeInfo
objects are not pointer comparable, we have to compare the
enum name.

llvm-svn: 97438
2010-03-01 06:59:22 +00:00
Mikhail Glushenkov abd56bde0e 80-col violations/trailing whitespace.
llvm-svn: 97427
2010-02-28 22:54:30 +00:00
Chris Lattner 53cf6b8444 eliminate GetInt1/2
llvm-svn: 97426
2010-02-28 22:38:43 +00:00
Chris Lattner 5ef43cec36 hoist the new isel interpreter out of DAGISelHeader.h
(which gets #included into the middle of each 
target's DAGISel class) into a .cpp file where it is
only compiled once.

llvm-svn: 97425
2010-02-28 22:37:22 +00:00
Chris Lattner af197502d6 enhance the new isel to handle the 'node already exists'
case of MorphNodeTo directly.

llvm-svn: 97417
2010-02-28 21:36:14 +00:00
Chris Lattner b1af865aa6 simplify this code, return only ever has zero or one operands.
llvm-svn: 97408
2010-02-28 18:53:13 +00:00
John McCall c12b133d00 Properly clear all the extra bits in a significand when making a NaN from an
APInt.  Be certain to set the integer bit in an x87 extended-precision
significand so that we don't accidentally make a pseudo-NaN.

llvm-svn: 97382
2010-02-28 12:49:50 +00:00