Bob Wilson
a1e343095f
Avoid adding a null MD node operand, which crashes with "-debug" when trying
...
to print the operand.
llvm-svn: 102395
2010-04-26 22:56:56 +00:00
Dale Johannesen
59a438560c
Remove crufty comments.
...
llvm-svn: 102380
2010-04-26 20:48:54 +00:00
Dale Johannesen
e098352ed1
Add DBG_VALUE handling for byval parameters; this
...
produces a comment on targets that support it, but
the Dwarf writer is not hooked up yet.
llvm-svn: 102372
2010-04-26 20:06:49 +00:00
Evan Cheng
ed69b382ea
- Move TargetLowering::EmitTargetCodeForFrameDebugValue to TargetInstrInfo and rename it to emitFrameIndexDebugValue.
...
- Teach spiller to modify DBG_VALUE instructions to reference spill slots.
llvm-svn: 102323
2010-04-26 07:38:55 +00:00
Dale Johannesen
582565e991
Stop abusing EmitInstrWithCustomInserter for target-dependent
...
form of DEBUG_VALUE, as it doesn't have reasonable default
behavior for unsupported targets. Add a new hook instead.
No functional change.
llvm-svn: 102320
2010-04-25 21:33:54 +00:00
Dale Johannesen
1fc01985a3
Add comment re byval args. Doesn't actually work this way yet.
...
xs
llvm-svn: 102316
2010-04-25 21:03:54 +00:00
Evan Cheng
0abb54d631
When a load operand is promoted to an extload, replace other uses with uses of extload result truncated.
...
llvm-svn: 102236
2010-04-24 04:43:44 +00:00
Dan Gohman
5544b0c588
Apply a fix for a vector setcc dagcombine from Jan Sjodin. No
...
testcase yet, as the testcase now fails downstream.
llvm-svn: 102228
2010-04-24 01:17:30 +00:00
Evan Cheng
b9ff130d47
Code refactoring.
...
llvm-svn: 102202
2010-04-23 19:10:30 +00:00
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
Evan Cheng
f1223bdec0
- It's not safe to promote rotates (at least not trivially).
...
- Some code refactoring.
llvm-svn: 102111
2010-04-22 20:19:46 +00:00
Dan Gohman
e149e9896c
Fix a comment.
...
llvm-svn: 102110
2010-04-22 20:06:42 +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
450aa64fc1
Move several SelectionDAG-independent utility functions out of the
...
SelectionDAG directory and into a new Analysis.cpp file.
llvm-svn: 101975
2010-04-21 01:22:34 +00:00
Dan Gohman
ad33d33719
Add another variant of this test which found a place where
...
CodeGen's ComputeMaskedBits was being over-conservative when computing
bits for an ADD.
llvm-svn: 101963
2010-04-21 00:19:28 +00:00
Dale Johannesen
0522b90cdb
Because of the EMMS problem, right now we have to support
...
user-defined operations that use MMX register types, but
the compiler shouldn't generate them on its own. This adds
a Synthesizable abstraction to represent this, and changes
the vector widening computation so it won't produce MMX types.
(The motivation is to remove noise from the ABI compatibility
part of the gcc test suite, which has some breakage right now.)
llvm-svn: 101951
2010-04-20 22:34:09 +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
7c845e4ea4
Sink this use_empty() check into isUsedOutsideOfDefiningBlock.
...
llvm-svn: 101902
2010-04-20 14:50:13 +00:00
Dan Gohman
7b7f0883fe
If a PHI node somehow has debug info, propogate it to the MachineInstr PHI.
...
llvm-svn: 101901
2010-04-20 14:48:02 +00:00
Dan Gohman
0f055d3f56
Don't iterate through the whole block just to find the PHI nodes.
...
llvm-svn: 101900
2010-04-20 14:46:25 +00:00
Dan Gohman
0c862a86fa
Delete a redundant return statement.
...
llvm-svn: 101860
2010-04-20 01:58:20 +00:00
Bill Wendling
467e6c2deb
The visitXOR method can return the same SDNode. If so, we don't want to delete
...
it as it's not dead.
llvm-svn: 101855
2010-04-20 01:25:01 +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
Evan Cheng
e19aa5cc52
More progress on promoting i16 operations to i32 for x86. Work in progress.
...
llvm-svn: 101808
2010-04-19 19:29:22 +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
Evan Cheng
e7c21a4242
More 80 col violation.
...
llvm-svn: 101806
2010-04-19 19:17:44 +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
a91754da67
Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
...
SelectionDAG-specific.
llvm-svn: 101801
2010-04-19 18:41:46 +00:00
Dan Gohman
1f0f2142cc
Fix -Wcast-qual warnings.
...
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Dan Gohman
8422e57baa
Delete now-unnecessary const_casts.
...
llvm-svn: 101637
2010-04-17 15:32:28 +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
Evan Cheng
829c300ce0
Another 80 col violation.
...
llvm-svn: 101620
2010-04-17 06:12:32 +00:00
Eric Christopher
7258dcd77f
Revert 101465, it broke internal OpenGL testing.
...
Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.
llvm-svn: 101579
2010-04-16 23:37:20 +00:00
Evan Cheng
f037f87bde
(i32 sext_in_reg (i32 aext (i16 x)), i16) -> (i32 sext x). No known test case until -promote-16bit is enabled.
...
llvm-svn: 101551
2010-04-16 22:26:19 +00:00
Dan Gohman
c4759a5b97
Create a new TargetSelectionDAGInfo class. This will eventually acquire
...
SelectionDAG-specific parts of TargetLowering.
llvm-svn: 101537
2010-04-16 21:12:11 +00:00
Dan Gohman
4d273f4519
Commit this, which should have accompanied 101531.
...
llvm-svn: 101532
2010-04-16 20:22:43 +00:00
Evan Cheng
954bd598dd
80 col.
...
llvm-svn: 101501
2010-04-16 17:58:41 +00:00
Evan Cheng
d6b0a7c075
80 col.
...
llvm-svn: 101500
2010-04-16 17:57:59 +00:00
Dan Gohman
3a7ee8eead
Avoid creating virtual registers for unused values.
...
llvm-svn: 101480
2010-04-16 17:15:02 +00:00