Owen Anderson
6147af0f8c
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.
llvm-svn: 54185
2008-07-30 00:21:16 +00:00
Eli Friedman
81169f2e1b
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.
llvm-svn: 54184
2008-07-30 00:04:08 +00:00
Owen Anderson
ab575176fc
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.
llvm-svn: 54174
2008-07-29 21:17:08 +00:00
Owen Anderson
bebb8e5d20
Don't decrement the BB remap when we don't need to.
...
llvm-svn: 54173
2008-07-29 21:15:44 +00:00
Duncan Sands
c3d73fbfc0
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.
llvm-svn: 54172
2008-07-29 20:56:02 +00:00
Bruno Cardoso Lopes
2188281cd4
Changed some methods order.
...
llvm-svn: 54169
2008-07-29 19:29:50 +00:00
Nate Begeman
f76a814673
Fix broken CellSPU lowering, re-instate braces in Legalize
...
llvm-svn: 54168
2008-07-29 19:07:27 +00:00
Bruno Cardoso Lopes
9d91fab260
Added floating point lowering for select.
...
llvm-svn: 54167
2008-07-29 19:05:28 +00:00
Duncan Sands
282f4a39f4
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.
llvm-svn: 54165
2008-07-29 18:31:42 +00:00
Nate Begeman
20b060cd54
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.
llvm-svn: 54164
2008-07-29 18:28:31 +00:00
Nate Begeman
9a71580e21
Add vector shifts to the IR, patch by Eli Friedman.
...
CodeGen & Clang work coming next.
llvm-svn: 54161
2008-07-29 15:49:41 +00:00
Matthijs Kooijman
7199907f50
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ö.
llvm-svn: 54160
2008-07-29 13:21:23 +00:00
Matthijs Kooijman
77948dbbc2
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.
llvm-svn: 54159
2008-07-29 10:00:13 +00:00
Matthijs Kooijman
1424ba7e0a
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.
llvm-svn: 54158
2008-07-29 08:55:30 +00:00
Matthijs Kooijman
6ef5a25c7f
Add a GetElementPtrInst::getIndexedType that accepts uint64_t's instead of just Value*'s.
...
llvm-svn: 54157
2008-07-29 08:46:11 +00:00
Evan Cheng
10d4254f45
Fix for PR2578. Do not split off a block whose size is less than FreeRangeHeader::getMinBlockSize(). Patch by Damien.
...
llvm-svn: 54152
2008-07-29 07:38:32 +00:00
Dan Gohman
ebe629a4b2
Revert 54147.
...
llvm-svn: 54148
2008-07-29 01:02:18 +00:00
Dan Gohman
1816900fd1
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.
llvm-svn: 54147
2008-07-28 22:18:25 +00:00
Dan Gohman
9653b21dc2
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.
llvm-svn: 54146
2008-07-28 21:51:04 +00:00
Owen Anderson
d2cc2655af
Don't remove volatile loads. Thanks to Duncan for noticing this one.
...
llvm-svn: 54144
2008-07-28 20:52:42 +00:00
Bill Wendling
db7e5da90e
Remove extra lines
...
llvm-svn: 54143
2008-07-28 20:50:25 +00:00
Bruno Cardoso Lopes
4223351620
Disable gp_rel relocation for constant pools access for now.
...
llvm-svn: 54142
2008-07-28 19:26:25 +00:00
Duncan Sands
3df25c8758
Since build_vector is a variadic node, the number
...
of operands should be -1 not 0.
llvm-svn: 54141
2008-07-28 19:17:21 +00:00
Bruno Cardoso Lopes
67af9a72f4
Added floating point lowering for setcc and brcond.
...
Fixed COMM asm directive usage.
ConstantPool using custom FourByteConstantSection.
llvm-svn: 54139
2008-07-28 19:11:24 +00:00
Duncan Sands
ac8ddfc48d
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.
llvm-svn: 54138
2008-07-28 19:09:01 +00:00
Bill Wendling
3a37809823
Don't build with 4.0.
...
llvm-svn: 54137
2008-07-28 18:45:36 +00:00
Dan Gohman
f6391108c6
Fix a typo in a comment.
...
llvm-svn: 54136
2008-07-28 18:43:51 +00:00
Dan Gohman
f8f44b4837
Reword a comment to be less ambiguous.
...
llvm-svn: 54135
2008-07-28 18:42:57 +00:00
Dan Gohman
415d5069f4
Fix a bashism in TestRunner.sh.
...
llvm-svn: 54134
2008-07-28 18:41:03 +00:00
Owen Anderson
4d84a90fa9
Add support for eliminating stores that store the same value that was just loaded.
...
This fixes PR2599.
llvm-svn: 54133
2008-07-28 16:14:26 +00:00
Owen Anderson
23a7866a06
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.
llvm-svn: 54132
2008-07-28 16:00:58 +00:00
Bill Wendling
86c1243f5e
Remove <iostream> include.
...
llvm-svn: 54131
2008-07-27 23:18:30 +00:00
Dan Gohman
7ae5bf35a2
Don't use reinterpret_cast when it isn't needed.
...
llvm-svn: 54130
2008-07-27 23:12:19 +00:00
Dan Gohman
6bfdeb2ed1
Make the ScheduleDAG's GraphRoot edge be blue and dashed too, like
...
the SelectionDAG's.
llvm-svn: 54129
2008-07-27 22:46:49 +00:00
Dan Gohman
9742f7772d
Rename SDOperand to SDValue.
...
llvm-svn: 54128
2008-07-27 21:46:04 +00:00
Dan Gohman
47c5cdbc34
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.
llvm-svn: 54127
2008-07-27 20:43:25 +00:00
Dan Gohman
a5a50a8853
Fix embedded CRLF characters.
...
llvm-svn: 54125
2008-07-27 18:37:58 +00:00
Dan Gohman
2a0bc8f6e1
Rename isOnlyUseOf to isOnlyUserOf.
...
llvm-svn: 54124
2008-07-27 18:06:42 +00:00
Dan Gohman
bdbaf4d128
Improve comments for SDNode use-count methods. No functionality change.
...
llvm-svn: 54123
2008-07-27 17:44:52 +00:00
Duncan Sands
545c21768f
Some binary operations were being treated as
...
unary operations! Add support for softening
some additional unary operations like fp_to_sint.
llvm-svn: 54122
2008-07-27 12:28:43 +00:00
Owen Anderson
25a3bf3f0e
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!
llvm-svn: 54077
2008-07-25 23:38:08 +00:00
Owen Anderson
8f9ab550a2
Revert my previous patch. In retrospect, this is completely the wrong way to fix this problem.
...
llvm-svn: 54072
2008-07-25 23:06:59 +00:00
Owen Anderson
9408721750
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.
llvm-svn: 54070
2008-07-25 22:32:01 +00:00
Owen Anderson
9e3ea5a60c
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.
llvm-svn: 54065
2008-07-25 21:35:43 +00:00
Owen Anderson
987bd1dc5b
Remove live interval entries for an interval if we're eliminating its only VN.
...
llvm-svn: 54062
2008-07-25 21:08:41 +00:00
Owen Anderson
fe97082ddd
Properly remap live ranges whose end indices are the end of the function.
...
llvm-svn: 54061
2008-07-25 21:07:13 +00:00
Dan Gohman
c28f2265a4
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.
llvm-svn: 54053
2008-07-25 20:36:15 +00:00
Owen Anderson
cefa4df4c1
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.
llvm-svn: 54043
2008-07-25 19:50:48 +00:00
Duncan Sands
46a694af35
Fix error: ‘std::ostream’ has not been declared
...
when compiling with gcc 4.3.
llvm-svn: 54041
2008-07-25 19:29:14 +00:00
Nate Begeman
1396e3d206
Fix test RUN line
...
llvm-svn: 54040
2008-07-25 19:08:59 +00:00