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

59996 Commits

Author SHA1 Message Date
Dan Gohman
6a48222bd8 Change TargetData's algorithm for computing defualt vector type
alignment to match what's used in clang and GCC for __alignof, rather
than trying to guess what Legalize is going to be doing.

llvm-svn: 102206
2010-04-23 19:41:15 +00:00
Evan Cheng
34f01afb97 Code refactoring.
llvm-svn: 102202
2010-04-23 19:10:30 +00:00
Stuart Hastings
ad81819149 Add some missing x86 patterns for movdq2q. Fixes two (LLVM-)GCC DejaGNU testcases. Radar 6881029.
llvm-svn: 102199
2010-04-23 19:03:32 +00:00
Chris Lattner
790231f95e fix some failures my callgraph dump format change broke.
llvm-svn: 102197
2010-04-23 18:38:40 +00:00
Chris Lattner
a61306d68f switch InlineInfo.DevirtualizedCalls's list to be of WeakVH.
This fixes a bug where calls inlined into an invoke would get
changed into an invoke but the array would keep pointing to
the (now dead) call.  The improved inliner behavior is still
disabled for now.

llvm-svn: 102196
2010-04-23 18:37:01 +00:00
Chris Lattner
775c94002d testcase for the bug that required a patch to be reverted.
llvm-svn: 102195
2010-04-23 18:31:01 +00:00
Chris Lattner
a69f36cccb fix callgraph dump to not print 0x0x1234 for nodes.
Add the instruction pointer value for debuggability.  
We now get dump output that looks like this:

Call graph node for function: 'f1'<<0x1017086b0>>  #uses=1
  CS<0x1017046f8> calls external node

Call graph node for function: '_ZNSt6vectorIdSaIdEEC1EmRKdRKS0_'<<0x1017086f0>>  #uses=1
  CS<0x0> calls external node

Call graph node for function: 'f4'<<0x1017087a0>>  #uses=1
  CS<0x101708c88> calls function 'f3'

llvm-svn: 102194
2010-04-23 18:23:40 +00:00
Evan Cheng
9228d598ad Fix X86ISD::CMP i16 to i32 promotion.
llvm-svn: 102192
2010-04-23 18:21:16 +00:00
Dan Gohman
6680b97d89 Move FastISel's HandlePHINodesInSuccessorBlocks call down into FastISel
itself too.

llvm-svn: 102176
2010-04-23 15:29:50 +00:00
Dan Gohman
cc14435fdf Switch getelementptr inbounds and sdiv exact from undef to trap.
llvm-svn: 102175
2010-04-23 15:23:32 +00:00
Sean Callanan
a50d7d5434 Fixed EDOperand to use the operand type, not the
flags, to determine whether or not the operand is
a memory operand.

llvm-svn: 102158
2010-04-23 01:56:36 +00:00
Dan Gohman
38949c2f1f Fix LSR to tolerate cases where ScalarEvolution initially
misses an opportunity to fold add operands, but folds them
after LSR has separated them out. This fixes rdar://7886751.

llvm-svn: 102157
2010-04-23 01:55:05 +00:00
Dan Gohman
4196c77b3b When it doesn't matter whether zero or sign extension is used,
use ScalarEvolutions "any" extend function.

llvm-svn: 102156
2010-04-23 01:51:29 +00:00
Dan Gohman
8b1e26715e Revert 102135, 102129, 102127, 102106, 102104, 102102, 102012, 102004,
because 102004 causes codegen to emit invalid assembly on at least
x86_64-unknown-gnu-linux.

llvm-svn: 102155
2010-04-23 01:18:53 +00:00
Chris Lattner
ac3d4d15a4 reject invalid comma stuff with a message. We reject the case in
PR6888 with:

$ llvm-as t.ll
llvm-as: t.ll:2:29: error: expected metadata or 'align'
 store <3 x i32> %x, i32 1, i32 1>, <3 x i32>* %p
                            ^

instead of:

$ llvm-as t.ll 
llvm-as: 

llvm-svn: 102154
2010-04-23 00:50:50 +00:00
Chris Lattner
85dd1e42b6 disable my previous inliner patch, it appears to be busting self-host.
llvm-svn: 102153
2010-04-23 00:41:03 +00:00
Chris Lattner
5d87e1be44 The inliner was choosing to not consider call sites
that appear in the SCC as a result of inlining as candidates
for inlining.  Change this so that it *does* consider call 
sites that change from being indirect to being direct as a
result of inlining.  This allows it to completely 
"devirtualize" the testcase.

llvm-svn: 102146
2010-04-22 23:37:35 +00:00
Jim Grosbach
b9dccb6103 Update ARM DAGtoDAG for matching UBFX instruction for unsigned bitfield
extraction. This fixes PR5998.

llvm-svn: 102144
2010-04-22 23:24:18 +00:00
Dan Gohman
a75ad3c1ca Add an initial description of a new concept: trap values, and change
the definition of the nsw and nuw flags to make use of it.

nsw was introduced to help optimizers answer yes to the following:

  // Can we change i from i32 to i64 to eliminate the cast inside the loop?
  for (int i = 0; i < n; ++i) A[i] *= 0.1;

  // Can we assume that this loop will eventually terminate?
  for (int i = 0; i <= n; ++i) A[i] *= 0.1;

In its current form, it isn't truly sufficient for either.

In the first case, if the increment overflows, it'll still have some
valid i32 value; sign-extending it will produce a value which is 33
homogeneous sign bits trailed by 31 independent undef bits. If i is
promoted to i64, it won't have those same values when it reaches that
point. (The compiler could recover here by reasoning about how i is
used by the load, but that's a lot more complicated and isn't always
possible.)

In the second case, there is no value for i which will be greater than
n, so having the increment return undef on overflow doesn't help.

Trap values are a formalization of some existing concepts that we have
about LLVM IR, and give the optimizers a better basis for answering yes
to both questions above.

llvm-svn: 102140
2010-04-22 23:14:21 +00:00
Chris Lattner
5edbd34cff refactor the interface to InlineFunction so that most of the in/out
arguments are handled with a new InlineFunctionInfo class.  This 
makes it easier to extend InlineFunction to return more info in the
future.

llvm-svn: 102137
2010-04-22 23:07:58 +00:00
Devang Patel
01dcb9fa4c Remove the test for now.
llvm-svn: 102135
2010-04-22 22:06:28 +00:00
Chris Lattner
1c39e01255 add macruby back
llvm-svn: 102132
2010-04-22 21:34:16 +00:00
Chris Lattner
707b6f87ba when inlining something like this:
define void @f3(void (i8*)* %__f) ssp {
entry:
  call void %__f(i8* undef)
  unreachable
}

define void @f4(i8* %this) ssp align 2 {
entry:
  call void @f3(void (i8*)* @f2) ssp
  ret void
}

The inliner is turning the indirect call to %__f into a direct
call to F2.  Make the call graph more precise when this happens.

The inliner doesn't revisit call sites introduced by inlining,
so there isn't an easy way to test for this, but a more precise
callgraph is a good thing.

llvm-svn: 102131
2010-04-22 21:31:00 +00:00
Devang Patel
ce6eb17106 Add comment.
llvm-svn: 102129
2010-04-22 20:56:35 +00:00
Dan Gohman
391423b743 Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks down
into SelectionDAGBuilder itself.

llvm-svn: 102128
2010-04-22 20:55:53 +00:00
Devang Patel
cf9bece3dd Adjust debug range offsets for isWeakForLinker() functions.
llvm-svn: 102127
2010-04-22 20:52:00 +00:00
Dan Gohman
e4787844ea Add a blurb about the new LSR.
llvm-svn: 102126
2010-04-22 20:50:43 +00:00
Nick Lewycky
a75e358709 The -condprop pass has been deleted.
llvm-svn: 102125
2010-04-22 20:48:34 +00:00
Dan Gohman
70f0f7f0d3 The post-RA scheduler is currently off by default on x86.
llvm-svn: 102124
2010-04-22 20:47:28 +00:00
Dan Gohman
d819e7fc95 Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISel
and into SelectionDAGBuilder and FastISel.

llvm-svn: 102123
2010-04-22 20:46:50 +00:00
Douglas Gregor
56d10f2b15 Add some verbiage about Clang to the 2.7 release notes
llvm-svn: 102121
2010-04-22 20:42:40 +00:00
Chris Lattner
66e308198d add a DEBUG call so that -debug lists when CGSCCPM iterates.
Fix RefreshCallGraph to use CGN->replaceCallEdge instead of hand
rolling its own loop.  replaceCallEdge properly maintains the
reference counts of the nodes, fixing a crash exposed by the
iterative callgraph stuff.

llvm-svn: 102120
2010-04-22 20:42:33 +00:00
Chris Lattner
efb9e5bf75 eliminate dead #include.
llvm-svn: 102119
2010-04-22 20:41:10 +00:00
Evan Cheng
da832d5c85 - It's not safe to promote rotates (at least not trivially).
- Some code refactoring.

llvm-svn: 102111
2010-04-22 20:19:46 +00:00
Dan Gohman
56b517480e Fix a comment.
llvm-svn: 102110
2010-04-22 20:06:42 +00:00
Dan Gohman
a177e59e3e Move PHINodesToUpdate out of SelectionDAGBuilder and into
FunctionLoweringInfo, as it isn't SelectionDAG-specific. This isn't
completely natural, as PHI node state is not per-function but rather
per-basic-block, however there's currently no other convenient
per-basic-block state to group it with.

llvm-svn: 102109
2010-04-22 19:55:20 +00:00
Devang Patel
c58366a423 Rename InsnAfterLabelMap and InsnBeforeLabelMap.
llvm-svn: 102106
2010-04-22 18:43:35 +00:00
Devang Patel
bae79885a8 Keep track of MCSymbol used to mark beginning of a function.
llvm-svn: 102104
2010-04-22 18:39:21 +00:00
Jim Grosbach
caf6c99d1c Add mention of ARM atomic builtin support
llvm-svn: 102103
2010-04-22 18:33:31 +00:00
Devang Patel
4160348891 At this point Start and End are not null.
llvm-svn: 102102
2010-04-22 18:28:58 +00:00
Jim Grosbach
d6e2566355 Update ARM frame index scavenging description
llvm-svn: 102101
2010-04-22 18:28:43 +00:00
Chris Lattner
309aa11350 remove dupe
llvm-svn: 102100
2010-04-22 18:26:17 +00:00
Chris Lattner
6233e00e2a reword my incoherent babble into something that makes sense
from Wesley Peck!

llvm-svn: 102096
2010-04-22 17:39:38 +00:00
Chris Lattner
dfdc7fccda two more projects.
llvm-svn: 102095
2010-04-22 17:28:36 +00:00
Chris Lattner
ed23fe4cff add some notes from Matthieu Moy!
llvm-svn: 102093
2010-04-22 17:25:00 +00:00
Chris Lattner
fc13e24c81 improve tblgen doc, pointed out by Zhongxing.
llvm-svn: 102072
2010-04-22 16:45:27 +00:00
Wesley Peck
8f150ced6d Fixing a typo in the "Clang project" section of the release notes.
llvm-svn: 102064
2010-04-22 14:19:00 +00:00
Wesley Peck
b295a50091 Small fix to the "Other Improvements and New Features" section of the release notes.
llvm-svn: 102063
2010-04-22 13:53:54 +00:00
Wesley Peck
dc9ba0134b Fixing small typos in the "New Useful APIs" section of the release notes.
llvm-svn: 102062
2010-04-22 13:50:46 +00:00
Wesley Peck
7f83cbe232 Fixing small typos in the "ARM Target Improvements" section of the release notes.
llvm-svn: 102061
2010-04-22 13:43:14 +00:00