platform/upstream/llvm.git
11 years agoAlso remove PlatformiOSSimulator::GetProcessInfo decl from
Jason Molenda [Sat, 20 Oct 2012 04:57:29 +0000 (04:57 +0000)]
Also remove PlatformiOSSimulator::GetProcessInfo decl from
the header file.
(followup patch to Sean's commit of r166355 earlier today.)

llvm-svn: 166365

11 years agoVectorization docs.
Nadav Rotem [Sat, 20 Oct 2012 02:34:34 +0000 (02:34 +0000)]
Vectorization docs.

llvm-svn: 166364

11 years ago[analyzer] Assume 'new' never returns NULL if it could throw an exception.
Jordan Rose [Sat, 20 Oct 2012 02:32:51 +0000 (02:32 +0000)]
[analyzer] Assume 'new' never returns NULL if it could throw an exception.

This is actually required by the C++ standard in
[basic.stc.dynamic.allocation]p3:

  If an allocation function declared with a non-throwing
  exception-specification fails to allocate storage, it shall return a
  null pointer. Any other allocation function that fails to allocate
  storage shall indicate failure only by throwing an exception of a type
  that would match a handler of type std::bad_alloc.

We don't bother checking for the specific exception type, but just go off
the operator new prototype. This should help with a certain class of lazy
initalization false positives.

<rdar://problem/12115221>

llvm-svn: 166363

11 years agoXTARGET was removed, update debug-info tests.
Argyrios Kyrtzidis [Sat, 20 Oct 2012 01:38:50 +0000 (01:38 +0000)]
XTARGET was removed, update debug-info tests.

llvm-svn: 166362

11 years agoDR1472: A reference isn't odr-used if it has preceding initialization,
Richard Smith [Sat, 20 Oct 2012 01:38:33 +0000 (01:38 +0000)]
DR1472: A reference isn't odr-used if it has preceding initialization,
initialized by a reference constant expression.

Our odr-use modeling still needs work here: we don't yet implement the 'set of
potential results of an expression' DR.

llvm-svn: 166361

11 years ago[ms-inline asm] Rename AsmOpRewrite to just AsmRewrite to be more generic. No functio...
Chad Rosier [Sat, 20 Oct 2012 01:02:45 +0000 (01:02 +0000)]
[ms-inline asm] Rename AsmOpRewrite to just AsmRewrite to be more generic. No functional change intended.

llvm-svn: 166360

11 years agoWhen associating file ranges of macro arguments with their
Argyrios Kyrtzidis [Sat, 20 Oct 2012 00:51:32 +0000 (00:51 +0000)]
When associating file ranges of macro arguments with their
macro expansion ranges, make sure to check all the FileID
entries that are contained in the spelling range of the
expansion for the macro argument.

Fixes rdar://12537982

llvm-svn: 166359

11 years ago[ms-inline asm] Update test case for r166357.
Chad Rosier [Sat, 20 Oct 2012 00:47:32 +0000 (00:47 +0000)]
[ms-inline asm] Update test case for r166357.

llvm-svn: 166358

11 years ago[ms-inline asm] If the state of the parser is ignore, then don't parse the
Chad Rosier [Sat, 20 Oct 2012 00:47:08 +0000 (00:47 +0000)]
[ms-inline asm] If the state of the parser is ignore, then don't parse the
inline assembly.  Also make sure the remove the ignored statements from the IR.

llvm-svn: 166357

11 years agoImproved logging for the SBTarget's launching
Sean Callanan [Sat, 20 Oct 2012 00:21:31 +0000 (00:21 +0000)]
Improved logging for the SBTarget's launching
and attaching APIs.

llvm-svn: 166356

11 years agoFixed the iOS simulator platform:
Sean Callanan [Sat, 20 Oct 2012 00:19:59 +0000 (00:19 +0000)]
Fixed the iOS simulator platform:

- Fixed a crash when the executable module
  couldn't be found.
- Fixed a problem that made it impossible
  to attach to processes in the simulator
  using the SBTarget::Attach.

llvm-svn: 166355

11 years agoLoopVectorize: Keep the IRBuilder on the stack.
Nadav Rotem [Fri, 19 Oct 2012 23:27:19 +0000 (23:27 +0000)]
LoopVectorize: Keep the IRBuilder on the stack.

llvm-svn: 166354

11 years ago[ms-inline asm] Test case for r166349 and r166352.
Chad Rosier [Fri, 19 Oct 2012 23:16:17 +0000 (23:16 +0000)]
[ms-inline asm] Test case for r166349 and r166352.

llvm-svn: 166353

11 years ago[ms-inline asm] Continue parsing even when we're in an ignore block.
Chad Rosier [Fri, 19 Oct 2012 23:15:00 +0000 (23:15 +0000)]
[ms-inline asm] Continue parsing even when we're in an ignore block.

llvm-svn: 166352

11 years agoVectorizer: Add support for loop reductions.
Nadav Rotem [Fri, 19 Oct 2012 23:05:40 +0000 (23:05 +0000)]
Vectorizer: Add support for loop reductions.

For example:

  for (i=0; i<n; i++)
   sum += A[i] +  B[i] + i;

llvm-svn: 166351

11 years ago1. Remove noreturn attribute from __builtin_debugtrap().
Shuxin Yang [Fri, 19 Oct 2012 23:00:20 +0000 (23:00 +0000)]
1. Remove noreturn attribute from __builtin_debugtrap().
  (The change at Clang side was committed in r166345)

2. Cosmetic change in order to conform to coding standards.

llvm-svn: 166350

11 years ago[ms-inline asm] Reset the opcode prior to parsing a statement.
Chad Rosier [Fri, 19 Oct 2012 22:57:33 +0000 (22:57 +0000)]
[ms-inline asm] Reset the opcode prior to parsing a statement.

llvm-svn: 166349

11 years ago[Options] Make Option non clang specific.
Michael J. Spencer [Fri, 19 Oct 2012 22:37:06 +0000 (22:37 +0000)]
[Options] Make Option non clang specific.

llvm-svn: 166348

11 years ago[Options] make Option a value type.
Michael J. Spencer [Fri, 19 Oct 2012 22:36:40 +0000 (22:36 +0000)]
[Options] make Option a value type.

llvm-svn: 166347

11 years ago<rdar://problem/12491387>
Greg Clayton [Fri, 19 Oct 2012 22:22:57 +0000 (22:22 +0000)]
<rdar://problem/12491387>

Added commands to the KDP plug-in that allow sending raw commands through the KDP protocol. You specify a command byte and a payload as ASCII hex bytes, and the packet is created with a valid header/sequenceID/length and sent. The command responds with a raw ASCII hex string that contains all bytes in the reply including the header.

An example of sending a read register packet for the GPR on x86_64:

(lldb) process plugin packet send --command 0x07 --payload 0100000004000000

llvm-svn: 166346

11 years agoremove noreturn attribute from __builtin_debugtrap
Shuxin Yang [Fri, 19 Oct 2012 22:21:42 +0000 (22:21 +0000)]
remove noreturn attribute from __builtin_debugtrap

llvm-svn: 166345

11 years ago[mips] Use 64-bit registers to return an sret pointer if target ABI is N64.
Akira Hatanaka [Fri, 19 Oct 2012 22:11:40 +0000 (22:11 +0000)]
[mips] Use 64-bit registers to return an sret pointer if target ABI is N64.

llvm-svn: 166344

11 years agoGrammar-o.
Eric Christopher [Fri, 19 Oct 2012 22:10:54 +0000 (22:10 +0000)]
Grammar-o.

llvm-svn: 166343

11 years ago[mips] Add code to do tail call optimization.
Akira Hatanaka [Fri, 19 Oct 2012 21:47:33 +0000 (21:47 +0000)]
[mips] Add code to do tail call optimization.

Currently, it is enabled only if option "enable-mips-tail-calls" is given and
all of the callee's arguments are passed in registers.

llvm-svn: 166342

11 years ago[mips] Fix TAILCALL's operand node type.
Akira Hatanaka [Fri, 19 Oct 2012 21:30:15 +0000 (21:30 +0000)]
[mips] Fix TAILCALL's operand node type.

llvm-svn: 166341

11 years agorevert r166264 because the LTO build is still failing
Nadav Rotem [Fri, 19 Oct 2012 21:28:43 +0000 (21:28 +0000)]
revert r166264 because the LTO build is still failing

llvm-svn: 166340

11 years ago[mips] Delete MipsFunctionInfo::MaxCallFrameSize which is no longer used.
Akira Hatanaka [Fri, 19 Oct 2012 21:18:38 +0000 (21:18 +0000)]
[mips] Delete MipsFunctionInfo::MaxCallFrameSize which is no longer used.

llvm-svn: 166339

11 years ago[mips] Add tail call instructions.
Akira Hatanaka [Fri, 19 Oct 2012 21:14:34 +0000 (21:14 +0000)]
[mips] Add tail call instructions.

llvm-svn: 166338

11 years ago[mips] Make the branch nodes used in jump instructions a template parameter.
Akira Hatanaka [Fri, 19 Oct 2012 21:11:03 +0000 (21:11 +0000)]
[mips] Make the branch nodes used in jump instructions a template parameter.

llvm-svn: 166337

11 years agoAdd node and enum for mips tail call.
Akira Hatanaka [Fri, 19 Oct 2012 20:59:39 +0000 (20:59 +0000)]
Add node and enum for mips tail call.

llvm-svn: 166318

11 years ago[ms-inline asm] Update testcase for r166316.
Chad Rosier [Fri, 19 Oct 2012 20:57:37 +0000 (20:57 +0000)]
[ms-inline asm] Update testcase for r166316.

llvm-svn: 166317

11 years ago[ms-inline asm] Have the TargetParser callback to Sema to determine the size of
Chad Rosier [Fri, 19 Oct 2012 20:57:14 +0000 (20:57 +0000)]
[ms-inline asm] Have the TargetParser callback to Sema to determine the size of
a memory operand.  Retain this information and then add the sizing directives
to the IR.  This allows the backend to do proper instruction selection.

llvm-svn: 166316

11 years agoChange the name of the variable used to detect if we are loading kexts to "load-kexts...
Greg Clayton [Fri, 19 Oct 2012 20:53:18 +0000 (20:53 +0000)]
Change the name of the variable used to detect if we are loading kexts to "load-kexts" instead of "disable-kext-loading" since the value is a boolean. This was requested by the person who requested the feature. It now defaults to true:

(lldb) settings show plugin.dynamic-loader.darwin-kernel.load-kexts
plugin.dynamic-loader.darwin-kernel.load-kexts (boolean) = true

llvm-svn: 166315

11 years agoAdd 'IntrNoReturn' for longjmp intrinsics
Michael Liao [Fri, 19 Oct 2012 20:43:54 +0000 (20:43 +0000)]
Add 'IntrNoReturn' for longjmp intrinsics

llvm-svn: 166314

11 years agoSimplifyLibcalls: The return value of ffsll is always i32, even when the input is...
Benjamin Kramer [Fri, 19 Oct 2012 20:43:44 +0000 (20:43 +0000)]
SimplifyLibcalls: The return value of ffsll is always i32, even when the input is zero.

Fixes PR13028.

llvm-svn: 166313

11 years ago[ms-inline asm] Revert accidental commit. Sorry for the churn.
Chad Rosier [Fri, 19 Oct 2012 20:38:09 +0000 (20:38 +0000)]
[ms-inline asm] Revert accidental commit. Sorry for the churn.

llvm-svn: 166312

11 years agoPretty-print a ParenListExpr in a variable initializer correctly. Patch by Grzegorz...
Eli Friedman [Fri, 19 Oct 2012 20:36:44 +0000 (20:36 +0000)]
Pretty-print a ParenListExpr in a variable initializer correctly.  Patch by Grzegorz Jablonski.

llvm-svn: 166311

11 years ago[ms-inline asm] Set the SemaCallback in the TargetAsmParser.
Chad Rosier [Fri, 19 Oct 2012 20:36:37 +0000 (20:36 +0000)]
[ms-inline asm] Set the SemaCallback in the TargetAsmParser.

llvm-svn: 166310

11 years agoFix a build error for ocaml bindings that was introduced with the TargetData -->...
Micah Villmow [Fri, 19 Oct 2012 20:36:22 +0000 (20:36 +0000)]
Fix a build error for ocaml bindings that was introduced with the TargetData --> DataLayout changes.

llvm-svn: 166309

11 years ago[ms-inline asm] Add a MCAsmParserSemaCallback to the TargetAsmParser.
Chad Rosier [Fri, 19 Oct 2012 20:35:42 +0000 (20:35 +0000)]
[ms-inline asm] Add a MCAsmParserSemaCallback to the TargetAsmParser.

llvm-svn: 166308

11 years agolit: Rename the valgrind leaks feature to match what is currently used
Daniel Dunbar [Fri, 19 Oct 2012 20:29:30 +0000 (20:29 +0000)]
lit: Rename the valgrind leaks feature to match what is currently used
(vg_leak).

llvm-svn: 166306

11 years agolit: Remove support for XTARGET.
Daniel Dunbar [Fri, 19 Oct 2012 20:29:27 +0000 (20:29 +0000)]
lit: Remove support for XTARGET.

 - The XTARGET feature (inherited from old DG tests) was just confusing (and
   barely ever used). The same effect can now be achieved with a combination of
   the more useful REQUIRES and XFAIL.

llvm-svn: 166305

11 years agotests: Fix two tests to just use -triple instead of XFAIL+XTARGET.
Daniel Dunbar [Fri, 19 Oct 2012 20:28:44 +0000 (20:28 +0000)]
tests: Fix two tests to just use -triple instead of XFAIL+XTARGET.

llvm-svn: 166304

11 years agolit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
Daniel Dunbar [Fri, 19 Oct 2012 20:12:00 +0000 (20:12 +0000)]
lit: Add 'valgrind' and 'valgrind-leaks' features when valgrind is used.
 - These can be used with the XFAIL options.

llvm-svn: 166303

11 years agotests: Stop mangling '-vg' into the triple, we don't use this currently.
Daniel Dunbar [Fri, 19 Oct 2012 20:11:56 +0000 (20:11 +0000)]
tests: Stop mangling '-vg' into the triple, we don't use this currently.
 - Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166302

11 years agotests: Stop mangling '-vg' into the triple, we don't use this currently.
Daniel Dunbar [Fri, 19 Oct 2012 20:11:46 +0000 (20:11 +0000)]
tests: Stop mangling '-vg' into the triple, we don't use this currently.
 - Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166301

11 years agoThis patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap()
Shuxin Yang [Fri, 19 Oct 2012 20:11:16 +0000 (20:11 +0000)]
This patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap()
which is supposed to consistently raise SIGTRAP across all systems. In contrast,
__builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and
SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap"
functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap().

  The X86 backend is already able to handle debugtrap(). This patch is to:
  1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang).
  2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which
     make the __builtin_debugtrap() "available" to all existing ports without the hassle of
     changing their code.
  3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and
     __builtin_trap() will be expanded into the function call of the specified trap function.
    This behavior may need change in the future.

  The provided testing-case is to make sure 2) and 3) are working for ARM port, and we
already have a testing case for x86.

llvm-svn: 166300

11 years agoIRgen: Initialize TargetLoweringInfo with a triple.
Daniel Dunbar [Fri, 19 Oct 2012 20:10:10 +0000 (20:10 +0000)]
IRgen: Initialize TargetLoweringInfo with a triple.

 - We create two TargetLoweringInfo instances for different pass managers, and
   they weren't consistent (the one for codegen didn't have the right info). I'm
   not sure this mattered anywhere in practice.

llvm-svn: 166299

11 years agoadd __builtin_debugtrap
Shuxin Yang [Fri, 19 Oct 2012 20:09:33 +0000 (20:09 +0000)]
add __builtin_debugtrap

llvm-svn: 166298

11 years agoRemove -w write flag to watch set var from tutorial.html.
Jason Molenda [Fri, 19 Oct 2012 19:52:12 +0000 (19:52 +0000)]
Remove -w write flag to watch set var from tutorial.html.

Fix one gdb example that had an "(lldb)" prompt in the lldb/gdb page.

llvm-svn: 166297

11 years agoClarify wording of -Wshift-op-parentheses.
David Blaikie [Fri, 19 Oct 2012 18:26:06 +0000 (18:26 +0000)]
Clarify wording of -Wshift-op-parentheses.

Suggestion from Matt Beaumont-Gay reviewing r165283.

llvm-svn: 166296

11 years agoRename "macosx-kernel" to "darwin-kernel" to match the filenames before anyone starts...
Greg Clayton [Fri, 19 Oct 2012 18:14:47 +0000 (18:14 +0000)]
Rename "macosx-kernel" to "darwin-kernel" to match the filenames before anyone starts using the settings for this plug-in.

llvm-svn: 166295

11 years agoAdded the infrastructure necessary for plug-ins to be able to add their own settings...
Greg Clayton [Fri, 19 Oct 2012 18:02:49 +0000 (18:02 +0000)]
Added the infrastructure necessary for plug-ins to be able to add their own settings instead of having settings added to existing ones. In particular "target.disable-kext-loading" was added to "target" where it should actually be specific to the the dynamic loader plugin. Now the plug-in manager has the ability to create settings at the root level starting with "plugin". Each plug-in type can add new sub dictionaries, and then each plug-in can register a setting dictionary under its own short name. For example the DynamicLoaderDarwinKernel plug-in now registers a setting dictionary at:

plugin
    dynamic-loader
        macosx-kernel
            (bool) disable-kext-loading

To settings can be set using:

(lldb) settings set plugin.dynamic-loader.macosx-kernel.disable-kext-loading true

I currently only hooked up the DynamicLoader plug-ins, but the code is very easy to duplicate when and if we need settings for other plug-ins.

llvm-svn: 166294

11 years ago[ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.
Chad Rosier [Fri, 19 Oct 2012 17:58:45 +0000 (17:58 +0000)]
[ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.

llvm-svn: 166293

11 years ago[ms-inline asm] Add the isParsingInlineAsm() function to the MCAsmTargetParser.
Chad Rosier [Fri, 19 Oct 2012 17:57:49 +0000 (17:57 +0000)]
[ms-inline asm] Add the isParsingInlineAsm() function to the MCAsmTargetParser.

llvm-svn: 166292

11 years agoIndvars: Don't recursively delete instruction during BB iteration.
Benjamin Kramer [Fri, 19 Oct 2012 17:53:54 +0000 (17:53 +0000)]
Indvars: Don't recursively delete instruction during BB iteration.

This can invalidate the iterators leading to use after frees and crashes.
Fixes PR12536.

llvm-svn: 166291

11 years agoFix some doc-os.
Daniel Dunbar [Fri, 19 Oct 2012 17:23:39 +0000 (17:23 +0000)]
Fix some doc-os.

llvm-svn: 166290

11 years agolit: Propagate TERM variable in environment, some tools can do really obscure
Daniel Dunbar [Fri, 19 Oct 2012 17:23:34 +0000 (17:23 +0000)]
lit: Propagate TERM variable in environment, some tools can do really obscure
odd things if this is missing.

llvm-svn: 166289

11 years agoLower BUILD_VECTOR to SHUFFLE + INSERT_VECTOR_ELT for X86
Michael Liao [Fri, 19 Oct 2012 17:15:18 +0000 (17:15 +0000)]
Lower BUILD_VECTOR to SHUFFLE + INSERT_VECTOR_ELT for X86

- If INSERT_VECTOR_ELT is supported (above SSE2, either by custom
  sequence of legal insn), transform BUILD_VECTOR into SHUFFLE +
  INSERT_VECTOR_ELT if most of elements could be built from SHUFFLE with few
  (so far 1) elements being inserted.

llvm-svn: 166288

11 years agoRemove const_casts by propagating constness down to called functions.
Dmitri Gribenko [Fri, 19 Oct 2012 16:51:38 +0000 (16:51 +0000)]
Remove const_casts by propagating constness down to called functions.

llvm-svn: 166287

11 years agoSCEVExpander: Don't crash when trying to merge two constant phis.
Benjamin Kramer [Fri, 19 Oct 2012 16:37:30 +0000 (16:37 +0000)]
SCEVExpander: Don't crash when trying to merge two constant phis.

Just constant fold them so they can't cause any trouble. Fixes PR12627.

llvm-svn: 166286

11 years agoAllow objc_requires_super to be used to check class methods as well.
Jordan Rose [Fri, 19 Oct 2012 16:05:26 +0000 (16:05 +0000)]
Allow objc_requires_super to be used to check class methods as well.

Also, unify ObjCShouldCallSuperDealloc and ObjCShouldCallSuperFinalize.
The two have identical behavior and will never be active at the same time.

There's one last simplification now, which is that if we see a call to
[super foo] and we are currently in a method named 'foo', we will
/unconditionally/ clear the ObjCShouldCallSuper flag, rather than check
first to see if we're in a method where calling super is required. There's
no reason to pay the extra lookup price here.

llvm-svn: 166285

11 years ago[ASan] add comment to blacklist file to test behavior introduced in r166283
Alexey Samsonov [Fri, 19 Oct 2012 15:26:48 +0000 (15:26 +0000)]
[ASan] add comment to blacklist file to test behavior introduced in r166283

llvm-svn: 166284

11 years ago[ASan] Support comments in ASan/TSan blacklist file as lines starting with #
Alexey Samsonov [Fri, 19 Oct 2012 15:24:46 +0000 (15:24 +0000)]
[ASan] Support comments in ASan/TSan blacklist file as lines starting with #

llvm-svn: 166283

11 years ago[ASan] instrumented asan unit tests should depend on blacklist file
Alexey Samsonov [Fri, 19 Oct 2012 15:18:14 +0000 (15:18 +0000)]
[ASan] instrumented asan unit tests should depend on blacklist file

llvm-svn: 166282

11 years agoChange VerifyDiagnosticConsumer so that it *must* contain at least one "expected...
Andy Gibbs [Fri, 19 Oct 2012 12:49:32 +0000 (12:49 +0000)]
Change VerifyDiagnosticConsumer so that it *must* contain at least one "expected-*" directive.  As a result, for test-cases that are not expected to generate any diagnostics, an additional directive "expected-no-diagnostics" has been implemented which can then be included in such test-cases.  This new directive may not be used in conjunction with any other "expected-*" directive.

This change was initially proposed as a solution to the problem highlighted by check-in r164677, i.e. that -verify will not cause a test-case failure where the compile command does not actually reference the file.

Patch reviewed by David Blaikie.

llvm-svn: 166281

11 years agoPrior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsum...
Andy Gibbs [Fri, 19 Oct 2012 12:44:48 +0000 (12:44 +0000)]
Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.

llvm-svn: 166280

11 years agoFix directive parsing in VerifyDiagnosticConsumer so that it ensures that "expected...
Andy Gibbs [Fri, 19 Oct 2012 12:36:49 +0000 (12:36 +0000)]
Fix directive parsing in VerifyDiagnosticConsumer so that it ensures that "expected" is at the start of the word and will no longer accept typos such as "junkexpected-*" as a valid "expected-*" directive.  A very few test-cases had to be amended to adhere to the new rule.

Patch reviewed by David Blaikie.

llvm-svn: 166279

11 years agoMove SplitBlockAndInsertIfThen to BasicBlockUtils.
Evgeniy Stepanov [Fri, 19 Oct 2012 10:48:31 +0000 (10:48 +0000)]
Move SplitBlockAndInsertIfThen to BasicBlockUtils.

llvm-svn: 166278

11 years agoLoopVectorize: Keep the IRBuilder on the stack.
Benjamin Kramer [Fri, 19 Oct 2012 08:42:02 +0000 (08:42 +0000)]
LoopVectorize: Keep the IRBuilder on the stack.

No functionality change.

llvm-svn: 166274

11 years agoARM:
Stepan Dyatkovskiy [Fri, 19 Oct 2012 08:23:06 +0000 (08:23 +0000)]
ARM:
Removed extra stack frame object for fixed byval arguments,
VarArgsStyleRegisters invocation was reworked due to some improper usage in
past. PR14099 also demonstrates it.

llvm-svn: 166273

11 years agoRevert r166268, this fix for a crash-on-invalid introduced a rejects-valid.
Nick Lewycky [Fri, 19 Oct 2012 08:08:02 +0000 (08:08 +0000)]
Revert r166268, this fix for a crash-on-invalid introduced a rejects-valid.
Richard has an unreduced testcase to work with.

llvm-svn: 166272

11 years ago[asan] update asan docs to explain more about linking and to mention full support...
Kostya Serebryany [Fri, 19 Oct 2012 07:00:46 +0000 (07:00 +0000)]
[asan] update asan docs to explain more about linking and to mention full support for i386 Linux

llvm-svn: 166271

11 years agoPacify -Wnon-virtual-dtor.
Nick Lewycky [Fri, 19 Oct 2012 07:00:09 +0000 (07:00 +0000)]
Pacify -Wnon-virtual-dtor.

llvm-svn: 166270

11 years agoDR1511: A const volatile global does not implicitly get internal linkage like a
Richard Smith [Fri, 19 Oct 2012 06:37:48 +0000 (06:37 +0000)]
DR1511: A const volatile global does not implicitly get internal linkage like a
const non-volatile global does.

llvm-svn: 166269

11 years agoPR14124: When performing template instantiation of a qualified-id outside of a
Richard Smith [Fri, 19 Oct 2012 06:32:17 +0000 (06:32 +0000)]
PR14124: When performing template instantiation of a qualified-id outside of a
class, diagnose if the qualified-id instantiates to a non-static class member.

llvm-svn: 166268

11 years ago[asan] make sure asan erases old unused allocas after it created a new one. This...
Kostya Serebryany [Fri, 19 Oct 2012 06:20:53 +0000 (06:20 +0000)]
[asan] make sure asan erases old unused allocas after it created a new one. This became important after the recent move from ModulePass to FunctionPass because no cleanup is happening after asan pass any more.

llvm-svn: 166267

11 years agoFix handling of the regparm attribute in the presence of classes with copy
Rafael Espindola [Fri, 19 Oct 2012 05:04:37 +0000 (05:04 +0000)]
Fix handling of the regparm attribute in the presence of classes with copy
constructors.

When I first moved regparm support to TargetInfo.cpp I tried to isolate it
in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the
code around and check for regparm at the end of the decision tree.

Without this refactoring classifyArgumentTypeWithReg would have to duplicate
the logic about when to use non-byval indirect arguments.

llvm-svn: 166266

11 years agoTeach getColumnNumber to use the line cache to get the start of the line if its on...
Craig Topper [Fri, 19 Oct 2012 04:40:38 +0000 (04:40 +0000)]
Teach getColumnNumber to use the line cache to get the start of the line if its on the same line as the last call to getLineNumber. Prevents needing to scan backwards for the new line. Fixes PR14106.

llvm-svn: 166265

11 years agorecommit the patch that makes LSR and LowerInvoke use the TargetTransform interface.
Nadav Rotem [Fri, 19 Oct 2012 04:27:49 +0000 (04:27 +0000)]
recommit the patch that makes LSR and LowerInvoke use the TargetTransform interface.

llvm-svn: 166264

11 years agoReintroduce the TargetTransformInfo to the clang pass manager.
Nadav Rotem [Fri, 19 Oct 2012 04:15:32 +0000 (04:15 +0000)]
Reintroduce the TargetTransformInfo to the clang pass manager.

llvm-svn: 166263

11 years agoAdd a new target setting to disable automatic loading of kext images
Jason Molenda [Fri, 19 Oct 2012 03:40:45 +0000 (03:40 +0000)]
Add a new target setting to disable automatic loading of kext images
in a kernel debug session:

settings set target.disable-kext-loading true

<rdar://problem/12490623>

llvm-svn: 166262

11 years agoclang/test/Index/annotate-comments.cpp: Relax the expression to be matched to -fms...
NAKAMURA Takumi [Fri, 19 Oct 2012 03:27:50 +0000 (03:27 +0000)]
clang/test/Index/annotate-comments.cpp: Relax the expression to be matched to -fms-compatibility. Then XFAIL can be removed.

FYI, it can be reproduced with "c-index-test -std=c++11 -fms-compatibility".

llvm-svn: 166261

11 years agoSimplify condition checking as CONCAT assume all inputs of the same type.
Michael Liao [Fri, 19 Oct 2012 03:17:00 +0000 (03:17 +0000)]
Simplify condition checking as CONCAT assume all inputs of the same type.

llvm-svn: 166260

11 years agotypeo fix in comment
Jason Molenda [Fri, 19 Oct 2012 02:18:10 +0000 (02:18 +0000)]
typeo fix in comment

llvm-svn: 166259

11 years agoChange CommunicationKDP::SendRequestWriteMemory to append data as binary
Jason Molenda [Fri, 19 Oct 2012 02:16:22 +0000 (02:16 +0000)]
Change CommunicationKDP::SendRequestWriteMemory to append data as binary
instead of asciified bytes.  <rdar://problem/12522978>

llvm-svn: 166258

11 years agoASTWriter.cpp: Fix a warning. [-Wunused-variable]
NAKAMURA Takumi [Fri, 19 Oct 2012 01:53:57 +0000 (01:53 +0000)]
ASTWriter.cpp: Fix a warning. [-Wunused-variable]

llvm-svn: 166257

11 years agoFixed a bug where empty C structs were given size
Sean Callanan [Fri, 19 Oct 2012 01:37:25 +0000 (01:37 +0000)]
Fixed a bug where empty C structs were given size
1 by the expression parser.  We now correctly
report that they are of size 0.  (C++ structs
are mandated to have nonzero size, and Clang marks
them as being 1 byte in size.)

<rdar://problem/12380800>

llvm-svn: 166256

11 years agovectorizer: Add support for reading and writing from the same memory location.
Nadav Rotem [Fri, 19 Oct 2012 01:24:18 +0000 (01:24 +0000)]
vectorizer: Add support for reading and writing from the same memory location.

llvm-svn: 166255

11 years agoHandle diamond inheritance in -Woverloaded-virtual.
David Blaikie [Fri, 19 Oct 2012 00:53:08 +0000 (00:53 +0000)]
Handle diamond inheritance in -Woverloaded-virtual.

llvm-svn: 166254

11 years agoFix typo in comment.
Nick Lewycky [Fri, 19 Oct 2012 00:47:07 +0000 (00:47 +0000)]
Fix typo in comment.

llvm-svn: 166253

11 years agoDescribe the new input-files block and its record, for llvm-bcanalyzer.
Douglas Gregor [Fri, 19 Oct 2012 00:45:00 +0000 (00:45 +0000)]
Describe the new input-files block and its record, for llvm-bcanalyzer.

llvm-svn: 166252

11 years agoMove the set of files to be validated in an AST file into the control
Douglas Gregor [Fri, 19 Oct 2012 00:38:02 +0000 (00:38 +0000)]
Move the set of files to be validated in an AST file into the control
block, so the input files are validated early on, before we've
committed to loading the AST file. This (accidentally) fixed a but
wherein the main file used to generate the AST file would *not* be
validated by the existing validation logic.

At the moment, this leads to some duplication of filenames between the
source manager block and input-file blocks, as well as validation
logic. This will be handled via an upcoming patch.

llvm-svn: 166251

11 years agoclang/test/Index/annotate-comments.cpp: Mark this as XFAIL on msvc. Investigating.
NAKAMURA Takumi [Fri, 19 Oct 2012 00:22:54 +0000 (00:22 +0000)]
clang/test/Index/annotate-comments.cpp: Mark this as XFAIL on msvc. Investigating.

llvm-svn: 166250

11 years agoChange the "rb" alias to "rbreak" since some people are used to typing more than...
Jim Ingham [Thu, 18 Oct 2012 23:24:12 +0000 (23:24 +0000)]
Change the "rb" alias to "rbreak" since some people are used to typing more than "rb" and so weren't
finding the alias.

llvm-svn: 166249

11 years agoReapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.
Nadav Rotem [Thu, 18 Oct 2012 23:22:48 +0000 (23:22 +0000)]
Reapply the TargerTransformInfo changes, minus the changes to LSR and Lowerinvoke.

llvm-svn: 166248

11 years agocleanup the comment.
Nadav Rotem [Thu, 18 Oct 2012 23:21:01 +0000 (23:21 +0000)]
cleanup the comment.

llvm-svn: 166247

11 years agoFix comment typo.
Bob Wilson [Thu, 18 Oct 2012 23:08:23 +0000 (23:08 +0000)]
Fix comment typo.

llvm-svn: 166246

11 years agoRevert r166223 and the subsequent commits that depend on it, r166230 & r166235.
Argyrios Kyrtzidis [Thu, 18 Oct 2012 22:42:31 +0000 (22:42 +0000)]
Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.

This seems to have introduced assertion hit when building compiler-rt.

llvm-svn: 166245

11 years ago<rdar://problem/12491420>
Greg Clayton [Thu, 18 Oct 2012 22:40:37 +0000 (22:40 +0000)]
<rdar://problem/12491420>

Added a new setting that allows a python OS plug-in to detect threads and provide registers for memory threads. To enable this you set the setting:

settings set target.process.python-os-plugin-path lldb/examples/python/operating_system.py

Then run your program and see the extra threads.

llvm-svn: 166244