1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
Commit Graph

60085 Commits

Author SHA1 Message Date
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
Wesley Peck
cb022ed0ce Rewording the "generated debug information" paragraph in the "Interpreter and JIT Improvements" section of the release notes.
llvm-svn: 102060
2010-04-22 13:36:27 +00:00
Wesley Peck
e625128571 Reworking the wording of the "target data string" paragraph in the "Optimizer Improvments" section of the release notes.
llvm-svn: 102059
2010-04-22 13:28:34 +00:00
Gabor Greif
13e1b5b1f1 <pre> seems to close <p>
llvm-svn: 102057
2010-04-22 10:25:23 +00:00
Gabor Greif
354e1c3939 the validator coughed up some problems, most of them fixed
llvm-svn: 102056
2010-04-22 10:21:43 +00:00
Gabor Greif
635f76d9de shorten link
llvm-svn: 102055
2010-04-22 10:11:24 +00:00
Chris Lattner
8ff3e6506e static analyzer has its own section
llvm-svn: 102054
2010-04-22 06:39:56 +00:00
Chris Lattner
649d0d8f2f add mc and static analyzer blurbs.
llvm-svn: 102053
2010-04-22 06:38:11 +00:00
Chris Lattner
5f414c7e6c another checkpoint.
llvm-svn: 102052
2010-04-22 06:28:20 +00:00
Chris Lattner
6335b2f168 various updates.
llvm-svn: 102051
2010-04-22 05:41:35 +00:00
Chris Lattner
6adbb41d8c fix file header.
llvm-svn: 102049
2010-04-22 05:33:15 +00:00
Dan Gohman
31d6b29bae Don't attempt to analyze values which are obviously undef. This fixes some
assertion failures in extreme cases.

llvm-svn: 102042
2010-04-22 01:35:11 +00:00