1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

55835 Commits

Author SHA1 Message Date
Jeffrey Yasskin
53a8f3981c Fix http://llvm.org/PR5729: x86-64 tail calls were putting their targets into
R11, and then asserting that the target was in R9.  Since R9 isn't reserved for
the target anymore, and is used as an argument, this patch changes the
assertion.

llvm-svn: 93065
2010-01-09 18:56:43 +00:00
Chris Lattner
9de6f439d3 2010 is upon us.
llvm-svn: 93062
2010-01-09 18:40:31 +00:00
Dan Gohman
771144e807 Use WriteAsOperand instead of getName() to print loop header names,
so that unnamed blocks are handled.

llvm-svn: 93059
2010-01-09 18:17:45 +00:00
Dan Gohman
123aee69c0 Tighten up the vim LLVM IR syntax highlighting regex for labels, and add a
highlighting rule for identifiers.

llvm-svn: 93056
2010-01-09 17:22:48 +00:00
Dan Gohman
03fedbe06b Set the vim auto-indent setting for open braces after case statements to
follow LLVM source convention.

Before:
  case X: {
            stuff;
          }

After:
  case X: {
    stuff;
  }

llvm-svn: 93055
2010-01-09 17:15:21 +00:00
David Chisnall
edfb3fc27c Fixed linking of modules containing aliases to constant bitcasts. Existing behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee).
Linking modules containing aliases to GEPs is still not quite right.  GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break.  Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later).

llvm-svn: 93052
2010-01-09 16:27:31 +00:00
Duncan Sands
8f97b49457 Suppress use of uninitialized variable warning.
llvm-svn: 93046
2010-01-09 08:30:33 +00:00
Chris Lattner
b142e13f84 only factor from expressions whose uses are empty and whose
base is the right expression type.  This fixes PR5981.

llvm-svn: 93045
2010-01-09 06:01:36 +00:00
Dan Gohman
3708af1c59 Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.

Also, fix some more issues with legalization of vector casts.

llvm-svn: 93043
2010-01-09 02:13:55 +00:00
Chris Lattner
8a92d699f8 clean up this code, add a fixme.
llvm-svn: 93042
2010-01-09 02:02:37 +00:00
Devang Patel
bd58ff3f60 Delete NamedMDSymTable while destrucing Module.
Disable  copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public.

llvm-svn: 93041
2010-01-09 01:44:59 +00:00
Dale Johannesen
0e21161e32 Add DEBUG_DECLARE. Not used yet.
llvm-svn: 93040
2010-01-09 01:24:25 +00:00
Devang Patel
de49dd9087 NamedMDNode is never used so there is no need to enumerate it here.
llvm-svn: 93039
2010-01-09 01:24:03 +00:00
Julien Lerouge
76c75e82d0 Fix nondeterministic behavior.
llvm-svn: 93038
2010-01-09 01:06:49 +00:00
Devang Patel
fbb47c2300 NamedMDNode element is either null or MDNode. Otherwise this is a malformed NamedMDNode record.
llvm-svn: 93037
2010-01-09 01:02:22 +00:00
Devang Patel
ea208bf99c Derive NamedMDNode from Value.
llvm-svn: 93032
2010-01-09 00:30:14 +00:00
Evan Cheng
afa00d14db Dan pointed out checking whether a node is dead by comparing its opcode to ISD::DELETED_NODE is not safe. Use a DAGUpdateListener to remove dead nodes from work list instead.
llvm-svn: 93031
2010-01-09 00:21:08 +00:00
Dale Johannesen
610f0ce9aa Add DEBUG_VALUE. Not used yet.
llvm-svn: 93030
2010-01-08 23:51:25 +00:00
Evan Cheng
2e497d1ed4 Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The results of the cmpxchg8b instructions are being thrown away when it branches back to the top of the checking loop. This means the loop always compares against the old value and this can result in a dead lock.
llvm-svn: 93028
2010-01-08 23:41:50 +00:00
Eric Christopher
79200db8b8 Grammar thinko.
llvm-svn: 93027
2010-01-08 21:42:39 +00:00
Eric Christopher
937778e8d0 Remove unnecessary dyn_cast and add a comment. Part of a WIP.
llvm-svn: 93026
2010-01-08 21:37:11 +00:00
Chris Lattner
fd117b63f7 mplement a theoretical fixme.
llvm-svn: 93024
2010-01-08 19:28:47 +00:00
Chris Lattner
474cd30fb7 rename CanEvaluateInDifferentType -> CanEvaluateTruncated and
simplify it now that it is only used for truncates.

llvm-svn: 93021
2010-01-08 19:19:23 +00:00
Evan Cheng
8b248e5016 Fix comment.
llvm-svn: 93020
2010-01-08 19:14:57 +00:00
Chris Lattner
05ae88cc8f teach instcombine to delete sign extending shift pairs (sra(shl X, C), C) when
the input is already sign extended.

llvm-svn: 93019
2010-01-08 19:04:21 +00:00
Chris Lattner
0dc48180de fix PR5978 by peeling the loop so that we avoid shifting the
result int by 8 for the first byte.  While normally harmless,
if the result is smaller than a byte, this shift is invalid.

llvm-svn: 93018
2010-01-08 19:02:23 +00:00
Duncan Sands
c94f8aeb36 Suppress an unused variable warning when assertions are off;
remove some trailing whitespace while there.

llvm-svn: 93008
2010-01-08 17:51:48 +00:00
Chris Lattner
725b9ba4e5 tidy up some stuff duncan pointed out.
llvm-svn: 93007
2010-01-08 17:48:19 +00:00
Johnny Chen
f782ccee01 Minor change, change the order of two "let Inst{...}" stmts within multiclass
T2I_bin_ii12rs definition.

llvm-svn: 93006
2010-01-08 17:41:33 +00:00
Eric Christopher
067afe673c After further thought revert the patch to make fast-isel avoid
putting relocations into the constant pool - this isn't needed
for correctness and in the rare occasion it happens would pull
us out of fast isel for the block.

If fast-isel application startup time ever becomes an issue we
can add better support for these addresses instead of bailing.

llvm-svn: 92995
2010-01-08 08:24:49 +00:00
Evan Cheng
f96a9ec02b ReplaceAllUsesOfValueWith may delete other nodes that the one being replaced. Do not delete dead nodes again.
llvm-svn: 92988
2010-01-08 02:36:12 +00:00
Evan Cheng
4f25f87baa Fix what looks to me obvious instruction definition bugs.
1. CMPXCHG8B and CMPXCHG16B did not specify implicit physical register defs and uses.
2. LCMPXCHG8B is loading 64 bit memory, not 32 bit.

llvm-svn: 92985
2010-01-08 01:29:19 +00:00
Eric Christopher
2a3196c2e5 Remove extraneous include.
llvm-svn: 92972
2010-01-08 00:05:33 +00:00
Tobias Grosser
b73235c0d0 Add assert to check dominance dfs numbers.
Compare the dominance information calculated using a dominance tree walk to the
information calculated based on DFS numbers, if XDEBUG is enabled.

llvm-svn: 92969
2010-01-07 23:50:41 +00:00
Tobias Grosser
35528e6f1d Remove workaround in PostDominators
Remove a FIXME and unify code that was necessary to work around broken
updateDFSNumbers().  Before updateDFSNumbers() did not work correctly for post
dominators.

llvm-svn: 92968
2010-01-07 23:50:25 +00:00
Tobias Grosser
fbc9ea7841 Fix DFS number calculation for postdominators
The DFS number calculation for postdominators was broken. In the case of
multiple exits that form the post dominator root nodes, do not iterate over
all exits, but start from the virtual root node. Otherwise bbs, that are not
post dominated by any exit but by the virtual root node, will never be assigned
a DFS number.

llvm-svn: 92967
2010-01-07 23:50:06 +00:00
Chris Lattner
944f9c4ac1 teach ComputeNumSignBits to look through PHI nodes.
llvm-svn: 92964
2010-01-07 23:44:37 +00:00
Chris Lattner
b8ec2bccaf filecheckize
llvm-svn: 92963
2010-01-07 23:42:23 +00:00
Chris Lattner
db8fa82914 Enhance instcombine to reason more strongly about promoting computation
that feeds into a zext, similar to the patch I did yesterday for sext.
There is a lot of room for extension beyond this patch.

llvm-svn: 92962
2010-01-07 23:41:00 +00:00
Chris Lattner
e0199dff81 Fix rdar://7517201, a regression introduced by r92849.
When folding a and(any_ext(load)) both the any_ext and the
load have to have only a single use.

This removes the anyext-uses.ll testcase which started failing
because it is unreduced and unclear what it is testing.

llvm-svn: 92950
2010-01-07 21:59:23 +00:00
Chris Lattner
f68e328a99 factor this code better and reduce nesting at the same
time, no functionality change.

llvm-svn: 92948
2010-01-07 21:53:27 +00:00
David Greene
c3f9f7a3db Revert r92939. These intrinsics get matched to LLVM instructions,
so removing at Chris' request.

llvm-svn: 92947
2010-01-07 21:43:58 +00:00
Evan Cheng
4523041394 APInt'fy TargetLowering::SimplifySetCC to fix PR5963.
llvm-svn: 92943
2010-01-07 20:58:44 +00:00
David Greene
7c9c709d3d Add some "missing" instrinsics to make the SSE intrinsic set a bit more
orthogonal.

llvm-svn: 92939
2010-01-07 19:47:43 +00:00
Benjamin Kramer
bbaf8cac38 Simplify code. No intended functionality/performance change.
llvm-svn: 92938
2010-01-07 19:46:15 +00:00
Eric Christopher
d218bc7a2f If the data requires a relocation then don't attempt to
add it to the constant pool for fast-isel. We already
don't add it for the normal case.

llvm-svn: 92934
2010-01-07 19:45:14 +00:00
Eric Christopher
1d452e5c87 We need to put any kind of data with a relocation into a
not-readonly segment on darwin.

llvm-svn: 92933
2010-01-07 19:44:05 +00:00
Devang Patel
10ee76f7f4 Use separate namespace for named metadata.
llvm-svn: 92931
2010-01-07 19:39:36 +00:00
Kovarththanan Rajaratnam
3a038bba47 Fix occurrence typo
llvm-svn: 92926
2010-01-07 18:46:52 +00:00
Chris Lattner
320b635dfd constant materialization could be improved.
llvm-svn: 92921
2010-01-07 17:53:10 +00:00