Commit Graph

40587 Commits

Author SHA1 Message Date
Matthijs Kooijman
e9a393be13 Document BasicBlock::Create.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54210 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-30 12:53:14 +00:00
Matthijs Kooijman
ed58a97afd 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
2008-07-30 12:14:10 +00:00
Mon P Wang
e3b3a7241c 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
2008-07-30 04:36:53 +00:00
Eli Friedman
1fbffe0cef 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
2008-07-30 04:36:32 +00:00
Owen Anderson
9382b9310f 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
2008-07-30 00:22:56 +00:00
Owen Anderson
b9fb8d1e69 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
2008-07-30 00:21:16 +00:00
Eli Friedman
068acc3caa 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
2008-07-30 00:04:08 +00:00
Owen Anderson
83ea1f8e19 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
2008-07-29 21:17:08 +00:00
Owen Anderson
a0c032f9b2 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
2008-07-29 21:15:44 +00:00
Duncan Sands
68d4d1d49c 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
2008-07-29 20:56:02 +00:00
Bruno Cardoso Lopes
97843cdb0b Changed some methods order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54169 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 19:29:50 +00:00
Nate Begeman
24dc346a16 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
2008-07-29 19:07:27 +00:00
Bruno Cardoso Lopes
6d399bdea2 Added floating point lowering for select.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54167 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 19:05:28 +00:00
Duncan Sands
c73738b3ec 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
2008-07-29 18:31:42 +00:00
Nate Begeman
f09d131126 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
2008-07-29 18:28:31 +00:00
Nate Begeman
5bc1ea0736 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
2008-07-29 15:49:41 +00:00
Matthijs Kooijman
75cf9cc527 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
2008-07-29 13:21:23 +00:00
Matthijs Kooijman
477f5a2f11 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
2008-07-29 10:00:13 +00:00
Matthijs Kooijman
bcbd9c43a1 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
2008-07-29 08:55:30 +00:00
Matthijs Kooijman
e2afdedec5 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
2008-07-29 08:46:11 +00:00
Evan Cheng
60b75f462e 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
2008-07-29 07:38:32 +00:00
Dan Gohman
7ba145b0b4 Revert 54147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54148 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 01:02:18 +00:00
Dan Gohman
b1e8cad61e 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
2008-07-28 22:18:25 +00:00
Dan Gohman
fed90b6d09 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
2008-07-28 21:51:04 +00:00
Owen Anderson
80e051dfde 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
2008-07-28 20:52:42 +00:00
Bill Wendling
a5d5af985e Remove extra lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 20:50:25 +00:00
Bruno Cardoso Lopes
f33bc43c9a 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
2008-07-28 19:26:25 +00:00
Duncan Sands
53388fcde6 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
2008-07-28 19:17:21 +00:00
Duncan Sands
50f2f38e50 This is not a binary file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54140 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 19:16:31 +00:00
Bruno Cardoso Lopes
85e31e3a53 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
2008-07-28 19:11:24 +00:00
Duncan Sands
ecf4fa2744 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
2008-07-28 19:09:01 +00:00
Bill Wendling
11274cc48f Don't build with 4.0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54137 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 18:45:36 +00:00
Dan Gohman
0471a79f20 Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54136 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 18:43:51 +00:00
Dan Gohman
ca425a2a98 Reword a comment to be less ambiguous.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54135 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 18:42:57 +00:00
Dan Gohman
171f3dcff1 Fix a bashism in TestRunner.sh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54134 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-28 18:41:03 +00:00
Owen Anderson
8aa895b19a 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
2008-07-28 16:14:26 +00:00
Owen Anderson
d4310a5d41 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
2008-07-28 16:00:58 +00:00
Bill Wendling
1a53eadbff Remove <iostream> include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54131 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-27 23:18:30 +00:00
Dan Gohman
7953f37810 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
2008-07-27 23:12:19 +00:00
Dan Gohman
29cdb26bba 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
2008-07-27 22:46:49 +00:00
Dan Gohman
475871a144 Rename SDOperand to SDValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54128 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-27 21:46:04 +00:00
Dan Gohman
8968450305 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
2008-07-27 20:43:25 +00:00
Dan Gohman
6c4942641f Fix embedded CRLF characters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54125 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-27 18:37:58 +00:00
Dan Gohman
2a6299543f Rename isOnlyUseOf to isOnlyUserOf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54124 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-27 18:06:42 +00:00
Dan Gohman
7a24cdc4ed 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
2008-07-27 17:44:52 +00:00
Duncan Sands
4ddc41e58c 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
2008-07-27 12:28:43 +00:00
Owen Anderson
a279a896ec 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
2008-07-25 23:38:08 +00:00
Owen Anderson
0a7615af25 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
2008-07-25 23:06:59 +00:00
Owen Anderson
0c525ca72f 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
2008-07-25 22:32:01 +00:00
Owen Anderson
020decc2b4 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
2008-07-25 21:35:43 +00:00