platform/upstream/llvm.git
11 years agoPR14141 (part of DR1351): An implicitly-deduced "any" exception specification
Richard Smith [Sun, 21 Oct 2012 23:00:34 +0000 (23:00 +0000)]
PR14141 (part of DR1351): An implicitly-deduced "any" exception specification
produces an exception of 'noexcept(false)' and is thus compatible with an
explicit exception specification of 'noexcept(false)'.

llvm-svn: 166404

11 years agoautoconf/cmake: Always require isl code generation.
Tobias Grosser [Sun, 21 Oct 2012 21:48:21 +0000 (21:48 +0000)]
autoconf/cmake: Always require isl code generation.

This change ensures that isl is only detected if it includes code generation
support. This allows us to remove a lot of conditional compilation and also
avoids missing test cases in case the feature is not available.

llvm-svn: 166403

11 years agocmake: Use suffix for shared modules instead of the one for shared libraries
Tobias Grosser [Sun, 21 Oct 2012 21:08:29 +0000 (21:08 +0000)]
cmake: Use suffix for shared modules instead of the one for shared libraries

On Linux there is no difference between shared modules and shared libaries, both
are '.so' files. However, on darwin only shared modules are '.so' files. Shared
libraries have the '.dynlib' suffix.

Fix test cases on darwin by expecting a shared module suffix for Polly instead
of a shared library suffix.

This fixes PR14135

Reported by:  Jack Howarth  <howarth@bromo.med.uc.edu>

llvm-svn: 166402

11 years agoDataLayout should use itself when calculating the size of a vector.
Hal Finkel [Sun, 21 Oct 2012 20:38:03 +0000 (20:38 +0000)]
DataLayout should use itself when calculating the size of a vector.

This is important for vectors of pointers because only DataLayout,
not the underlying vector type, knows how to calculate the size
of the pointers in the vector. Fixes PR14138.

llvm-svn: 166401

11 years agoFix typo, make test case slightly more reabable. Thanks to Dmitri Gribenko for
Lang Hames [Sun, 21 Oct 2012 19:56:13 +0000 (19:56 +0000)]
Fix typo, make test case slightly more reabable. Thanks to Dmitri Gribenko for
the suggestions.

llvm-svn: 166400

11 years agoRevert r166390 "LoopIdiom: Replace custom dependence analysis with LoopDependenceAnal...
Benjamin Kramer [Sun, 21 Oct 2012 19:31:16 +0000 (19:31 +0000)]
Revert r166390 "LoopIdiom: Replace custom dependence analysis with LoopDependenceAnalysis."

It passes all tests, produces better results than the old code but uses the
wrong pass, LoopDependenceAnalysis, which is old and unmaintained. "Why is it
still in tree?", you might ask. The answer is obviously: "To confuse developers."

Just swapping in the new dependency pass sends the pass manager into an infinte
loop, I'll try to figure out why tomorrow.

llvm-svn: 166399

11 years agoDon't crash when the Assignments vector is empty.
Jakob Stoklund Olesen [Sun, 21 Oct 2012 19:05:03 +0000 (19:05 +0000)]
Don't crash when the Assignments vector is empty.

Reported by Vincent Lejeune using an out-of-tree target.

llvm-svn: 166398

11 years agoRegisterPasses: Remove unreachable default case in switch
Tobias Grosser [Sun, 21 Oct 2012 18:31:27 +0000 (18:31 +0000)]
RegisterPasses: Remove unreachable default case in switch

llvm-svn: 166397

11 years agowww: Correct command line that loads polly into dragonegg
Tobias Grosser [Sun, 21 Oct 2012 17:33:00 +0000 (17:33 +0000)]
www: Correct command line that loads polly into dragonegg

Reported by:  Jack Howarth  <howarth@bromo.med.uc.edu>

llvm-svn: 166396

11 years agoAvoid an extra hash lookup when inserting a value into the widen map.
Anders Carlsson [Sun, 21 Oct 2012 16:26:35 +0000 (16:26 +0000)]
Avoid an extra hash lookup when inserting a value into the widen map.

llvm-svn: 166395

11 years agoIntroduce a separate file for CMake macros
Tobias Grosser [Sun, 21 Oct 2012 15:51:49 +0000 (15:51 +0000)]
Introduce a separate file for CMake macros

Contributed by:  Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

llvm-svn: 166394

11 years agoSimplify code. No functionality change.
Jakub Staszak [Sun, 21 Oct 2012 15:36:03 +0000 (15:36 +0000)]
Simplify code. No functionality change.

llvm-svn: 166393

11 years agoSimplify code. No functionality change.
Jakub Staszak [Sun, 21 Oct 2012 15:29:19 +0000 (15:29 +0000)]
Simplify code. No functionality change.

llvm-svn: 166392

11 years agoSilence warning about && in ||.
Benjamin Kramer [Sun, 21 Oct 2012 15:21:56 +0000 (15:21 +0000)]
Silence warning about && in ||.

llvm-svn: 166391

11 years agoLoopIdiom: Replace custom dependence analysis with LoopDependenceAnalysis.
Benjamin Kramer [Sun, 21 Oct 2012 15:03:07 +0000 (15:03 +0000)]
LoopIdiom: Replace custom dependence analysis with LoopDependenceAnalysis.

Requires a lot less code and complexity on loop-idiom's side and the more
precise analysis can catch more cases, like the one I included as a test case.
This also fixes the edge-case miscompilation from PR9481. I'm not entirely
sure that all cases are handled that the old checks handled but LDA will
certainly become smarter in the future.

llvm-svn: 166390

11 years agoAdd support of MIPS n32 ABI to the Clang driver. The fix builds correct library/objec...
Simon Atanasyan [Sun, 21 Oct 2012 11:44:57 +0000 (11:44 +0000)]
Add support of MIPS n32 ABI to the Clang driver. The fix builds correct library/object files paths and passes appropriate command line options to the linker if user provides -mabi=n32 option.

The patch reviewed by Rafael Espindola.

llvm-svn: 166389

11 years agoFix a bug in the vectorization of wide load/store operations.
Nadav Rotem [Sun, 21 Oct 2012 06:49:10 +0000 (06:49 +0000)]
Fix a bug in the vectorization of wide load/store operations.
We used a SCEV to detect that A[X] is consecutive. We assumed that X was
the induction variable. But X can be any expression that uses the induction
for example: X = i + 2;

llvm-svn: 166388

11 years agoAdd support for reduction variables that do not start at zero.
Nadav Rotem [Sun, 21 Oct 2012 05:52:51 +0000 (05:52 +0000)]
Add support for reduction variables that do not start at zero.
This is important for nested-loop reductions such as :

In the innermost loop, the induction variable does not start with zero:

for (i = 0 .. n)
 for (j = 0 .. m)
  sum += ...

llvm-svn: 166387

11 years agoDocument change. Describe the pass and some papers that inspired the design of the...
Nadav Rotem [Sun, 21 Oct 2012 04:04:25 +0000 (04:04 +0000)]
Document change. Describe the pass and some papers that inspired the design of the pass.

llvm-svn: 166386

11 years agoUnrevert r166268, reverted in r166272, with a fix for the issue which Nick
Richard Smith [Sun, 21 Oct 2012 03:28:35 +0000 (03:28 +0000)]
Unrevert r166268, reverted in r166272, with a fix for the issue which Nick
found: if an overloaded operator& is present before a template definition,
the expression &T::foo is represented as a CXXOperatorCallExpr, not as a
UnaryOperator, so we didn't notice that it's permitted to reference a non-static
data member of an unrelated class.

While investigating this, I discovered another problem in this area: we are
treating template default arguments as unevaluated contexts during substitution,
resulting in performing incorrect checks for uses of non-static data members in
C++11. That is not fixed by this patch (I'll look into this soon; it's related
to the failure to correctly instantiate constexpr function templates), but was
resulting in this bug not firing in C++11 mode (except with -Wc++98-compat).

Original message:

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: 166385

11 years agoVectorizer: fix a bug in the classification of induction/reduction phis.
Nadav Rotem [Sun, 21 Oct 2012 02:38:01 +0000 (02:38 +0000)]
Vectorizer: fix a bug in the classification of induction/reduction phis.

llvm-svn: 166384

11 years agoWhen used in a compound expression FP_CONTRACT should proceed all explicit
Lang Hames [Sun, 21 Oct 2012 01:10:01 +0000 (01:10 +0000)]
When used in a compound expression FP_CONTRACT should proceed all explicit
declarations and statements. Emit an error if the FP_CONTRACT is used
later in a compound statement.

llvm-svn: 166383

11 years agoAllow the commuted form of tied-operand constraints in tablegen ("$dst = $src",
Lang Hames [Sat, 20 Oct 2012 22:44:13 +0000 (22:44 +0000)]
Allow the commuted form of tied-operand constraints in tablegen ("$dst = $src",
rather than "$src = $dst").

llvm-svn: 166382

11 years agoReorder the sections of "USE AND EXTENSIONS" so the most useful to
Jason Molenda [Sat, 20 Oct 2012 21:01:22 +0000 (21:01 +0000)]
Reorder the sections of "USE AND EXTENSIONS" so the most useful to
users new to lldb are at the top.

llvm-svn: 166381

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