Commit Graph

240050 Commits

Author SHA1 Message Date
Simon Pilgrim 67e7e22462 [X86][AVX] Dropped combineShuffle256 - this can now be performed by EltsFromConsecutiveLoads
llvm-svn: 279397
2016-08-21 15:39:45 +00:00
Sanjay Patel 792636603f [InstCombine] use APInt instead of ConstantInt in isSignBitCheck(); NFCI
The callers still have ConstantInt guards, so there is no functional change
intended from this change. But relaxing the callers will allow more folds
for vector types.

llvm-svn: 279396
2016-08-21 15:07:45 +00:00
Roman Gareev 5f99f8656e Add a flag to dump SCoP optimized with the IslScheduleOptimizer pass
Dump polyhedral descriptions of Scops optimized with the isl scheduling
optimizer and the set of post-scheduling transformations applied
on the schedule tree to be able to check the work of the IslScheduleOptimizer
pass at the polyhedral level.

Reviewed-by: Tobias Grosser <tobias@grosser.es>

Differential Revision: https://reviews.llvm.org/D23740

llvm-svn: 279395
2016-08-21 11:20:39 +00:00
Roman Gareev e2ee79afde Simplify AccFuncMap to vector<> AccessFunctions
getAccessFunctions() is dead code and the 'BB' argument
of getOrCreateAccessFunctions() is not used. This patch deletes
getAccessFunctions and transforms AccFuncMap into
a std::vector<std::unique_ptr<MemoryAccess>> AccessFunctions.

Reviewed-by: Tobias Grosser <tobias@grosser.es>

Differential Revision: https://reviews.llvm.org/D23759

llvm-svn: 279394
2016-08-21 11:09:19 +00:00
Guy Blank 9ae797a798 [AVX512][FastISel] Do not use K registers in TEST instructions
In some cases, FastIsel was emitting TEST instruction with K reg input, which is illegal.
Changed to using KORTEST when dealing with K regs.

Differential Revision: https://reviews.llvm.org/D23163

llvm-svn: 279393
2016-08-21 08:02:27 +00:00
Asaf Badouh 356bb76809 [X86][AVX512F] minor fix of the parameter names
add "__" prefix

Bug 28842 https://llvm.org/bugs/show_bug.cgi?id=29040

Differential Revision: https://reviews.llvm.org/D23753


 

llvm-svn: 279392
2016-08-21 07:56:47 +00:00
Duncan P. N. Exon Smith 8f44c98d04 ARM: Avoid dereferencing end() in ARMFrameLowering::emitEpilogue
This fixes the crash from PR29072, where the MachineBasicBlock::iterator
wasn't being properly checked against MachineBasicBlock::end() before
iterating.  This was another bug exposed by the new
ilist::iterator::operator*() assertion from r279314.

This testcase is poor quality.  bugpoint couldn't reduce any further,
and I haven't had time to dig into what's going on so I can't invent a
better one.  I didn't even get good CHECK lines in: this is just a
crasher.

I'm committing anyway since this is a real crash with an obvious fix,
but I'll leave PR29072 open and ask an ARM maintainer to help improve
the testcase.

llvm-svn: 279391
2016-08-21 00:08:10 +00:00
Todd Fiala 3b40aa57f6 Fix broken macOS LLDB Xcode build from r279314
llvm-svn: 279390
2016-08-20 23:24:02 +00:00
Simon Pilgrim 636422a898 [X86][SSE] Regenerate 32-bit buildvector test
llvm-svn: 279389
2016-08-20 23:09:57 +00:00
Simon Pilgrim ead5076753 [X86][SSE] Regenerate subvector extraction widening test
llvm-svn: 279388
2016-08-20 22:00:53 +00:00
Simon Pilgrim b65d476549 [X86] Regenerate fp truncate tests
llvm-svn: 279387
2016-08-20 21:56:33 +00:00
Simon Pilgrim 8275583be6 Regenerate test
llvm-svn: 279386
2016-08-20 21:37:30 +00:00
Simon Pilgrim a1142579f1 Regenerate test
llvm-svn: 279385
2016-08-20 21:35:45 +00:00
Simon Pilgrim ae9b81e684 [X86][XOP] Tweak vpermil2pd test to stop it being combined away
llvm-svn: 279384
2016-08-20 21:07:41 +00:00
Vitaly Buka 1f9e135023 [asan] Minimize code size by using __asan_set_shadow_* for large blocks
Summary:
We can insert function call instead of multiple store operation.
Current default is blocks larger than 64 bytes.
Changes are hidden behind -asan-experimental-poisoning flag.

PR27453

Differential Revision: https://reviews.llvm.org/D23711

llvm-svn: 279383
2016-08-20 20:23:50 +00:00
Simon Pilgrim e62d0da8cc Wdocumentation fix
llvm-svn: 279382
2016-08-20 20:21:27 +00:00
Simon Pilgrim 02b13d4d3c Use SDValue::getOpcode() helper instead of via SDValue::getNode()
llvm-svn: 279381
2016-08-20 20:04:18 +00:00
Vitaly Buka 3455b9b8bc [asan] Initialize __asan_set_shadow_* callbacks
Summary:
Callbacks are not being used yet.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23634

llvm-svn: 279380
2016-08-20 18:34:39 +00:00
Vitaly Buka 186280daa5 [asan] Optimize store size in FunctionStackPoisoner::poisonRedZones
Summary: Reduce store size to avoid leading and trailing zeros.

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23648

llvm-svn: 279379
2016-08-20 18:34:36 +00:00
Artem Dergachev 5657486854 [analyzer] Use faster hashing (MD5) in CloneDetector.
This replaces the old approach of fingerprinting every AST node into a string,
which avoided collisions and was simple to implement, but turned out to be
extremely ineffective with respect to both performance and memory.

The collisions are now dealt with in a separate pass, which no longer causes
performance problems because collisions are rare.

Patch by Raphael Isemann!

Differential Revision: https://reviews.llvm.org/D22515

llvm-svn: 279378
2016-08-20 17:35:53 +00:00
Vitaly Buka 8176ee9b5d [asan] Rename asan-instrument-allocas -> asan-instrument-dynamic-allocas
Summary: Depends on D23707.

Subscribers: kubabrecka

Differential Revision: https://reviews.llvm.org/D23709

llvm-svn: 279377
2016-08-20 17:22:36 +00:00
Vitaly Buka 5b4f12176c [asan] Cleanup instrumentation of dynamic allocas
Summary:
Extract instrumenting dynamic allocas into separate method.
Rename asan-instrument-allocas -> asan-instrument-dynamic-allocas

Differential Revision: https://reviews.llvm.org/D23707

llvm-svn: 279376
2016-08-20 17:22:27 +00:00
Simon Pilgrim cb0ba1067f [X86][SSE] Added vector interleave test (PR21281)
llvm-svn: 279375
2016-08-20 17:07:38 +00:00
Benjamin Kramer f3b323debc [Sema] Don't crash on scanf on forward-declared enums.
This is valid in GNU C, which allows pointers to incomplete enums. GCC
just pretends that the underlying type is 'int' in those cases, follow
that behavior.

llvm-svn: 279374
2016-08-20 16:51:33 +00:00
Vitaly Buka f9fd63ad39 [asan] Add support of lifetime poisoning into ComputeASanStackFrameLayout
Summary:
We are going to combine poisoning of red zones and scope poisoning.

PR27453

Reviewers: kcc, eugenis

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23623

llvm-svn: 279373
2016-08-20 16:48:24 +00:00
Duncan P. N. Exon Smith 1bdc716dca Move unittests/Support/IteratorTest.cpp to unittests/ADT/
This testing stuff from ADT, not Support.  Fix the file location.

llvm-svn: 279372
2016-08-20 14:58:31 +00:00
Vassil Vassilev 8643639ab4 PR28423: Compare primary declaration contexts.
In certain cases (mostly coming from modules), Sema's idea of the StdNamespace
does not point to the first declaration of namespace std.

Patch by Cristina Cristescu!

Reviewed by Richard Smith.

llvm-svn: 279371
2016-08-20 14:50:22 +00:00
Matthew Simpson 235e479984 Reapply "[SLP] Initialize VectorizedValue when gathering"
The test case included in r279125 exposed existing undefined behavior in the
SLP vectorizer that it did not introduce. This patch reapplies the original
patch, but modifies the test case to avoid hitting the undefined behavior. This
allows us to close PR28330 while keeping the UBSan bot happy. The undefined
behavior the original test uncovered will be addressed in a follow-on patch.

Reference: https://llvm.org/bugs/show_bug.cgi?id=28330
llvm-svn: 279370
2016-08-20 14:49:02 +00:00
Matthew Simpson 2429656aa9 [SLP] Add command line option for minimum tree size (NFC)
llvm-svn: 279369
2016-08-20 14:10:06 +00:00
Ed Schouten 21483f5636 Add R_386_TLS_LE as a relocation having an implicit addend.
TLS on i386 in non-PIE/PIC code seems broken right now, because we don't
properly add the addend encoded in the instruction to the resulting
offset when processing R_386_TLS_LE relocations.

Extend one of the existing tests for TLS on i686 to use an addend.

PR:		https://llvm.org/bugs/show_bug.cgi?id=29068
Reviewed by:	ruiu
Differential Revision:	https://reviews.llvm.org/D23741

llvm-svn: 279368
2016-08-20 10:54:51 +00:00
Artem Dergachev 51b9a0e8e8 [analyzer] Make CloneDetector consider macro expansions.
So far macro-generated code was treated by the CloneDetector as normal code.
This caused that some macros where reported as false-positive clones because
large chunks of code coming from otherwise concise macro expansions were treated
as copy-pasted code.

This patch ensures that macros are treated in the same way as literals/function
calls. This prevents macros that expand into multiple statements
from being reported as clones.

Patch by Raphael Isemann!

Differential Revision: https://reviews.llvm.org/D23316

llvm-svn: 279367
2016-08-20 10:06:59 +00:00
Artem Dergachev 5183888813 [analyzer] Make CloneDetector consider template arguments.
For example, code samples `isa<Stmt>(S)' and `isa<Expr>(S)'
are no longer considered to be clones.

Patch by Raphael Isemann!

Differential Revision: https://reviews.llvm.org/D23555

llvm-svn: 279366
2016-08-20 09:57:21 +00:00
Vitaly Buka cc7db13bf0 Revert "[SLP] Initialize VectorizedValue when gathering" to fix ubsan bot.
This reverts commit r279125.

https://reviews.llvm.org/D23410

llvm-svn: 279363
2016-08-20 07:09:39 +00:00
Chandler Carruth 75e010634d [CMake/ASan] Skip using libedit if ASan is enabled -- it leaks memory.
Note that you'll have to clear this variable from your CMake cache for
it to take effect.

llvm-svn: 279362
2016-08-20 07:05:13 +00:00
Xinliang David Li 3bf2d58a21 [Profile] add test with large counts
llvm-svn: 279361
2016-08-20 05:28:42 +00:00
Chandler Carruth 8abdf75d6b [PM] Introduce an abstraction for all the analyses over a particular IR
unit for use in the PreservedAnalyses set.

This doesn't have any important functional change yet but it cleans
things up and makes the analysis substantially more efficient by
avoiding querying through the type erasure for every analysis.

I also think it makes it much easier to reason about how analyses are
preserved when walking across pass managers and across IR unit
abstractions.

Thanks to Sean and Mehdi both for the comments and suggestions.

Differential Revision: https://reviews.llvm.org/D23691

llvm-svn: 279360
2016-08-20 04:57:28 +00:00
Matt Arsenault 314364cbd2 amdgpu: Fix default case value for get_local_size
llvm-svn: 279359
2016-08-20 04:17:17 +00:00
Manman Ren 0f67a9effc Revert r279351 and r279357 due to bot failures
llvm-svn: 279358
2016-08-20 03:00:54 +00:00
Manman Ren 43bbc0d1d6 Fix windows bot
llvm-svn: 279357
2016-08-20 02:28:15 +00:00
Teresa Johnson 765941a841 [gold/ThinLTO] Restore ThinLTO file management in gold plugin
Summary:
The gold-plugin changes added along with the new LTO API in r278338 had
the effect of removing the management of the PluginInputFile that
ensured the files weren't released back to gold until the backend
threads were complete. Add back the old file handling.

Fixes PR29020.

Reviewers: mehdi_amini

Subscribers: mehdi_amini, llvm-commits, hjl.tools

Differential Revision: https://reviews.llvm.org/D23721

llvm-svn: 279356
2016-08-20 01:24:07 +00:00
Teresa Johnson 1f76caf3dd [gold] Fix new gold test to specify emulation mode
Add emulation mode option for new test added in r279023.

llvm-svn: 279355
2016-08-20 01:22:10 +00:00
Todd Fiala be1d3a0b0e added Xcode lldb-gtest-for-debugging target
The lldb-gtest target is for CI and runs the tests as
part of the build phase.  It does not support debugging
the gtests from Xcode, though, due to the run happening
during the build phase.

This change adds a lldb-gtest-for-debugging target that
can be used to debug gtests.

llvm-svn: 279354
2016-08-20 00:54:03 +00:00
Enrico Granata 3630a287a6 Add logic to the ObjC runtime in LLDB to extract the pointer values of the two singleton (pairtons?) instances of __NSCFBoolean that represent true and false
This is useful because that knowledge will in turn allow no-code-running formatting of boolean NSNumbers; but that's a commit that will have to wait Monday..

llvm-svn: 279353
2016-08-20 00:48:11 +00:00
Evgeniy Stepanov c49b00a249 [msan] Disable prlimit test on glibc < 2.13.
llvm-svn: 279352
2016-08-20 00:38:55 +00:00
Manman Ren e712d2061c [NFC] Add a class ObjCProtocolQualifiers to wrap APIs for ObjC protocol list.
This is in preparation of adding a new type class ObjCTypeParamType that
can take protocol qualifiers. ObjCProtocolQualifiers will be shared between
ObjCObjectType and ObjCTypeParamType.
    
rdar://24619481
rdar://25060179

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

llvm-svn: 279351
2016-08-20 00:04:21 +00:00
Matt Arsenault 220268d177 amdgcn: Fix get_local_size IR return type
llvm-svn: 279350
2016-08-20 00:01:21 +00:00
Mehdi Amini 458f805468 [LTO] Add the ability to test -thinlto-emit-imports-files through llvm-lto2
Summary:
Start bringing llvm-lto2 to a level where we can test the LTO API
a bit deeper.

Reviewers: tejohnson

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23681

llvm-svn: 279349
2016-08-19 23:54:40 +00:00
Vedant Kumar 8a4d2ddd19 [Driver] Remove unused #include of llvm/Support/config.h
This is a follow-up to r279112 (which removed the need for the header)
and in the same spirit as r279035 (which attempted to un-break
out-of-tree builds).

llvm-svn: 279348
2016-08-19 23:15:35 +00:00
Matthias Braun 367d853042 MachineFunction: Add llvm_unreachable for missing properties
Most compilers should give you a warning anyway though.

llvm-svn: 279346
2016-08-19 23:03:28 +00:00
Jim Ingham 27f4a94e0a Remove a test that depends on knowing all compiler's register allocation schemes.
This test was using a condition that would compare a variable against the register that would hold
it.  It was failing with clang on arm64 because clang put the variable on the stack.

This is not a supportable way to write tests.

llvm-svn: 279345
2016-08-19 22:58:26 +00:00