oota-llvm.git
16 years agoRemoved small section flag for mips, the assembler doesnt support this flag
Bruno Cardoso Lopes [Wed, 30 Jul 2008 17:04:04 +0000 (17:04 +0000)]
Removed small section flag for mips, the assembler doesnt support this flag

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54214 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded new features to represent specific instructions groups
Bruno Cardoso Lopes [Wed, 30 Jul 2008 17:01:06 +0000 (17:01 +0000)]
Added new features to represent specific instructions groups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54213 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoInstruction definition cleanup
Bruno Cardoso Lopes [Wed, 30 Jul 2008 16:58:59 +0000 (16:58 +0000)]
Instruction definition cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54212 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDocument BasicBlock::Create.
Matthijs Kooijman [Wed, 30 Jul 2008 12:53:14 +0000 (12:53 +0000)]
Document BasicBlock::Create.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54210 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNot that using stream headers other than iostream is allowed.
Matthijs Kooijman [Wed, 30 Jul 2008 12:14:10 +0000 (12:14 +0000)]
Not that using stream headers other than iostream is allowed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54209 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded support for overloading intrinsics (atomics) based on pointers
Mon P Wang [Wed, 30 Jul 2008 04:36:53 +0000 (04:36 +0000)]
Added support for overloading intrinsics (atomics) based on pointers
to different address spaces.  This alters the naming scheme for those
intrinsics, e.g., atomic.load.add.i32 => atomic.load.add.i32.p0i32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54195 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAnother SCEV issue from PR2607; essentially the same issue, but this
Eli Friedman [Wed, 30 Jul 2008 04:36:32 +0000 (04:36 +0000)]
Another SCEV issue from PR2607; essentially the same issue, but this
time applying to the implicit comparison in smin expressions. The
correct way to transform an inequality into the opposite
inequality, either signed or unsigned, is with a not expression.

I looked through the SCEV code, and I don't think there are any more
occurrences of this issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54194 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMore fixes for corner cases when remapping live range indices.
Owen Anderson [Wed, 30 Jul 2008 00:22:56 +0000 (00:22 +0000)]
More fixes for corner cases when remapping live range indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54186 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen merging live intervals, we also need to merge in any live ranges that are inputs...
Owen Anderson [Wed, 30 Jul 2008 00:21:16 +0000 (00:21 +0000)]
When merging live intervals, we also need to merge in any live ranges that are inputs to two-address instructions
that themselves define a range we already care about.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54185 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix for PR2607: SCEV miscomputing the loop count for loops with an
Eli Friedman [Wed, 30 Jul 2008 00:04:08 +0000 (00:04 +0000)]
Fix for PR2607: SCEV miscomputing the loop count for loops with an
SGT exit condition.  Essentially, the correct way to flip an inequality
in 2's complement is the not operator, not the negation operator.
That said, the difference only affects cases involving INT_MIN.

Also, enhance the pre-test search logic to be a bit smarter about
inequalities flipped with a not operator, so it can eliminate the smax
from the iteration count for simple loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54184 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen merging a PHI operand's live interval into the PHI's live interval, we need...
Owen Anderson [Tue, 29 Jul 2008 21:17:08 +0000 (21:17 +0000)]
When merging a PHI operand's live interval into the PHI's live interval, we need to merge over all liveranges in
the operand's interval that share the relevant value number, not just the range that immediately precedes the PHI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54174 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't decrement the BB remap when we don't need to.
Owen Anderson [Tue, 29 Jul 2008 21:15:44 +0000 (21:15 +0000)]
Don't decrement the BB remap when we don't need to.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54173 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2609. If a label is deleted, then it needs
Duncan Sands [Tue, 29 Jul 2008 20:56:02 +0000 (20:56 +0000)]
Fix PR2609.  If a label is deleted, then it needs
to be marked invalid regardless of whether it is
a debug, an exception handling or (hopefully) a
GC label.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54172 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChanged some methods order.
Bruno Cardoso Lopes [Tue, 29 Jul 2008 19:29:50 +0000 (19:29 +0000)]
Changed some methods order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54169 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix broken CellSPU lowering, re-instate braces in Legalize
Nate Begeman [Tue, 29 Jul 2008 19:07:27 +0000 (19:07 +0000)]
Fix broken CellSPU lowering, re-instate braces in Legalize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54168 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded floating point lowering for select.
Bruno Cardoso Lopes [Tue, 29 Jul 2008 19:05:28 +0000 (19:05 +0000)]
Added floating point lowering for select.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54167 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSet the executable bit - means it can actually
Duncan Sands [Tue, 29 Jul 2008 18:31:42 +0000 (18:31 +0000)]
Set the executable bit - means it can actually
be run when installing on sparc sun.  Set the
mime type to text/x-sh while there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54165 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDisable a fix in the previous patch, since it breaks CellSPU.
Nate Begeman [Tue, 29 Jul 2008 18:28:31 +0000 (18:28 +0000)]
Disable a fix in the previous patch, since it breaks CellSPU.
The CellSPU codegen is broken, but needs to be fixed before we can
put this back in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54164 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd vector shifts to the IR, patch by Eli Friedman.
Nate Begeman [Tue, 29 Jul 2008 15:49:41 +0000 (15:49 +0000)]
Add vector shifts to the IR, patch by Eli Friedman.
CodeGen & Clang work coming next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54161 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd -unroll-allow-partial command line option that enabled the loop unroller to
Matthijs Kooijman [Tue, 29 Jul 2008 13:21:23 +0000 (13:21 +0000)]
Add -unroll-allow-partial command line option that enabled the loop unroller to
partially unroll a loop when fully unrolling would not fit under the threshold.

Patch by Mikael Lepistö.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54160 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRestructure ArgumentPromotion a bit. Instead of just having a single boolean
Matthijs Kooijman [Tue, 29 Jul 2008 10:00:13 +0000 (10:00 +0000)]
Restructure ArgumentPromotion a bit. Instead of just having a single boolean
that says "unconditional loads from this argument are safe", we now keep track
of the safety per set of indices from which loads happen. This prevents
ArgPromotion from promoting loads that aren't really valid. As an added effect,
this will now disregard the the type of the indices passed to a GEP, so
"load GEP %A, i32 1" and "load GEP %A, i64 1" will result in a single argument,
not two.

This fixes PR2598, for which a testcase has been added as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54159 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImprove bugpoint output a bit by outputting the actual instructions instead of
Matthijs Kooijman [Tue, 29 Jul 2008 08:55:30 +0000 (08:55 +0000)]
Improve bugpoint output a bit by outputting the actual instructions instead of
just it's name, which is often empty. Also remove a newline from the output
that wasn't really needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54158 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.
Matthijs Kooijman [Tue, 29 Jul 2008 08:46:11 +0000 (08:46 +0000)]
Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54157 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix for PR2578. Do not split off a block whose size is less than FreeRangeHeader...
Evan Cheng [Tue, 29 Jul 2008 07:38:32 +0000 (07:38 +0000)]
Fix for PR2578. Do not split off a block whose size is less than FreeRangeHeader::getMinBlockSize(). Patch by Damien.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54152 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert 54147.
Dan Gohman [Tue, 29 Jul 2008 01:02:18 +0000 (01:02 +0000)]
Revert 54147.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54148 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd x86 isel patterns to match what would be a ZERO_EXTEND_INREG operation,
Dan Gohman [Mon, 28 Jul 2008 22:18:25 +0000 (22:18 +0000)]
Add x86 isel patterns to match what would be a ZERO_EXTEND_INREG operation,
which is represented in codegen as an 'and' operation. This matches them
with movz instructions, instead of leaving them to be matched by and
instructions with an immediate field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54147 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFold the useful features of alist and alist_node into ilist, and
Dan Gohman [Mon, 28 Jul 2008 21:51:04 +0000 (21:51 +0000)]
Fold the useful features of alist and alist_node into ilist, and
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.

Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.

Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54146 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't remove volatile loads. Thanks to Duncan for noticing this one.
Owen Anderson [Mon, 28 Jul 2008 20:52:42 +0000 (20:52 +0000)]
Don't remove volatile loads.  Thanks to Duncan for noticing this one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54144 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove extra lines
Bill Wendling [Mon, 28 Jul 2008 20:50:25 +0000 (20:50 +0000)]
Remove extra lines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54143 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDisable gp_rel relocation for constant pools access for now.
Bruno Cardoso Lopes [Mon, 28 Jul 2008 19:26:25 +0000 (19:26 +0000)]
Disable gp_rel relocation for constant pools access for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54142 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSince build_vector is a variadic node, the number
Duncan Sands [Mon, 28 Jul 2008 19:17:21 +0000 (19:17 +0000)]
Since build_vector is a variadic node, the number
of operands should be -1 not 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54141 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis is not a binary file.
Duncan Sands [Mon, 28 Jul 2008 19:16:31 +0000 (19:16 +0000)]
This is not a binary file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54140 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdded floating point lowering for setcc and brcond.
Bruno Cardoso Lopes [Mon, 28 Jul 2008 19:11:24 +0000 (19:11 +0000)]
Added floating point lowering for setcc and brcond.
Fixed COMM asm directive usage.
ConstantPool using custom FourByteConstantSection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54139 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTest this differently: I saw this test fail
Duncan Sands [Mon, 28 Jul 2008 19:09:01 +0000 (19:09 +0000)]
Test this differently: I saw this test fail
because opt exited while llvm-as was still
writing to the pipe, causing it to get a
SIGPIPE.  It seems best to change things to
avoid the race altogether.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54138 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't build with 4.0.
Bill Wendling [Mon, 28 Jul 2008 18:45:36 +0000 (18:45 +0000)]
Don't build with 4.0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54137 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a typo in a comment.
Dan Gohman [Mon, 28 Jul 2008 18:43:51 +0000 (18:43 +0000)]
Fix a typo in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54136 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoReword a comment to be less ambiguous.
Dan Gohman [Mon, 28 Jul 2008 18:42:57 +0000 (18:42 +0000)]
Reword a comment to be less ambiguous.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54135 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a bashism in TestRunner.sh.
Dan Gohman [Mon, 28 Jul 2008 18:41:03 +0000 (18:41 +0000)]
Fix a bashism in TestRunner.sh.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54134 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd support for eliminating stores that store the same value that was just loaded.
Owen Anderson [Mon, 28 Jul 2008 16:14:26 +0000 (16:14 +0000)]
Add support for eliminating stores that store the same value that was just loaded.
This fixes PR2599.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54133 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a subtle bug when removing instructions from memdep. In very specific
Owen Anderson [Mon, 28 Jul 2008 16:00:58 +0000 (16:00 +0000)]
Fix a subtle bug when removing instructions from memdep.  In very specific
circumstances we could end up remapping a dependee to the same instruction
that we're trying to remove.  Handle this properly by just falling back to
a conservative solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54132 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove <iostream> include.
Bill Wendling [Sun, 27 Jul 2008 23:18:30 +0000 (23:18 +0000)]
Remove <iostream> include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54131 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDon't use reinterpret_cast when it isn't needed.
Dan Gohman [Sun, 27 Jul 2008 23:12:19 +0000 (23:12 +0000)]
Don't use reinterpret_cast when it isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54130 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake the ScheduleDAG's GraphRoot edge be blue and dashed too, like
Dan Gohman [Sun, 27 Jul 2008 22:46:49 +0000 (22:46 +0000)]
Make the ScheduleDAG's GraphRoot edge be blue and dashed too, like
the SelectionDAG's.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54129 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename SDOperand to SDValue.
Dan Gohman [Sun, 27 Jul 2008 21:46:04 +0000 (21:46 +0000)]
Rename SDOperand to SDValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54128 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTidy SDNode::use_iterator, and complete the transition to have it
Dan Gohman [Sun, 27 Jul 2008 20:43:25 +0000 (20:43 +0000)]
Tidy SDNode::use_iterator, and complete the transition to have it
parallel its analogue, Value::value_use_iterator. The operator* method
now returns the user, rather than the use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54127 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix embedded CRLF characters.
Dan Gohman [Sun, 27 Jul 2008 18:37:58 +0000 (18:37 +0000)]
Fix embedded CRLF characters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54125 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename isOnlyUseOf to isOnlyUserOf.
Dan Gohman [Sun, 27 Jul 2008 18:06:42 +0000 (18:06 +0000)]
Rename isOnlyUseOf to isOnlyUserOf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54124 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoImprove comments for SDNode use-count methods. No functionality change.
Dan Gohman [Sun, 27 Jul 2008 17:44:52 +0000 (17:44 +0000)]
Improve comments for SDNode use-count methods. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54123 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSome binary operations were being treated as
Duncan Sands [Sun, 27 Jul 2008 12:28:43 +0000 (12:28 +0000)]
Some binary operations were being treated as
unary operations!  Add support for softening
some additional unary operations like fp_to_sint.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54122 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix the issues originally addressed in r54070. After thinking about it some more...
Owen Anderson [Fri, 25 Jul 2008 23:38:08 +0000 (23:38 +0000)]
Fix the issues originally addressed in r54070.  After thinking about it some more, I realized that the right thing to do
is to have StrongPHIElimination use its knowledge of the PHIs before they're erased to update the intervals appropriate.  This is
both simpler and more accurate than the alternative, which was having LIA figure it out when it renumbered things, plus it's just
the right thing to do!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54077 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRevert my previous patch. In retrospect, this is completely the wrong way to fix...
Owen Anderson [Fri, 25 Jul 2008 23:06:59 +0000 (23:06 +0000)]
Revert my previous patch.  In retrospect, this is completely the wrong way to fix this problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54072 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoSpecial cases are needed in renumbering when dealing with renumbering after a PHI...
Owen Anderson [Fri, 25 Jul 2008 22:32:01 +0000 (22:32 +0000)]
Special cases are needed in renumbering when dealing with renumbering after a PHI has been removed.  The interval previously defined
by the PHI needs to be extended to the beginning of its basic block, and the intervals that were inputs need to be trimmed to the end
of their basic blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54070 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIn order to avoid reprocessing a register more than once, we need to add it
Owen Anderson [Fri, 25 Jul 2008 21:35:43 +0000 (21:35 +0000)]
In order to avoid reprocessing a register more than once, we need to add it
to the handled set so it will get filtered out in future iterations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54065 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove live interval entries for an interval if we're eliminating its only VN.
Owen Anderson [Fri, 25 Jul 2008 21:08:41 +0000 (21:08 +0000)]
Remove live interval entries for an interval if we're eliminating its only VN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54062 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoProperly remap live ranges whose end indices are the end of the function.
Owen Anderson [Fri, 25 Jul 2008 21:07:13 +0000 (21:07 +0000)]
Properly remap live ranges whose end indices are the end of the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54061 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename the version of CreateRet that's a convenience method for creating
Dan Gohman [Fri, 25 Jul 2008 20:36:15 +0000 (20:36 +0000)]
Rename the version of CreateRet that's a convenience method for creating
multiple-valued return values, so that the name CreateRet is just for
creating plain ret statements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54053 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake the remapping of interval indices (particularly ending indices) more robust.
Owen Anderson [Fri, 25 Jul 2008 19:50:48 +0000 (19:50 +0000)]
Make the remapping of interval indices (particularly ending indices) more robust.
This is tricky business, and will probably take a few more iterations to get
the last kinks out of it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54043 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix error: ‘std::ostream’ has not been declared
Duncan Sands [Fri, 25 Jul 2008 19:29:14 +0000 (19:29 +0000)]
Fix error: ‘std::ostream’ has not been declared
when compiling with gcc 4.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54041 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix test RUN line
Nate Begeman [Fri, 25 Jul 2008 19:08:59 +0000 (19:08 +0000)]
Fix test RUN line

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54040 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDisable mov{L, LP, HP, HLP, *DUP} shuffles for mmx
Nate Begeman [Fri, 25 Jul 2008 19:05:58 +0000 (19:05 +0000)]
Disable mov{L, LP, HP, HLP, *DUP} shuffles for mmx
mmx needs its own fancy shuffle logic based on unpack; for now we get correct but awful code.

Also commit Mon Ping's VSETCC patch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54039 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove unnecessary implicit argument
Nate Begeman [Fri, 25 Jul 2008 17:56:27 +0000 (17:56 +0000)]
Remove unnecessary implicit argument

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54031 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix minor issues with VICmp/VFCmp constant expressions
Nate Begeman [Fri, 25 Jul 2008 17:35:37 +0000 (17:35 +0000)]
Fix minor issues with VICmp/VFCmp constant expressions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54030 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFit in 80 cols
Nate Begeman [Fri, 25 Jul 2008 17:34:41 +0000 (17:34 +0000)]
Fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54029 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAllow verifier to be run on partially materialized modules.
Nate Begeman [Fri, 25 Jul 2008 17:28:23 +0000 (17:28 +0000)]
Allow verifier to be run on partially materialized modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54028 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd predicate for GhostLinkage, used by the JIT
Nate Begeman [Fri, 25 Jul 2008 17:26:48 +0000 (17:26 +0000)]
Add predicate for GhostLinkage, used by the JIT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54027 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRemove dead PatLeaf; there are a number of issues around MMX movl that need to be...
Nate Begeman [Fri, 25 Jul 2008 17:25:04 +0000 (17:25 +0000)]
Remove dead PatLeaf; there are a number of issues around MMX movl that need to be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54026 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTab removal
Nate Begeman [Fri, 25 Jul 2008 17:24:13 +0000 (17:24 +0000)]
Tab removal

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54025 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a #include for the uses of uint64_t.
Dan Gohman [Fri, 25 Jul 2008 15:39:12 +0000 (15:39 +0000)]
Add a #include for the uses of uint64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54016 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoThis test needs -aggressive-remat enabled.
Dan Gohman [Fri, 25 Jul 2008 15:25:32 +0000 (15:25 +0000)]
This test needs -aggressive-remat enabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54015 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoDisable the new aggressive remat logic introduced in 54000; it causes some
Dan Gohman [Fri, 25 Jul 2008 15:08:37 +0000 (15:08 +0000)]
Disable the new aggressive remat logic introduced in 54000; it causes some
regressions, such as PR2595. Also, there is a significant code-quality
issue in SPEC 464.h264ref and a few others.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54014 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoWhen splitting a vector shuffle, fixed which type we used for the hi part
Mon P Wang [Fri, 25 Jul 2008 01:30:26 +0000 (01:30 +0000)]
When splitting a vector shuffle, fixed which type we used for the hi part

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54007 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoTeach ARM isLegalAddressingMode to handle unknown type without crashing. This fixes...
Evan Cheng [Fri, 25 Jul 2008 00:55:17 +0000 (00:55 +0000)]
Teach ARM isLegalAddressingMode to handle unknown type without crashing. This fixes pr2589.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54004 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd a #include <cassert>, since this file use assert.
Dan Gohman [Fri, 25 Jul 2008 00:44:19 +0000 (00:44 +0000)]
Add a #include <cassert>, since this file use assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54003 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoApply a patch from Mahadevan R, with minor formatting changes, to
Dan Gohman [Fri, 25 Jul 2008 00:36:05 +0000 (00:36 +0000)]
Apply a patch from Mahadevan R, with minor formatting changes, to
workaround a GCC 3.3 bug observed on OpenBSD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54002 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse AliasAnalysis::pointsToConstantMemory in SDISel to avoid unnecessary
Dan Gohman [Fri, 25 Jul 2008 00:04:14 +0000 (00:04 +0000)]
Use AliasAnalysis::pointsToConstantMemory in SDISel to avoid unnecessary
dependencies with constant load nodes. This allows them to be scheduled
freely.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54001 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnable rematerialization of constants using AliasAnalysis::pointsToConstantMemory,
Dan Gohman [Fri, 25 Jul 2008 00:02:30 +0000 (00:02 +0000)]
Enable rematerialization of constants using AliasAnalysis::pointsToConstantMemory,
and knowledge of PseudoSourceValues. This unfortunately isn't sufficient to allow
constants to be rematerialized in PIC mode -- the extra indirection is a
complication.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54000 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoPut the LICM of constant GlobalVariables, introduced in r53945, under a
Dan Gohman [Thu, 24 Jul 2008 23:57:25 +0000 (23:57 +0000)]
Put the LICM of constant GlobalVariables, introduced in r53945, under a
command-line option, and disable it by default. It introduced performance
regressions because CodeGen is currently not able to remat such loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53997 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAdd target triples so these tests behave as expected on non-darwin hosts.
Dan Gohman [Thu, 24 Jul 2008 18:08:01 +0000 (18:08 +0000)]
Add target triples so these tests behave as expected on non-darwin hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53991 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoAvoid emitting casts in static initializer contexts. This fixes
Dan Gohman [Thu, 24 Jul 2008 17:57:48 +0000 (17:57 +0000)]
Avoid emitting casts in static initializer contexts. This fixes
large numbers of CBE regressions caused by r53958.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53990 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoStore the predecessor MBB in the PHIUnion, rather than an index, since the indices...
Owen Anderson [Thu, 24 Jul 2008 17:12:16 +0000 (17:12 +0000)]
Store the predecessor MBB in the PHIUnion, rather than an index, since the indices will change after renumbering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53985 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a catastrophic PPC64 ABI bug: i32 operands which are passed in memory (all of...
Evan Cheng [Thu, 24 Jul 2008 08:17:07 +0000 (08:17 +0000)]
Fix a catastrophic PPC64 ABI bug: i32 operands which are passed in memory (all of the parameter registers are used) are loaded from sp offsets that were off by 4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53979 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoCreate temp. file in current path.
Devang Patel [Thu, 24 Jul 2008 00:35:38 +0000 (00:35 +0000)]
Create temp. file in current path.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53973 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoIdentify llvm bit-code file that is causing linking failure in LTO mode.
Devang Patel [Thu, 24 Jul 2008 00:34:11 +0000 (00:34 +0000)]
Identify llvm bit-code file that is causing linking failure in LTO mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53972 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoNew test case.
Evan Cheng [Thu, 24 Jul 2008 00:22:05 +0000 (00:22 +0000)]
New test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53971 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoRename instance variables, parameter argument names to eliminate a bunch of compilati...
Evan Cheng [Thu, 24 Jul 2008 00:08:56 +0000 (00:08 +0000)]
Rename instance variables, parameter argument names to eliminate a bunch of compilation warnings with -Wshadow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53970 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnable the insertion of empty indices into LiveInterals, thereby making renumbering...
Owen Anderson [Wed, 23 Jul 2008 21:37:49 +0000 (21:37 +0000)]
Enable the insertion of empty indices into LiveInterals, thereby making renumbering possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53961 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix a compile-time regression introduced by my heuristic-changing patch. I forgot
Owen Anderson [Wed, 23 Jul 2008 19:47:27 +0000 (19:47 +0000)]
Fix a compile-time regression introduced by my heuristic-changing patch.  I forgot
to multiply the instruction count by a constant factor in a few places, which
caused the register allocator to require many more iterations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53959 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUse C99 aggregate literal syntax for first-class struct and array values.
Dan Gohman [Wed, 23 Jul 2008 18:41:03 +0000 (18:41 +0000)]
Use C99 aggregate literal syntax for first-class struct and array values.
This fixes several recent CBE regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53958 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMinor fixes.
Bruno Cardoso Lopes [Wed, 23 Jul 2008 16:01:50 +0000 (16:01 +0000)]
Minor fixes.
Added ConstantPool support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53951 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoMake CreateBinOp/CreateNeg/CreateNot do constant folding.
Chris Lattner [Wed, 23 Jul 2008 06:58:10 +0000 (06:58 +0000)]
Make CreateBinOp/CreateNeg/CreateNot do constant folding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53950 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago"Allow LICM to sink or lift loads from constant memory. Also add a test
Chris Lattner [Wed, 23 Jul 2008 05:06:28 +0000 (05:06 +0000)]
"Allow LICM to sink or lift loads from constant memory. Also add a test
case for this.

This allows instructions like loads from global variables declared to
be constant to be moved out of loops."

Patch by Stefanus Du Toit!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53945 91177308-0d34-0410-b5e6-96231b3b80d8

16 years ago'Previously, the emacs tablegen mode would highlight constants even if
Chris Lattner [Wed, 23 Jul 2008 04:49:20 +0000 (04:49 +0000)]
'Previously, the emacs tablegen mode would highlight constants even if
they appear in words. This would cause things like the "128" in "VR128"
to be highlighted. This patch fixes the highlighting by only recognizing
constants when they have word breaks around them.'

Patch by Stefanus Du Toit!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53944 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoUpdate the generated .cvs files.
Dan Gohman [Wed, 23 Jul 2008 00:54:54 +0000 (00:54 +0000)]
Update the generated .cvs files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53943 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoEnable first-class aggregates support.
Dan Gohman [Wed, 23 Jul 2008 00:34:11 +0000 (00:34 +0000)]
Enable first-class aggregates support.

Remove the GetResultInst instruction. It is still accepted in LLVM assembly
and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove
support for return instructions with multiple values. These are auto-upgraded
to use InsertValueInst instructions.

The IRBuilder still accepts multiple-value returns, and auto-upgrades them
to InsertValueInst instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53941 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix PR2485: do all 4-element SSE shuffles in max. of 2 shuffle instructions.
Evan Cheng [Wed, 23 Jul 2008 00:22:17 +0000 (00:22 +0000)]
Fix PR2485: do all 4-element SSE shuffles in max. of 2 shuffle instructions.
Based on patch by Nicolas Capens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53939 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoLegalizeTypes support for VSETCC. Fixes PR2575.
Duncan Sands [Tue, 22 Jul 2008 23:54:03 +0000 (23:54 +0000)]
LegalizeTypes support for VSETCC.  Fixes PR2575.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53938 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoChange the heuristics used in the coalescer, register allocator, and within
Owen Anderson [Tue, 22 Jul 2008 22:46:49 +0000 (22:46 +0000)]
Change the heuristics used in the coalescer, register allocator, and within
live intervals itself to use an instruction count approximation that is
not affected by inserting empty indices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53937 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoQuit early, if unable to reproduce error using original input files.
Devang Patel [Tue, 22 Jul 2008 22:20:18 +0000 (22:20 +0000)]
Quit early, if unable to reproduce error using original input files.
Quit, if unable to fix error when linker input files are all native object files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53935 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFactor out SSE 4 wide shuffle lowering code into its own function. No functionality...
Evan Cheng [Tue, 22 Jul 2008 21:13:36 +0000 (21:13 +0000)]
Factor out SSE 4 wide shuffle lowering code into its own function. No functionality changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53933 91177308-0d34-0410-b5e6-96231b3b80d8

16 years agoFix pr2566: incorrect assumption about bit_convert. It doesn't not have to output...
Evan Cheng [Tue, 22 Jul 2008 20:42:56 +0000 (20:42 +0000)]
Fix pr2566: incorrect assumption about bit_convert. It doesn't not have to output a vector value. Patch by Nicolas Capens!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53932 91177308-0d34-0410-b5e6-96231b3b80d8