Dan Gohman
4dc9f47c97
Use the getNode() accessor instead of accessing the Node
...
member directly, which is private as of r55504.
llvm-svn: 62364
2009-01-16 21:47:21 +00:00
Chris Lattner
cfaf556999
new nodes should be added to the worklist, not old nodes.
...
llvm-svn: 62359
2009-01-16 21:15:56 +00:00
Evan Cheng
c4d19d6e8c
CreateVirtualRegisters does trivial copy coalescing. If a node def is used by a single CopyToReg, it reuses the virtual register assigned to the CopyToReg. This won't work for SDNode that is a clone or is itself cloned. Disable this optimization for those nodes or it can end up with non-SSA machine instructions.
...
llvm-svn: 62356
2009-01-16 20:57:18 +00:00
Mikhail Glushenkov
49be18cfc6
Registry.h should not depend on CommandLine.h.
...
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.
llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5000223556
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Dan Gohman
c5b1dbdb4e
Initial hazard recognizer support in post-pass scheduling. This includes
...
a new toy hazard recognizier heuristic which attempts to direct the
scheduler to avoid clumping large groups of loads or stores too densely.
llvm-svn: 62291
2009-01-16 01:33:36 +00:00
Devang Patel
1ee58c7d8c
Validate dbg_* intrinsics before lowering them.
...
llvm-svn: 62286
2009-01-15 23:41:32 +00:00
Mon P Wang
e235ba591f
Added missing support to widen an operand from a bit convert.
...
llvm-svn: 62285
2009-01-15 22:43:38 +00:00
Dan Gohman
3e0dcbbd15
Generalize the HazardRecognizer interface so that it can be used
...
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.
llvm-svn: 62284
2009-01-15 22:18:12 +00:00
Rafael Espindola
0aba6c9435
Add the private linkage.
...
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Dan Gohman
6fcee67989
Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
...
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.
To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.
llvm-svn: 62275
2009-01-15 19:20:50 +00:00
Dan Gohman
273ef2ab9f
Make getWidenVectorType const; this file was missed in the
...
previous commit.
llvm-svn: 62266
2009-01-15 17:39:39 +00:00
Dan Gohman
791e6c24db
More consts on TargetLowering references.
...
llvm-svn: 62262
2009-01-15 16:58:17 +00:00
Dan Gohman
9dd6a69768
Use const with TargetLowering references in a few more places.
...
llvm-svn: 62260
2009-01-15 16:43:02 +00:00
Gabor Greif
feac7ccdbd
minor refactoring: use a more specific API
...
llvm-svn: 62256
2009-01-15 11:10:44 +00:00
Devang Patel
1da8253b35
Removoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that were used to handle debug info.
...
llvm-svn: 62199
2009-01-13 23:54:55 +00:00
Devang Patel
7a618394f6
Undo previous checkin.
...
llvm-svn: 62190
2009-01-13 22:54:57 +00:00
Devang Patel
ab5ef6abf1
Use dwarf writer to decide whether the module has debug info or not.
...
llvm-svn: 62184
2009-01-13 21:25:00 +00:00
Dan Gohman
9e9858781c
The list-td and list-tdrr schedulers don't yet support physreg
...
scheduling dependencies. Add assertion checks to help catch
this.
It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.
llvm-svn: 62177
2009-01-13 20:24:13 +00:00
Duncan Sands
975f2428ba
When replacing uses and the same node is reached
...
via two paths, process it once not twice, d'oh!
Analysis, testcase and original patch thanks to
Mon Ping Wang.
llvm-svn: 62169
2009-01-13 15:17:14 +00:00
Duncan Sands
439d97a6cb
Fix some typos. Also, the WidenedVectors map
...
was not being cleaned by ExpungeNode.
llvm-svn: 62167
2009-01-13 14:42:39 +00:00
Duncan Sands
8267463dec
Correct a comment - this is not a sign extension.
...
llvm-svn: 62166
2009-01-13 14:04:14 +00:00
Devang Patel
eed0505ed8
Use DebugInfo interface to lower dbg_* intrinsics.
...
llvm-svn: 62127
2009-01-13 00:35:13 +00:00
Duncan Sands
bcdbfb63dc
Rename getABITypeSize to getTypePaddedSize, as
...
suggested by Chris.
llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Evan Cheng
5e17ea36e1
Fix PR3241: Currently EmitCopyFromReg emits a copy from the physical register to a virtual register unless it requires an expensive cross class copy. That means we are only treating "expensive to copy" register dependency as physical register dependency.
...
Also future proof the scheduler to handle "normal" physical register dependencies. The code is not exercised yet.
llvm-svn: 62074
2009-01-12 03:19:55 +00:00
Evan Cheng
e280fcfbbc
CheckForPhysRegDependency should not return copy cost. It's not used. No functionality change.
...
llvm-svn: 62036
2009-01-11 08:53:35 +00:00
Evan Cheng
411c48b7d2
Duplicated node may produce a non-physical register def.
...
llvm-svn: 62015
2009-01-09 22:44:02 +00:00
Evan Cheng
7a918ea197
Minor debug output tweak.
...
llvm-svn: 62005
2009-01-09 20:42:34 +00:00
Devang Patel
7fd7643d23
Request DwarfWriter. This will be used to handle dbg_* intrinsics.
...
llvm-svn: 61999
2009-01-09 19:11:50 +00:00
Misha Brukman
71c7e40966
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Dan Gohman
3579548f68
Remove redundant 'else's. No functionality change.
...
llvm-svn: 61891
2009-01-07 22:30:55 +00:00
Dan Gohman
b19f5073f9
Fix a bug in ComputeLinearIndex computation handling multi-level
...
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.
llvm-svn: 61828
2009-01-06 22:53:52 +00:00
Dan Gohman
595c38acb0
Update these argument lists for the isNormalMemory
...
argument. This doesn't affect current functionality.
llvm-svn: 61779
2009-01-06 01:28:56 +00:00
Dan Gohman
1cdb677fc8
Use a latency value of 0 for the artificial edges inserted by
...
AddPseudoTwoAddrDeps. This lets the scheduling infrastructure
avoid recalculating node heights. In very large testcases this
was a major bottleneck. Thanks to Roman Levenstein for finding
this!
As a side effect, fold-pcmpeqd-0.ll is now scheduled better
and it no longer requires spilling on x86-32.
llvm-svn: 61778
2009-01-06 01:19:04 +00:00
Dan Gohman
9938898e44
TargetLowering.h #includes SelectionDAGNodes.h, so it doesn't need its
...
own OpActionsCapacity magic number; it can just use ISD::BUILTIN_OP_END,
as long as it takes care to round up when needed.
llvm-svn: 61733
2009-01-05 19:40:39 +00:00
Dan Gohman
8271066844
Tidy up #includes, deleting a bunch of unnecessary #includes.
...
llvm-svn: 61715
2009-01-05 17:59:02 +00:00
Devang Patel
689e130117
squash warnings.
...
llvm-svn: 61707
2009-01-05 17:31:22 +00:00
Dan Gohman
2a079de3f5
Fix a DAGCombiner abort on an invalid shift count constant. This fixes PR3250.
...
llvm-svn: 61613
2009-01-03 19:22:06 +00:00
Dan Gohman
8dc1513b6c
CommuteNodesToReducePressure() is now removed.
...
llvm-svn: 61612
2009-01-03 19:19:30 +00:00
Dan Gohman
6a518de5f5
Remove the code from the scheduler that commuted two-address
...
instructions to avoid copies, because TwoAddressInstructionPass
also does this optimization. The scheduler's version didn't
account for live-out values, which resulted in spurious commutes
and missed opportunities.
Now, TwoAddressInstructionPass handles all the opportunities,
instead of just those that the scheduler missed. The result is
usually the same, though there are occasional trivial differences
resulting from the avoidance of spurious commutes.
llvm-svn: 61611
2009-01-03 18:01:46 +00:00
Duncan Sands
0fca32114b
Factorize (and generalize) the code promoting SELECT
...
and BRCOND conditions. Reorder a few methods while
there.
llvm-svn: 61547
2009-01-01 20:36:20 +00:00
Duncan Sands
07002edaca
Remove trailing spaces.
...
llvm-svn: 61545
2009-01-01 19:56:02 +00:00
Duncan Sands
190d6bc636
Fix PR3274: when promoting the condition of a BRCOND node,
...
promote from i1 all the way up to the canonical SetCC type.
In order to discover an appropriate type to use, pass
MVT::Other to getSetCCResultType. In order to be able to
do this, change getSetCCResultType to take a type as an
argument, not a value (this is also more logical).
llvm-svn: 61542
2009-01-01 15:52:00 +00:00
Scott Michel
5bb7db3872
Teach LeaglizeDAG that i64 mul can be a libcall.
...
llvm-svn: 61463
2008-12-29 03:21:37 +00:00
Dale Johannesen
88e47fa0e4
Change comments so everybody can understand them, hopefully.
...
llvm-svn: 61405
2008-12-23 23:47:22 +00:00
Dale Johannesen
e1a3d2da49
Add another permutation where we should get rid of a-a.
...
llvm-svn: 61401
2008-12-23 23:01:27 +00:00
Anton Korobeynikov
328347152a
Restore debug printing
...
llvm-svn: 61398
2008-12-23 22:26:18 +00:00
Anton Korobeynikov
f4a9c57b23
Sometimes APInt syntax is really ugly... :(
...
llvm-svn: 61397
2008-12-23 22:26:01 +00:00
Anton Korobeynikov
a2055f8f17
Indent stuff properly
...
llvm-svn: 61396
2008-12-23 22:25:45 +00:00
Anton Korobeynikov
9559c8c377
Initial checkin of APInt'ififcation of switch lowering
...
llvm-svn: 61395
2008-12-23 22:25:27 +00:00