platform/upstream/llvm.git
9 years agoMIR Serialization: print and parse LLVM IR using MIR format.
Alex Lorenz [Tue, 19 May 2015 18:17:39 +0000 (18:17 +0000)]
MIR Serialization: print and parse LLVM IR using MIR format.

This commit is the initial commit for the MIR serialization project.
It creates a new library under CodeGen called 'MIR'. This new
library adds a new machine function pass that prints out the LLVM IR
using the MIR format. This pass is then added as a last pass when a
'stop-after' option is used in llc. The new library adds the initial
functionality for parsing of MIR files as well. This commit also
extends the llc tool so that it can recognize and parse MIR input files.

Reviewers: Duncan P. N. Exon Smith, Matthias Braun, Philip Reames

Differential Revision: http://reviews.llvm.org/D9616

llvm-svn: 237708

9 years agoRemove unused MachineLocation.h include from MCAsmInfo.h. NFC
Pete Cooper [Tue, 19 May 2015 17:59:09 +0000 (17:59 +0000)]
Remove unused MachineLocation.h include from MCAsmInfo.h.  NFC

llvm-svn: 237707

9 years agoRegisterCoalescer: Improve a comment.
Matthias Braun [Tue, 19 May 2015 17:52:32 +0000 (17:52 +0000)]
RegisterCoalescer: Improve a comment.

Explain the relation of the example to the variables in the code,
explain what bad behaviour the code avoids in this case.

llvm-svn: 237706

9 years agouse range-based for loop
Sanjay Patel [Tue, 19 May 2015 17:49:14 +0000 (17:49 +0000)]
use range-based for loop

llvm-svn: 237705

9 years agoclang-format: Add space in function pointers with SpaceBeforeParens=Always
Anders Waldenborg [Tue, 19 May 2015 16:54:26 +0000 (16:54 +0000)]
clang-format: Add space in function pointers with SpaceBeforeParens=Always

"void (*my_function)(void)" should become "void (*my_function) (void)" when
SpaceBeforeParens is set to 'Always'

Differential Revision: http://reviews.llvm.org/D9835

llvm-svn: 237704

9 years ago[RewriteStatepointsForGC] Fix up naming in "relocationViaAlloca" and run it through...
Igor Laevsky [Tue, 19 May 2015 16:29:43 +0000 (16:29 +0000)]
[RewriteStatepointsForGC] Fix up naming in "relocationViaAlloca" and run it through clang-format.

Differential Revision: http://reviews.llvm.org/D9774

llvm-svn: 237703

9 years agoRemove the InstructionSimplifierPass immediately after InstructionCombiningPass.
Wei Mi [Tue, 19 May 2015 16:09:11 +0000 (16:09 +0000)]
Remove the InstructionSimplifierPass immediately after InstructionCombiningPass.

InstructionCombiningPass was added after LoopUnrollPass in r237395. Because
InstructionCombiningPass is strictly more powerful than InstructionSimplifierPass,
remove the unnecessary InstructionSimplifierPass.

Differential Revision: http://reviews.llvm.org/D9838

llvm-svn: 237702

9 years ago[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper...
Igor Laevsky [Tue, 19 May 2015 15:59:05 +0000 (15:59 +0000)]
[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper to clone them after statepoint than to emit proper relocates for them. This change implements this logic. There is alredy similar optimization in CodeGenPrepare, but doing so during RewriteStatepointsForGC allows to capture more opprtunities such as relocates in loops and longer instruction chains.

Differential Revision: http://reviews.llvm.org/D9774

llvm-svn: 237701

9 years agoAdd compiler flag test support to LIT. Fix new/delete tests on apple-clang.
Eric Fiselier [Tue, 19 May 2015 15:15:53 +0000 (15:15 +0000)]
Add compiler flag test support to LIT. Fix new/delete tests on apple-clang.

llvm-svn: 237700

9 years agoImplement LWG2433: uninitialized_copy()/etc. should tolerate overloaded operator&
Marshall Clow [Tue, 19 May 2015 15:01:48 +0000 (15:01 +0000)]
Implement LWG2433: uninitialized_copy()/etc. should tolerate overloaded operator&

llvm-svn: 237699

9 years ago[X86] Add _mm_broadcastsd_pd intrinsic
Michael Kuperstein [Tue, 19 May 2015 14:49:14 +0000 (14:49 +0000)]
[X86] Add _mm_broadcastsd_pd intrinsic

_mm_broadcastsd_pd is basically an alias for _mm_movedup_pd, however the alias is only available from AVX2 forward.

llvm-svn: 237698

9 years ago[mips][microMIPSr6] Implement NOR, OR, ORI, XOR and XORI instructions
Zoran Jovanovic [Tue, 19 May 2015 14:12:55 +0000 (14:12 +0000)]
[mips][microMIPSr6] Implement NOR, OR, ORI, XOR and XORI instructions
Differential Revision: http://reviews.llvm.org/D8800

llvm-svn: 237697

9 years ago[mips][microMIPSr6] Implement AND and ANDI instructions
Zoran Jovanovic [Tue, 19 May 2015 13:32:31 +0000 (13:32 +0000)]
[mips][microMIPSr6] Implement AND and ANDI instructions
Differential Revision: http://reviews.llvm.org/D8772

llvm-svn: 237696

9 years agoRangify for loop in Cleanup(), NFC.
Yaron Keren [Tue, 19 May 2015 13:32:19 +0000 (13:32 +0000)]
Rangify for loop in Cleanup(), NFC.

llvm-svn: 237695

9 years agoPrevent Cleanup() from running more than once.
Yaron Keren [Tue, 19 May 2015 13:31:25 +0000 (13:31 +0000)]
Prevent Cleanup() from running more than once.

llvm-svn: 237694

9 years ago[X86] Added _mm256_bslli_epi128 and _mm256_bsrli_epi128.
Michael Kuperstein [Tue, 19 May 2015 13:05:46 +0000 (13:05 +0000)]
[X86] Added _mm256_bslli_epi128 and _mm256_bsrli_epi128.

These two intrinsics are alternative names for _mm256_slli_si256 and _mm256_srli_si256, respectively.

llvm-svn: 237693

9 years agoUse cat and not type Under MSYS, same as Cygwin.
Yaron Keren [Tue, 19 May 2015 12:59:23 +0000 (12:59 +0000)]
Use cat and not type Under MSYS, same as Cygwin.
type means something else under the MSYS shell.

Patch by Tzafrir Poupko!

llvm-svn: 237692

9 years ago[OPENMP] Fixed codegen for copying/initialization of array variables/parameters.
Alexey Bataev [Tue, 19 May 2015 12:31:28 +0000 (12:31 +0000)]
[OPENMP] Fixed codegen for copying/initialization of array variables/parameters.
This modification generates proper copyin/initialization sequences for array variables/parameters. Before they were considered as pointers, not arrays.

llvm-svn: 237691

9 years agoclang-format: Improve *-detection.
Daniel Jasper [Tue, 19 May 2015 12:29:27 +0000 (12:29 +0000)]
clang-format: Improve *-detection.

Before:
  S << a *(10);

After:
  S << a * (10);

This fixes llvm.org/PR16500.

llvm-svn: 237690

9 years ago[mips] Correct and improve special-case shuffle instructions.
Daniel Sanders [Tue, 19 May 2015 12:24:52 +0000 (12:24 +0000)]
[mips] Correct and improve special-case shuffle instructions.

Summary:
The documentation writes vectors highest-index first whereas LLVM-IR writes
them lowest-index first. As a result, instructions defined in terms of
left_half() and right_half() had the halves reversed.

In addition to correcting them, they have been improved to allow shuffles
that use the same operand twice or in reverse order. For example, ilvev
used to accept masks of the form:
  <0, n, 2, n+2, 4, n+4, ...>
but now accepts:
  <0, 0, 2, 2, 4, 4, ...>
  <n, n, n+2, n+2, n+4, n+4, ...>
  <0, n, 2, n+2, 4, n+4, ...>
  <n, 0, n+2, 2, n+4, 4, ...>

One further improvement is that splati.[bhwd] is now the preferred instruction
for splat-like operations. The other special shuffles are no longer used
for splats. This lead to the discovery that <0, 0, ...> would not cause
splati.[hwd] to be selected and this has also been fixed.

This fixes the enc-3des test from the test-suite on Mips64r6 with MSA.

Reviewers: vkalintiris

Reviewed By: vkalintiris

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9660

llvm-svn: 237689

9 years agoclang-format: Improve for-loop formatting.
Daniel Jasper [Tue, 19 May 2015 11:51:39 +0000 (11:51 +0000)]
clang-format: Improve for-loop formatting.

Before:
  for (SmallVectorImpl<TemplateIdAnnotationn *>::iterator I =
           Container.begin(),
                                                          E = Container.end();
       I != E; ++I)

After:
  for (SmallVectorImpl<TemplateIdAnnotationn *>::iterator
           I = Container.begin(),
           E = Container.end();
       I != E; ++I)

This fixes llvm.org/PR23544.

llvm-svn: 237688

9 years agoAs r237678 was reverted, this is no longer needed.
Yaron Keren [Tue, 19 May 2015 11:46:27 +0000 (11:46 +0000)]
As r237678 was reverted, this is no longer needed.

llvm-svn: 237687

9 years agoclang-format: Support #include_next
Daniel Jasper [Tue, 19 May 2015 11:22:29 +0000 (11:22 +0000)]
clang-format: Support #include_next

Before:
  #include_next < test.h >

After:
  #include_next <test.h>

This fixes llvm.org/PR23500

llvm-svn: 237686

9 years ago[mips][microMIPSr6] Implement DIV, DIVU, MOD and MODU instructions
Zoran Jovanovic [Tue, 19 May 2015 11:21:37 +0000 (11:21 +0000)]
[mips][microMIPSr6] Implement DIV, DIVU, MOD and MODU instructions
Differential Revision: http://reviews.llvm.org/D8769

llvm-svn: 237685

9 years agoclang-format: Correctly detect casts to qualified types.
Daniel Jasper [Tue, 19 May 2015 11:18:39 +0000 (11:18 +0000)]
clang-format: Correctly detect casts to qualified types.

Before:
  ns::E f() { return (ns::E) - 1; }

After:
  ns::E f() { return (ns::E)-1; }

This fixes llvm.org/PR23503.

llvm-svn: 237684

9 years agoFix Visual C++ errors C2784, C2780, C2782 after r237678.
Yaron Keren [Tue, 19 May 2015 11:18:10 +0000 (11:18 +0000)]
Fix Visual C++ errors C2784, C2780, C2782 after r237678.
It does not like std::min(unsigned, uint32_t).

llvm-svn: 237683

9 years ago[X86] ABI change for x86-32: pass 3 vector arguments in-register instead of 4, except...
Michael Kuperstein [Tue, 19 May 2015 11:06:56 +0000 (11:06 +0000)]
[X86] ABI change for x86-32: pass 3 vector arguments in-register instead of 4, except on Darwin.

This changes the ABI used on 32-bit x86 for passing vector arguments.
Historically, clang passes the first 4 vector arguments in-register, and additional vector arguments on the stack, regardless of platform. That is different from the behavior of gcc, icc, and msvc, all of which pass only the first 3 arguments in-register.
The 3-register convention is documented, unofficially, in Agner's calling convention guide, and, officially, in the recently released version 1.0 of the i386 psABI.

Darwin is kept as is because the OS X ABI Function Call Guide explicitly documents the current (4-register) behavior.

This fixes PR21510

Differential revision: http://reviews.llvm.org/D9644

llvm-svn: 237682

9 years agoclang-format: Fix regression caused by r237244.
Daniel Jasper [Tue, 19 May 2015 11:06:33 +0000 (11:06 +0000)]
clang-format: Fix regression caused by r237244.

Before:
  [call aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.
          aaaaaaaa];

After:
  [call aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa.aaaaaaaa
          .aaaaaaaa];

This merely papers over the fact that we aren't parsing ObjC method calls
correctly. Also, the indentation is weird.

llvm-svn: 237681

9 years agoRevert "Avoid size_t -> unsigned conversion in MathExtras.h header. NFC".
Pawel Bylica [Tue, 19 May 2015 10:51:24 +0000 (10:51 +0000)]
Revert "Avoid size_t -> unsigned conversion in MathExtras.h header. NFC".

llvm-svn: 237680

9 years agoMark TestEvents as XTIMEOUT on Linux
Tamas Berghammer [Tue, 19 May 2015 10:49:40 +0000 (10:49 +0000)]
Mark TestEvents as XTIMEOUT on Linux

llvm-svn: 237679

9 years agoAvoid size_t -> unsigned conversion in MathExtras.h header. NFC.
Pawel Bylica [Tue, 19 May 2015 10:35:32 +0000 (10:35 +0000)]
Avoid size_t -> unsigned conversion in MathExtras.h header. NFC.

llvm-svn: 237678

9 years agoFix documentation for Set-Like Containers
Artyom Skrobov [Tue, 19 May 2015 10:21:12 +0000 (10:21 +0000)]
Fix documentation for Set-Like Containers

llvm-svn: 237677

9 years agoDon't print =breakpoint-created if BP info was emitted in the result record (MI)
Ilia K [Tue, 19 May 2015 09:57:56 +0000 (09:57 +0000)]
Don't print =breakpoint-created if BP info was emitted in the result record (MI)

llvm-svn: 237676

9 years ago[sanitizer][MIPS] Add --target flag for MIPS32
Sagar Thakur [Tue, 19 May 2015 09:07:37 +0000 (09:07 +0000)]
[sanitizer][MIPS] Add --target flag for MIPS32

Without the --target flag, clang uses the mips64 triple which selects the n64 abi. We need to add --target=mips-linux-gnu, so that clang can select the correct abi for mips32r2.

Reviewers: dsanders, kcc, samsonov
Subscribers: llvm-commits, mohit.bhakkad, jaydeep
Differential Revision: http://reviews.llvm.org/D9249

llvm-svn: 237675

9 years ago[OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.
Alexey Bataev [Tue, 19 May 2015 08:44:56 +0000 (08:44 +0000)]
[OPENMP] Prohibit VLAs in 'private/firstprivate' clauses of 'task' directive.
Currently runtime does not allow to support variably modified types for 'private' and 'firstprivate' clauses in 'task' directives.

llvm-svn: 237674

9 years agoFix getSwappedBytes for double.
Pawel Bylica [Tue, 19 May 2015 08:44:15 +0000 (08:44 +0000)]
Fix getSwappedBytes for double.

llvm-svn: 237673

9 years ago[OPENMP] Prohibit variably modified types in 'copyprivate' clause.
Alexey Bataev [Tue, 19 May 2015 08:19:24 +0000 (08:19 +0000)]
[OPENMP] Prohibit variably modified types in 'copyprivate' clause.
Runtime does not allow to work with VLAs in copyprivate clause.

llvm-svn: 237672

9 years ago[OPENMP] Fixed analysis of function arguments and their data sharing attributes.
Alexey Bataev [Tue, 19 May 2015 07:46:42 +0000 (07:46 +0000)]
[OPENMP] Fixed analysis of function arguments and their data sharing attributes.
Added proper analysis for types of function arguments.

llvm-svn: 237670

9 years agoBrainF.cpp: Update CreateCall() according to r237624.
NAKAMURA Takumi [Tue, 19 May 2015 06:50:19 +0000 (06:50 +0000)]
BrainF.cpp: Update CreateCall() according to r237624.

llvm-svn: 237669

9 years agoSemaExprCXX.cpp: Try to fix \param in r237608. [-Wdocumentation]
NAKAMURA Takumi [Tue, 19 May 2015 06:47:23 +0000 (06:47 +0000)]
SemaExprCXX.cpp: Try to fix \param in r237608. [-Wdocumentation]

llvm-svn: 237668

9 years agoDrop unnecessary ';' after namespace
Tobias Grosser [Tue, 19 May 2015 06:25:19 +0000 (06:25 +0000)]
Drop unnecessary ';' after namespace

The ';' was introduced in 237642. With it in place, we get a large number of
warnings in -pedantic mode.

llvm-svn: 237667

9 years agoAdapt to IRBuilder::CreateCall interface change
Tobias Grosser [Tue, 19 May 2015 06:25:02 +0000 (06:25 +0000)]
Adapt to IRBuilder::CreateCall interface change

The IRBuilder::CreateCall interface was changed in r237624 and now requires an
initializer list.

llvm-svn: 237666

9 years agodotest - minor doc fix
Vince Harron [Tue, 19 May 2015 05:10:22 +0000 (05:10 +0000)]
dotest - minor doc fix

llvm-svn: 237665

9 years agomark new/delete tests as XFAIL more carefully
Eric Fiselier [Tue, 19 May 2015 03:41:22 +0000 (03:41 +0000)]
mark new/delete tests as XFAIL more carefully

llvm-svn: 237664

9 years ago[libcxx] Rework sized delete.
Eric Fiselier [Tue, 19 May 2015 02:03:22 +0000 (02:03 +0000)]
[libcxx] Rework sized delete.

Summary:
This patch does 2 main things:
1. Enable sized delete if the feature test macro `__cpp_sized_deallocation` is enabled.
2. Rework and cleanup all of the sized delete tests.

Test Plan:
The sized delete replacement tests are now split into 4 files:
1. sized_delete11.pass.cpp: Ensure overriding sized delete in C++11 has no effect.
2. sized_delete14.pass.cpp: Test overriding sized delete in C++14 and ensure it is called. This test fails on clang and GCC < 5.1.
3. size_delete_calls_unsized_delete_.pass.cpp: Test that the default sized delete calls unsized delete.
4. sized_delete_fsizeddeallocation.pass.cpp: Test overriding sized delete when -fsized-deallocation is passed. This test should pass on clang and GCC >= 5.1

I have also removed a lot of cruft from the old tests. They no longer replace the new handler and tests that it is called for bad allocations.

Reviewers: mclow.lists

Reviewed By: mclow.lists

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D9831

llvm-svn: 237662

9 years agoPR20073: promote "dereference of 'void*'" from Extension to ExtWarn.
Richard Smith [Tue, 19 May 2015 01:41:12 +0000 (01:41 +0000)]
PR20073: promote "dereference of 'void*'" from Extension to ExtWarn.

llvm-svn: 237652

9 years agoSelectionDAG: Cleanup and simplify FoldConstantArithmetic
Matthias Braun [Tue, 19 May 2015 01:40:21 +0000 (01:40 +0000)]
SelectionDAG: Cleanup and simplify FoldConstantArithmetic

This cleans up the FoldConstantArithmetic code by factoring out the case
of two ConstantSDNodes into an own function. This avoids unnecessary
complexity for many callers who already have ConstantSDNode arguments.

This also avoids an intermeidate SmallVector datastructure and a loop
over that datastructure.

llvm-svn: 237651

9 years ago[BitcodeReader] Error out if we read an invalid function argument type
Filipe Cabecinhas [Tue, 19 May 2015 01:21:06 +0000 (01:21 +0000)]
[BitcodeReader] Error out if we read an invalid function argument type

Bug found with AFL fuzz.

llvm-svn: 237650

9 years ago[lib/Fuzzer] more efficient reload logic; also don't spam git too much
Kostya Serebryany [Tue, 19 May 2015 01:06:07 +0000 (01:06 +0000)]
[lib/Fuzzer] more efficient reload logic; also don't spam git too much

llvm-svn: 237649

9 years ago[AST] Put VarDeclBitfields on a diet
David Majnemer [Tue, 19 May 2015 00:57:16 +0000 (00:57 +0000)]
[AST] Put VarDeclBitfields on a diet

VarDeclBitfields contained bits which are never present in parameters.
Split these out so that ParmVarDeclBitfields wouldn't grow past 32-bits
if another field was added.

llvm-svn: 237648

9 years ago[modules] Support for merging a parsed definition of a static data member of a class...
Richard Smith [Tue, 19 May 2015 00:49:29 +0000 (00:49 +0000)]
[modules] Support for merging a parsed definition of a static data member of a class template into an imported but hidden definition.

llvm-svn: 237647

9 years ago[BitcodeReader] It's a malformed block if CodeLenWidth is too big
Filipe Cabecinhas [Tue, 19 May 2015 00:34:17 +0000 (00:34 +0000)]
[BitcodeReader] It's a malformed block if CodeLenWidth is too big

Bug found with AFL fuzz.

llvm-svn: 237646

9 years agoDAGCombiner: Factor common pattern into isOneConstant() function. NFC
Matthias Braun [Tue, 19 May 2015 00:25:21 +0000 (00:25 +0000)]
DAGCombiner: Factor common pattern into isOneConstant() function. NFC

llvm-svn: 237645

9 years agoDAGCombiner: Factor common pattern into isAllOnesConstant() function. NFC
Matthias Braun [Tue, 19 May 2015 00:25:20 +0000 (00:25 +0000)]
DAGCombiner: Factor common pattern into isAllOnesConstant() function. NFC

llvm-svn: 237644

9 years agoDAGCombiner: Use isNullConstant() where possible
Matthias Braun [Tue, 19 May 2015 00:25:17 +0000 (00:25 +0000)]
DAGCombiner: Use isNullConstant() where possible

llvm-svn: 237643

9 years agoStore intrinsic ID by value in Function instead of a string lookup. NFC.
Pete Cooper [Tue, 19 May 2015 00:24:26 +0000 (00:24 +0000)]
Store intrinsic ID by value in Function instead of a string lookup.  NFC.

On 64-bit targets, Function has 4-bytes of padding in its struct layout.

This uses the space for the intrinsic ID. It is set and recalculated whenever the function name is set.  This is similar to the current behavior which clears the function from the intrinsic ID cache when its renamed.

The intrinsic cache itself is removed as the only purpose was to speedup calls to getIntrinsicID() which now just reading the new field in the struct.

Reviewed by Duncan.  http://reviews.llvm.org/D9836

llvm-svn: 237642

9 years agoMove Function::lookupIntrinsicID to a static method. NFC
Pete Cooper [Tue, 19 May 2015 00:02:25 +0000 (00:02 +0000)]
Move Function::lookupIntrinsicID to a static method.  NFC

llvm-svn: 237641

9 years agoUse ADB pull to download modules from android target.
Oleksiy Vyalov [Mon, 18 May 2015 23:44:06 +0000 (23:44 +0000)]
Use ADB pull to download modules from android target.

http://reviews.llvm.org/D9816

llvm-svn: 237640

9 years agoRe-land r237175: [X86] Always return the sret parameter in eax/rax ...
Reid Kleckner [Mon, 18 May 2015 23:35:09 +0000 (23:35 +0000)]
Re-land r237175: [X86] Always return the sret parameter in eax/rax ...

This reverts commit r237210.

Also fix X86/complex-fca.ll to match the code that we used to generate
on win32 and now generate everwhere to conform to SysV.

llvm-svn: 237639

9 years agoMark N4510 as complete; we already do this
Marshall Clow [Mon, 18 May 2015 23:25:09 +0000 (23:25 +0000)]
Mark N4510 as complete; we already do this

llvm-svn: 237638

9 years agoEnable debugging of multithreaded programs on Windows.
Adrian McCarthy [Mon, 18 May 2015 23:24:32 +0000 (23:24 +0000)]
Enable debugging of multithreaded programs on Windows.

llvm-svn: 237637

9 years agoAdd support for N4389 - std::bool_constant
Marshall Clow [Mon, 18 May 2015 23:21:06 +0000 (23:21 +0000)]
Add support for N4389 - std::bool_constant

llvm-svn: 237636

9 years agoRevert accidental change in r237633
Matthias Braun [Mon, 18 May 2015 23:18:13 +0000 (23:18 +0000)]
Revert accidental change in r237633

llvm-svn: 237635

9 years ago[mips][microMIPSr6] Implement LSA instruction
Jozef Kolek [Mon, 18 May 2015 23:12:10 +0000 (23:12 +0000)]
[mips][microMIPSr6] Implement LSA instruction

This patch implements LSA instruction using mapping.

Differential Revision: http://reviews.llvm.org/D8919

llvm-svn: 237634

9 years agoDAGCombiner: Factor common pattern into isNullConstant() function. NFC
Matthias Braun [Mon, 18 May 2015 23:07:27 +0000 (23:07 +0000)]
DAGCombiner: Factor common pattern into isNullConstant() function. NFC

llvm-svn: 237633

9 years agoMake it possible to run dotest on Linux without any parameters
Vince Harron [Mon, 18 May 2015 23:07:18 +0000 (23:07 +0000)]
Make it possible to run dotest on Linux without any parameters

dotest will select clang-3.5 by default and fall back on clang/gcc
dotest will look for the lldb executable in the typical cmake
output locations:
{lldb}/../../../build/bin (next to llvm directory)
{lldb}/../../../build/host/bin (next to llvm directory)
{lldb}/../build/bin (next to lldb directory)
{lldb}/../build/host/bin (next to lldb directory)

llvm-svn: 237632

9 years agoFix indentation
David Blaikie [Mon, 18 May 2015 22:51:39 +0000 (22:51 +0000)]
Fix indentation

llvm-svn: 237631

9 years agoRevert changes to DefaultABIInfo accidentally introduced in r208733
Reid Kleckner [Mon, 18 May 2015 22:46:30 +0000 (22:46 +0000)]
Revert changes to DefaultABIInfo accidentally introduced in r208733

Also add trivial handling of transparent unions.

PPC32, MSP430, and XCore apparently all rely on DefaultABIInfo. This
should worry you, because DefaultABIInfo is not implementing the rules
of any particular ABI.

Fixes PR23097, patch by Andy Gibbs.

llvm-svn: 237630

9 years agoRevert "[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that...
David Blaikie [Mon, 18 May 2015 22:40:13 +0000 (22:40 +0000)]
Revert "[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that accepts a Function without needing to take an explicit callee Type"

Creates ambiguity in Clang callers. Reverting while I figure it out.

This reverts commit r237627.

llvm-svn: 237629

9 years ago[BitcodeReader] Make sure the type of the inserted value matches the type of the...
Filipe Cabecinhas [Mon, 18 May 2015 22:27:11 +0000 (22:27 +0000)]
[BitcodeReader] Make sure the type of the inserted value matches the type of the aggregate at those indices

Bug found with AFL-fuzz.

llvm-svn: 237628

9 years ago[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that accepts...
David Blaikie [Mon, 18 May 2015 22:25:14 +0000 (22:25 +0000)]
[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that accepts a Function without needing to take an explicit callee Type

The common case is a direct call, so don't make all those users have to
explicitly pass the result of llvm::Function::getFunctionType.

llvm-svn: 237627

9 years agoAPI update for streamlining of IRBuilder::CreateCall to just use ArrayRef/initializer...
David Blaikie [Mon, 18 May 2015 22:14:03 +0000 (22:14 +0000)]
API update for streamlining of IRBuilder::CreateCall to just use ArrayRef/initializer_list+braced init

llvm-svn: 237625

9 years agoSimplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only
David Blaikie [Mon, 18 May 2015 22:13:54 +0000 (22:13 +0000)]
Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only

llvm-svn: 237624

9 years ago80-col fixup.
Eric Christopher [Mon, 18 May 2015 22:12:43 +0000 (22:12 +0000)]
80-col fixup.

llvm-svn: 237623

9 years agoFix grammar in comments.
Eric Christopher [Mon, 18 May 2015 22:12:41 +0000 (22:12 +0000)]
Fix grammar in comments.

llvm-svn: 237622

9 years agoAArch64: work around ld64 bug more aggressively.
Tim Northover [Mon, 18 May 2015 22:07:20 +0000 (22:07 +0000)]
AArch64: work around ld64 bug more aggressively.

ld64 currently mishandles internal pointer relocations (i.e.
ARM64_RELOC_UNSIGNED referred to by section & offset rather than symbol). The
existing __cfstring clause was an early discovery and workaround for this, but
the problem is wider and we should avoid such relocations wherever possible for
now.

This code should be reverted to allowing internal relocations as soon as
possible.

PR23437.

llvm-svn: 237621

9 years agoFix some odd whitespace and formatting errors while making
Eric Christopher [Mon, 18 May 2015 21:49:02 +0000 (21:49 +0000)]
Fix some odd whitespace and formatting errors while making
changes in ConstantsContext.h.

llvm-svn: 237620

9 years agoExtract the load/store type verification to a separate function.
Filipe Cabecinhas [Mon, 18 May 2015 21:48:55 +0000 (21:48 +0000)]
Extract the load/store type verification to a separate function.

Summary:
Added isLoadableOrStorableType to PointerType.

We were doing some checks in some places, occasionally assert()ing instead
of telling the caller. With this patch, I'm putting all type checking in
the same place for load/store type instructions, and verifying the same
thing every time.

I also added a check for load/store of a function type.

Applied extracted check to Load, Store, and Cmpxcg.

I don't have exhaustive tests for all of these, but all Error() calls in
TypeCheckLoadStoreInst are being tested (in invalid.test).

Reviewers: dblaikie, rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9785

llvm-svn: 237619

9 years agoFix for testsuite including omp.h
Jonathan Peyton [Mon, 18 May 2015 21:38:50 +0000 (21:38 +0000)]
Fix for testsuite including omp.h

When calling the testsuite, clang could not locate omp.h.  The
proper environment variable was modified to include:
exports/common/omp.h.  Documentation was also updated to be more
clear.

Patch by Sunita Chandrasekaran

llvm-svn: 237618

9 years ago[lib/Fuzzer] when -sync_command=<CMD> is given, periodically execute 'CMD CORPUS...
Kostya Serebryany [Mon, 18 May 2015 21:34:20 +0000 (21:34 +0000)]
[lib/Fuzzer] when -sync_command=<CMD> is given, periodically execute 'CMD CORPUS' to synchronize with other processes

llvm-svn: 237617

9 years agoUpdate isl to 6be6768e
Tobias Grosser [Mon, 18 May 2015 21:29:58 +0000 (21:29 +0000)]
Update isl to 6be6768e

Besides a couple of interface cleanups, this change also contains a performance
optimization of isl_mat_product that should give us up to almost 6% compiletime
reduction.

llvm-svn: 237616

9 years agoDelete old CMake build system
Jonathan Peyton [Mon, 18 May 2015 21:21:25 +0000 (21:21 +0000)]
Delete old CMake build system

Remove runtime/CMakeLists.txt.old and runtime/src/CMakeLists.txt as
they no longer worked and were not being kept up to date.

Differential Revision: http://reviews.llvm.org/D9756

llvm-svn: 237615

9 years ago[YAML] Plug a memory leak
Benjamin Kramer [Mon, 18 May 2015 21:11:27 +0000 (21:11 +0000)]
[YAML] Plug a memory leak

The destructor of BlockScalarNode is never called. Store the contained
string in BumpPtrAllocated memory instead.

llvm-svn: 237614

9 years agoAdded missing 'override' to `ReadMismatchingDeleteExpressions`
Ismail Pazarbasi [Mon, 18 May 2015 20:46:12 +0000 (20:46 +0000)]
Added missing 'override' to `ReadMismatchingDeleteExpressions`

llvm-svn: 237613

9 years ago[modules] Support for merging a parsed class template specialization definition into...
Richard Smith [Mon, 18 May 2015 20:36:47 +0000 (20:36 +0000)]
[modules] Support for merging a parsed class template specialization definition into an imported but hidden definition.

llvm-svn: 237612

9 years agoMachineInstr: Change return value of getOpcode() to unsigned.
Matthias Braun [Mon, 18 May 2015 20:27:55 +0000 (20:27 +0000)]
MachineInstr: Change return value of getOpcode() to unsigned.

This was previously returning int. However there are no negative opcode
numbers and more importantly this was needlessly different from
MCInstrDesc::getOpcode() (which even is the value returned here) and
SDValue::getOpcode()/SDNode::getOpcode().

llvm-svn: 237611

9 years agoCreate new diagnostic group -Wmove
Richard Trieu [Mon, 18 May 2015 20:25:44 +0000 (20:25 +0000)]
Create new diagnostic group -Wmove

-Wmove includes the three existing warnings for std::move calls, self move,
reduntant move, and pessimizing move.  -Wmove is included in -Wmost, so that
it can be discoverable to people using that or -Wall.

Differential Revision: http://reviews.llvm.org/D9493

llvm-svn: 237610

9 years ago[modules] When a file is listed as a non-textual header in a module map, don't
Richard Smith [Mon, 18 May 2015 20:02:41 +0000 (20:02 +0000)]
[modules] When a file is listed as a non-textual header in a module map, don't
enter it more than once, even if it doesn't have #include guards -- we already
know that it is intended to have the same effect every time it's included, and
it's already had that effect. This particularly helps with local submodule
visibility builds, where the include guard macro may not be visible in the
includer, but will become visible the moment we enter the included file.

llvm-svn: 237609

9 years agoDetect uses of mismatching forms of 'new' and 'delete'
Ismail Pazarbasi [Mon, 18 May 2015 19:59:11 +0000 (19:59 +0000)]
Detect uses of mismatching forms of 'new' and 'delete'

Emit warning when operand to `delete` is allocated with `new[]` or
operand to `delete[]` is allocated with `new`.

rev 2 update:
`getNewExprFromInitListOrExpr` should return `dyn_cast_or_null`
instead of `dyn_cast`, since `E` might be null.

Reviewers: rtrieu, jordan_rose, rsmith

Subscribers: majnemer, cfe-commits

Differential Revision: http://reviews.llvm.org/D4661

llvm-svn: 237608

9 years agoHave -Wredundant-move ignore reference types.
Richard Trieu [Mon, 18 May 2015 19:54:08 +0000 (19:54 +0000)]
Have -Wredundant-move ignore reference types.

Don't give a warning when the type being moved is a reference type.  Also
uncomment two lines in the test case.

llvm-svn: 237607

9 years agoUpdate C++1z status; mark issues 2059,2369,2415,2454 and 2458 as 'complete'. I have...
Marshall Clow [Mon, 18 May 2015 19:52:49 +0000 (19:52 +0000)]
Update C++1z status; mark issues 2059,2369,2415,2454 and 2458 as 'complete'. I have committed patches for all of them

llvm-svn: 237606

9 years ago[Verifier] Assert gc_relocate always return a pointer type
Chen Li [Mon, 18 May 2015 19:50:14 +0000 (19:50 +0000)]
[Verifier] Assert gc_relocate always return a pointer type

Summary: Add an assertion in verifier.cpp to make sure gc_relocate relocate a gc pointer, and its return type has the same address space with the relocated pointer.

Reviewers: reames, AndyAyers, sanjoy, pgavlin

Reviewed By: pgavlin

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9695

llvm-svn: 237605

9 years agoUpdate C++1z status; mark all the issues that require no library change as 'complete'
Marshall Clow [Mon, 18 May 2015 19:50:05 +0000 (19:50 +0000)]
Update C++1z status; mark all the issues that require no library change as 'complete'

llvm-svn: 237604

9 years agoFixes errors in remote tests
Vince Harron [Mon, 18 May 2015 19:44:19 +0000 (19:44 +0000)]
Fixes errors in remote tests

llvm-svn: 237603

9 years agoRefactored dotest arg parser so that it's accessible from dosep
Vince Harron [Mon, 18 May 2015 19:40:54 +0000 (19:40 +0000)]
Refactored dotest arg parser so that it's accessible from dosep

This allows dosep to understand an act on dotest arguments

Differential Revision: http://reviews.llvm.org/D9820

llvm-svn: 237602

9 years agodotest - Refactored some code into loops
Vince Harron [Mon, 18 May 2015 19:40:00 +0000 (19:40 +0000)]
dotest - Refactored some code into loops

Renamed 'base' to 'lldbRootDirectory'
Renamed 'lldbPath' to 'lldbPythonDir'
Added cmake output directories to lldb executable search locations
Fixed invocation of lldb -P to ignore 'Cannot read termcap database'

Differential Revision: http://reviews.llvm.org/D9818

llvm-svn: 237601

9 years agoRefactored lldb executable name discovery
Vince Harron [Mon, 18 May 2015 19:39:03 +0000 (19:39 +0000)]
Refactored lldb executable name discovery

The lldb executable was referenced through the code by 7 different
(effectively) global variables.

global lldbExecutablePath
global lldbExecutable
os.environ['LLDB_EXEC']
os.environ['LLDB_TEST']
dotest.lldbExec
dotest.lldbHere
lldbtest.lldbExec

This change uses one global variable lldbtest_config.lldbExec to
replace them all.

Differential Revision: http://reviews.llvm.org/D9817

llvm-svn: 237600

9 years agoXTIMEOUT TestThreadSpecificBreakpoint.py on darwin
Vince Harron [Mon, 18 May 2015 19:36:33 +0000 (19:36 +0000)]
XTIMEOUT TestThreadSpecificBreakpoint.py on darwin

Differential Revision: http://reviews.llvm.org/D9815

llvm-svn: 237599

9 years agoChange lldb-mi deployment target to use Xcode project global setting
Vince Harron [Mon, 18 May 2015 19:35:07 +0000 (19:35 +0000)]
Change lldb-mi deployment target to use Xcode project global setting

Differential Revision: http://reviews.llvm.org/D9705

llvm-svn: 237598

9 years ago[PlaceSafepoints] Assertion on that gc_result can not have preceding phis should...
Chen Li [Mon, 18 May 2015 19:02:25 +0000 (19:02 +0000)]
[PlaceSafepoints] Assertion on that gc_result can not have preceding phis should only apply to invoke statepoint

Summary: When PlaceSafepoints pass replaces old return result with gc_result from statepoint, it asserts that gc_result can not have preceding phis in its parent block. This is only true on invoke statepoint, which terminates the block and puts its result at the beginning of the normal successor block. Call statepoint does not terminate the block and thus its result is in the same block with it. There should be no restriction on whether there are phis or not.

Reviewers: reames, igor-laevsky

Reviewed By: igor-laevsky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9803

llvm-svn: 237597