Commit Graph

99872 Commits

Author SHA1 Message Date
John McCall 5143d646b9 When mangling a qualified array type, push the qualifiers down to the
element type.  Fixes rdar://problem/8913416.

llvm-svn: 124315
2011-01-26 20:05:40 +00:00
Bob Wilson b9b2422e89 Improve the AsmMatcher's ability to handle suboperands.
When an operand class is defined with MIOperandInfo set to a list of
suboperands, the AsmMatcher has so far required that operand to also define
a custom ParserMatchClass, and InstAlias patterns have not been able to
set the individual suboperands separately.  This patch removes both of those
restrictions.  If a "compound" operand does not override the default
ParserMatchClass, then the AsmMatcher will now parse its suboperands
separately.  If an InstAlias operand has the same class as the corresponding
compound operand, then it will be handled as before; but if that check fails,
TableGen will now try to match up a sequence of InstAlias operands with the
corresponding suboperands.

llvm-svn: 124314
2011-01-26 19:44:55 +00:00
Douglas Gregor e1a47c1766 Rvalue references for *this: explicitly keep track of whether a
reference binding is for the implicit object parameter of a member
function with a ref-qualifier. My previous comment, that we didn't
need to track this explicitly, was wrong: we do in fact get
rvalue-references-prefer-rvalues overloading with ref-qualifiers.

llvm-svn: 124313
2011-01-26 19:41:18 +00:00
Eric Christopher cd55a46c31 Temporarily revert 124275 to see if it brings the dragonegg buildbot back.
llvm-svn: 124312
2011-01-26 19:40:31 +00:00
Douglas Gregor 0282432039 Rvalue references for *this: implement the implicit conversion rules
for the implicit object argument to a non-static member function with
a ref-qualifier (C++0x [over.match.funcs]p4).

llvm-svn: 124311
2011-01-26 19:30:28 +00:00
John McCall 0a6bf2ebe2 Un-nest the meat of this function.
llvm-svn: 124310
2011-01-26 19:21:13 +00:00
John McCall f256eb54a2 Fix some obvious bugs in the conditional-cleanup code and then make the
dtor cleanup use it.

llvm-svn: 124309
2011-01-26 19:15:39 +00:00
Devang Patel 1c7bd7f481 - Do not try to print nameless variable's info.
- Print a summary of breakpoints in the beginning.

llvm-svn: 124308
2011-01-26 19:14:14 +00:00
David Greene bab5e6ed0e [AVX] Add INSERT_SUBVECTOR and support it on x86. This provides a
default implementation for x86, going through the stack in a similr
fashion to how the codegen implements BUILD_VECTOR.  Eventually this
will get matched to VINSERTF128 if AVX is available.

llvm-svn: 124307
2011-01-26 19:13:22 +00:00
Jim Ingham 2c36439cb0 Make sure that if a CallFunction thread plan crashes while running in the "run to address" mode, and it
is an auto-discard thread plan, the plan stack unwinds properly.

llvm-svn: 124306
2011-01-26 19:13:09 +00:00
Jim Ingham 4bf570d618 Typo in looking up the stored address breakpoints, could cause us to look too far for breakpoints.
llvm-svn: 124305
2011-01-26 19:10:34 +00:00
Jim Ingham 9b23df5903 Initialize an uninitialized variable. I don't think this is ever used, but just to be sure...
llvm-svn: 124304
2011-01-26 19:09:39 +00:00
Johnny Chen 4f7370f7ae Add "-A arch_spec" and "-C compiler_spec" options to the test driver. Example:
$ ./dotest.py -A i386 -C clang -v -w -t -p TestObjCMethods.py
$ ./dotest.py -A x86_64 -C gcc -v -w types

llvm-svn: 124303
2011-01-26 19:07:42 +00:00
Devang Patel a11210b1b8 While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal nodes.
llvm-svn: 124302
2011-01-26 18:55:05 +00:00
Devang Patel 9d4eb2f480 Process valid SDDbgValues even if the node does not have any order assigned.
llvm-svn: 124301
2011-01-26 18:42:32 +00:00
Devang Patel 1448e7c8b6 Refactor.
llvm-svn: 124300
2011-01-26 18:20:04 +00:00
Peter Collingbourne 8bfb2f8ab5 Move InheritableAttr::isInherited to Attr
llvm-svn: 124299
2011-01-26 18:07:13 +00:00
Peter Collingbourne 7b0b89609f Remove Attr::isMerged; it is not used any more and redundant with
InheritableAttr

llvm-svn: 124298
2011-01-26 18:07:07 +00:00
Douglas Gregor b2f8aa9556 Rvalue references for *this: allow functions to be overloaded based on
the presence and form of a ref-qualifier. Note that we do *not* yet
implement the restriction in C++0x [over.load]p2 that requires either
all non-static functions with a given parameter-type-list to have a
ref-qualifier or none of them to have a ref-qualifier.

llvm-svn: 124297
2011-01-26 17:47:49 +00:00
Douglas Gregor f3ea1ed1ad Rvalue references for *this: add name mangling for ref-qualifiers,
using rules that I just made up this morning. This encoding has now
been proposed to the Itanium C++ ABI group for inclusion, but of
course it's still possible that the mangling will change.

llvm-svn: 124296
2011-01-26 17:36:28 +00:00
Douglas Gregor 54e462ac6e Rvalue references for *this: tentative parsing and template argument deduction.
llvm-svn: 124295
2011-01-26 16:50:54 +00:00
Douglas Gregor 1d042091d3 Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,
the restrictions on .* and ->* for ref-qualified pointer-to-member
functions.

llvm-svn: 124294
2011-01-26 16:40:18 +00:00
Douglas Gregor 71711a673b Inline namespaces are always available in Clang. Rely on that without
testing via __has_feature, since __has_feature for C++0x features no
longer evaluates true in C++98/03 mode.

Also, eliminate the redundant using directive. Inline namespaces make
their members visible in the enclosing namespace automatically.

llvm-svn: 124293
2011-01-26 15:39:56 +00:00
David Greene b6f1611928 [AVX] Support EXTRACT_SUBVECTOR on x86. This provides a default
implementation of EXTRACT_SUBVECTOR for x86, going through the stack
in a similr fashion to how the codegen implements BUILD_VECTOR.
Eventually this will get matched to VEXTRACTF128 if AVX is available.

llvm-svn: 124292
2011-01-26 15:38:49 +00:00
Douglas Gregor c41d94eb1a Clean up the C++0x __has_feature tests. Specifically:
- Don't publicize a C++0x feature through __has_feature if we aren't
    in C++0x mode (even if the feature is available only with a
    warning). 
  - "auto" is not implemented well enough for its __has_feature to be
    turned on.
  - Fix the test of C++0x __has_feature to actually test what we're
  trying to test. Searching for the substring "foo" when our options
  are "foo" and "no_foo" doesn't work :)

llvm-svn: 124291
2011-01-26 15:36:03 +00:00
Douglas Gregor e696ebbd70 Reinstate r124236 (tweaking the rvalue-reference overload resolution
rules), now that we've actually have a clean build for me to sully.

llvm-svn: 124290
2011-01-26 14:52:12 +00:00
Bruno Cardoso Lopes ce0af9c961 Add encoding testcases for ARM vcvtr variations
llvm-svn: 124289
2011-01-26 13:53:38 +00:00
Bruno Cardoso Lopes 178c1e0c9b fix the encoding and add testcases for ARM nop, yield, wfe and wfi instructions
llvm-svn: 124288
2011-01-26 13:28:14 +00:00
Duncan Sands 69bdb585b2 Fix PR9039, a use-after-free in reassociate. The issue was that the
operand being factorized (and erased) could occur several times in Ops,
resulting in freed memory being used when the next occurrence in Ops was
analyzed.

llvm-svn: 124287
2011-01-26 10:08:38 +00:00
Nick Lewycky 91543447a6 AttrListPtr has an overloaded operator== which does this for us, we should use
it. No functionality change!

llvm-svn: 124286
2011-01-26 09:23:19 +00:00
Nick Lewycky 82d4db8662 Teach mergefunc that intptr_t is the same width as a pointer. We still can't
merge vector<intptr_t>::push_back() and vector<void*>::push_back() because
Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent.

llvm-svn: 124285
2011-01-26 09:13:58 +00:00
Nick Lewycky fb622f9920 There are no vectors of pointer or arrays, so we don't need to check vector
elements for type equivalence.

llvm-svn: 124284
2011-01-26 08:50:18 +00:00
Duncan Sands 8a33733228 APInt has a method for determining whether a number is a power of 2
which is more efficient than countPopulation - use it.

llvm-svn: 124283
2011-01-26 08:44:16 +00:00
Nick Lewycky d9e6b4a8ff Fix memory corruption. If one of the SCEV creation functions calls another but
doesn't return immediately after then the insert position in UniqueSCEVs will
be out of date. No test because this is a memory corruption issue. Fixes PR9051!

llvm-svn: 124282
2011-01-26 08:40:22 +00:00
Douglas Gregor db9d664244 Rvalue references for *this:
- Add ref-qualifiers to the type system; they are part of the
  canonical type. Print & profile ref-qualifiers
  - Translate the ref-qualifier from the Declarator chunk for
    functions to the function type. 
  - Diagnose mis-uses of ref-qualifiers w.r.t. static member
  functions, free functions, constructors, destructors, etc.
  - Add serialization and deserialization of ref-qualifiers.

llvm-svn: 124281
2011-01-26 05:01:58 +00:00
Ted Kremenek 5d068499a7 Teach -Wreturn-type that destructors can appear
after a 'return' in a CFGBlock.  This accidentally
was working before, but the false assumption that
'return' always appeared at the end of the block
was uncovered by a recent change.

llvm-svn: 124280
2011-01-26 04:49:52 +00:00
Ted Kremenek e543be3531 Merge -Wuninitialized-experimental into -Wuninitialized.
llvm-svn: 124279
2011-01-26 04:49:48 +00:00
Ted Kremenek 33ddd9692d Tweak -Wuninitialized-experimental to not emit
a warning for uses of an uninitialized variable
when the use is a void cast, e.g. (void) x.

llvm-svn: 124278
2011-01-26 04:49:43 +00:00
John McCall ce1de6172c Better framework for conditional cleanups; untested as yet.
I'm separately committing this because it incidentally changes some
block orderings and minor IR issues, like using a phi instead of
an unnecessary alloca.

llvm-svn: 124277
2011-01-26 04:00:11 +00:00
Douglas Gregor 5499235d13 Rvalue references for *this: parse ref-qualifiers.
llvm-svn: 124276
2011-01-26 03:43:54 +00:00
Eric Christopher 078159e310 Separate out the constant bonus from the size reduction metrics. Rework
a few loops accordingly. Should be no functional change.

This is a step for more accurate cost/benefit analysis of devirt/inlining
bonuses.

llvm-svn: 124275
2011-01-26 02:58:39 +00:00
Ken Dyck 02155cb8e8 Use RecordLayout::getBaseClassOffset() where CharUnits are needed instead of
converting getBaseClassOffsetInBits() to CharUnits.

llvm-svn: 124274
2011-01-26 02:17:08 +00:00
Bill Wendling d13d13496f Add needed braces.
llvm-svn: 124273
2011-01-26 02:06:22 +00:00
NAKAMURA Takumi 0cfdac078e Target/X86: Tweak win64's tailcall.
llvm-svn: 124272
2011-01-26 02:04:09 +00:00
NAKAMURA Takumi 31aafbd501 TableGen: PointerLikeRegClass can be accepted to operand.
llvm-svn: 124271
2011-01-26 02:03:48 +00:00
NAKAMURA Takumi 9d29eff198 Fix whitespace.
llvm-svn: 124270
2011-01-26 02:03:37 +00:00
NAKAMURA Takumi c780782560 lib/Target/X86/X86RegisterInfo.cpp: Fix whitespace.
llvm-svn: 124268
2011-01-26 01:28:06 +00:00
NAKAMURA Takumi 86278dc3ea lib/Target/X86/X86RegisterInfo.cpp: Fix a typo in comment.
llvm-svn: 124267
2011-01-26 01:27:58 +00:00
Argyrios Kyrtzidis c7ffd35cb7 [analyzer] Enable the self-init checker under command-line option '-analyzer-check-objc-self-init' which by default
is enabled by the driver for '--analyze'.

llvm-svn: 124266
2011-01-26 01:26:50 +00:00
Argyrios Kyrtzidis 7e71884ecb Correct r124242 making sure function chunk that gets diagnosed is really about the block.
Clairvoyance by John!

llvm-svn: 124264
2011-01-26 01:26:44 +00:00