Dan Gohman
6e9a8fcc28
Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
...
itself too.
llvm-svn: 102176
2010-04-23 15:29:50 +00:00
Dan Gohman
5b43aa0ddd
Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks down
...
into SelectionDAGBuilder itself.
llvm-svn: 102128
2010-04-22 20:55:53 +00:00
Dan Gohman
c594eab10f
Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISel
...
and into SelectionDAGBuilder and FastISel.
llvm-svn: 102123
2010-04-22 20:46:50 +00:00
Dan Gohman
fd81254190
Move PHINodesToUpdate out of SelectionDAGBuilder and into
...
FunctionLoweringInfo, as it isn't SelectionDAG-specific. This isn't
completely natural, as PHI node state is not per-function but rather
per-basic-block, however there's currently no other convenient
per-basic-block state to group it with.
llvm-svn: 102109
2010-04-22 19:55:20 +00:00
Dan Gohman
57c732b032
Add more const qualifiers on TargetMachine and friends.
...
llvm-svn: 101977
2010-04-21 01:34:56 +00:00
Dan Gohman
950fe784be
Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISel
...
into SelectionDAGBuilder. This avoids a separate pass over the
instructions, and has the side effect of providing debug location
information to the copy.
llvm-svn: 101906
2010-04-20 15:03:56 +00:00
Dan Gohman
f41ad478ca
Don't send PHI nodes down to SelectionDAGBuilder of FastISel, since
...
they end up doing nothing.
llvm-svn: 101904
2010-04-20 15:00:41 +00:00
Dan Gohman
eadc04badc
Remove this debug output; it isn't that useful, and it's incomplete
...
in the case where a basic block is split.
llvm-svn: 101850
2010-04-20 00:56:44 +00:00
Dan Gohman
e450d7444d
Sink DebugLoc handling out of SelectionDAGISel into FastISel and
...
SelectionDAGBuilder, where it doesn't have to be as complicated.
llvm-svn: 101848
2010-04-20 00:48:35 +00:00
Dan Gohman
3df671a81c
Remove MachineFunction's DefaultDebugLoc member, and make DwarfDebug.cpp
...
responsible for figuring out what that's supposed to be on its own.
llvm-svn: 101844
2010-04-20 00:37:27 +00:00
Dan Gohman
ca35aa1122
Reapply the removal of SelectionDAGISel's BB, with a fix for the case
...
where multiple blocks are emitted; functions which do this need to return
the new BB so that their callers can stay current.
llvm-svn: 101843
2010-04-20 00:29:35 +00:00
Dan Gohman
be2e727a38
Revert 101825, which is causing trouble.
...
llvm-svn: 101832
2010-04-19 23:34:15 +00:00
Dan Gohman
8cccc542f6
Eliminate SelectionDAGISel's "current block" member. Just pass it as
...
an argument to things that need it.
llvm-svn: 101825
2010-04-19 22:51:14 +00:00
Dan Gohman
7c0303a059
Eliminate the CurMBB member from SelectionDAGBuilder. For places that
...
need it, just pass around the parent block of the current instruction
explicitly.
llvm-svn: 101822
2010-04-19 22:41:47 +00:00
Dan Gohman
1e95790fd4
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
c334960f16
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
21cea8ac2e
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
f1bd5fcdb4
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
3a7ee8eead
Avoid creating virtual registers for unused values.
...
llvm-svn: 101480
2010-04-16 17:15:02 +00:00
Dan Gohman
4572a9f479
Fix a comment.
...
llvm-svn: 101477
2010-04-16 16:52:37 +00:00
Dan Gohman
5563473062
Refine further the scope where the global DebugLoc value is active.
...
llvm-svn: 101443
2010-04-16 05:06:56 +00:00
Dan Gohman
b29cda9b3c
Fix a bunch of namespace polution.
...
llvm-svn: 101376
2010-04-15 17:08:50 +00:00
Dan Gohman
913c998703
Add more const qualifiers for LLVM IR pointers in CodeGen.
...
llvm-svn: 101342
2010-04-15 04:33:49 +00:00
Dan Gohman
bcaf681cde
Add const qualifiers to CodeGen's use of LLVM IR constructs.
...
llvm-svn: 101334
2010-04-15 01:51:59 +00:00
Dan Gohman
a3918ecdf5
Delete unused arguments.
...
llvm-svn: 101275
2010-04-14 20:05:00 +00:00
Dan Gohman
7deb447781
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
c2c08d19b8
Reset the debug location even if the instruction was a terminator.
...
llvm-svn: 101272
2010-04-14 19:30:02 +00:00
Dan Gohman
3215eae4a3
Delete an unused function.
...
llvm-svn: 101263
2010-04-14 17:22:02 +00:00
Dan Gohman
094fc7b09e
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
ad0b3ea3cc
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
0f405c8d73
Add a comment.
...
llvm-svn: 101260
2010-04-14 17:09:37 +00:00
Dan Gohman
2ca8fb229c
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
4bfb437ec9
Reorgnaize this code to be more tidy and readable.
...
llvm-svn: 101256
2010-04-14 17:02:07 +00:00
Dan Gohman
1939b5f130
Trim #includes.
...
llvm-svn: 101255
2010-04-14 16:54:39 +00:00
Dan Gohman
2b79ee8bc8
Move the code for emitting livein copies out of SelectionDAGISel.
...
llvm-svn: 101254
2010-04-14 16:51:49 +00:00
Dan Gohman
69e8e322d9
Sink landing-pad marking code out of
...
SelectionDAGISel::runOnMachineFunction into FunctionLowering.
llvm-svn: 101252
2010-04-14 16:32:56 +00:00
Chris Lattner
94ef52824b
minor tidying.
...
llvm-svn: 100725
2010-04-07 23:50:38 +00:00
Chris Lattner
2104b8d36e
rename llvm::llvm_report_error -> llvm::report_fatal_error
...
llvm-svn: 100709
2010-04-07 22:58:41 +00:00
Chris Lattner
3b9f02a2aa
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
6361414c88
remove some redundant MMI arguments.
...
llvm-svn: 100417
2010-04-05 06:10:13 +00:00
Chris Lattner
305f2efb63
unthread MMI from FastISel
...
llvm-svn: 100416
2010-04-05 06:05:26 +00:00
Chris Lattner
f5d0636850
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
ab5dc34351
selection dag doesn't need DwarfWriter, remove some tendrils.
...
llvm-svn: 100382
2010-04-05 02:23:33 +00:00
Chris Lattner
7cfa70e9b3
fastisel doesn't need DwarfWriter, remove some tendricles.
...
llvm-svn: 100381
2010-04-05 02:19:28 +00:00
Chris Lattner
bd009d6d6d
stop using DebugLoc::getUnknownLoc()
...
llvm-svn: 100215
2010-04-02 20:17:23 +00:00
Chris Lattner
915c5f9862
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
3131ae86d8
use the optimized debug info apis in sdisel.
...
llvm-svn: 99986
2010-03-31 04:24:50 +00:00
Chris Lattner
03719af41d
add a statistic for the # times isel has to backtrack.
...
llvm-svn: 99774
2010-03-28 19:46:56 +00:00
Chris Lattner
6642118e83
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
89ad2f1d60
comply with the wishes of a fixme.
...
llvm-svn: 99742
2010-03-28 05:55:17 +00:00