Commit Graph

82874 Commits

Author SHA1 Message Date
Anders Carlsson 3c1db570b2 Factor code to initialize an implicit member out into a separate function.
llvm-svn: 102162
2010-04-23 02:15:47 +00:00
Douglas Gregor 2c4a7501ee When parsing a cast-expression that starts with a scope annotation,
try to annotate as a type first to determine whether we have a
functional-style cast. Patch by Eli Friedman, fixes PR6830.

llvm-svn: 102161
2010-04-23 02:08:13 +00:00
Douglas Gregor 19043f0a6a I hate default statements. Fixes PR6874.
llvm-svn: 102160
2010-04-23 02:02:43 +00:00
Anders Carlsson 6bd91c387b Remove calls to isDependentContext, since we handle that case earlier in the code. Make BuildImplicitBaseInitializer return a boolean instead.
llvm-svn: 102159
2010-04-23 02:00:02 +00:00
Sean Callanan 62232d90cf 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 997bbc54d6 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 ff3174e97f 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 e9135cb3fb 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 95b0ff445c 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 d8d898dbd3 disable my previous inliner patch, it appears to be busting self-host.
llvm-svn: 102153
2010-04-23 00:41:03 +00:00
Douglas Gregor 306de2f6a1 Template instantiation for @try and @finally (but not @catch, yet).
llvm-svn: 102147
2010-04-22 23:59:56 +00:00
Chris Lattner 2eee5d3467 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
Douglas Gregor ff1915208d Make TemplateDecl and ObjCContainerDecl abstract
llvm-svn: 102145
2010-04-22 23:35:25 +00:00
Jim Grosbach 825cb299cd 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
Douglas Gregor e93525ed95 Kill off IDNS_ObjCImplementation and IDNS_ObjCCategoryName; they
aren't and never were used. There's a gap in the bit pattern for IDNS
now, but I'm sure *someone* will fill it.

llvm-svn: 102143
2010-04-22 23:19:50 +00:00
Dan Gohman ffc9a6b4ac 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
Douglas Gregor f68a508586 Template instantiation for the Objective-C "fast enumeration"
statement, i.e., 

  for (element in collection) {
    // do something
  }

llvm-svn: 102138
2010-04-22 23:10:45 +00:00
Chris Lattner 4ba01ec869 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 894874e7af Remove the test for now.
llvm-svn: 102135
2010-04-22 22:06:28 +00:00
Douglas Gregor 6148de71dd Template instantiation for Objective-C++ @synchronized statements.
llvm-svn: 102134
2010-04-22 22:01:21 +00:00
Douglas Gregor 2900c16b92 Implement template instantiation for Objective-C++ @throw statements.
llvm-svn: 102133
2010-04-22 21:44:01 +00:00
Chris Lattner 64694df564 add macruby back
llvm-svn: 102132
2010-04-22 21:34:16 +00:00
Chris Lattner 016c00a311 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
Fariborz Jahanian 62c560246e Check for -fno-constant-cfstrings consistency
in pch.

llvm-svn: 102130
2010-04-22 21:01:59 +00:00
Devang Patel 6adc5620ab Add comment.
llvm-svn: 102129
2010-04-22 20:56:35 +00:00
Dan Gohman 5b43aa0ddd Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks down
into SelectionDAGBuilder itself.

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

llvm-svn: 102123
2010-04-22 20:46:50 +00:00
Douglas Gregor c5b5c0591d Add some verbiage about Clang to the 2.7 release notes
llvm-svn: 102121
2010-04-22 20:42:40 +00:00
Chris Lattner 055cf267db 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 0a3b5b4e39 eliminate dead #include.
llvm-svn: 102119
2010-04-22 20:41:10 +00:00
Fariborz Jahanian 63408e848b Support for -fno-constant-cfstrings option - wip.
llvm-svn: 102112
2010-04-22 20:26:39 +00:00
Evan Cheng f1223bdec0 - 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 e149e9896c Fix a comment.
llvm-svn: 102110
2010-04-22 20:06:42 +00:00
Dan Gohman fd81254190 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
John McCall 8c12dc4351 Use the naming class from the overloaded lookup when access-checking an
address of overloaded function, instead of assuming that a nested name
specifier was used.  A nested name specifier is not required for static
functions.

Fixes PR6886.

llvm-svn: 102107
2010-04-22 18:44:12 +00:00
Devang Patel 0fde4aeedd Rename InsnAfterLabelMap and InsnBeforeLabelMap.
llvm-svn: 102106
2010-04-22 18:43:35 +00:00
Devang Patel 53f530d44c Keep track of MCSymbol used to mark beginning of a function.
llvm-svn: 102104
2010-04-22 18:39:21 +00:00
Jim Grosbach 9628468d94 Add mention of ARM atomic builtin support
llvm-svn: 102103
2010-04-22 18:33:31 +00:00
Devang Patel bae14a1cab At this point Start and End are not null.
llvm-svn: 102102
2010-04-22 18:28:58 +00:00
Jim Grosbach 77f0f5b616 Update ARM frame index scavenging description
llvm-svn: 102101
2010-04-22 18:28:43 +00:00
Chris Lattner 0d34c06cf2 remove dupe
llvm-svn: 102100
2010-04-22 18:26:17 +00:00
Chris Lattner 8b29021712 another tweak for haiku support, patch by Paul Davey!
llvm-svn: 102098
2010-04-22 17:48:00 +00:00
Chris Lattner 77a23804b9 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 ad2804110b two more projects.
llvm-svn: 102095
2010-04-22 17:28:36 +00:00
Douglas Gregor 21515a992f Some Objective-C++ types and expressions will never change during
template instantiation, since they cannot be dependent or have
dependent parts. Handle them the simple way.

llvm-svn: 102094
2010-04-22 17:28:13 +00:00
Chris Lattner cecb923e78 add some notes from Matthieu Moy!
llvm-svn: 102093
2010-04-22 17:25:00 +00:00