Anton Korobeynikov
5298428cff
Add TargetAsmInfo stuff for all darwin-based targets
...
llvm-svn: 53787
2008-07-19 13:14:46 +00:00
Anton Korobeynikov
3724600253
Add TargetAsmInfo for all ELF-based targets
...
llvm-svn: 53786
2008-07-19 13:14:11 +00:00
Anton Korobeynikov
583ed0eb6e
Remove bogus assertion. This unbreaks mingw, where ConstantSDNode
...
has alignment 8 and LoadSDNode (used as LargestT template) - 4.
llvm-svn: 53782
2008-07-19 05:52:44 +00:00
Dan Gohman
f38f99ccc5
Re-introduce LeakDetector support for MachineInstrs and MachineBasicBlocks.
...
Fix a leak that this turned up in LowerSubregs.cpp.
And, comment a leak in LiveIntervalAnalysis.cpp.
llvm-svn: 53746
2008-07-17 23:49:46 +00:00
Owen Anderson
cb787a2004
Make MergeBlockIntoPredecessor more aggressive when the same successor appears
...
more than once.
llvm-svn: 53731
2008-07-17 19:42:29 +00:00
Dan Gohman
8981962672
Add a new function, ReplaceAllUsesOfValuesWith, which handles bulk
...
replacement of multiple values. This is slightly more efficient
than doing multiple ReplaceAllUsesOfValueWith calls, and theoretically
could be optimized even further. However, an important property of this
new function is that it handles the case where the source value set and
destination value set overlap. This makes it feasible for isel to use
SelectNodeTo in many very common cases, which is advantageous because
SelectNodeTo avoids a temporary node and it doesn't require CSEMap
updates for users of values that don't change position.
Revamp MorphNodeTo, which is what does all the work of SelectNodeTo, to
handle operand lists more efficiently, and to correctly handle a number
of corner cases to which its new wider use exposes it.
This commit also includes a change to the encoding of post-isel opcodes
in SDNodes; now instead of being sandwiched between the target-independent
pre-isel opcodes and the target-dependent pre-isel opcodes, post-isel
opcodes are now represented as negative values. This makes it possible
to test if an opcode is pre-isel or post-isel without having to know
the size of the current target's post-isel instruction set.
These changes speed up llc overall by 3% and reduce memory usage by 10%
on the InstructionCombining.cpp testcase with -fast and -regalloc=local.
llvm-svn: 53728
2008-07-17 19:10:17 +00:00
Evan Cheng
d57da4e81f
Indentation.
...
llvm-svn: 53727
2008-07-17 18:41:20 +00:00
Nate Begeman
af01bfff99
SSE codegen for vsetcc nodes
...
llvm-svn: 53719
2008-07-17 16:51:19 +00:00
Duncan Sands
41aeb22c1d
Factorize some code for determining which libcall to use.
...
llvm-svn: 53713
2008-07-17 02:36:29 +00:00
Owen Anderson
7fb36c8bba
Factor MergeBlockIntoPredecessor out into BasicBlockUtils.
...
llvm-svn: 53705
2008-07-17 00:01:40 +00:00
Devang Patel
a6c5ff690a
Mark function used by asm block as used, otherwise optimizer may not see the use and may delete the function.
...
llvm-svn: 53692
2008-07-16 17:54:34 +00:00
Dan Gohman
7e1e10f7d2
Fix the name of BreakCriticalMachineEdge.h's include guard
...
llvm-svn: 53686
2008-07-16 16:04:07 +00:00
Dan Gohman
9f52e3890f
Correct a top-level comment.
...
llvm-svn: 53685
2008-07-16 16:03:31 +00:00
Dan Gohman
dd8c0b17bf
Clarify the comments here, to make slightly more clear the
...
difference in purpose of TargetInstrInfo and TargetInstrDesc,
which isn't immediately obvious from the name.
llvm-svn: 53683
2008-07-16 16:02:59 +00:00
Dan Gohman
2cd7961ade
Tidy a doxygen comment.
...
llvm-svn: 53682
2008-07-16 15:59:56 +00:00
Dan Gohman
c4400b8618
SelectionDAG::AssignNodeIds is unused.
...
llvm-svn: 53636
2008-07-15 18:29:32 +00:00
Dan Gohman
e76fd33ee5
Reapply 53476 and 53480, with a fix so that it properly updates
...
the BB member to the current basic block after emitting
instructions.
llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Chris Lattner
8a9725bffe
Reapply r53540, now with the matching header!
...
llvm-svn: 53557
2008-07-14 17:32:59 +00:00
Chris Lattner
58fe3dee5a
whitespace fix.
...
llvm-svn: 53537
2008-07-14 00:28:45 +00:00
Chris Lattner
f5c321c7fc
doxygenate comments and wrap to 80 cols.
...
llvm-svn: 53536
2008-07-14 00:27:31 +00:00
Ted Kremenek
6efe7adf98
Inline typedef for alist_iterator::pointer to work with MSVC++.
...
llvm-svn: 53517
2008-07-12 18:28:46 +00:00
Nick Lewycky
0dae6f90bb
operator[] is not defined for list::iterator. Overload it in ilist::iterator
...
to prevent silly things from happening accidentally. PR2171
llvm-svn: 53507
2008-07-12 07:00:52 +00:00
Evan Cheng
ebf7ff4531
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
...
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
bf47a27643
Add a utility function to MachineInstr for testing whether an instruction
...
has exactly one MachineMemOperand, and change some X86 lowering code to
make use of it.
llvm-svn: 53498
2008-07-12 00:10:52 +00:00
Dan Gohman
fee8b04935
Fix spelling of "hierarchy" in comments.
...
llvm-svn: 53489
2008-07-11 22:51:32 +00:00
Dan Gohman
0abdafa4f9
Fix typos in comments.
...
llvm-svn: 53487
2008-07-11 22:48:20 +00:00
Dan Gohman
4c18394001
Include a frame index in the "fixed stack" pseudo source value
...
instead of using the frame index for the SVOffset, which was
inconsistent.
llvm-svn: 53486
2008-07-11 22:44:52 +00:00
Ted Kremenek
d6dcdf8802
Minor tweaks to the ImmutableList iterator interface.
...
Added partial specialization of DenseMapInfo<T> for ImmutableList.
llvm-svn: 53485
2008-07-11 22:43:07 +00:00
Dan Gohman
6ee2195ab1
Add support for putting NamedRegionTimers in TimerGroups, and
...
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Dan Gohman
d1342570f2
Use find instead of lower_bound.
...
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Dan Gohman
d7a32ecde2
Trim unnecessary #includes.
...
llvm-svn: 53471
2008-07-11 20:38:31 +00:00
Duncan Sands
1e3fe05638
It is pointless to turn a UINT_TO_FP into an
...
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.
llvm-svn: 53461
2008-07-11 17:00:14 +00:00
Duncan Sands
58130a26f4
Add two missing SINT_TO_FP libcalls.
...
llvm-svn: 53460
2008-07-11 16:57:02 +00:00
Duncan Sands
669d4d6909
Add support for 128 bit shifts and 32 bit shifts
...
on 16 bit machines.
llvm-svn: 53458
2008-07-11 16:52:29 +00:00
Ted Kremenek
4e5efc791c
Make typedef public to make MSVC++ happy.
...
llvm-svn: 53433
2008-07-10 23:24:20 +00:00
Ted Kremenek
d2eef72ae9
Make some typedefs public to make MSVC++ happy.
...
llvm-svn: 53432
2008-07-10 23:09:45 +00:00
Ted Kremenek
9bd15119cd
Make typedefs in ilist public (Visual C++ errors out when they are private).
...
llvm-svn: 53431
2008-07-10 22:58:10 +00:00
Bill Wendling
7e2acf0dc9
Pull r53428 from Gaz into mainline:
...
Remove warnings about unused/shadowed variables.
llvm-svn: 53430
2008-07-10 22:57:49 +00:00
Ted Kremenek
91171c5406
Added ImmutableMap constructor that accepts a const TreeTy*.
...
llvm-svn: 53429
2008-07-10 22:57:10 +00:00
Dan Gohman
c3f346dc55
Tidy up #includes.
...
llvm-svn: 53426
2008-07-10 22:26:19 +00:00
Dan Gohman
83d9009473
Add a SubclassData field to SDNode, similar to what's done
...
in Value, to make use of some otherwise unused space. Use this
field to shrink LoadSDNode and StoreSDNode by moving the
addressing mode and ext/trunc fields there.
llvm-svn: 53422
2008-07-10 21:44:59 +00:00
Dan Gohman
157e75d975
Fix a copy+pasto in an assertion string.
...
llvm-svn: 53419
2008-07-10 19:58:23 +00:00
Dan Gohman
b379840cf7
Stack objects have nonnegative indices, not just positive indices.
...
llvm-svn: 53418
2008-07-10 19:57:25 +00:00
Dan Gohman
bb0847c84c
Escape the graph name. This unbreaks -view-cfg.
...
llvm-svn: 53417
2008-07-10 19:55:54 +00:00
Dan Gohman
2b9dccb286
Remove this file; the code that it went with is no longer
...
in the repository.
llvm-svn: 53416
2008-07-10 19:55:04 +00:00
Duncan Sands
a6c09579f0
Add support for 128 bit multiplicative operations.
...
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.
llvm-svn: 53408
2008-07-10 15:35:05 +00:00
Duncan Sands
90a916539d
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
...
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.
llvm-svn: 53407
2008-07-10 15:33:02 +00:00
Duncan Sands
e667a05fcb
Correct a comment.
...
llvm-svn: 53401
2008-07-10 11:21:59 +00:00
Evan Cheng
3ec3113431
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
...
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
llvm-svn: 53394
2008-07-10 07:35:43 +00:00
Chris Lattner
cd6afe938b
add a helper method for code that wants to handle vector
...
constants by element without caring how they are formed.
llvm-svn: 53382
2008-07-10 00:28:34 +00:00