platform/upstream/llvm.git
9 years agoAvoid using the cast and use the templated accessor function.
Eric Christopher [Fri, 30 Jan 2015 23:46:40 +0000 (23:46 +0000)]
Avoid using the cast and use the templated accessor function.

llvm-svn: 227643

9 years ago[AArch64] Add a few more DUP testcases. NFC.
Ahmed Bougacha [Fri, 30 Jan 2015 23:41:15 +0000 (23:41 +0000)]
[AArch64] Add a few more DUP testcases.  NFC.

Also, don't lie about testing index 0.

llvm-svn: 227642

9 years agoCodeGen: create a WindowsARMTargetCodeGenInfo
Saleem Abdulrasool [Fri, 30 Jan 2015 23:29:19 +0000 (23:29 +0000)]
CodeGen: create a WindowsARMTargetCodeGenInfo

Create a new TargetCodeGenInfo for Windows on ARM to permit annotating the
functions with stack-probe-size (for /Gs and -mstack-probe-support) for
generating the stack probe necessary for Windows targets.  This will be used by
the backend when lowering the frame to generate the stack probe appropriately.

llvm-svn: 227641

9 years agoFactor out statepoint verification into separate function. (NFC)
Philip Reames [Fri, 30 Jan 2015 23:28:05 +0000 (23:28 +0000)]
Factor out statepoint verification into separate function. (NFC)

Patch by: Igor Laevsky

"Simple refactoring. This is done in preparation to support verification of invokable statepoints."

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

llvm-svn: 227640

9 years ago[fuzzer] Add a gtest-style test
Kostya Serebryany [Fri, 30 Jan 2015 23:26:57 +0000 (23:26 +0000)]
[fuzzer] Add a gtest-style test

Summary: Add one gtest-style test.

Test Plan: run on bot

Reviewers: samsonov

Reviewed By: samsonov

Subscribers: llvm-commits

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

llvm-svn: 227639

9 years agoReuse a bunch of cached subtargets and remove getSubtarget calls
Eric Christopher [Fri, 30 Jan 2015 23:24:40 +0000 (23:24 +0000)]
Reuse a bunch of cached subtargets and remove getSubtarget calls
without a Function argument.

llvm-svn: 227638

9 years agoFix statepoint verifier tests to actually test verifier.
Philip Reames [Fri, 30 Jan 2015 23:18:42 +0000 (23:18 +0000)]
Fix statepoint verifier tests to actually test verifier.

Patch by: Igor Laevsky

"Statepoint verifier tests were using wrong names for the statepoint and gc.relocate intrinsics. This change renames them to use correct names and fixes all uncovered issues."

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

llvm-svn: 227636

9 years ago[AArch64] Robustize neon-scalar-copy.ll tests. NFC.
Ahmed Bougacha [Fri, 30 Jan 2015 23:13:57 +0000 (23:13 +0000)]
[AArch64] Robustize neon-scalar-copy.ll tests. NFC.

Some of those didn't even have run lines: they were removed
inadvertently during the Great Merge of 2014.

They used to check for DUPs, but now we go through W-regs?
Filed PR22418 for that potential regression.

For now, just make the tests explicit, so we now where we stand.

llvm-svn: 227635

9 years ago[TSan] Fix Go build.
Alexey Samsonov [Fri, 30 Jan 2015 23:04:57 +0000 (23:04 +0000)]
[TSan] Fix Go build.

llvm-svn: 227634

9 years agoRemove unused function.
Alexey Samsonov [Fri, 30 Jan 2015 23:04:54 +0000 (23:04 +0000)]
Remove unused function.

llvm-svn: 227633

9 years agoAdd ARM test for r227489, but XFAIL because this is actually more work than it appear...
David Blaikie [Fri, 30 Jan 2015 23:04:39 +0000 (23:04 +0000)]
Add ARM test for r227489, but XFAIL because this is actually more work than it appeared to be.

Also revert r227489 since it didn't actually fix the thing I thought I
was fixing (since the test case was targeting the wrong architecture
initially). The change might be correct & demonstrated by other test
cases, but it's not a priority for me to find those test cases right
now.

Filed PR22417 for the failure.

llvm-svn: 227632

9 years agoGNU LD option export-dynamic can accept single dash flag.
Davide Italiano [Fri, 30 Jan 2015 22:56:22 +0000 (22:56 +0000)]
GNU LD option export-dynamic can accept single dash flag.

Differential Revision: D7044
Reviewed by: ruiu

llvm-svn: 227631

9 years agoAdd myself to CREDITS.TXT.
Dan Albert [Fri, 30 Jan 2015 22:40:31 +0000 (22:40 +0000)]
Add myself to CREDITS.TXT.

llvm-svn: 227630

9 years agoUpdate web page to direct patches to Phabricator.
Dan Albert [Fri, 30 Jan 2015 22:33:41 +0000 (22:33 +0000)]
Update web page to direct patches to Phabricator.

llvm-svn: 227629

9 years ago[PBQP] Fix transposed worst row/column check in handleAdd/RemoveNode in the PBQP
Lang Hames [Fri, 30 Jan 2015 22:28:49 +0000 (22:28 +0000)]
[PBQP] Fix transposed worst row/column check in handleAdd/RemoveNode in the PBQP
allocator.

Patch by Jonas Paulsson. Thanks Jonas!

llvm-svn: 227628

9 years agoSEH: Don't jump to an unreachable continuation block
Reid Kleckner [Fri, 30 Jan 2015 22:16:45 +0000 (22:16 +0000)]
SEH: Don't jump to an unreachable continuation block

If both the __try and __except blocks do not return, we want to delete
the continuation block as unreachable instead.

llvm-svn: 227627

9 years agoNFC. Making printOptionValues an API on the parser class.
Chris Bieneman [Fri, 30 Jan 2015 22:16:01 +0000 (22:16 +0000)]
NFC. Making printOptionValues an API on the parser class.

llvm-svn: 227626

9 years agoFix memory leak in WinEHPrepare introduced in r227405.
Alexey Samsonov [Fri, 30 Jan 2015 22:07:05 +0000 (22:07 +0000)]
Fix memory leak in WinEHPrepare introduced in r227405.

This leak was detected by ASan bootstrap of LLVM.

llvm-svn: 227625

9 years agoRemove unused function.
Eric Christopher [Fri, 30 Jan 2015 22:02:36 +0000 (22:02 +0000)]
Remove unused function.

llvm-svn: 227624

9 years agoRemove extraneous forward declaration.
Eric Christopher [Fri, 30 Jan 2015 22:02:34 +0000 (22:02 +0000)]
Remove extraneous forward declaration.

llvm-svn: 227623

9 years agoUse the cached subtargets and remove calls to getSubtarget/getSubtargetImpl
Eric Christopher [Fri, 30 Jan 2015 22:02:31 +0000 (22:02 +0000)]
Use the cached subtargets and remove calls to getSubtarget/getSubtargetImpl
without a Function argument.

llvm-svn: 227622

9 years agoAdd a similar templated cast for getSubtarget off of the MachineFunction
Eric Christopher [Fri, 30 Jan 2015 22:02:19 +0000 (22:02 +0000)]
Add a similar templated cast for getSubtarget off of the MachineFunction
to save typing a lot of static_casts.

llvm-svn: 227621

9 years agoAdd one more vim swap file pattern
Michael Liao [Fri, 30 Jan 2015 21:59:28 +0000 (21:59 +0000)]
Add one more vim swap file pattern

llvm-svn: 227620

9 years ago[Hexagon] Adding vector shift instructions and tests.
Colin LeMahieu [Fri, 30 Jan 2015 21:58:46 +0000 (21:58 +0000)]
[Hexagon] Adding vector shift instructions and tests.

llvm-svn: 227619

9 years agoR600/SI: Handle SI_SPILL_V96_RESTORE in SIRegisterInfo::eliminateFrameIndex()
Tom Stellard [Fri, 30 Jan 2015 21:51:51 +0000 (21:51 +0000)]
R600/SI: Handle SI_SPILL_V96_RESTORE in SIRegisterInfo::eliminateFrameIndex()

This fixes a crash in Unigine Heaven.

llvm-svn: 227618

9 years agoWindows: Fix _CPPUNWIND definition to follow -fcxx-exceptions
Reid Kleckner [Fri, 30 Jan 2015 21:42:55 +0000 (21:42 +0000)]
Windows: Fix _CPPUNWIND definition to follow -fcxx-exceptions

This is consistent with how we interpret the MSVC /EH flag, which
controls -fcxx-exceptions.

llvm-svn: 227616

9 years ago[X86] Cleanup tabs in test vector-zext.ll. NFC.
Ahmed Bougacha [Fri, 30 Jan 2015 21:41:28 +0000 (21:41 +0000)]
[X86] Cleanup tabs in test vector-zext.ll. NFC.

Some tests have tabs, some don't.
In vector-[sz]ext.ll, space wins (well duh!).

llvm-svn: 227615

9 years agoSilence "not all paths return a value" warning in MSVC
Reid Kleckner [Fri, 30 Jan 2015 21:30:57 +0000 (21:30 +0000)]
Silence "not all paths return a value" warning in MSVC

llvm-svn: 227614

9 years ago[Hexagon] Adding vector predicate instructions.
Colin LeMahieu [Fri, 30 Jan 2015 21:24:06 +0000 (21:24 +0000)]
[Hexagon] Adding vector predicate instructions.

llvm-svn: 227613

9 years ago[Hexagon] Adding vector permutation instructions and tests.
Colin LeMahieu [Fri, 30 Jan 2015 21:14:00 +0000 (21:14 +0000)]
[Hexagon] Adding vector permutation instructions and tests.

llvm-svn: 227612

9 years agoWin64: Put a REX_W prefix on all TAILJMP* instructions
Reid Kleckner [Fri, 30 Jan 2015 21:03:31 +0000 (21:03 +0000)]
Win64: Put a REX_W prefix on all TAILJMP* instructions

MSDN's x64 software conventions page says that this is one of the fixed
list of legal epilogues:
https://msdn.microsoft.com/en-us/library/tawsa7cb.aspx

Presumably this is how the unwinder distinguishes epilogue jumps from
in-function control flow.

Also normalize the way we place "## TAILCALL" comments on such jumps.

llvm-svn: 227611

9 years agoELF: Fix a bug in -l.
Rui Ueyama [Fri, 30 Jan 2015 21:03:19 +0000 (21:03 +0000)]
ELF: Fix a bug in -l.

If a linker script is given with -l, LLD failed to read the file.
The bug was introduced in 227341.

llvm-svn: 227610

9 years ago[Hexagon] Adding vector multiplies. Cleaning up tests.
Colin LeMahieu [Fri, 30 Jan 2015 20:56:54 +0000 (20:56 +0000)]
[Hexagon] Adding vector multiplies.  Cleaning up tests.

llvm-svn: 227609

9 years agoRemove the preverify pass from the documentation now that it has been removed
Yunzhong Gao [Fri, 30 Jan 2015 20:51:09 +0000 (20:51 +0000)]
Remove the preverify pass from the documentation now that it has been removed
since r199487.

llvm-svn: 227608

9 years ago[Hexagon] Adding XTYPE/COMPLEX instructions and cleaning up tests.
Colin LeMahieu [Fri, 30 Jan 2015 20:08:37 +0000 (20:08 +0000)]
[Hexagon] Adding XTYPE/COMPLEX instructions and cleaning up tests.

llvm-svn: 227607

9 years ago[AArch64] Make AArch64A57FPLoadBalancing output stable.
Chad Rosier [Fri, 30 Jan 2015 19:55:40 +0000 (19:55 +0000)]
[AArch64] Make AArch64A57FPLoadBalancing output stable.

Add tie breaker to colorChainSet() sort so that processing order doesn't
depend on std::set order, which depends on pointer order, which is
unstable from run to run.

No test case as this is nearly impossible to reproduce.

Phabricator Review: http://reviews.llvm.org/D7265
Patch by Geoff Berry <gberry@codeaurora.org>!

llvm-svn: 227606

9 years agoRemove a redundant dyn_cast.
Adrian Prantl [Fri, 30 Jan 2015 19:42:59 +0000 (19:42 +0000)]
Remove a redundant dyn_cast.

llvm-svn: 227605

9 years agoInliner: Use replaceDbgDeclareForAlloca() instead of splicing the
Adrian Prantl [Fri, 30 Jan 2015 19:37:48 +0000 (19:37 +0000)]
Inliner: Use replaceDbgDeclareForAlloca() instead of splicing the
instruction and generalize it to optionally dereference the variable.
Follow-up to r227544.

llvm-svn: 227604

9 years agoARM: further correct .fpu directive handling
Saleem Abdulrasool [Fri, 30 Jan 2015 19:35:18 +0000 (19:35 +0000)]
ARM: further correct .fpu directive handling

If the original FPU specification involved a restricted VFP unit (d16), ensure
that we reset the functionality when we encounter a new FPU type.  In
particular, if the user specified vfpv3-d16, but switched to a VFPv3 (which has
32 double precision registers), we would fail to reset the D16 feature, and
treat it as being equivalent to vfpv3-d16.

llvm-svn: 227603

9 years agoRevert "Add missing test from r227488"
Renato Golin [Fri, 30 Jan 2015 19:25:23 +0000 (19:25 +0000)]
Revert "Add missing test from r227488"

This reverts commit r227489, since this is the real one failing the bots.

llvm-svn: 227602

9 years agoRevert "Revert "Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respec...
Renato Golin [Fri, 30 Jan 2015 19:25:20 +0000 (19:25 +0000)]
Revert "Revert "Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps.""

This reverts commit r227600, since that reverted the wrong comit. Sorry.

llvm-svn: 227601

9 years agoRevert "Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the...
Renato Golin [Fri, 30 Jan 2015 19:18:58 +0000 (19:18 +0000)]
Revert "Matching ARM change for r227481: DebugInfo: Teach Fast ISel to respect the debug location of comparisons in jumps."

This reverts commit r227488 as it was failing ARM bots.

llvm-svn: 227600

9 years agoFixup gold-plugin after r227576.
Alexey Samsonov [Fri, 30 Jan 2015 19:14:04 +0000 (19:14 +0000)]
Fixup gold-plugin after r227576.

llvm-svn: 227599

9 years ago[Hexagon] Adding XTYPE/ALU vector instructions. Organizing test files.
Colin LeMahieu [Fri, 30 Jan 2015 19:13:26 +0000 (19:13 +0000)]
[Hexagon] Adding XTYPE/ALU vector instructions.  Organizing test files.

llvm-svn: 227598

9 years agoARM: improve caret diagnostics for invalid FPU name
Saleem Abdulrasool [Fri, 30 Jan 2015 18:42:10 +0000 (18:42 +0000)]
ARM: improve caret diagnostics for invalid FPU name

In the case of an invalid FPU name, place the caret at the name rather than FPU
directive.

llvm-svn: 227595

9 years agoFix lli after the DebugInfo move.
Zachary Turner [Fri, 30 Jan 2015 18:42:03 +0000 (18:42 +0000)]
Fix lli after the DebugInfo move.

llvm-svn: 227594

9 years agoSpecial-case the PS4 SDK for a clang test
Filipe Cabecinhas [Fri, 30 Jan 2015 18:25:59 +0000 (18:25 +0000)]
Special-case the PS4 SDK for a clang test

Original patch by Gao Yunzhong!

llvm-svn: 227593

9 years agoShuffle tests around to more appropriate files
Filipe Cabecinhas [Fri, 30 Jan 2015 18:25:48 +0000 (18:25 +0000)]
Shuffle tests around to more appropriate files

llvm-svn: 227592

9 years agoFix regression in r227409 where we were passing -fsyntax-only
Eric Christopher [Fri, 30 Jan 2015 18:22:23 +0000 (18:22 +0000)]
Fix regression in r227409 where we were passing -fsyntax-only
in all cases.

Patch by Artem Belevich.

llvm-svn: 227591

9 years agoWrap debug output with DEBUG().
Rui Ueyama [Fri, 30 Jan 2015 18:20:44 +0000 (18:20 +0000)]
Wrap debug output with DEBUG().

llvm-svn: 227590

9 years agoCheck bit widths before trying to get a type.
Filipe Cabecinhas [Fri, 30 Jan 2015 18:13:50 +0000 (18:13 +0000)]
Check bit widths before trying to get a type.

Added a test case for it.
Also added run lines for the test case in r227566.

Bugs found with afl-fuzz

llvm-svn: 227589

9 years ago[Hexagon] Adding a number of vector load variants and organizing tests.
Colin LeMahieu [Fri, 30 Jan 2015 18:09:44 +0000 (18:09 +0000)]
[Hexagon] Adding a number of vector load variants and organizing tests.

llvm-svn: 227588

9 years agoReally really don't build llvm-pdbdump on MSVC < 2013.
Zachary Turner [Fri, 30 Jan 2015 18:08:05 +0000 (18:08 +0000)]
Really really don't build llvm-pdbdump on MSVC < 2013.

I thought it was enough to just not add the tool subdirectory,
but apparently I need to explicitly mark it ignore.

llvm-svn: 227587

9 years agoMove DebugInfo to DebugInfo/DWARF.
Zachary Turner [Fri, 30 Jan 2015 18:07:45 +0000 (18:07 +0000)]
Move DebugInfo to DebugInfo/DWARF.

In preparation for adding PDB support to LLVM, this moves the
DWARF parsing code to its own subdirectory under DebugInfo, and
renames LLVMDebugInfo to LLVMDebugInfoDWARF.

This is purely a mechanical / build system change.

Differential Revision: http://reviews.llvm.org/D7269
Reviewed by: Eric Christopher

llvm-svn: 227586

9 years agoImplement log10
Jan Vesely [Fri, 30 Jan 2015 18:00:34 +0000 (18:00 +0000)]
Implement log10

v2: Use constant and multiplication instead of division
v3: Use hex constants

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 227585

9 years agoARM: correct handling of .fpu directive
Saleem Abdulrasool [Fri, 30 Jan 2015 17:58:25 +0000 (17:58 +0000)]
ARM: correct handling of .fpu directive

The FPU directive permits the user to switch the target FPU, enabling
instructions that would be otherwise unavailable.  However, when configuring the
new subtarget features, we would not enable the implied functions for newer
FPUs.  This would result in invalid rejection of valid input.  Ensure that we
inherit the implied FPU functionality when enabling newer versions of the FPU.
Fortunately, these are mostly hierarchical, unlike the CPUs.

Addresses PR22395.

llvm-svn: 227584

9 years ago[mips] Pass ABI name via -target-abi instead of target-features
Daniel Sanders [Fri, 30 Jan 2015 17:35:23 +0000 (17:35 +0000)]
[mips] Pass ABI name via -target-abi instead of target-features

Patch by Vladimir Medic

Reviewers: echristo, atanasyan, dsanders

Reviewed By: atanasyan, dsanders

Subscribers: llvm-commits, echristo, atanasyan

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

llvm-svn: 227583

9 years agotidy up; NFC
Sanjay Patel [Fri, 30 Jan 2015 16:58:58 +0000 (16:58 +0000)]
tidy up; NFC

llvm-svn: 227582

9 years agoFollow-up to r217302 and r227555: Don't crash on inline ~A::A() if A is an int.
Nico Weber [Fri, 30 Jan 2015 16:53:11 +0000 (16:53 +0000)]
Follow-up to r217302 and r227555: Don't crash on inline ~A::A() if A is an int.

Even with r227555, this still crashed:

  struct S {
    int A;
    ~A::A() {}
  };

That's because ParseOptionalCXXScopeSpecifier()'s call to
ActOnCXXNestedNameSpecifier() doesn't mark the scope spec as invalid if sema
thought it's a good idea to fixit-correct "::" to ":".  For the diagnostic
improvement done in r217302, we never want :: to be interpreted as :, so fix
this by setting ColonSacred to false temporarily.

Found by SLi's bot.

llvm-svn: 227581

9 years agoAdapt test for tid format on non-Darwin platforms
Ed Maste [Fri, 30 Jan 2015 16:45:24 +0000 (16:45 +0000)]
Adapt test for tid format on non-Darwin platforms

llvm-svn: 227580

9 years agoRestrict SigtrampUnwind test to Darwin only
Ed Maste [Fri, 30 Jan 2015 16:33:02 +0000 (16:33 +0000)]
Restrict SigtrampUnwind test to Darwin only

It needs OS-specific knowledge and has not yet been adapted to other
systems.

llvm-svn: 227579

9 years agoSkip Objective-C test on non-Darwin platforms
Ed Maste [Fri, 30 Jan 2015 16:31:07 +0000 (16:31 +0000)]
Skip Objective-C test on non-Darwin platforms

llvm-svn: 227578

9 years agoCode cleanup
Nathan Sidwell [Fri, 30 Jan 2015 14:21:35 +0000 (14:21 +0000)]
Code cleanup
Parser::ParseLexedMethodDeclaration: Use local var for Param
Sema::MergeCXXFunctionDecls: Use hasInheritedDefaultArg

llvm-svn: 227577

9 years ago[PM] Sink the population of the pass manager with target-specific
Chandler Carruth [Fri, 30 Jan 2015 13:33:42 +0000 (13:33 +0000)]
[PM] Sink the population of the pass manager with target-specific
analyses back into the LTO code generator.

The pass manager builder (and the transforms library in general)
shouldn't be referencing the target machine at all.

This makes the LTO population work like the others -- the data layout
and target transform info need to be pre-populated.

llvm-svn: 227576

9 years agoFix a warning introduced by r227557 due to a default label in a fully
Chandler Carruth [Fri, 30 Jan 2015 13:30:43 +0000 (13:30 +0000)]
Fix a warning introduced by r227557 due to a default label in a fully
covering switch.

llvm-svn: 227575

9 years ago[Cygming] Seek also chkstk_ms, or JIT fails with DLL builds. It is fixup for r227519.
NAKAMURA Takumi [Fri, 30 Jan 2015 13:01:19 +0000 (13:01 +0000)]
[Cygming] Seek also chkstk_ms, or JIT fails with DLL builds. It is fixup for r227519.

llvm-svn: 227574

9 years agoRegenerate configure since r227090.
NAKAMURA Takumi [Fri, 30 Jan 2015 13:01:00 +0000 (13:01 +0000)]
Regenerate configure since r227090.

llvm-svn: 227573

9 years ago[Sanitizers] Intercept gethost functions on FreeBSD
Viktor Kutuzov [Fri, 30 Jan 2015 12:58:37 +0000 (12:58 +0000)]
[Sanitizers] Intercept gethost functions on FreeBSD
Committed unreviewed with permission.

llvm-svn: 227572

9 years ago[Msan] Fix the shmctl unit tests to pass on FreeBSD
Viktor Kutuzov [Fri, 30 Jan 2015 12:55:40 +0000 (12:55 +0000)]
[Msan] Fix the shmctl unit tests to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D7253

llvm-svn: 227571

9 years ago[Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macro
Viktor Kutuzov [Fri, 30 Jan 2015 12:43:52 +0000 (12:43 +0000)]
[Sanitizers] Introduce GET_LINK_MAP_BY_DLOPEN_HANDLE() macro
Differential Revision: http://reviews.llvm.org/D7233

llvm-svn: 227570

9 years agoCorrect a typo in a comment
Tobias Grosser [Fri, 30 Jan 2015 12:33:43 +0000 (12:33 +0000)]
Correct a typo in a comment

llvm-svn: 227569

9 years ago[mips] Manually replace JAL pseudo-instructions with their JALR equivalent, instead...
Toma Tabacu [Fri, 30 Jan 2015 11:18:50 +0000 (11:18 +0000)]
[mips] Manually replace JAL pseudo-instructions with their JALR equivalent, instead of using InstAlias.

Summary:
This is needed by the .cprestore assembler directive.

This directive needs to be able to insert an LW instruction after every JALR replacement of a JAL pseudo-instruction
(and never after a JALR which has NOT been a result of a pseudo-instruction replacement).

The problem with using InstAlias for these is that after it replaces the pseudo-instruction, we can't find out if the resulting JALR instruction
was generated by an InstAlias or not, so we don't know whether or not to insert our LW instruction.

By replacing it manually, we know when the pseudo-instruction replacement happens and we can insert the LW instruction correctly.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: emaste, llvm-commits

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

llvm-svn: 227568

9 years agoRemove unneeded code
Filipe Cabecinhas [Fri, 30 Jan 2015 11:17:56 +0000 (11:17 +0000)]
Remove unneeded code

We don't really care about enabling RTTI with -fexceptions, only with
-fcxx-exceptions.

llvm-svn: 227567

9 years ago[bitcode reader] Fix an assert on invalid type tables
Filipe Cabecinhas [Fri, 30 Jan 2015 10:57:58 +0000 (10:57 +0000)]
[bitcode reader] Fix an assert on invalid type tables

Bug found with afl-fuzz

llvm-svn: 227566

9 years agoFix OpenCL 1.2 double as an optional core feature behaviour
Fraser Cormack [Fri, 30 Jan 2015 10:51:46 +0000 (10:51 +0000)]
Fix OpenCL 1.2 double as an optional core feature behaviour

In OpenCL 1.2, using double no longer requires using the pragma cl_khr_fp64,
instead a kernel is allowed to use double, but must first have queried
clGetDeviceInfo's CL_DEVICE_DOUBLE_FP_CONFIG.

Page 197, section 6.1.1 of the OpenCL 1.2 specification has a footnote 23
describing this behaviour.

I've also added test cases such that the pragma must be used if targeting
OpenCL 1.0 or 1.1, but is ignored in 1.2 and 2.0.

Patch by Neil Henning!

Reviewers: Pekka Jääskeläinen

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

llvm-svn: 227565

9 years agoIntroduce llvm/test/LTO/X86. LTO tests may be assumed as target-specific.
NAKAMURA Takumi [Fri, 30 Jan 2015 10:09:26 +0000 (10:09 +0000)]
Introduce llvm/test/LTO/X86. LTO tests may be assumed as target-specific.

llvm-svn: 227564

9 years agoIntroduce llvm/test/LTO/ARM for arm-specific LTO test(s).
NAKAMURA Takumi [Fri, 30 Jan 2015 09:53:37 +0000 (09:53 +0000)]
Introduce llvm/test/LTO/ARM for arm-specific LTO test(s).

llvm-svn: 227563

9 years agoChange a very hot piece of code in TableGen's register unit computations to use bit...
Owen Anderson [Fri, 30 Jan 2015 09:05:49 +0000 (09:05 +0000)]
Change a very hot piece of code in TableGen's register unit computations to use bit vectors rather than arrays.

For target descriptions with very large and very dense register files, TableGen
can take an extremely long time to run.  This change makes a dent in that (~15%
in my measurements) by accelerating the single hottest operation with better data
structures.

I believe there's still a lot of room to make this even faster with more global
changes that require replacing some of the existing datastructures in this area
with bit vectors, but that's a more involved change and I wanted to get this
simpler improvement in first.

llvm-svn: 227562

9 years agoMove the target specific test case arbitrary-induction-step.ll to test/Transforms...
Hao Liu [Fri, 30 Jan 2015 07:33:31 +0000 (07:33 +0000)]
Move the target specific test case arbitrary-induction-step.ll to test/Transforms/LoopVectorize/AArch64 folder.

llvm-svn: 227561

9 years ago[Sanitizer] Make BlockingMutex really linker initialized.
Yury Gribov [Fri, 30 Jan 2015 06:20:43 +0000 (06:20 +0000)]
[Sanitizer] Make BlockingMutex really linker initialized.

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

llvm-svn: 227560

9 years agoReplace code dup with a macro.
Yury Gribov [Fri, 30 Jan 2015 06:18:46 +0000 (06:18 +0000)]
Replace code dup with a macro.
Differential Revision: http://reviews.llvm.org/D7172

llvm-svn: 227559

9 years ago[Core] Fix "variable ‘comp’ has function type" error shown by gcc
Simon Atanasyan [Fri, 30 Jan 2015 05:42:57 +0000 (05:42 +0000)]
[Core] Fix "variable ‘comp’ has function type" error shown by gcc

llvm-svn: 227558

9 years ago[LoopVectorize] Induction variables: support arbitrary constant step.
Hao Liu [Fri, 30 Jan 2015 05:02:21 +0000 (05:02 +0000)]
[LoopVectorize] Induction variables: support arbitrary constant step.
Previously, only -1 and +1 step values are supported for induction variables. This patch extends LV to support
arbitrary constant steps.
Initial patch by Alexey Volkov. Some bug fixes are added in the following version.

Differential Revision: http://reviews.llvm.org/D6051 and http://reviews.llvm.org/D7193

llvm-svn: 227557

9 years agoSema: Disable template instantiation once a fatal error is raised
David Majnemer [Fri, 30 Jan 2015 05:01:23 +0000 (05:01 +0000)]
Sema: Disable template instantiation once a fatal error is raised

Fatal errors disable all further diagnostics.  Continuing to permit
template instantiation does nothing but make it take longer for clang to
finish with the TU.

Instead, halt all further instantiation.

Fixed in PR22396.

llvm-svn: 227556

9 years agoFollow-up to r217302: Don't crash on ~A::A() if A is undeclared.
Nico Weber [Fri, 30 Jan 2015 04:05:15 +0000 (04:05 +0000)]
Follow-up to r217302: Don't crash on ~A::A() if A is undeclared.

llvm-svn: 227555

9 years agoTypo fixo.
Nico Weber [Fri, 30 Jan 2015 03:47:03 +0000 (03:47 +0000)]
Typo fixo.

llvm-svn: 227554

9 years agoWrap to 80 cols by removing trailing whitespace. No behavior change.
Nico Weber [Fri, 30 Jan 2015 02:35:21 +0000 (02:35 +0000)]
Wrap to 80 cols by removing trailing whitespace. No behavior change.

llvm-svn: 227553

9 years agoSmall tweak to the name of kernel binaries that we look
Jason Molenda [Fri, 30 Jan 2015 02:28:06 +0000 (02:28 +0000)]
Small tweak to the name of kernel binaries that we look
for; match files starting with "mach", not "mach." so
the old common name mach_kernel will still be matched.

llvm-svn: 227552

9 years agoRemove useless DEBUG_WITH_TYPE.
Rui Ueyama [Fri, 30 Jan 2015 02:15:57 +0000 (02:15 +0000)]
Remove useless DEBUG_WITH_TYPE.

We have a DEBUG_TYPE macro for the same debug string already
at the beginning of the file.

llvm-svn: 227551

9 years ago[AArch64]Fix PR21675, a bug about lowering llvm.ctpop.i32. We should noot use "DAG...
Hao Liu [Fri, 30 Jan 2015 02:13:53 +0000 (02:13 +0000)]
[AArch64]Fix PR21675, a bug about lowering llvm.ctpop.i32. We should noot use "DAG.getUNDEF(MVT::v8i8)" to get all zero vector.
Patch by Wei-cheng Wang.

llvm-svn: 227550

9 years agoReplace SimpleFileWrapper with a function.
Rui Ueyama [Fri, 30 Jan 2015 02:11:59 +0000 (02:11 +0000)]
Replace SimpleFileWrapper with a function.

SimpleFileWrapper was a class to wrap an existing (possibly non-mutable)
file as a mutable file. We used instances of the class in RoundTrip*
passes, because the passes convert mutable files to non-mutable files,
and we needed to convert them back to mutable.

That feature can be implemented without defining a new class. Generally
speaking, if we can implement a feature without defining a class and
using only public interface of exsiting classes, that's preferred way
to do that. And this is the case.

llvm-svn: 227549

9 years agoUse the cached subtarget in PPCFrameLowering.
Eric Christopher [Fri, 30 Jan 2015 02:11:26 +0000 (02:11 +0000)]
Use the cached subtarget in PPCFrameLowering.

llvm-svn: 227548

9 years agoMigrate some of PPC away from the use of bare getSubtarget/getSubtargetImpl.
Eric Christopher [Fri, 30 Jan 2015 02:11:24 +0000 (02:11 +0000)]
Migrate some of PPC away from the use of bare getSubtarget/getSubtargetImpl.

llvm-svn: 227547

9 years agoMigrage PPCRegisterInfo to use the cached subtarget.
Eric Christopher [Fri, 30 Jan 2015 02:11:21 +0000 (02:11 +0000)]
Migrage PPCRegisterInfo to use the cached subtarget.

llvm-svn: 227546

9 years agoTeach AST printing to not print whitespace inside {} and () for initialization,
Richard Smith [Fri, 30 Jan 2015 02:04:26 +0000 (02:04 +0000)]
Teach AST printing to not print whitespace inside {} and () for initialization,
to match LLVM's preferred style.

llvm-svn: 227545

9 years agoFix PR22386. The inliner moves static allocas to the entry basic block
Adrian Prantl [Fri, 30 Jan 2015 01:55:25 +0000 (01:55 +0000)]
Fix PR22386. The inliner moves static allocas to the entry basic block
so we need to move the dbg.declare intrinsics that describe them, too.

llvm-svn: 227544

9 years agoExplicitly write type instead of auto.
Rui Ueyama [Fri, 30 Jan 2015 01:52:23 +0000 (01:52 +0000)]
Explicitly write type instead of auto.

Now it is clear that std::move() is meaningless here.

llvm-svn: 227543

9 years agoMigrate a bare getSubtarget call to query the MachineFunction
Eric Christopher [Fri, 30 Jan 2015 01:50:09 +0000 (01:50 +0000)]
Migrate a bare getSubtarget call to query the MachineFunction
for the target dependent one.

llvm-svn: 227542

9 years agoMigrate NVPTXISelLowering to take the subtarget that it's dependent
Eric Christopher [Fri, 30 Jan 2015 01:50:07 +0000 (01:50 +0000)]
Migrate NVPTXISelLowering to take the subtarget that it's dependent
upon as an argument and store/use that in the entire function.

llvm-svn: 227541

9 years agoWeaken an assertion that isn't true for invalid input.
Nico Weber [Fri, 30 Jan 2015 01:48:49 +0000 (01:48 +0000)]
Weaken an assertion that isn't true for invalid input.

llvm-svn: 227540