Commit Graph

121959 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 926227811b Update MultiplexASTMutationListener with the missing methods from ASTMutationListener.
llvm-svn: 150265
2012-02-10 20:10:36 +00:00
Argyrios Kyrtzidis 1b6e5dc6a5 [libclang] Encode the template specialization parameters of a function
specialization in its USR string.

llvm-svn: 150264
2012-02-10 20:10:32 +00:00
Jakob Stoklund Olesen 91a3da0f73 Clean up comment.
llvm-svn: 150262
2012-02-10 19:27:34 +00:00
Jakob Stoklund Olesen 024d7ae110 Add a static MachineOperand::clobbersPhysReg().
It can be necessary to detach a register mask pointer from its
MachineOperand. This method is convenient for checking clobbered
physregs on a detached bitmask pointer.

llvm-svn: 150261
2012-02-10 19:23:53 +00:00
Ted Kremenek dde2adec89 Enhance checking for null format string literal to take into account __null. Fixes <rdar://problem/8269537>.
llvm-svn: 150260
2012-02-10 19:13:51 +00:00
Jakob Stoklund Olesen a16ae59722 Add register mask support to InterferenceCache.
This makes global live range splitting behave identically with and
without register mask operands.

This is not necessarily the best way of using register masks for live
range splitting.  It would be more efficient to first split global live
ranges around calls (i.e., register masks), and reserve the fine grained
per-physreg interference guidance for global live ranges that do not
cross calls.

For now the goal is to produce identical assembly when enabling register
masks.

llvm-svn: 150259
2012-02-10 18:58:34 +00:00
Jakob Stoklund Olesen b7c1715df1 Remove unused variable.
llvm-svn: 150258
2012-02-10 18:52:15 +00:00
Pete Cooper 13e082d8ba Added description of invariant.load metadata to LangRef. It was added to the compiler in r144100
llvm-svn: 150257
2012-02-10 18:13:54 +00:00
Douglas Gregor a1bffa26ca Allow implicit capture of 'this' in a lambda even when the capture
default is '=', and reword the warning about explicitly capturing
'this' in such lambdas to indicate that only explicit capture is
banned. 

Introduce Fix-Its for this and other "save the programmer from
themself" rules regarding what can be explicitly captured and what
must be implicitly captured.

llvm-svn: 150256
2012-02-10 17:46:20 +00:00
Douglas Gregor 01db64f0ac Add test from [expr.prim.lambda]p12, which deals with odr-use and
nested captures. We currently don't get odr-use correct in array
bounds, so that bit is commented out while we sort out what we need to
do.

llvm-svn: 150255
2012-02-10 16:48:36 +00:00
Bob Wilson e67004e2f1 Back out some changes that accidentally committed.
llvm-svn: 150254
2012-02-10 16:41:46 +00:00
Bob Wilson ddd971564e Revert r150232 since it breaks the build when there's no ARM assembler.
llvm-svn: 150253
2012-02-10 16:36:49 +00:00
Douglas Gregor 04bbab586b Don't introduce a lambda's operator() into the class until after we
have finished parsing the body, so that name lookup will never find
anything within the closure type. Then, add this operator() and the
conversion function (if available) before completing the class.

llvm-svn: 150252
2012-02-10 16:13:20 +00:00
Jason W Kim c7f4841769 Make valgrind happy.
llvm-svn: 150251
2012-02-10 16:07:59 +00:00
Hal Finkel 1bde3f86d1 Update BBVectorize to use aliasesUnknownInst.
This allows BBVectorize to check the "unknown instruction" list in the
alias sets. This is important to prevent instruction fusing from reordering
function calls. Resolves PR11920.

llvm-svn: 150250
2012-02-10 15:52:40 +00:00
Hal Finkel 56f6b0f219 Have AliasSet::aliasesUnknownInst use pointer TBAA info when available
llvm-svn: 150249
2012-02-10 15:52:39 +00:00
Hal Finkel 9d87207f57 Make aliasesPointer and aliasesUnknownInst public members of AliasSet.
These query functions are safe for external use and, furthermore,
are the only way to make queries against the "unknown instructions" array.
BBVectorize will use these functions.

llvm-svn: 150248
2012-02-10 15:52:37 +00:00
Duncan Sands 26641d7c02 Fix PR11948: the result type of an icmp may be a vector of boolean -
don't assume it is a boolean.

llvm-svn: 150247
2012-02-10 14:31:24 +00:00
Duncan Sands bf48ac622a Revert commit 149912 (lattner) and add a testcase that shows the problem (which
is that patterns no longer match for vectors of booleans, because you only get
ConstantDataVector when the vector element type is i8, i16, etc, not when it is
i1).  Original commit message:
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector.

llvm-svn: 150246
2012-02-10 14:26:42 +00:00
Benjamin Kramer bf152d57a4 Put instruction names into an indexed string table on the side, removing a pointer from MCInstrDesc.
Make them accessible through MCInstrInfo. They are only used for debugging purposes so this doesn't
have an impact on performance. X86MCTargetDesc.o goes from 630K to 461K on x86_64.

llvm-svn: 150245
2012-02-10 13:18:44 +00:00
Richard Smith 63168c7533 PR11684, core issue 1417:
o Correct the handling of the restrictions on usage of cv-qualified and
  ref-qualified function types.
o Fix a bug where such types were rejected in template type parameter default
  arguments, due to such arguments not being treated as a template type arg
  context.
o Remove the ExtWarn for usage of such types as template arguments; that was
  a standard defect, not a GCC extension.
o Improve the wording and unify the code for diagnosing cv-qualifiers with the
  code for diagnosing ref-qualifiers.

llvm-svn: 150244
2012-02-10 11:05:11 +00:00
Richard Smith d98937b011 Test cleanup: prefer static_assert to handmade alternative.
llvm-svn: 150243
2012-02-10 10:55:13 +00:00
Evgeniy Stepanov 0247b99171 Loosen the test from r150238 a bit to make some of our bots happy.
llvm-svn: 150242
2012-02-10 10:04:01 +00:00
Richard Smith 5e580292ac Track whether a function type has a trailing return type as type sugar. Use this
to pretty-print such function types better, and to fix a case where we were not
instantiating templates in lexical order. In passing, move the Variadic bit from
Type's bitfields to FunctionProtoType to get the Type bitfields down to 32 bits.
Also ensure that we always substitute the return type of a function when
substituting explicitly-specified arguments, since that can cause us to bail
out with a SFINAE error before we hit a hard error in parameter substitution.

llvm-svn: 150241
2012-02-10 09:58:53 +00:00
Richard Smith 25a01eca11 --lies.
llvm-svn: 150240
2012-02-10 09:37:07 +00:00
Douglas Gregor 136b2f24f0 Add a lambda example from the working draft.
llvm-svn: 150239
2012-02-10 09:37:05 +00:00
Evgeniy Stepanov 3fae4aeae4 Fix function prolog codegen whe coerce-to type is a struct.
This changes function prolog in such a way as to avoid out-of-bounds
stack store in the case when coerce-to type has a larger storage size
than the real argument type.

Fixes PR11905.

llvm-svn: 150238
2012-02-10 09:30:15 +00:00
Douglas Gregor f02455e5ee Add various tests for captures and the reaching scope of the lambda
expression. Implement C++11 [expr.prim.lambda]p12's requirement that
capturing a variable will odr-use it.

llvm-svn: 150237
2012-02-10 09:26:04 +00:00
Douglas Gregor 12695101ec Implement the conversion to a function pointer for lambda expressions,
per C++ [expr.prim.lambda]p6.

llvm-svn: 150236
2012-02-10 08:36:38 +00:00
Douglas Gregor 9c702207e5 Extend CXXRecordDecl with a function that determines the mapping from
the variables captured by a lambda to the fields that store the
captured values. To be used in IRgen.

llvm-svn: 150235
2012-02-10 07:45:31 +00:00
Richard Smith 0cd4ab194b Update to new resolution for DR1458. When taking the address of an object of
incomplete class type which has an overloaded operator&, it's now just
unspecified whether the overloaded operator or the builtin is used.

llvm-svn: 150234
2012-02-10 07:41:06 +00:00
Andrew Trick 09fc1bb605 comment grammar
llvm-svn: 150233
2012-02-10 07:08:25 +00:00
Daniel Dunbar d205200d41 make/clang_darwin: Tweak CheckArches function to force the integrated-as and use
the stub SDK to try and ensure we always pick up the right archs when they
should be able to be used.
 - Also, warn when we drop an architecture.

llvm-svn: 150232
2012-02-10 06:00:35 +00:00
Daniel Dunbar dc51baade4 Remove stray semi-colon.
llvm-svn: 150231
2012-02-10 06:00:29 +00:00
David Blaikie 54f5d859ad Move -Wswitch from -Wmost to -Wall, consitent with GCC.
This is a relatively noisy warning for a codebase not explicitly designed for
it (effectively enforcing a stylistic constraint about the use of defaults
in switches over enums) & there's nothing Clang does to clean up the noise
when compared to GCC's implementation so the same decision seems suitable.

llvm-svn: 150230
2012-02-10 05:15:16 +00:00
Jia Liu 5b6562f58c update --enable-targets list
llvm-svn: 150229
2012-02-10 04:58:24 +00:00
Andrew Trick f08915ca8e unnecessary include
llvm-svn: 150228
2012-02-10 04:10:44 +00:00
Andrew Trick f4ff234384 PTX no longer needs to provide its own backend.
llvm-svn: 150227
2012-02-10 04:10:40 +00:00
Andrew Trick d3f8fe81f4 RegAlloc superpass: includes phi elimination, coalescing, and scheduling.
Creates a configurable regalloc pipeline.

Ensure specific llc options do what they say and nothing more: -reglloc=... has no effect other than selecting the allocator pass itself. This patch introduces a new umbrella flag, "-optimize-regalloc", to enable/disable the optimizing regalloc "superpass". This allows for example testing coalscing and scheduling under -O0 or vice-versa.

When a CodeGen pass requires the MachineFunction to have a particular property, we need to explicitly define that property so it can be directly queried rather than naming a specific Pass. For example, to check for SSA, use MRI->isSSA, not addRequired<PHIElimination>.

CodeGen transformation passes are never "required" as an analysis

ProcessImplicitDefs does not require LiveVariables.

We have a plan to massively simplify some of the early passes within the regalloc superpass.

llvm-svn: 150226
2012-02-10 04:10:36 +00:00
Andrew Trick 9363b597e3 whitespace
llvm-svn: 150225
2012-02-10 04:10:26 +00:00
Lang Hames 351fc56ab0 Remove unused 'isAlias' parameter.
llvm-svn: 150224
2012-02-10 03:19:36 +00:00
Ted Kremenek 6eb25628c5 Revert r145999. This turned out to be a bad idea. Unfortunately, 'id' is used so profusely
in many APIs and large codebases that this made the deprecated warning trigger happy to
the point of not being useful.

llvm-svn: 150223
2012-02-10 02:45:47 +00:00
Jim Grosbach ffc02c5ffc ARM on darwin, v6 implies the presence of VFP for the assembler.
rdar://10838899

llvm-svn: 150222
2012-02-10 02:21:49 +00:00
Eli Friedman edb6f5dca1 Make sure we convert struct layout pragmas to attributes for class templates the same way we do for non-template classes. <rdar://problem/10791194>.
llvm-svn: 150221
2012-02-10 02:02:21 +00:00
Jakob Stoklund Olesen 9ef50bd66c Constrain the regmask search space for local live ranges.
When checking a local live range for interference, restrict the binary
search to the single block.

llvm-svn: 150220
2012-02-10 01:31:31 +00:00
Jakob Stoklund Olesen 25c4195ecc Cache basic block boundaries for faster RegMaskSlots access.
Provide API to get a list of register mask slots and bits in a basic
block.

llvm-svn: 150219
2012-02-10 01:26:29 +00:00
Jakob Stoklund Olesen aa06de2447 Optimize LiveIntervals::intervalIsInOneMBB().
No looping and binary searches necessary.

Return a pointer to the containing block instead of just a bool.

llvm-svn: 150218
2012-02-10 01:23:55 +00:00
Sean Callanan 933693b621 Fixed a bunch of ownership problems with the expression
parser.  Specifically:

- ClangUserExpression now keeps weak pointers to the
  structures it needs and then locks them when needed.
  This ensures that they continue to be valid without
  leaking memory if the ClangUserExpression is long
  lived.

- ClangExpressionDeclMap, instead of keeping a pointer
  to an ExecutionContext, now contains an
  ExecutionContext.  This prevents bugs if the pointer
  or its contents somehow become stale.  It also no
  longer requires that ExecutionContexts be passed
  into any function except its initialization function,
  since it can count on the ExecutionContext still
  being around.

There's a lot of room for improvement (specifically,
ClangExpressionDeclMap should also use weak pointers
insetad of shared pointers) but this is an important
first step that codifies assumptions that already
existed in the code.

llvm-svn: 150217
2012-02-10 01:22:05 +00:00
Anna Zaks e963fd51a8 [analyzer] MallocChecker: add a list of false positives based on running
the checker over postgres and sqlite.

llvm-svn: 150216
2012-02-10 01:11:03 +00:00
Anna Zaks 3188686c55 [analyzer] MallocChecker Cleanup - harden against crashes, fix an error
(use of return instead of continue), wording.

llvm-svn: 150215
2012-02-10 01:11:00 +00:00