Commit Graph

6430 Commits

Author SHA1 Message Date
Sanjiv Gupta
bb326bbe88 Allow targets to legalize operations (with illegal operands) that produces multiple values. For example, a load with an illegal operand (a load produces two values, a value and chain).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 04:48:39 +00:00
Owen Anderson
6cf7c390ec Be more aggressive about renumbering vregs after splitting them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62639 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 00:13:28 +00:00
Devang Patel
476615934a Encode member accessibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-21 00:08:04 +00:00
Devang Patel
2a574669f3 Appropriately mark fowrad decls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62625 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 22:27:02 +00:00
Evan Cheng
a894ae130b Fix PR3243: a LiveVariables bug. When HandlePhysRegKill is checking whether the last reference is also the last def (i.e. dead def), it should also check if last reference is the current machine instruction being processed. This can happen when it is processing a physical register use and setting the current machine instruction as sub-register's last ref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62617 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 21:25:12 +00:00
Bill Wendling
e9a7286087 Use "SINT_TO_FP" instead of "UINT_TO_FP" when getting the exponent. This was
causing the limited precision stuff to produce the wrong result for values in
the range [0, 1).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62615 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 21:17:57 +00:00
Devang Patel
2be5893a04 Fix struct member's debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62610 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 21:02:02 +00:00
Devang Patel
6906ba52f0 Need only one set of debug info versions enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 19:22:03 +00:00
Evan Cheng
04ee5a1d92 Change TargetInstrInfo::isMoveInstr to return source and destination sub-register indices as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 19:12:24 +00:00
Devang Patel
9ec50ab3f8 Fix global variable's address in a DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 18:55:39 +00:00
Devang Patel
eab4a2e8ac Enable debug info for enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 18:35:14 +00:00
Devang Patel
ce31b027e7 Enable debug info for composite types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62589 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 18:13:03 +00:00
Evan Cheng
e08eb9ca1d Refactor code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62573 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 06:44:16 +00:00
Bill Wendling
6c53334b90 Shift types need to match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62571 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 06:10:42 +00:00
Dan Gohman
f5add58549 Fix a dagcombine to not generate loads of non-round integer types,
as its comment says, even in the case where it will be generating
extending loads. This fixes PR3216.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62557 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 01:06:45 +00:00
Devang Patel
c2997f4a34 Do not use DenseMap because the iterator is invalidated while constructing types. After all there was a reason why std::map was used initially!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 00:58:55 +00:00
Evan Cheng
d0deec20f6 Make linear scan's trivial coalescer slightly more aggressive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62547 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-20 00:16:18 +00:00
Devang Patel
b79b5359fb Verify debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62545 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 23:21:49 +00:00
Dan Gohman
c533612949 Remove SDNode's virtual destructor. This makes it impossible for
SDNode subclasses to keep state that requires non-trivial
destructors, however it was already effectively impossible,
since the destructor isn't actually ever called. There currently
aren't any SDNode subclasses affected by this, and in general
it's desireable to keep SDNode objects light-weight.

This eliminates the last virtual member function in the SDNode
class, so it eliminates the need for a vtable pointer, making
SDNode smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 22:39:36 +00:00
Dan Gohman
dbe664adcd Fix SelectionDAG::ReplaceAllUsesWith to behave correctly when
uses are added to the From node while it is processing From's
use list, because of automatic local CSE. The fix is to avoid
visiting any new uses.

Fix a few places in the DAGCombiner that assumed that after
a RAUW call, the From node has no users and may be deleted.

This fixes PR3018.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:44:21 +00:00
Sanjiv Gupta
15c94d08ab Few targets like PIC16 wants libcall generation for illegal type i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 18:25:27 +00:00
Mon P Wang
e3bc6ae92a Simplify extract element based on comments from Duncan Sands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 06:43:40 +00:00
Devang Patel
2d1768ca52 Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 08:05:14 +00:00
Devang Patel
5aac3d3707 Refactor code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 08:01:33 +00:00
Devang Patel
7ab2450674 Assign argument type to appropriate DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62412 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 06:57:25 +00:00
Devang Patel
7e55b3a663 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 06:51:37 +00:00
Devang Patel
2d91d18ba1 Disable composite type debug info for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 05:05:12 +00:00
Mon P Wang
7ac9cdfc99 Simplify extract element of a scalar to vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 00:07:25 +00:00
Dan Gohman
f7119393a9 Instead of adding dependence edges between terminator instructions
and every other instruction in their blocks to keep the terminator
instructions at the end, teach the post-RA scheduler how to operate
on ranges of instructions, and exclude terminators from the range
of instructions that get scheduled.

Also, exclude mid-block labels, such as EH_LABEL instructions, and
schedule code before them separately from code after them. This
fixes problems with the post-RA scheduler moving code past
EH_LABELs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 22:10:20 +00:00
Dan Gohman
49bb50e0b6 If an anti-dependence uses a non-allocatable register, set AntiDepReg
to 0, to ensure that the subsequent code doesn't try to break the
dependence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62365 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:57:43 +00:00
Dan Gohman
b6a6164832 Use the getNode() accessor instead of accessing the Node
member directly, which is private as of r55504.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:47:21 +00:00
Dan Gohman
8554449e31 Fix the check for an empty basic block to check for an empty SUnits
array instead, since this is what the scheduler actually cares about.
And remove a check that is unnecessary, since it can assume that
SUnits isn't empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:37:14 +00:00
Chris Lattner
df874eed56 new nodes should be added to the worklist, not old nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:15:56 +00:00
Devang Patel
07354e532b Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:07:53 +00:00
Evan Cheng
e57187cbe3 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62356 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 20:57:18 +00:00
Devang Patel
99ec3538b8 Use lightweight DebugInfo objects directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62341 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 19:28:14 +00:00
Devang Patel
7103c6a993 Align source code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62328 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 18:01:58 +00:00
Dan Gohman
79ce4cea47 Fix a "comparison between signed and unsigned integer expressions"
warning.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 17:55:08 +00:00
Mikhail Glushenkov
2388a588bd 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5c1799b293 Delete trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62307 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 06:53:46 +00:00
Devang Patel
5be935536f Validate debug info values only if DwarfDebug is initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 02:15:14 +00:00
Devang Patel
61c6bf37ef Any debug info symbol is only valid if atleast one compile unit is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62294 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 01:49:46 +00:00
Dan Gohman
2836c283bb 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 01:33:36 +00:00
Devang Patel
153745cc1f Do not stumble over forward declared struct member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 00:50:53 +00:00
Devang Patel
cf3a4487c0 Validate dbg_* intrinsics before lowering them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 23:41:32 +00:00
Mon P Wang
fa9c5eac33 Added missing support to widen an operand from a bit convert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 22:43:38 +00:00
Dan Gohman
fc54c55296 Generalize the HazardRecognizer interface so that it can be used
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 22:18:12 +00:00
Dan Gohman
c475c3608a Simplify the MachineLICM pass by having it only traverse outer
loops, hoisting instructions all the way out in one step rather
than hoisting them one nest level at a time. Also, make a few
other code simplifications. This speeds up MachineLICM
by several fold.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 22:01:38 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Devang Patel
f193ff0590 Use lightweight DebugInfo objects directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 19:26:23 +00:00