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

934 Commits

Author SHA1 Message Date
Dan Gohman
6bcd9dabb7 Give SelectionDAG a TargetMachine too, rather than having it
fetch one from the MachineFunction.

llvm-svn: 101807
2010-04-19 19:22:07 +00:00
Dan Gohman
f1f21fb3c6 Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.

llvm-svn: 101802
2010-04-19 19:05:59 +00:00
Dan Gohman
a0f855157e Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Evan Cheng
6442d111dd More work to allow dag combiner to promote 16-bit ops to 32-bit.
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Dan Gohman
e9683c52da Avoid creating virtual registers for unused values.
llvm-svn: 101480
2010-04-16 17:15:02 +00:00
Dan Gohman
cb1d4ed9d0 Fix a comment.
llvm-svn: 101477
2010-04-16 16:52:37 +00:00
Dan Gohman
01d4af69bf Refine further the scope where the global DebugLoc value is active.
llvm-svn: 101443
2010-04-16 05:06:56 +00:00
Dan Gohman
d48633d340 Fix a bunch of namespace polution.
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Dan Gohman
64a84ceb3f Add more const qualifiers for LLVM IR pointers in CodeGen.
llvm-svn: 101342
2010-04-15 04:33:49 +00:00
Dan Gohman
0e0b8cf9fd Add const qualifiers to CodeGen's use of LLVM IR constructs.
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Dan Gohman
d5d199da5f Delete unused arguments.
llvm-svn: 101275
2010-04-14 20:05:00 +00:00
Dan Gohman
c64d1d02a3 Factor out EH landing pad code into a separate function, and constify
a bunch of stuff to support it.

llvm-svn: 101273
2010-04-14 19:53:31 +00:00
Dan Gohman
c94abce286 Reset the debug location even if the instruction was a terminator.
llvm-svn: 101272
2010-04-14 19:30:02 +00:00
Dan Gohman
4fd4153d52 Delete an unused function.
llvm-svn: 101263
2010-04-14 17:22:02 +00:00
Dan Gohman
45b0642839 Clear the FunctionLoweringInfo object before doing other things that
don't need it.

llvm-svn: 101262
2010-04-14 17:13:16 +00:00
Dan Gohman
3738dc7587 Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
drop the redundant #ifndef NDEBUG.

llvm-svn: 101261
2010-04-14 17:11:23 +00:00
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