platform/upstream/llvm.git
10 years agoTry to fix ARM buildbots
Renato Golin [Sat, 22 Nov 2014 16:59:03 +0000 (16:59 +0000)]
Try to fix ARM buildbots

llvm-svn: 222619

10 years agoSupport matching signext attribute in the parallel_num_threads_codegen test to appeas...
Daniel Sanders [Sat, 22 Nov 2014 16:21:18 +0000 (16:21 +0000)]
Support matching signext attribute in the parallel_num_threads_codegen test to appease clang-cmake-mips builder.

The Mips target adds the signext attribute to signed 32-bit integers in order
to support the N32/N64 correctly. Integers must be promoted to 64-bit bit on
these ABI's.

llvm-svn: 222618

10 years agoSupport matching signext attribute in vla-lambda-capturing test to appease clang...
Daniel Sanders [Sat, 22 Nov 2014 16:08:56 +0000 (16:08 +0000)]
Support matching signext attribute in vla-lambda-capturing test to appease clang-cmake-mips builder.

The Mips target adds the signext attribute to signed 32-bit integers in order
to support the N32/N64 correctly. Integers must be promoted to 64-bit bit on
these ABI's.

llvm-svn: 222617

10 years agoCodeGen: Make atomic operations play nice with address spaces
David Majnemer [Sat, 22 Nov 2014 10:44:12 +0000 (10:44 +0000)]
CodeGen: Make atomic operations play nice with address spaces

We were being a little sloppy with our pointer/address space casts.

This fixes PR21643.

llvm-svn: 222615

10 years ago[x86] Teach the vector shuffle yet another step of canonicalization.
Chandler Carruth [Sat, 22 Nov 2014 09:18:53 +0000 (09:18 +0000)]
[x86] Teach the vector shuffle yet another step of canonicalization.

No functionality changed yet, but this will prevent subsequent patches
from having to handle permutations of various interleaved shuffle
patterns.

llvm-svn: 222614

10 years agoInstCombine: Propagate NSW/NUW for X*(1<<Y) -> X<<Y
David Majnemer [Sat, 22 Nov 2014 08:57:02 +0000 (08:57 +0000)]
InstCombine: Propagate NSW/NUW for X*(1<<Y) -> X<<Y

llvm-svn: 222613

10 years agoInstCombine: Propagate NSW for -X * -Y -> X * Y
David Majnemer [Sat, 22 Nov 2014 07:25:19 +0000 (07:25 +0000)]
InstCombine: Propagate NSW for -X * -Y -> X * Y

llvm-svn: 222612

10 years agoInstSimplify: Simplify (sub 0, X) -> X if it's NUW
David Majnemer [Sat, 22 Nov 2014 07:15:16 +0000 (07:15 +0000)]
InstSimplify: Simplify (sub 0, X) -> X if it's NUW

This is a generalization of the X - (0 - Y) -> X transform.

llvm-svn: 222611

10 years agoSimplify MicrosoftMangleContextImpl::shouldMangleStringLiteral
David Majnemer [Sat, 22 Nov 2014 06:20:38 +0000 (06:20 +0000)]
Simplify MicrosoftMangleContextImpl::shouldMangleStringLiteral

No functionality changed.

llvm-svn: 222610

10 years agoInstCombine: Silence a parenthesis warning
David Majnemer [Sat, 22 Nov 2014 06:09:28 +0000 (06:09 +0000)]
InstCombine: Silence a parenthesis warning

llvm-svn: 222609

10 years agoMark 9 lldb unit tests for ubuntu as XFAIL.
Siva Chandra [Sat, 22 Nov 2014 05:55:00 +0000 (05:55 +0000)]
Mark 9 lldb unit tests for ubuntu as XFAIL.

The following lldb unit tests fail check-lldb on ubuntu:

TestDataFormatterStdMap.py
TestDataFormatterStdVBool.py
TestDataFormatterStdVector.py
TestDataFormatterSynthVal.py
TestEvents.py
TestInitializerList.py
TestMemoryHistory.py
TestReportData.py
TestValueVarUpdate.py

These unit test failures are for non-core functionality. The intent is to
reduce the check-lldb FAILS to core functionality FAILS and then circle
back later and fix these FAILS at a later date.

llvm-svn: 222608

10 years ago[x86] Add some tests for a common unpack pattern of vector shuffle that
Chandler Carruth [Sat, 22 Nov 2014 05:44:43 +0000 (05:44 +0000)]
[x86] Add some tests for a common unpack pattern of vector shuffle that
has a remarkably unique and efficient lowering.

While we get this some of the time already, we miss a few cases and
there wasn't a principled reason we got it. We should at least test
this. v8 already has tests for this pattern.

llvm-svn: 222607

10 years agoInstCombine: Preserve nsw when folding X*(2^C) -> X << C
David Majnemer [Sat, 22 Nov 2014 04:52:55 +0000 (04:52 +0000)]
InstCombine: Preserve nsw when folding X*(2^C) -> X << C

llvm-svn: 222606

10 years agoInstCombine: Preserve nsw/nuw for ((X << C2)*C1) -> (X * (C1 << C2))
David Majnemer [Sat, 22 Nov 2014 04:52:52 +0000 (04:52 +0000)]
InstCombine: Preserve nsw/nuw for ((X << C2)*C1) -> (X * (C1 << C2))

llvm-svn: 222605

10 years agoInstCombine: Preserve nsw for (mul %V, -1) -> (sub 0, %V)
David Majnemer [Sat, 22 Nov 2014 04:52:38 +0000 (04:52 +0000)]
InstCombine: Preserve nsw for (mul %V, -1) -> (sub 0, %V)

llvm-svn: 222604

10 years agoDelay checking overrides for exception specifications if the overridden
Richard Smith [Sat, 22 Nov 2014 03:09:05 +0000 (03:09 +0000)]
Delay checking overrides for exception specifications if the overridden
specification has not yet been parsed.

llvm-svn: 222603

10 years agoFixed an issue where a DW_FORM_ref{2,4,8} might be extracted incorrectly because...
Greg Clayton [Sat, 22 Nov 2014 01:58:59 +0000 (01:58 +0000)]
Fixed an issue where a DW_FORM_ref{2,4,8} might be extracted incorrectly because the wrong compile unit was being used to calculate the compile unit relative offset.

This was fixed by making the DWARFFormValue contain the compile unit that it needs so it can decode its form value correctly. Any form value that requires a compile unit will now assert. If any of the assertions that were added are triggered, then code that led to the extraction of the form value without properly setting the compile unit must be fixed immediately.

<rdar://problem/19035440>

llvm-svn: 222602

10 years agoWhen a RegisterContext produces an invalid CFA address, change
Jason Molenda [Sat, 22 Nov 2014 01:52:03 +0000 (01:52 +0000)]
When a RegisterContext produces an invalid CFA address, change
UnwindLLDB::AddOneMoreFrame to try the fallback unwind plan on
that same stack frame before it tries the fallback unwind plan
on the "next" or callee frame.

In RegisterContextLLDB::TryFallbackUnwindPlan, when we're
trying the fallback unwind plan to see if it is valid, make
sure we change all of the object ivars that might be used in
the process of fetching the CFA & caller's saved pc value
and restore those if we decide not to use the fallback
unwindplan.

<rdar://problem/19035079>

llvm-svn: 222601

10 years agoThis is the first step of making lldb able to create target-specific things
Jim Ingham [Sat, 22 Nov 2014 01:42:44 +0000 (01:42 +0000)]
This is the first step of making lldb able to create target-specific things
(e.g. breakpoints, stop-hooks) before we have any targets - for instance in
your ~/.lldbinit file.  These will then get copied over to any new targets
that get created.  So far, you can only make stop-hooks.

Breakpoints will have to learn to move themselves from target to target for
us to get them from no-target to new-target.

We should also make a command & SB API way to prime this ur-target.

llvm-svn: 222600

10 years agoMake the sourcing of the local .lldbinit file quiet.
Jim Ingham [Sat, 22 Nov 2014 01:33:22 +0000 (01:33 +0000)]
Make the sourcing of the local .lldbinit file quiet.

<rdar://problem/19065278>

llvm-svn: 222599

10 years agoSilence a -Wcast-qual warning
David Majnemer [Sat, 22 Nov 2014 00:45:01 +0000 (00:45 +0000)]
Silence a -Wcast-qual warning

llvm-svn: 222598

10 years ago[ProcessWindows] Clean up the register definitions array.
Zachary Turner [Sat, 22 Nov 2014 00:37:14 +0000 (00:37 +0000)]
[ProcessWindows] Clean up the register definitions array.

llvm-svn: 222597

10 years agoJust a few words to introduce the extra optional argument to Python summaries
Enrico Granata [Sat, 22 Nov 2014 00:06:30 +0000 (00:06 +0000)]
Just a few words to introduce the extra optional argument to Python summaries

llvm-svn: 222594

10 years agoEnable Python summaries to use custom SBTypeSummaryOptions if the user is so inclined...
Enrico Granata [Sat, 22 Nov 2014 00:02:47 +0000 (00:02 +0000)]
Enable Python summaries to use custom SBTypeSummaryOptions if the user is so inclined. Updates to the webdoc will follow

llvm-svn: 222593

10 years agoFix mispelled 'ling' Python property to be 'line' in
Jason Molenda [Sat, 22 Nov 2014 00:00:17 +0000 (00:00 +0000)]
Fix mispelled 'ling' Python property to be 'line' in
SBLineEntry and SBDeclaration.  Patch from Chris Willmore.
<rdar://problem/19054323>

llvm-svn: 222592

10 years agoMS ABI: Mangle u8 string literals
David Majnemer [Fri, 21 Nov 2014 23:56:50 +0000 (23:56 +0000)]
MS ABI: Mangle u8 string literals

UTF8 string literals are mangled just like ASCII string literals.

llvm-svn: 222591

10 years ago[InstCombine] Re-commit of r218721 (Optimize icmp-select-icmp sequence)
Gerolf Hoflehner [Fri, 21 Nov 2014 23:36:44 +0000 (23:36 +0000)]
[InstCombine] Re-commit of  r218721 (Optimize icmp-select-icmp sequence)

Fixes the self-host fail. Note that this commit activates dominator
analysis in the combiner by default (like the original commit did).

llvm-svn: 222590

10 years agoRemove print statement that was accidentally left in.
Greg Clayton [Fri, 21 Nov 2014 23:34:35 +0000 (23:34 +0000)]
Remove print statement that was accidentally left in.

llvm-svn: 222589

10 years agoDon't make check-sanitizer depend on profile on Windows
Reid Kleckner [Fri, 21 Nov 2014 23:09:51 +0000 (23:09 +0000)]
Don't make check-sanitizer depend on profile on Windows

We don't build the profiling library on Windows, so CMake warns that the
target doesn't exist.

llvm-svn: 222588

10 years agoFix transformation of add with pc argument to adr for non-immediate
Joerg Sonnenberger [Fri, 21 Nov 2014 22:39:34 +0000 (22:39 +0000)]
Fix transformation of add with pc argument to adr for non-immediate
arguments.

llvm-svn: 222587

10 years ago[asan] remove old experimental code
Kostya Serebryany [Fri, 21 Nov 2014 22:34:29 +0000 (22:34 +0000)]
[asan] remove old experimental code

llvm-svn: 222586

10 years agoR600/SI: Add a failing test case for offset order in ds_read2 instructions
Tom Stellard [Fri, 21 Nov 2014 22:31:47 +0000 (22:31 +0000)]
R600/SI: Add a failing test case for offset order in ds_read2 instructions

llvm-svn: 222585

10 years agoR600/SI: Add an s_mov_b32 to patterns which use the M0RegClass
Tom Stellard [Fri, 21 Nov 2014 22:31:46 +0000 (22:31 +0000)]
R600/SI: Add an s_mov_b32 to patterns which use the M0RegClass

We need to use a s_mov_b32 rather than a copy, so that CSE will
eliminate redundant moves to the m0 register.

llvm-svn: 222584

10 years agoR600/SI: Emit s_mov_b32 m0, -1 before every DS instruction
Tom Stellard [Fri, 21 Nov 2014 22:31:44 +0000 (22:31 +0000)]
R600/SI: Emit s_mov_b32 m0, -1 before every DS instruction

This s_mov_b32 will write to a virtual register from the M0Reg
class and all the ds instructions now take an extra M0Reg explicit
argument.

This change is necessary to prevent issues with the scheduler
mixing together instructions that expect different values in the m0
registers.

llvm-svn: 222583

10 years agoPer off-list feedback, this API returns the *first* value with a given name, not...
Enrico Granata [Fri, 21 Nov 2014 22:23:08 +0000 (22:23 +0000)]
Per off-list feedback, this API returns the *first* value with a given name, not the *only* one. Rename it to reflect that

llvm-svn: 222582

10 years agoR600/SI: Add SIFoldOperands pass
Tom Stellard [Fri, 21 Nov 2014 22:06:37 +0000 (22:06 +0000)]
R600/SI: Add SIFoldOperands pass

This pass attempts to fold the source operands of mov and copy
instructions into their uses.

llvm-svn: 222581

10 years ago[mips][microMIPS] This patch implements functionality in MIPS delay slot
Jozef Kolek [Fri, 21 Nov 2014 22:04:35 +0000 (22:04 +0000)]
[mips][microMIPS] This patch implements functionality in MIPS delay slot
filler such as if delay slot filler have to put NOP instruction into the
delay slot of microMIPS BEQ or BNE instruction which uses the register $0,
then instead of emitting NOP this instruction is replaced by the corresponding
microMIPS compact branch instruction, i.e. BEQZC or BNEZC.

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

llvm-svn: 222580

10 years agoR600/SI: Mark s_mov_b32 and s_mov_b64 as rematerializable
Tom Stellard [Fri, 21 Nov 2014 22:00:16 +0000 (22:00 +0000)]
R600/SI: Mark s_mov_b32 and s_mov_b64 as rematerializable

llvm-svn: 222579

10 years agoR600/SI: Use hex notation for constant in test
Tom Stellard [Fri, 21 Nov 2014 22:00:13 +0000 (22:00 +0000)]
R600/SI: Use hex notation for constant in test

llvm-svn: 222578

10 years ago[Hexagon] Adding sxth instruction.
Colin LeMahieu [Fri, 21 Nov 2014 21:54:59 +0000 (21:54 +0000)]
[Hexagon] Adding sxth instruction.

llvm-svn: 222577

10 years agoAdd an API on SBValueList to find the first value with a given name stored in the...
Enrico Granata [Fri, 21 Nov 2014 21:45:03 +0000 (21:45 +0000)]
Add an API on SBValueList to find the first value with a given name stored in the list

llvm-svn: 222576

10 years ago[Hexagon] Adding sxtb instruction. Renaming some identically named classes that...
Colin LeMahieu [Fri, 21 Nov 2014 21:35:52 +0000 (21:35 +0000)]
[Hexagon] Adding sxtb instruction.  Renaming some identically named classes that will be removed after converting referencing defs.

llvm-svn: 222575

10 years ago[Mips] Use endian::read() for relocation addendum reading
Simon Atanasyan [Fri, 21 Nov 2014 21:26:32 +0000 (21:26 +0000)]
[Mips] Use endian::read() for relocation addendum reading

llvm-svn: 222574

10 years ago[asan] add statistic counter to dynamic alloca instrumentation
Kostya Serebryany [Fri, 21 Nov 2014 21:25:18 +0000 (21:25 +0000)]
[asan] add statistic counter to dynamic alloca instrumentation

llvm-svn: 222573

10 years ago[ASan] Get fake stack code working with GCC 4.8.2.
Jay Foad [Fri, 21 Nov 2014 21:25:09 +0000 (21:25 +0000)]
[ASan] Get fake stack code working with GCC 4.8.2.

Summary:
TestCases/Linux/heavy_uar_test.cc was failing on my
PowerPC64 box with GCC 4.8.2, because the compiler recognised
a memset-like loop and turned it into a call to memset, which
got intercepted by __asan_memset, which got upset because it was
being called on an address in high shadow memory.

Use break_optimization to stop the compiler from doing this.

Reviewers: kcc, samsonov

Reviewed By: kcc

Subscribers: llvm-commits

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

llvm-svn: 222572

10 years ago[Hexagon] Removing SUB_rr and replacing with A2_sub.
Colin LeMahieu [Fri, 21 Nov 2014 21:19:18 +0000 (21:19 +0000)]
[Hexagon] Removing SUB_rr and replacing with A2_sub.

llvm-svn: 222571

10 years agoObjective-C ARC. Fixes a crash when checking for 'weak' propery
Fariborz Jahanian [Fri, 21 Nov 2014 21:12:11 +0000 (21:12 +0000)]
Objective-C ARC. Fixes a crash when checking for 'weak' propery
whose base is not an expression. rdar://19053620

llvm-svn: 222570

10 years agoSema: Don't permit variably modified types in typeid
David Majnemer [Fri, 21 Nov 2014 21:09:12 +0000 (21:09 +0000)]
Sema: Don't permit variably modified types in typeid

GCC and ICC both reject this and the 'Runtime-sized arrays with
automatic storage duration' (N3639) paper forbade this as well.
Previously, we would crash on our way to mangling.

This fixes PR21632.

llvm-svn: 222569

10 years agoImplement -Wcast-qual, fixing #13772.
Roman Divacky [Fri, 21 Nov 2014 21:03:10 +0000 (21:03 +0000)]
Implement -Wcast-qual, fixing #13772.

Many thanks to dblaikie for his advices and suggestions!

llvm-svn: 222568

10 years agoRemove duplication of relocation names in lib/Object/ELFYAML.cpp
Tim Northover [Fri, 21 Nov 2014 20:16:09 +0000 (20:16 +0000)]
Remove duplication of relocation names in lib/Object/ELFYAML.cpp

We can now use the ELF relocation .def files to create the mapping
of relocation numbers to names and avoid having to duplicate the
list of relocations.

Patch by Will Newton.

llvm-svn: 222567

10 years agoRemove duplication of relocation names in lib/Object/ELF.cpp
Tim Northover [Fri, 21 Nov 2014 20:16:07 +0000 (20:16 +0000)]
Remove duplication of relocation names in lib/Object/ELF.cpp

We can now use the ELF relocation .def files to create the mapping
of relocation numbers to names and avoid having to duplicate the
list of relocations.

Patch by Will Newton.

llvm-svn: 222566

10 years agoSplit ELF relocation defintions into per-architecture .def files
Tim Northover [Fri, 21 Nov 2014 20:16:02 +0000 (20:16 +0000)]
Split ELF relocation defintions into per-architecture .def files

This should allow the list of relocations for a particular
architecture to be kept in a single header rather than duplicated
whenever we need to enumerate all the relocations.

Patch by Will Newton.

llvm-svn: 222565

10 years agoMS ABI: Mangle char16_t and char32_t string literals
David Majnemer [Fri, 21 Nov 2014 19:57:25 +0000 (19:57 +0000)]
MS ABI: Mangle char16_t and char32_t string literals

We previously had support for char and wchar_t string literals.  VS 2015
added support for char16_t and char32_t.

String literals must be mangled in the MS ABI in order for them to be
deduplicated across translation units: their linker has no notion of
mergeable section.  Instead, they use the mangled name to make a COMDAT
for the string literal; the COMDAT will merge with other COMDATs in
other object files.

This allows strings in object files generated by clang to get merged
with strings in object files generated by MSVC.

llvm-svn: 222564

10 years agoDebug Info: revert r222195, r222210 and r222239.
Manman Ren [Fri, 21 Nov 2014 19:55:23 +0000 (19:55 +0000)]
Debug Info: revert r222195, r222210 and r222239.

This is no longer needed after David's fix at r222377 + r222485.
rdar://18958417

llvm-svn: 222563

10 years agoDisable header duplication at -Oz in loop-rotate pass.
Roman Divacky [Fri, 21 Nov 2014 19:53:24 +0000 (19:53 +0000)]
Disable header duplication at -Oz in loop-rotate pass.

llvm-svn: 222562

10 years agoDebug Info: add an assertion that the context field of a global variable can not
Manman Ren [Fri, 21 Nov 2014 19:47:48 +0000 (19:47 +0000)]
Debug Info: add an assertion that the context field of a global variable can not
be a DIType with identifier.

This makes sure that there is no need to use DIScopeRef for global variable's
context.

rdar://18958417

llvm-svn: 222561

10 years agoUse isl_schedule_get_ctx
Tobias Grosser [Fri, 21 Nov 2014 19:39:42 +0000 (19:39 +0000)]
Use isl_schedule_get_ctx

llvm-svn: 222560

10 years agoFix typo
Tobias Grosser [Fri, 21 Nov 2014 19:39:38 +0000 (19:39 +0000)]
Fix typo

llvm-svn: 222559

10 years ago[Objective-C] Support a new special module flag that will be put into the
Manman Ren [Fri, 21 Nov 2014 19:24:55 +0000 (19:24 +0000)]
[Objective-C] Support a new special module flag that will be put into the
objc_imageinfo struct.

rdar://17954668

llvm-svn: 222558

10 years agoLazyValueInfo: range'ify some for-loops. No functional change.
Hans Wennborg [Fri, 21 Nov 2014 19:07:46 +0000 (19:07 +0000)]
LazyValueInfo: range'ify some for-loops. No functional change.

llvm-svn: 222557

10 years agoAdd params() to FunctionType. NFC.
Rafael Espindola [Fri, 21 Nov 2014 19:03:35 +0000 (19:03 +0000)]
Add params() to FunctionType. NFC.

While at it, also use makeArrayRef in elements().

llvm-svn: 222556

10 years agoDon't repeat class/function/variable names in comments. NFC.
Sanjay Patel [Fri, 21 Nov 2014 18:58:38 +0000 (18:58 +0000)]
Don't repeat class/function/variable names in comments. NFC.

llvm-svn: 222555

10 years agoLazyValueInfo: fix some typos and indentation, etc. NFC.
Hans Wennborg [Fri, 21 Nov 2014 18:58:23 +0000 (18:58 +0000)]
LazyValueInfo: fix some typos and indentation, etc. NFC.

llvm-svn: 222554

10 years agoAdd and use a helper elements() to StructType. NFC.
Rafael Espindola [Fri, 21 Nov 2014 18:53:05 +0000 (18:53 +0000)]
Add and use a helper elements() to StructType. NFC.

llvm-svn: 222553

10 years agoAdd an assertion for detecting missed/uncorrected TypoExprs.
Kaelyn Takata [Fri, 21 Nov 2014 18:48:06 +0000 (18:48 +0000)]
Add an assertion for detecting missed/uncorrected TypoExprs.

llvm-svn: 222552

10 years agoEnable ActOnIdExpression to use delayed typo correction for non-C++ code
Kaelyn Takata [Fri, 21 Nov 2014 18:48:04 +0000 (18:48 +0000)]
Enable ActOnIdExpression to use delayed typo correction for non-C++ code
when calling DiagnoseEmptyLookup.

llvm-svn: 222551

10 years agoProperly correct initializer expressions based on whether they would be valid.
Kaelyn Takata [Fri, 21 Nov 2014 18:48:00 +0000 (18:48 +0000)]
Properly correct initializer expressions based on whether they would be valid.

llvm-svn: 222550

10 years agoUse the full-Expr filter to disambiguate equidistant correction
Kaelyn Takata [Fri, 21 Nov 2014 18:47:58 +0000 (18:47 +0000)]
Use the full-Expr filter to disambiguate equidistant correction
candidates.

llvm-svn: 222549

10 years agoDo some cleanup of DumpValueObjectOptions. The whole concept of raw printing was...
Enrico Granata [Fri, 21 Nov 2014 18:47:26 +0000 (18:47 +0000)]
Do some cleanup of DumpValueObjectOptions. The whole concept of raw printing was split between feature-specific flags, and an m_be_raw flag, which then drove some other changes in printing behavior. Clean that up, so that each functionality has its own flag .. oh, and make the bools all go in a bitfield since I may want to add more of those over time

llvm-svn: 222548

10 years agoAllow multiple -debug-only args
Matthias Braun [Fri, 21 Nov 2014 18:06:09 +0000 (18:06 +0000)]
Allow multiple -debug-only args

Debug output is shown if any of the -debug-only arguments match.

llvm-svn: 222547

10 years agoLess space; NFC
Sanjay Patel [Fri, 21 Nov 2014 18:05:59 +0000 (18:05 +0000)]
Less space; NFC

llvm-svn: 222546

10 years agoFix formatting. NFC.
Rafael Espindola [Fri, 21 Nov 2014 18:05:55 +0000 (18:05 +0000)]
Fix formatting. NFC.

llvm-svn: 222545

10 years agoAdd a feature flag for slow 32-byte unaligned memory accesses [x86].
Sanjay Patel [Fri, 21 Nov 2014 17:40:04 +0000 (17:40 +0000)]
Add a feature flag for slow 32-byte unaligned memory accesses [x86].

This patch adds a feature flag to avoid unaligned 32-byte load/store AVX codegen
for Sandy Bridge and Ivy Bridge. There is no functionality change intended for
those chips. Previously, the absence of AVX2 was being used as a proxy to detect
this feature. But that hindered codegen for AVX-enabled AMD chips such as btver2
that do not have the 32-byte unaligned access slowdown.

Performance measurements are included in PR21541 ( http://llvm.org/bugs/show_bug.cgi?id=21541 ).

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

llvm-svn: 222544

10 years agoRevert "Allow FDE references outside the +/-2GB range supported by PC relative offset...
Duncan P. N. Exon Smith [Fri, 21 Nov 2014 17:21:18 +0000 (17:21 +0000)]
Revert "Allow FDE references outside the +/-2GB range supported by PC relative offsets for code models other than small/medium. For JIT application, memory layout is less controlled and can result in truncations otherwise."

This reverts commit r222538.

It's causing test failures for CFI, at least on Darwin:

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1189/
http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/1391/

Note that the previous incremental build was on r222537, and the CFI
tests weren't failing:
http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental/1188/

llvm-svn: 222542

10 years agoExtend PipePosix with child_processes_inherit support - to control whether pipe handl...
Oleksiy Vyalov [Fri, 21 Nov 2014 16:18:57 +0000 (16:18 +0000)]
Extend PipePosix with child_processes_inherit support - to control whether pipe handles should be inherited by a child process.

http://reviews.llvm.org/D6348

llvm-svn: 222541

10 years ago[x86] Restructure the checking patterns for v16 and v32 avx2 vector
Chandler Carruth [Fri, 21 Nov 2014 14:53:03 +0000 (14:53 +0000)]
[x86] Restructure the checking patterns for v16 and v32 avx2 vector
shuffle lowering to allow much better blend matching.

Specifically, with the new structure the code seems clearer to me and we
correctly can hit the cases where merging two 128-bit lanes is a clear
win and can be shuffled cheaply afterward.

llvm-svn: 222539

10 years agoAllow FDE references outside the +/-2GB range supported by PC relative
Joerg Sonnenberger [Fri, 21 Nov 2014 14:42:43 +0000 (14:42 +0000)]
Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.

Patch from Akos Kiss.

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

llvm-svn: 222538

10 years ago[x86] Make the previous logic significantly less conservative and get
Chandler Carruth [Fri, 21 Nov 2014 14:33:24 +0000 (14:33 +0000)]
[x86] Make the previous logic significantly less conservative and get
a bunch more improvements.

Non-lane-crossing is fine, the key is that lane merging only makes sense
for single-input shuffles. Not sure why I got so turned around here. The
code all works, I was just using the wrong model for it.

This only updates v4 and v8 lowering. The v16 and v32 lowering requires
restructuring the entire check sequence.

llvm-svn: 222537

10 years ago[DAG] Teach how to turn a build_vector into a shuffle if some of the operands are...
Andrea Di Biagio [Fri, 21 Nov 2014 14:32:06 +0000 (14:32 +0000)]
[DAG] Teach how to turn a build_vector into a shuffle if some of the operands are zero.

Before this patch, the DAGCombiner only tried to convert build_vector dag nodes
into shuffles if all operands were either extract_vector_elt or undef.

This patch improves that logic and teaches the DAGCombiner how to deal with
build_vector dag nodes where one or more operands are zero. A build_vector
dag node with some zero operands is turned into a shuffle only if the resulting
shuffle mask is legal for the target.

llvm-svn: 222536

10 years ago[ASan] Allow the users of SymbolizationLoop to make use of the --dsym_hint option...
Alexander Potapenko [Fri, 21 Nov 2014 14:12:00 +0000 (14:12 +0000)]
[ASan] Allow the users of SymbolizationLoop to make use of the --dsym_hint option in llvm-symbolizer

Let the users of SymbolizationLoop define a function that produces the list of .dSYM hints (possible path to the .dSYM bundle) for the given binary.
Because the hints can't be added to an existing llvm-symbolizer process, we spawn a new symbolizer process ones each time a new hint appears.
Those can only appear for binaries that we haven't seen before.

llvm-svn: 222535

10 years agoclang-format: Understand more lambda return types.
Daniel Jasper [Fri, 21 Nov 2014 14:08:38 +0000 (14:08 +0000)]
clang-format: Understand more lambda return types.

Before:
  auto a = [&b, c ](D * d) -> D * {}

After:
 auto a = [&b, c](D* d) -> D* {}

llvm-svn: 222534

10 years ago[x86] Teach the x86 vector shuffle lowering to detect mergable 128-bit
Chandler Carruth [Fri, 21 Nov 2014 13:56:05 +0000 (13:56 +0000)]
[x86] Teach the x86 vector shuffle lowering to detect mergable 128-bit
lanes.

By special casing these we can often either reduce the total number of
shuffles significantly or reduce the number of (high latency on Haswell)
AVX2 shuffles that potentially cross 128-bit lanes. Even when these
don't actually cross lanes, they have much higher latency to support
that. Doing two of them and a blend is worse than doing a single insert
across the 128-bit lanes to blend and then doing a single interleaved
shuffle.

While this seems like a narrow case, it kept cropping up on me and the
difference is *huge* as you can see in many of the test cases. I first
hit this trying to perfectly fix the interleaving shuffle patterns used
by Halide for AVX2.

llvm-svn: 222533

10 years agosanitizer_common: fix function w/o return
Dmitry Vyukov [Fri, 21 Nov 2014 13:55:19 +0000 (13:55 +0000)]
sanitizer_common: fix function w/o return
When SANITIZER_USES_CANONICAL_LINUX_SYSCALLS the function misses return statement.

llvm-svn: 222532

10 years agoclang-format: Use nested block special case for all languages.
Daniel Jasper [Fri, 21 Nov 2014 13:38:53 +0000 (13:38 +0000)]
clang-format: Use nested block special case for all languages.

Previously this was only used for JavaScript.

Before:
  functionCall({
                 int i;
                 int j;
               },
               aaaa, bbbb, cccc);

After:
  functionCall({
    int i;
    int j;
  }, aaaa, bbbb, cccc);

llvm-svn: 222531

10 years agoFix test after r222526.
Dmitry Vyukov [Fri, 21 Nov 2014 12:48:43 +0000 (12:48 +0000)]
Fix test after r222526.

llvm-svn: 222530

10 years agoclang-format: Handle comments in short case labels.
Daniel Jasper [Fri, 21 Nov 2014 12:36:25 +0000 (12:36 +0000)]
clang-format: Handle comments in short case labels.

With AllowShortCaseLabelsOnASingleLine set to true:
This gets now left unchanged:
  case 1:
    // comment
    return;

Whereas before it was changed into:
  case 1: // comment return;

This fixes llvm.org/PR21630.

llvm-svn: 222529

10 years ago[x86] Remove more windows line endings that slipped into this file...
Chandler Carruth [Fri, 21 Nov 2014 12:33:46 +0000 (12:33 +0000)]
[x86] Remove more windows line endings that slipped into this file...

llvm-svn: 222528

10 years agoclang-format: [Java] Support more Java keywords.
Daniel Jasper [Fri, 21 Nov 2014 12:19:07 +0000 (12:19 +0000)]
clang-format: [Java] Support more Java keywords.

Before:
  public final<X> Foo foo() {
  }

  public abstract<X> Foo foo();

After:
  public final <X> Foo foo() {
  }

  public abstract <X> Foo foo();

Patch by Harry Terkelsen. Thank you.

llvm-svn: 222527

10 years agoclang: do not add -pie for tsan
Dmitry Vyukov [Fri, 21 Nov 2014 12:19:01 +0000 (12:19 +0000)]
clang: do not add -pie for tsan

Revision 220571 removes the requirement to use -pie for tsan binaries. So remove -pie from driver.
Also s/hasZeroBaseShadow/requiresPIE/ because that is what it is used for. Msan does not have zero-based shadow, but requires pie. And in general the relation between zero-based shadow and pie is unclear.

http://reviews.llvm.org/D6318

llvm-svn: 222526

10 years ago[x86] Add a bunch of test cases to 256-bit shuffles that exercise
Chandler Carruth [Fri, 21 Nov 2014 12:17:50 +0000 (12:17 +0000)]
[x86] Add a bunch of test cases to 256-bit shuffles that exercise
merging 128-bit subvectors and also shuffling all the elements of those
subvectors. Currently we generate pretty bad code for many of these, but
I'm testing a patch that should dramatically improve this in addition to
making the shuffle lowering robust to other changes.

llvm-svn: 222525

10 years agoclang-format: [Java] Basic lambda support.
Daniel Jasper [Fri, 21 Nov 2014 12:14:12 +0000 (12:14 +0000)]
clang-format: [Java] Basic lambda support.

llvm-svn: 222524

10 years ago[OPENMP] Disable CapturedStmt generation for standalone directives.
Alexey Bataev [Fri, 21 Nov 2014 11:33:46 +0000 (11:33 +0000)]
[OPENMP] Disable CapturedStmt generation for standalone directives.
No functional changes, just code improvement.

llvm-svn: 222523

10 years ago[DAG] Refactor the shuffle combining logic in DAGCombiner. NFC.
Andrea Di Biagio [Fri, 21 Nov 2014 11:33:07 +0000 (11:33 +0000)]
[DAG] Refactor the shuffle combining logic in DAGCombiner. NFC.

This patch simplifies the logic that combines a pair of shuffle nodes into
a single shuffle if there is a legal mask. Also added comments to better
describe the algorithm. No functional change intended.

llvm-svn: 222522

10 years ago[X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive...
Alexey Volkov [Fri, 21 Nov 2014 11:19:34 +0000 (11:19 +0000)]
[X86] For Silvermont CPU use 16-bit division instead of 64-bit for small positive numbers

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

llvm-svn: 222521

10 years ago[asan] Runtime support for asan-instrument-allocas which enables instrumentation...
Yury Gribov [Fri, 21 Nov 2014 10:32:05 +0000 (10:32 +0000)]
[asan] Runtime support for asan-instrument-allocas which enables instrumentation of variable-sized dynamic allocas. Patch by Max Ostapenko.

Reviewed at http://reviews.llvm.org/D6055

llvm-svn: 222520

10 years ago[asan] Add new hidden compile-time flag asan-instrument-allocas to sanitize variable...
Yury Gribov [Fri, 21 Nov 2014 10:29:50 +0000 (10:29 +0000)]
[asan] Add new hidden compile-time flag asan-instrument-allocas to sanitize variable-sized dynamic allocas. Patch by Max Ostapenko.

Reviewed at http://reviews.llvm.org/D6055

llvm-svn: 222519

10 years agoAdd LLVMScalarOpts to LLVMPowerPCCodeGen.
NAKAMURA Takumi [Fri, 21 Nov 2014 09:14:45 +0000 (09:14 +0000)]
Add LLVMScalarOpts to LLVMPowerPCCodeGen.

llvm-svn: 222516

10 years agoMS ABI: Mangle char16_t and char32_t types
David Majnemer [Fri, 21 Nov 2014 09:06:49 +0000 (09:06 +0000)]
MS ABI: Mangle char16_t and char32_t types

These mangling make clang more compatible with MSVC 2015.
Correctly mangling char16_t and char32_t will take a little more work.

llvm-svn: 222515

10 years agoHandle extra whitespace in linux distribution name.
Eric Fiselier [Fri, 21 Nov 2014 08:54:35 +0000 (08:54 +0000)]
Handle extra whitespace in linux distribution name.

llvm-svn: 222514

10 years agoMark some locale tests as XFAIL on debian and opensuse.
Eric Fiselier [Fri, 21 Nov 2014 08:02:38 +0000 (08:02 +0000)]
Mark some locale tests as XFAIL on debian and opensuse.

llvm-svn: 222513