Commit Graph

241540 Commits

Author SHA1 Message Date
Matt Arsenault fbfd828d2a Replace nextafter implementation
This one passes conformance.

llvm-svn: 280961
2016-09-08 16:37:56 +00:00
Simon Pilgrim 073472a2bf [InstCombine][X86] Regenerate masked memory op combine tests
llvm-svn: 280960
2016-09-08 16:32:37 +00:00
Simon Pilgrim cd7b2830b9 [InstCombine][X86] Regenerate vperm2f128/vperm2i128 combine tests
llvm-svn: 280959
2016-09-08 16:30:46 +00:00
Reid Kleckner dd16896324 Really fix warnings about passing -std=gnu99 to MSVC
llvm-svn: 280958
2016-09-08 16:25:34 +00:00
Simon Pilgrim 3b1ecbe66c [InstCombine][X86] Regenerate insertps combine tests
llvm-svn: 280957
2016-09-08 16:15:21 +00:00
Vedant Kumar 2c5c878312 [Coverage] Delete some dead code (NFC)
llvm-svn: 280956
2016-09-08 16:14:14 +00:00
Jason Henline 5755bb42ff Add streamexecutor-config
Summary:
Similar to llvm-config, gets command-line flags that are needed to build
applications linking against StreamExecutor.

Reviewers: jprice, jlebar

Subscribers: beanz, parallel_libs-commits

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

llvm-svn: 280955
2016-09-08 16:12:33 +00:00
Qin Zhao 0ab52b97e8 Revert "[ESan][MIPS] Adds support for MIPS64"
Summary:
This reverts commit 62b3eecdbe72af0255f0639b0446087a47efbf48. (D23799)

The CL cause 13 ESan test failure on x86_64:
Failing Tests (13):
    EfficiencySanitizer-x86_64 :: TestCases/large-stack-linux.c
    EfficiencySanitizer-x86_64 :: TestCases/libc-intercept.c
    EfficiencySanitizer-x86_64 :: TestCases/mmap-shadow-conflict.c
    EfficiencySanitizer-x86_64 :: TestCases/struct-simple.cpp
    EfficiencySanitizer-x86_64 :: TestCases/verbose-simple.c
    EfficiencySanitizer-x86_64 :: TestCases/workingset-early-fault.c
    EfficiencySanitizer-x86_64 :: TestCases/workingset-memset.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-midreport.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-samples.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-signal-posix.cpp
    EfficiencySanitizer-x86_64 :: TestCases/workingset-simple.cpp
    EfficiencySanitizer-x86_64 :: Unit/circular_buffer.cpp
    EfficiencySanitizer-x86_64 :: Unit/hashtable.cpp

  Unexpected Failures: 13

Reviewers: bruening, slthakur

Subscribers: sdardis, kubabrecka, beanz

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

llvm-svn: 280954
2016-09-08 16:09:46 +00:00
Francis Ricci 0b6f487c63 [compiler-rt] Don't use -fPIC when building for Windows
Summary: This flag doesn't make sense on Windows systems.

Reviewers: beanz, kubabrecka, compnerd

Subscribers: dberris, llvm-commits, beanz

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

llvm-svn: 280953
2016-09-08 15:57:22 +00:00
Sam Kolton 1b746d1b9d [TableGen] AsmMatcher: Add AsmVariantName to Instruction class.
Summary:
This allows specifying instructions that are available only in specific assembler variant. If AsmVariantName is specified then instruction will be presented only in MatchTable for this variant. If not specified then assembler variants will be determined based on AsmString.
Also this allows splitting assembler match tables in same way as it is done in dissasembler.

Reviewers: ab, tstellarAMD, craig.topper, vpykhtin

Subscribers: wdng

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

llvm-svn: 280952
2016-09-08 15:50:52 +00:00
Reid Kleckner 1361c0c6ef Remove restriction that 'sret' must be on the first parameter
On Windows, it is often applied to the second parameter, and the x86
backend is prepared to deal with sret appearing on any parameter.

Other backends assume it only appears on parameter zero, but those are
target-specific requirements, and not an IR-level rule.

llvm-svn: 280951
2016-09-08 15:45:27 +00:00
Reid Kleckner cb5c98b14a Give an x86 assembler test a triple
llvm-svn: 280950
2016-09-08 15:40:43 +00:00
Dehao Chen db3810771e revert r280427
Refactor replaceDominatedUsesWith to have a flag to control whether to replace uses in BB itself.

Summary: This is in preparation for LoopSink pass which calls replaceDominatedUsesWith to update after sinking.
llvm-svn: 280949
2016-09-08 15:25:12 +00:00
Michael Kruse 7886bd7ca5 Add -polly-flatten-schedule pass.
The -polly-flatten-schedule pass reduces the number of scattering
dimensions in its isl_union_map form to make them easier to understand.
It is not meant to be used in production, only for debugging and
regression tests.

To illustrate, how it can make sets simpler, here is a lifetime set
used computed by the porposed DeLICM pass without flattening:

    { Stmt_reduction_for[0, 4] -> [0, 2, o2, o3] : o2 < 0;
      Stmt_reduction_for[0, 4] -> [0, 1, o2, o3] : o2 >= 5;
      Stmt_reduction_for[0, 4] -> [0, 1, 4, o3] : o3 > 0;
      Stmt_reduction_for[0, i1] -> [0, 1, i1, 1] : 0 <= i1 <= 3;
      Stmt_reduction_for[0, 4] -> [0, 2, 0, o3] : o3 <= 0 }

And here the same lifetime for a semantically identical one-dimensional
schedule:

    { Stmt_reduction_for[0, i1] -> [2 + 3i1] : 0 <= i1 <= 4 }

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

llvm-svn: 280948
2016-09-08 15:02:36 +00:00
Rafael Espindola 868fc9279e Handle globs in global symbol names.
Fixes pr28775.

llvm-svn: 280947
2016-09-08 14:50:55 +00:00
Tobias Grosser a2d80ba58a GICHelper: Correctly assign return value
... to preserve reference counting logic.

In practice the missing assignment would not have caused any issues. We still
fix it as the code is wrong and it also causes noise in the clang static
analysis runs.

llvm-svn: 280946
2016-09-08 14:34:54 +00:00
Kuba Brecka 8651c04ce0 [asan] Fix handle_abort_on_error.cc test on Darwin
r280885 added a testcase for handle_abort, which is broken on macOS, let’s add this support into sanitizer_mac.cc.

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

llvm-svn: 280945
2016-09-08 14:32:11 +00:00
Aditya Kumar b839888af8 Added 'inline' attribute to basic_string's destructor
Author: laxmansole

Reviewers: howard.hinnant
           mclow.lists
Subscribers: EricWF, flyingforyou, evandro

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

Currently basic_string's destructor is not getting inlined. So adding 'inline' attribute to ~basic_string().
Worked in collaboration with Aditya Kumar.

llvm-svn: 280944
2016-09-08 14:31:44 +00:00
Tobias Grosser b27ed0da37 SCEVAffinator: Add missing __isl_take annotations
llvm-svn: 280943
2016-09-08 14:31:31 +00:00
Valentina Giusti cda0ae46ac Fix for rL280668, Intel(R) Memory Protection Extensions (Intel(R) MPX) support.
Summary: Signed-off-by: Valentina Giusti <valentina.giusti@intel.com>

Reviewers: dvlahovski, granata.enrico, clayborg, labath

Subscribers: lldb-commits

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

llvm-svn: 280942
2016-09-08 14:16:45 +00:00
Rafael Espindola 4d1e4d76ee Use a protected destructor instead of a virtual one.
llvm-svn: 280941
2016-09-08 14:11:08 +00:00
Tobias Grosser 55a7af7da5 ScopInfo: Make clear that no double-free problem exists
When running the clang static analyser to check for memory issues, this code
originally showed a double free, as the analyser was unable to understand that
isl_set_free always returns NULL and consequently later uses of the isl object
we just freed will never be reached. Without this knowledge, the analyser has
to issue a warning.

We refactor the code to make it clear that for empty maps the current loop
iteration is aborted.

llvm-svn: 280940
2016-09-08 14:08:07 +00:00
Tobias Grosser b316dc166f ScopDetection: Make sure we do not accidentally divide by zero
This code path is likely never triggered, but by still handling this case
locally we avoid warnings in clangs static analyzer.

llvm-svn: 280939
2016-09-08 14:08:05 +00:00
Tobias Grosser adfc971820 DependenceInfo: Make clear that no double-free problem exists
When running the clang static analyser to check for memory issues, this code
originally showed a double free, as the analyser was unable to understand that
isl_union_map_free always returns NULL and consequently later uses of the isl
object we just freed will never be reached. Without this knowledge, the analyser
has to issue a warning.

We refactor the code to make it clear that for empty maps the current loop
iteration is aborted.

llvm-svn: 280938
2016-09-08 14:08:01 +00:00
Rafael Espindola 042a3f209b Compute section names only once.
This simplifies error handling as there is now only one place in the
code that needs to consider the possibility that the name is
corrupted. Before we would do it in every access.

llvm-svn: 280937
2016-09-08 14:06:08 +00:00
Tobias Grosser f3600dfa2d IslNodeBuilder: Add missing __isl_take annotations
llvm-svn: 280936
2016-09-08 13:48:55 +00:00
Renato Golin d257373887 [ARM XRay] Try to fix Thumb-only failure
I mised the check that it had to support ARM to work. This commit tries
to fix that, to make sure we don't emit ARM code in Thumb-only mode.

llvm-svn: 280935
2016-09-08 13:45:10 +00:00
Filipe Cabecinhas 3e848ea586 [asan] Handle SIGBART signal description. (found by buildbot)
llvm-svn: 280934
2016-09-08 13:28:26 +00:00
Ed Maste 1c365dc268 Fix -Wcovered-switch-default warning in AppleObjCRuntimeV2.cpp
The switch coveres all possible values. If a new one is added in the
future the compiler will start warning, providing a notification that
the switch needs updating.

llvm-svn: 280933
2016-09-08 13:17:42 +00:00
James Molloy c6a6144966 [SDAGBuilder] Don't create a binary tree for switches in minsize mode
This bloats codesize - all of the non-leaf nodes are extra code.

llvm-svn: 280932
2016-09-08 13:12:22 +00:00
Ed Maste 7771462b28 Fix unused variable and integer sign warnings from r280906
llvm-svn: 280931
2016-09-08 13:11:31 +00:00
Filipe Cabecinhas 1989be7cf0 [asan] Reify ErrorDeadlySignal
Summary: Keep reifying other errors.

Reviewers: kcc, samsonov

Subscribers: llvm-commits, kubabrecka

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

llvm-svn: 280930
2016-09-08 12:58:15 +00:00
James Molloy 753c18f5c0 [Thumb1] AND with a constant operand can be converted into BIC
So model the cost of materializing the constant operand C as the minimum of
C and ~C.

llvm-svn: 280929
2016-09-08 12:58:12 +00:00
James Molloy 7c7255e40b [Thumb1] Fix cost calculation for complemented immediates
Materializing something like "-3" can be done as 2 instructions:
  MOV r0, #3
  MVN r0, r0

This has a cost of 2, not 3. It looks like we were already trying to detect this pattern in TII::getIntImmCost(), but were taking the complement of the zero-extended value instead of the sign-extended value which is unlikely to ever produce a number < 256.

There were no tests failing after changing this... :/

llvm-svn: 280928
2016-09-08 12:58:04 +00:00
Simon Pilgrim cc7b4b511b [SelectionDAG] Add BUILD_VECTOR support to computeKnownBits and SimplifyDemandedBits
Add the ability to computeKnownBits and SimplifyDemandedBits to extract the known zero/one bits from BUILD_VECTOR, returning the known bits that are shared by every vector element.

This is an initial step towards determining the sign bits of a vector (PR29079).

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

llvm-svn: 280927
2016-09-08 12:57:51 +00:00
Simon Pilgrim a01ee07a19 [DAGCombiner] Enable AND combines of splatted constant vectors
Allow AND combines to use a vector splatted constant as well as a constant scalar.

Preliminary part of D24253.

llvm-svn: 280926
2016-09-08 12:36:39 +00:00
Rafael Espindola 16853bb00f Pack InputSectionData from 72 to 64 bytes. NFC.
llvm-svn: 280925
2016-09-08 12:33:41 +00:00
Abhishek Aggarwal 3c7f070956 LLDB: API for iPermission of object file's sections
Summary:
 - Added an API to public interface that provides permissions (RWX) of
   individual sections of an object file
   
 - Earlier, there was no way to find out this information through SB
   APIs
    
 - A possible use case of this API is:
   when a user wants to know the sections that have executable machine
   instructions and want to write a tool on top of LLDB based on this
   information

 - Differential Revision: https://reviews.llvm.org/D24251

llvm-svn: 280924
2016-09-08 12:22:56 +00:00
Tobias Grosser 2a526feec9 ScopInfo: Add missing __isl_take annotation
llvm-svn: 280923
2016-09-08 11:18:56 +00:00
Pavel Labath 6f22b771c4 Fix test breakage in r280919
It turns out that self.dbg.GetSelectedPlatform().GetTriple() is not a good way
to get the triple of the process, as it returns the incorrect triple in case of a
32-bit process running on a 64-bit platform.

Instead, go the long way round and ask the stub for the process triple. This
fixes the test for i386.

llvm-svn: 280922
2016-09-08 11:09:14 +00:00
Simon Pilgrim 4acc49e58d Moved unreachable to appease msvc, gcc and clang
llvm-svn: 280921
2016-09-08 11:03:41 +00:00
Kuba Brecka 419ebb2891 [tsan] Support C++11 call_once in TSan on Darwin
This patch adds a wrapper for call_once, which uses an already-compiled helper __call_once with an atomic release which is invisible to TSan. To avoid false positives, the interceptor performs an explicit atomic release in the callback wrapper.

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

llvm-svn: 280920
2016-09-08 10:15:20 +00:00
Pavel Labath 2f1fbaebe2 gdb-remote: Add jModulesInfo packet
Summary:
This adds the jModulesInfo packet, which is the equivalent of qModulesInfo, but it enables us to
query multiple modules at once. This makes a significant speed improvement in case the
application has many (over a hundred) modules, and the communication link has a non-negligible
latency. This functionality is accessed by ProcessGdbRemote::PrefetchModuleSpecs(), which does
the caching. GetModuleSpecs() is modified to first consult the cache before asking the remote
stub. PrefetchModuleSpecs is currently only called from POSIX-DYLD dynamic loader plugin, after
it reads the list of modules from the inferior memory, but other uses are possible.

This decreases the attach time to an android application by about 40%.

Reviewers: clayborg

Subscribers: tberghammer, lldb-commits, danalbert

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

llvm-svn: 280919
2016-09-08 10:07:04 +00:00
Pablo Barrio 2b7ed1339c Revert "[ARM] Lower UDIV+UREM to UDIV+MLS (and the same for SREM)"
This reverts commit r280808.

It is possible that this change results in an infinite loop. This
is causing timeouts in some tests on ARM, and a Chromebook bot is
failing.

llvm-svn: 280918
2016-09-08 10:05:57 +00:00
Simon Pilgrim 48c32b1504 Fixed a 'not all control paths return a value' warning on MSVC builds
llvm-svn: 280917
2016-09-08 09:59:58 +00:00
George Rimar 9fc6143a5b [ELF] - Add virtual destructor to LinkerScriptBase class. NFC.
Absence of it caused a clang warning:
warning: 'lld:🧝:LinkerScriptBase' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]

At fact we don't need it here because do not destroy this object by
base pointer.

llvm-svn: 280916
2016-09-08 09:59:13 +00:00
Eugene Leviant 36fac7f0d0 Linker script: implement ALIGNOF
Differential revision: https://reviews.llvm.org/D24141

llvm-svn: 280915
2016-09-08 09:08:30 +00:00
Simon Atanasyan 919a58c456 [ELF][MIPS] Fix initialization of TLS-related GOT entries
This patch allows static linking of TLS code. To do that it fixes
GOT entries initialization.

If TLS-related GOT entry created for a preemptible symbol i.e. has
a corresponding dynamic relocation, leave the entry initialized by zero.
Write down adjusted TLS symbol's values otherwise. For the adjustments
calculation use offsets for thread-local storage.

https://www.linux-mips.org/wiki/NPTL

llvm-svn: 280914
2016-09-08 09:07:19 +00:00
Simon Atanasyan af52f6af22 [ELF][MIPS] Update the comment
llvm-svn: 280913
2016-09-08 09:07:12 +00:00
Eugene Leviant 3967ea05a9 Set entry address to 0x0 if no _start symbol
Differential revision: https://reviews.llvm.org/D23925

llvm-svn: 280912
2016-09-08 08:57:51 +00:00