1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

918 Commits

Author SHA1 Message Date
Dan Gohman
4374fdf868 Add a comment.
llvm-svn: 101260
2010-04-14 17:09:37 +00:00
Dan Gohman
d0c66476e1 Move the code for initialing the entry block livein set out of
SelectionDAGISel.

llvm-svn: 101258
2010-04-14 17:05:00 +00:00
Dan Gohman
859cb3eea9 Reorgnaize this code to be more tidy and readable.
llvm-svn: 101256
2010-04-14 17:02:07 +00:00
Dan Gohman
a1656764cc Trim #includes.
llvm-svn: 101255
2010-04-14 16:54:39 +00:00
Dan Gohman
2c09c272ff Move the code for emitting livein copies out of SelectionDAGISel.
llvm-svn: 101254
2010-04-14 16:51:49 +00:00
Dan Gohman
6471bcb1fd Sink landing-pad marking code out of
SelectionDAGISel::runOnMachineFunction into FunctionLowering.

llvm-svn: 101252
2010-04-14 16:32:56 +00:00
Chris Lattner
f9fbc74e40 minor tidying.
llvm-svn: 100725
2010-04-07 23:50:38 +00:00
Chris Lattner
80b41881bc rename llvm::llvm_report_error -> llvm::report_fatal_error
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
dde7376e9d Three changes:
1. Introduce some enums and accessors in the InlineAsm class
   that eliminate a ton of magic numbers when handling inline
   asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
   a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
   metadata, propagating it to the instruction emitter, which
   drops it.

No functionality change.

llvm-svn: 100605
2010-04-07 05:20:54 +00:00
Chris Lattner
097a332684 remove some redundant MMI arguments.
llvm-svn: 100417
2010-04-05 06:10:13 +00:00
Chris Lattner
6f3c3f60ce unthread MMI from FastISel
llvm-svn: 100416
2010-04-05 06:05:26 +00:00
Chris Lattner
248e65ec05 trim some spurious references to DwarfWriter. SDIsel really doesn't
need it anymore, so don't addRequire it.

llvm-svn: 100400
2010-04-05 04:09:20 +00:00
Chris Lattner
c930f73b4d selection dag doesn't need DwarfWriter, remove some tendrils.
llvm-svn: 100382
2010-04-05 02:23:33 +00:00
Chris Lattner
1fda8b3a8b fastisel doesn't need DwarfWriter, remove some tendricles.
llvm-svn: 100381
2010-04-05 02:19:28 +00:00
Chris Lattner
0da97990f6 stop using DebugLoc::getUnknownLoc()
llvm-svn: 100215
2010-04-02 20:17:23 +00:00
Chris Lattner
305c84b8ee Switch the code generator (except the JIT) onto the new DebugLoc
representation.  This eliminates the 'DILocation' MDNodes for 
file/line/col tuples from -O0 -g codegen.

This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.

I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before.  Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.

llvm-svn: 100209
2010-04-02 19:42:39 +00:00
Chris Lattner
1d2ea2510d use the optimized debug info apis in sdisel.
llvm-svn: 99986
2010-03-31 04:24:50 +00:00
Chris Lattner
24b8a8bebd add a statistic for the # times isel has to backtrack.
llvm-svn: 99774
2010-03-28 19:46:56 +00:00
Chris Lattner
5ad69fe4b6 finally remove the immAllOnesV_bc/immAllZerosV_bc patterns
and those derived from them.  These are obnoxious because
they were written as: PatLeaf<(bitconvert).  Not having an
argument was foiling adding better type checking for operand
count matching up with what was required (in this case,
bitconvert always requires an operand!)

llvm-svn: 99759
2010-03-28 08:43:23 +00:00
Chris Lattner
78dc3c322f comply with the wishes of a fixme.
llvm-svn: 99742
2010-03-28 05:55:17 +00:00
Chris Lattner
918dd19018 now that (parallel) is gone and a variety of bugs in targets
are cleaned up, we can remove an old fixme.

llvm-svn: 99741
2010-03-28 05:54:03 +00:00
Chris Lattner
3f060e3216 add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and
1, 1 cases which are by-far the most frequent.  This shrinks the X86
isel table from 77014 -> 74657 bytes.

llvm-svn: 99740
2010-03-28 05:50:16 +00:00
Chris Lattner
bacf4edba3 don't add nodes to the now-dead nodes list multiple times, this
can cause a crash on crazy situations in msp430 when morph-node-to
is disabled.

llvm-svn: 99739
2010-03-28 05:28:31 +00:00
Chris Lattner
bb65543f01 don't add flag nodes with chain results to the NowDeadNodes
list multiple times when MorphNodeTo can't be applied.

llvm-svn: 99735
2010-03-28 04:54:33 +00:00
Chris Lattner
85756c913d improve -debug-only=isel comments for cases when we don't enter a
scope due to obviously false predicate.

llvm-svn: 99723
2010-03-27 18:54:50 +00:00
Chris Lattner
13f444cdf1 Change tblgen to emit FOOISD opcode names as two
bytes instead of one byte.  This is important because
we're running up to too many opcodes to fit in a byte
and it is aggrevated by FIRST_TARGET_MEMORY_OPCODE
making the numbering sparse.  This just bites the
bullet and bloats out the table.  In practice, this
increases the size of the x86 isel table from 74.5K
to 76K.  I think we'll cope :)

This fixes rdar://7791648

llvm-svn: 99494
2010-03-25 06:33:05 +00:00
Devang Patel
3244526a3b Emit dwarf variable info communicated by code generator through DBG_VALUE machine instructions.
This is a work in progress.

llvm-svn: 98556
2010-03-15 18:33:46 +00:00
Chris Lattner
70eca8f78e fix ShrinkDemandedOps to not leave dead nodes around,
fixing PR6607

llvm-svn: 98512
2010-03-14 19:46:02 +00:00
Chris Lattner
5393443ed6 rewrite ShrinkDemandedOps to be faster and indent less,
no functionality change.

llvm-svn: 98511
2010-03-14 19:43:04 +00:00
Chris Lattner
f656ba2910 make -view-isel-dags print after the 'ShrinkDemandedOps' pass.
llvm-svn: 98509
2010-03-14 19:27:55 +00:00
Chris Lattner
2bdb0765f8 fix AsmPrinter::GetBlockAddressSymbol to always return a unique
label instead of trying to form one based on the BB name (which
causes collisions if the name is empty).  This fixes PR6608

llvm-svn: 98495
2010-03-14 17:53:23 +00:00
Chris Lattner
5fef80c5aa change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol.  Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID.  Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".

llvm-svn: 98463
2010-03-14 02:33:54 +00:00
Dan Gohman
0d69c61fec Attempt to make this debug output meaningful, both in the case of
multibyte opcodes and in the case of multiple scopes.

llvm-svn: 98036
2010-03-09 02:15:05 +00:00
Dan Gohman
cc7ed51fa3 Print the correct index in the "match failed at index" message.
llvm-svn: 98013
2010-03-09 00:07:36 +00:00
Jakob Stoklund Olesen
67476519d7 Avoid creating bad PHI instructions when BR is being const-folded.
llvm-svn: 97836
2010-03-05 21:49:10 +00:00
Chris Lattner
80aaccb987 Fix PR6497, a bug where we'd fold a load into an addc
node which has a flag.  That flag in turn was used by an
already-selected adde which turned into an ADC32ri8 which
used a selected load which was chained to the load we
folded.  This flag use caused us to form a cycle.  Fix
this by not ignoring chains in IsLegalToFold even in
cases where the isel thinks it can.

llvm-svn: 97791
2010-03-05 06:19:13 +00:00
Chris Lattner
d7353d219f inline a small function with one call site.
llvm-svn: 97789
2010-03-05 05:49:45 +00:00
Chris Lattner
860cbbb031 add a statistic for # times fastisel fails.
llvm-svn: 97738
2010-03-04 19:46:56 +00:00
Chris Lattner
2bbca2de9e change the new isel matcher to emit ComplexPattern matches
as the very last thing before node emission.  This should
dramatically reduce the number of times we do 'MatchAddress'
on X86, speeding up compile time.  This also improves comments
in the tables and shrinks the table a bit, now down to 
80506 bytes for x86.

llvm-svn: 97703
2010-03-04 01:23:08 +00:00
Chris Lattner
19007009c8 inline CannotYetSelectIntrinsic into CannotYetSelect and simplify.
llvm-svn: 97690
2010-03-04 00:21:16 +00:00
Chris Lattner
9e7f00c3aa add some of the more obscure predicate types to the
Scope accelerator.

llvm-svn: 97652
2010-03-03 07:46:25 +00:00
Chris Lattner
9889ed8c45 speed up scope node processing: if the first element of a scope
entry we're about to process is obviously going to fail, don't
bother pushing a scope only to have it immediately be popped.
This avoids a lot of scope stack traffic in common cases.

Unfortunately, this requires duplicating some of the predicate
dispatch.  To avoid duplicating the actual logic I pulled each
predicate out to its own static function which gets used in
both places.

llvm-svn: 97651
2010-03-03 07:31:15 +00:00
Chris Lattner
92a814205f introduce a new SwitchTypeMatcher node (which is analogous to
SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it.  This
speeds up selection, particularly for X86 which has lots of 
variants of instructions with only type differences.

llvm-svn: 97645
2010-03-03 06:28:15 +00:00
Chris Lattner
9c9c1158cb Fix some issues in WalkChainUsers dealing with
CopyToReg/CopyFromReg/INLINEASM.  These are annoying because
they have the same opcode before an after isel.  Fix this by
setting their NodeID to -1 to indicate that they are selected,
just like what automatically happens when selecting things that
end up being machine nodes.

With that done, give IsLegalToFold a new flag that causes it to
ignore chains.  This lets the HandleMergeInputChains routine be
the one place that validates chains after a match is successful,
enabling the new hotness in chain processing.  This smarter
chain processing eliminates the need for "PreprocessRMW" in the
X86 and MSP430 backends and enables MSP to start matching it's
multiple mem operand instructions more aggressively.

I currently #if out the dead code in the X86 backend and MSP 
backend, I'll remove it for real in a follow-on patch.

The testcase changes are:
  test/CodeGen/X86/sse3.ll: we generate better code
  test/CodeGen/X86/store_op_load_fold2.ll: PreprocessRMW was 
      miscompiling this before, we now generate correct code
      Convert it to filecheck while I'm at it.
  test/CodeGen/MSP430/Inst16mm.ll: Add a testcase for mem/mem
      folding to make anton happy. :)

llvm-svn: 97596
2010-03-02 22:20:06 +00:00
Chris Lattner
0c14477270 run HandleMergeInputChains even if we only have one input chain.
llvm-svn: 97581
2010-03-02 19:34:59 +00:00
Chris Lattner
2019e2922f 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
d23cbd049d 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
bd1d913a9d factor node morphing out to its own helper method.
llvm-svn: 97558
2010-03-02 06:55:04 +00:00
Chris Lattner
1707a88a2c 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
Chris Lattner
9a28d163c2 Use the right induction variable.
llvm-svn: 97541
2010-03-02 02:37:23 +00:00