platform/upstream/llvm.git
11 years agoRename the lldb/gdb command page.
Jason Molenda [Sat, 20 Oct 2012 21:00:03 +0000 (21:00 +0000)]
Rename the lldb/gdb command page.
Remove 'Customization', 'Documentation', and 'FAQ' pages from the sidebar's "USE AND EXTENSION"
section.  These pages have no content.  If someone ever wants to add content to them, we can
re-add them to the sidebar.

llvm-svn: 166380

11 years agoFix an infinite loop in the loop-vectorizer.
Nadav Rotem [Sat, 20 Oct 2012 20:45:01 +0000 (20:45 +0000)]
Fix an infinite loop in the loop-vectorizer.

PR14134.

llvm-svn: 166379

11 years agoDocument current Doxygen use practices in Coding Standards. Mostly it is
Dmitri Gribenko [Sat, 20 Oct 2012 13:27:43 +0000 (13:27 +0000)]
Document current Doxygen use practices in Coding Standards.  Mostly it is
obvious stuff and most new code being committed conforms to that.  Some old
code does not; this might cause confusion and this is the motivation to
document the correct guidelines.

llvm-svn: 166378

11 years agoMove private classes into anonymous namespaces.
Benjamin Kramer [Sat, 20 Oct 2012 13:02:06 +0000 (13:02 +0000)]
Move private classes into anonymous namespaces.

llvm-svn: 166377

11 years agoSymbol hygiene: Make sure declarations and definitions match, make helper functions...
Benjamin Kramer [Sat, 20 Oct 2012 12:53:26 +0000 (12:53 +0000)]
Symbol hygiene: Make sure declarations and definitions match, make helper functions static.

llvm-svn: 166376

11 years agoSROA: Simplify code. No functionality change.
Benjamin Kramer [Sat, 20 Oct 2012 12:04:57 +0000 (12:04 +0000)]
SROA: Simplify code. No functionality change.

llvm-svn: 166375

11 years agoInstCombine: Fix an edge case where constant icmps could sneak into ConstantFoldInstO...
Benjamin Kramer [Sat, 20 Oct 2012 08:43:52 +0000 (08:43 +0000)]
InstCombine: Fix an edge case where constant icmps could sneak into ConstantFoldInstOperands and crash.

Have to refactor the ConstantFolder interface one day to define bugs like this away. Fixes PR14131.

llvm-svn: 166374

11 years agoDR1473: Do not require a space between operator"" and the ud-suffix in a
Richard Smith [Sat, 20 Oct 2012 08:41:10 +0000 (08:41 +0000)]
DR1473: Do not require a space between operator"" and the ud-suffix in a
literal-operator-id.

llvm-svn: 166373

11 years agoRework implementation of DR1492: Apply the resolution to operator delete too,
Richard Smith [Sat, 20 Oct 2012 08:26:51 +0000 (08:26 +0000)]
Rework implementation of DR1492: Apply the resolution to operator delete too,
since it also has an implicit exception specification. Downgrade the error to
an extwarn, since at least for operator delete, system headers like to declare
it as 'noexcept' whereas the implicit definition does not have an explicit
exception specification. Move the exception specification for user-declared
'operator delete' functions from the type-as-written into the type, to reflect
reality and to allow us to detect whether there was an implicit exception spec
or not.

llvm-svn: 166372

11 years agoVectorize: teach cavVectorizeMemory to distinguish between A[i]+=x and A[B[i]]+=x.
Nadav Rotem [Sat, 20 Oct 2012 08:26:33 +0000 (08:26 +0000)]
Vectorize: teach cavVectorizeMemory to distinguish between A[i]+=x and A[B[i]]+=x.
If the pointer is consecutive then it is safe to read and write. If the pointer is non-loop-consecutive then
it is unsafe to vectorize it because we may hit an ordering issue.

llvm-svn: 166371

11 years agoAccept -Wno-arc-abi without warning for a while.
Nico Weber [Sat, 20 Oct 2012 06:18:14 +0000 (06:18 +0000)]
Accept -Wno-arc-abi without warning for a while.

Xcode 4.5 passes -Wno-arc-abi to clang, which makes a clang newer than
r163917 warn that it doesn't understand -Wno-arc-abi. I asked if adding
this is ok at
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20121015/066433.html
and nobody objected.

Adding this makes life a bit easier for the chromium project. If you think
this is a burden on for clang, shout, and I'll revert this.

llvm-svn: 166370

11 years agoFix __builtin_va_arg assertion failure in ARM AAPCS.
Logan Chien [Sat, 20 Oct 2012 06:11:33 +0000 (06:11 +0000)]
Fix __builtin_va_arg assertion failure in ARM AAPCS.

llvm-svn: 166369

11 years agoFixed a bug that caused floating-point values
Sean Callanan [Sat, 20 Oct 2012 06:08:09 +0000 (06:08 +0000)]
Fixed a bug that caused floating-point values
to be printed truncated.

<rdar://problem/12389615>

llvm-svn: 166368

11 years agoFix a typo
Nadav Rotem [Sat, 20 Oct 2012 05:03:27 +0000 (05:03 +0000)]
Fix a typo

llvm-svn: 166367

11 years agoVectorizer: refactor the memory checks to a new function. No functionality change.
Nadav Rotem [Sat, 20 Oct 2012 04:59:06 +0000 (04:59 +0000)]
Vectorizer: refactor the memory checks to a new function. No functionality change.

llvm-svn: 166366

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