platform/upstream/llvm.git
7 years ago[cmake] Declare LLVM_CMAKE_PATH for use in subprojects
Michal Gorny [Wed, 19 Oct 2016 12:18:34 +0000 (12:18 +0000)]
[cmake] Declare LLVM_CMAKE_PATH for use in subprojects

Declare the LLVM_CMAKE_PATH to the source directory location of CMake
files, in order to make it possible to easily use them in subprojects.
Such a variable is already declared in most of LLVM projects
(and inconsistently mixed with direct source tree references), including
Clang, LLDB, compiler-rt, libcxx... Declaring it inside main LLVM tree
makes it possible to avoid having to declare fallback values or use
conditionals in those projects.

It should be noted that in some of the subprojects LLVM_CMAKE_PATH is
used to reference generated LLVMConfig.cmake file. However, these
references are conditional to stand-alone builds and explicitly
including this file is unnecessary in combined builds.

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

llvm-svn: 284581

7 years ago[Thumb-1] Synthesize TBB/TBH instructions to make use of compressed jump tables
James Molloy [Wed, 19 Oct 2016 12:06:49 +0000 (12:06 +0000)]
[Thumb-1] Synthesize TBB/TBH instructions to make use of compressed jump tables

The TBB and TBH instructions in Thumb-2 allow jump tables to be compressed into sequences of bytes or shorts respectively. These instructions do not exist in Thumb-1, however it is possible to synthesize them out of a sequence of other instructions.

It turns out this sequence is so short that it's almost never a lose for performance and is ALWAYS a significant win for code size.

TBB example:
Before: lsls r0, r0, #2    After: add  r0, pc
        adr  r1, .LJTI0_0         ldrb r0, [r0, #6]
        ldr  r0, [r0, r1]         lsls r0, r0, #1
        mov  pc, r0               add  pc, r0
  => No change in prologue code size or dynamic instruction count. Jump table shrunk by a factor of 4.

The only case that can increase dynamic instruction count is the TBH case:

Before: lsls r0, r4, #2    After: lsls r4, r4, #1
        adr  r1, .LJTI0_0         add  r4, pc
        ldr  r0, [r0, r1]         ldrh r4, [r4, #6]
        mov  pc, r0               lsls r4, r4, #1
                                  add  pc, r4
  => 1 more instruction in prologue. Jump table shrunk by a factor of 2.

So there is an argument that this should be disabled when optimizing for performance (and a TBH needs to be generated). I'm not so sure about that in practice, because on small cores with Thumb-1 performance is often tied to code size. But I'm willing to turn it off when optimizing for performance if people want (also note that TBHs are fairly rare in practice!)

llvm-svn: 284580

7 years ago[Sema] Gcc compatibility of vector shift
Andrey Bokhanko [Wed, 19 Oct 2016 12:06:10 +0000 (12:06 +0000)]
[Sema] Gcc compatibility of vector shift

Gcc prints error if elements of left and right parts of a shift have different
sizes. This patch is provided the GCC compatibility.

Patch by Vladimir Yakovlev.

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

llvm-svn: 284579

7 years ago[DAGCombiner] Just call isConstOrConstSplat directly. NFCI.
Simon Pilgrim [Wed, 19 Oct 2016 11:28:15 +0000 (11:28 +0000)]
[DAGCombiner] Just call isConstOrConstSplat directly. NFCI.

This will get the same ConstantSDNode scalar or vector splat value as the current separate dyn_cast<ConstantSDNode> / isVector() approach.

llvm-svn: 284578

7 years ago[modules] Do not report missing definitions of demoted constexpr variable templates.
Vassil Vassilev [Wed, 19 Oct 2016 11:19:30 +0000 (11:19 +0000)]
[modules] Do not report missing definitions of demoted constexpr variable templates.

This is a followup to regression introduced in r284284.

This should fix our libstdc++ modules builds.

https://reviews.llvm.org/D25678

Reviewed by Richard Smith!

llvm-svn: 284577

7 years agoFix line endings
Simon Pilgrim [Wed, 19 Oct 2016 11:16:58 +0000 (11:16 +0000)]
Fix line endings

llvm-svn: 284576

7 years ago[ELF] Add "error" and "warning" prefixes to linker messages
Eugene Leviant [Wed, 19 Oct 2016 09:35:19 +0000 (09:35 +0000)]
[ELF] Add "error" and "warning" prefixes to linker messages

Differential revision: https://reviews.llvm.org/D25729

llvm-svn: 284575

7 years ago[DAGCombine] Generalize distributeTruncateThroughAnd to work with any non-opaque...
Simon Pilgrim [Wed, 19 Oct 2016 08:57:37 +0000 (08:57 +0000)]
[DAGCombine] Generalize distributeTruncateThroughAnd to work with any non-opaque constant or constant vector

llvm-svn: 284574

7 years ago[clang-format] Add comment manipulation header
Eric Liu [Wed, 19 Oct 2016 08:19:46 +0000 (08:19 +0000)]
[clang-format] Add comment manipulation header

Summary:
Introduces a separate target for comment manipulation.
Currently, comment manipulation is in BreakableComment.cpp.
Towards implementing comment reflowing, we want to factor out the
comment-related functionality, so it can be reused.
Start simple by just moving out getLineCommentIndentPrefix.

Patch by Krasimir Georgiev!

Reviewers: djasper

Subscribers: klimek, beanz, mgorny, modocache

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

llvm-svn: 284573

7 years agoRevert of r284571 because of failing tests.
Sjoerd Meijer [Wed, 19 Oct 2016 07:45:48 +0000 (07:45 +0000)]
Revert of r284571 because of failing tests.

llvm-svn: 284572

7 years agoChecking FP function attribute values and adding more build attribute tests.
Sjoerd Meijer [Wed, 19 Oct 2016 07:25:06 +0000 (07:25 +0000)]
Checking FP function attribute values and adding more build attribute tests.

This renames the function for checking FP function attribute values and also
adds more build attribute tests (which are in separate files because build
attributes are set per file).

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

llvm-svn: 284571

7 years agoDenseSet: Appease msc18 to define derived constructors explicitly.
NAKAMURA Takumi [Wed, 19 Oct 2016 05:43:17 +0000 (05:43 +0000)]
DenseSet: Appease msc18 to define derived constructors explicitly.

msc18 doesn't recognize "using BaseT::BaseT;"

  llvm\include\llvm/ADT/DenseSet.h(213) : error C2875: using-declaration causes a multiple declaration of 'BaseT'
          llvm\include\llvm/ADT/DenseSet.h(214) : see reference to class template instantiation 'llvm::DenseSet<ValueT,ValueInfoT>' being compiled
  llvm\include\llvm/ADT/DenseSet.h(231) : error C2875: using-declaration causes a multiple declaration of 'BaseT'
          llvm\include\llvm/ADT/DenseSet.h(232) : see reference to class template instantiation 'llvm::SmallDenseSet<ValueT,InlineBuckets,ValueInfoT>' being compiled

llvm-svn: 284570

7 years ago[AVX-512] Teach isel lowering that a subvector broadcast being inserted into both...
Craig Topper [Wed, 19 Oct 2016 04:44:17 +0000 (04:44 +0000)]
[AVX-512] Teach isel lowering that a subvector broadcast being inserted into both halves of a 512-bit vector can be combined into a larger subvector broadcast.

Summary:
This allows us to create broadcasts of 128-bit vector loads into 512-bit vectors.

New patterns added to support 8-bit and 16-bit vector types and v2f64/v2i64->v8f64/v8i64 without DQI instructions.

There also fallback patterns when the load can't be folded. These patterns are a little complex as we first need to insert the lower 128-bits into the second 128-bits using a zmm subvector insert instruction. We need to use a zmm insert in case VLX isn't available. Then use another zmm sub vector insert to take those 256-bits and insert them into the upper bits. Since we used a zmm insert to create the 256-bits we also need to do a extract_subreg to get just the lower 256-bits to pass to the second insert.

The outer insert for the fallback patterns should have its type correct because eventually we should also supported masked operations here too. So we need a DQI and a NoDQI version of the v16f32/v16i32 patterns.

Reviewers: RKSimon, delena, igorb

Subscribers: llvm-commits

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

llvm-svn: 284567

7 years agoUpdate the section.ll to fix non-x86 failure.
Dehao Chen [Wed, 19 Oct 2016 03:53:41 +0000 (03:53 +0000)]
Update the section.ll to fix non-x86 failure.

llvm-svn: 284566

7 years agoRevert back to the state before r284550
Chris Bieneman [Wed, 19 Oct 2016 02:44:20 +0000 (02:44 +0000)]
Revert back to the state before r284550

This patch is causing a lot of issues on bots that I didn't see in local testing. I'm going to have to work on this. Reverting for now while I sort it out.

llvm-svn: 284565

7 years agoTrying to fix a few more missing LDFLAGS.
Chris Bieneman [Wed, 19 Oct 2016 02:31:31 +0000 (02:31 +0000)]
Trying to fix a few more missing LDFLAGS.

llvm-svn: 284564

7 years agoRevert r284545 again as the regression in ppc still exists. There is bug in MBPI...
Dehao Chen [Wed, 19 Oct 2016 01:18:25 +0000 (01:18 +0000)]
Revert r284545 again as the regression in ppc still exists. There is bug in MBPI exposed by th patch.

Also update the section.ll to fix non-x86 failure.

llvm-svn: 284563

7 years ago[asan] Replace std::to_string with llvm::to_string
Vitaly Buka [Wed, 19 Oct 2016 00:16:56 +0000 (00:16 +0000)]
[asan] Replace std::to_string with llvm::to_string

llvm-svn: 284557

7 years agoResolve exception specifications when selecting an overloaded operator.
Richard Smith [Wed, 19 Oct 2016 00:14:23 +0000 (00:14 +0000)]
Resolve exception specifications when selecting an overloaded operator.

llvm-svn: 284556

7 years agoFixing the linux bots I broke in r284550
Chris Bieneman [Wed, 19 Oct 2016 00:13:56 +0000 (00:13 +0000)]
Fixing the linux bots I broke in r284550

Need to gate cxx linker adding driver-mode flag based on the linker being clang.

llvm-svn: 284555

7 years ago[libFuzzer] extend -print_coverage to also print uncovered lines, functions, and...
Kostya Serebryany [Wed, 19 Oct 2016 00:12:03 +0000 (00:12 +0000)]
[libFuzzer] extend -print_coverage to also print uncovered lines, functions, and files.

Example of output:
COVERAGE:
COVERED: in DSO2(int) /pathto/DSO2.cpp:6
COVERED: in DSO2(int) /pathto/DSO2.cpp:8
COVERED: in DSO1(int) /pathto/DSO1.cpp:6
COVERED: in DSO1(int) /pathto/DSO1.cpp:8
COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:16
COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:19
COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:25
COVERED: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:26
MODULE_WITH_COVERAGE: /pathto/libLLVMFuzzer-DSO1.so
UNCOVERED_LINE: in DSO1(int) /pathto/DSO1.cpp:9
UNCOVERED_FUNC: in Uncovered1()
MODULE_WITH_COVERAGE: /pathto/libLLVMFuzzer-DSO2.so
UNCOVERED_LINE: in DSO2(int) /pathto/DSO2.cpp:9
UNCOVERED_FUNC: in Uncovered2()
MODULE_WITH_COVERAGE: /pathto/LLVMFuzzer-DSOTest
UNCOVERED_LINE: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:21
UNCOVERED_LINE: in LLVMFuzzerTestOneInput /pathto/DSOTestMain.cpp:27
UNCOVERED_FILE: /pathto/DSOTestExtra.cpp

Several things are not perfect here:
* we are using objdump+awk instead of sancov because sancov does not support DSOs yet.
* this breaks in the presence of ASAN_OPTIONS=strip_path_prefix=...
  (need to implement another API to get the module name by PC)

llvm-svn: 284554

7 years ago[CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only...
Justin Lebar [Wed, 19 Oct 2016 00:06:49 +0000 (00:06 +0000)]
[CUDA] Rework tests now that we emit deferred diagnostics during sema.  Test-only change.

Summary:
Previously we had to split out a lot of our tests into a test that
checked only immediate errors and a test that checked only deferred
errors.  This was because, if you emitted any immediate errors, we
wouldn't run codegen, where the deferred errors were emitted.

We've fixed this, and now emit deferred errors during sema.  This lets
us merge a bunch of tests, and lets us convert some other tests to
-fsyntax-only.

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 284553

7 years agoWhen invoking Terminal, don't assume the default shell
Chris Bieneman [Tue, 18 Oct 2016 23:55:34 +0000 (23:55 +0000)]
When invoking Terminal, don't assume the default shell

Summary:
If a user has their shell set to a non-POSIX conferment shell the TestTerminal.py tests fail because the shell blurb constructed here may not work in their shell.

In my specific case fish-shell (The Friendly Interactive Shell - http://fishshell.com) does not support $?, it instead uses $status (because it is friendly).

This patch removes the assumption of your default shell by running the constructed bash command via "/bin/bash -c ...". This should be safer for users mutating their shell environment.

Reviewers: tfiala

Subscribers: joerg, lldb-commits

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

llvm-svn: 284552

7 years ago[CMake] Don't include LLDB_TEST_COMPILER in cached variable
Chris Bieneman [Tue, 18 Oct 2016 23:54:28 +0000 (23:54 +0000)]
[CMake] Don't include LLDB_TEST_COMPILER in cached variable

Summary:
CMake has no builtin mechanism for cache invalidation. As a general convention you want to not expand user-specified variables in other cached variables because they will not get updated when the user changes their specified value.

This patch moves the "-C" option for dotest.py into the LLDB_TEST_COMMON_ARGS and out of the CMake cache. In order to prevent issues with out-of-date cache files on builders I've added code to scrub "-C ${LLDB_TEST_COMPILER}" out of the CMake caches, by Force writing the variable. This code can be removed in a few days once the change has trickled through CI systems.

Reviewers: tfiala, labath, zturner

Subscribers: lldb-commits, mgorny

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

llvm-svn: 284551

7 years agoUse clang --driver-mode instead of guessing c++ compiler path
Chris Bieneman [Tue, 18 Oct 2016 23:53:24 +0000 (23:53 +0000)]
Use clang --driver-mode instead of guessing c++ compiler path

Summary:
When building the LLDB test programs, if your CC is clang it actually isn't safe to make CXX a string replace of "clang -> clang++". This falls down on unix configurations if your compiler is clang-${version}.

A safer approach is to use the "--driver-mode=g++" option to tell clang to act like clang++.

Reviewers: tfiala, zturner, labath

Subscribers: lldb-commits

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

llvm-svn: 284550

7 years agoDR1330: instantiate exception-specifications when "needed". We previously did
Richard Smith [Tue, 18 Oct 2016 23:39:12 +0000 (23:39 +0000)]
DR1330: instantiate exception-specifications when "needed". We previously did
not instantiate exception specifications of functions if they were only used in
unevaluated contexts (other than 'noexcept' expressions).

In C++17 onwards, this becomes essential since the exception specification is
now part of the function's type.

Note that this means that constructs like the following no longer work:

  struct A {
    static T f() noexcept(...);
    decltype(f()) *p;
  };

... because the decltype expression now needs the exception specification of
'f', which has not yet been parsed.

llvm-svn: 284549

7 years ago[asan] Update test for D25715
Vitaly Buka [Tue, 18 Oct 2016 23:30:07 +0000 (23:30 +0000)]
[asan] Update test for D25715

Reviewers: eugenis

Subscribers: kubabrecka, llvm-commits

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

llvm-svn: 284548

7 years ago[asan] Simplify calculation of stack frame layout extraction calculation of stack...
Vitaly Buka [Tue, 18 Oct 2016 23:29:52 +0000 (23:29 +0000)]
[asan] Simplify calculation of stack frame layout extraction calculation of stack description into separate function.

Reviewers: eugenis

Subscribers: llvm-commits

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

llvm-svn: 284547

7 years ago[asan] Append line number to variable name if line is available and in the same file...
Vitaly Buka [Tue, 18 Oct 2016 23:29:41 +0000 (23:29 +0000)]
[asan] Append line number to variable name if line is available and in the same file as the function.

PR30498

Reviewers: eugenis

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

llvm-svn: 284546

7 years agoUsing branch probability to guide critical edge splitting.
Dehao Chen [Tue, 18 Oct 2016 23:24:02 +0000 (23:24 +0000)]
Using branch probability to guide critical edge splitting.

Summary:
The original heuristic to break critical edge during machine sink is relatively conservertive: when there is only one instruction sinkable to the critical edge, it is likely that the machine sink pass will not break the critical edge. This leads to many speculative instructions executed at runtime. However, with profile info, we could model the splitting benefits: if the critical edge has 50% taken rate, it would always be beneficial to split the critical edge to avoid the speculated runtime instructions. This patch uses profile to guide critical edge splitting in machine sink pass.

The performance impact on speccpu2006 on Intel sandybridge machines:

spec/2006/fp/C++/444.namd                  25.3  +0.26%
spec/2006/fp/C++/447.dealII               45.96  -0.10%
spec/2006/fp/C++/450.soplex               41.97  +1.49%
spec/2006/fp/C++/453.povray               36.83  -0.96%
spec/2006/fp/C/433.milc                   23.81  +0.32%
spec/2006/fp/C/470.lbm                    41.17  +0.34%
spec/2006/fp/C/482.sphinx3                48.13  +0.69%
spec/2006/int/C++/471.omnetpp             22.45  +3.25%
spec/2006/int/C++/473.astar               21.35  -2.06%
spec/2006/int/C++/483.xalancbmk           36.02  -2.39%
spec/2006/int/C/400.perlbench              33.7  -0.17%
spec/2006/int/C/401.bzip2                  22.9  +0.52%
spec/2006/int/C/403.gcc                   32.42  -0.54%
spec/2006/int/C/429.mcf                   39.59  +0.19%
spec/2006/int/C/445.gobmk                 26.98  -0.00%
spec/2006/int/C/456.hmmer                 24.52  -0.18%
spec/2006/int/C/458.sjeng                 28.26  +0.02%
spec/2006/int/C/462.libquantum            55.44  +3.74%
spec/2006/int/C/464.h264ref               46.67  -0.39%

geometric mean                                   +0.20%

Manually checked 473 and 471 to verify the diff is in the noise range.

Reviewers: rengolin, davidxl

Subscribers: llvm-commits

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

llvm-svn: 284545

7 years agorevert r284541.
Dehao Chen [Tue, 18 Oct 2016 23:11:20 +0000 (23:11 +0000)]
revert r284541.

llvm-svn: 284544

7 years ago[test] Fix buildbot after SCEV change.
Michael Kruse [Tue, 18 Oct 2016 22:58:09 +0000 (22:58 +0000)]
[test] Fix buildbot after SCEV change.

Update test after commit r284501:
[SCEV] Make CompareValueComplexity a little bit smarter

Contributed-by: Sanjoy Das <sanjoy@playingwithpointers.com>
llvm-svn: 284543

7 years agoConditionally eliminate library calls where the result value is not used
Rong Xu [Tue, 18 Oct 2016 21:36:27 +0000 (21:36 +0000)]
Conditionally eliminate library calls where the result value is not used

Summary:
This pass shrink-wraps a condition to some library calls where the call
result is not used. For example:
   sqrt(val);
 is transformed to
   if (val < 0)
     sqrt(val);
Even if the result of library call is not being used, the compiler cannot
safely delete the call because the function can set errno on error
conditions.
Note in many functions, the error condition solely depends on the incoming
parameter. In this optimization, we can generate the condition can lead to
the errno to shrink-wrap the call. Since the chances of hitting the error
condition is low, the runtime call is effectively eliminated.

These partially dead calls are usually results of C++ abstraction penalty
exposed by inlining. This optimization hits 108 times in 19 C/C++ programs
in SPEC2006.

Reviewers: hfinkel, mehdi_amini, davidxl

Subscribers: modocache, mgorny, mehdi_amini, xur, llvm-commits, beanz

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

llvm-svn: 284542

7 years agoUsing branch probability to guide critical edge splitting.
Dehao Chen [Tue, 18 Oct 2016 21:36:11 +0000 (21:36 +0000)]
Using branch probability to guide critical edge splitting.

Summary:
The original heuristic to break critical edge during machine sink is relatively conservertive: when there is only one instruction sinkable to the critical edge, it is likely that the machine sink pass will not break the critical edge. This leads to many speculative instructions executed at runtime. However, with profile info, we could model the splitting benefits: if the critical edge has 50% taken rate, it would always be beneficial to split the critical edge to avoid the speculated runtime instructions. This patch uses profile to guide critical edge splitting in machine sink pass.

The performance impact on speccpu2006 on Intel sandybridge machines:

spec/2006/fp/C++/444.namd                  25.3  +0.26%
spec/2006/fp/C++/447.dealII               45.96  -0.10%
spec/2006/fp/C++/450.soplex               41.97  +1.49%
spec/2006/fp/C++/453.povray               36.83  -0.96%
spec/2006/fp/C/433.milc                   23.81  +0.32%
spec/2006/fp/C/470.lbm                    41.17  +0.34%
spec/2006/fp/C/482.sphinx3                48.13  +0.69%
spec/2006/int/C++/471.omnetpp             22.45  +3.25%
spec/2006/int/C++/473.astar               21.35  -2.06%
spec/2006/int/C++/483.xalancbmk           36.02  -2.39%
spec/2006/int/C/400.perlbench              33.7  -0.17%
spec/2006/int/C/401.bzip2                  22.9  +0.52%
spec/2006/int/C/403.gcc                   32.42  -0.54%
spec/2006/int/C/429.mcf                   39.59  +0.19%
spec/2006/int/C/445.gobmk                 26.98  -0.00%
spec/2006/int/C/456.hmmer                 24.52  -0.18%
spec/2006/int/C/458.sjeng                 28.26  +0.02%
spec/2006/int/C/462.libquantum            55.44  +3.74%
spec/2006/int/C/464.h264ref               46.67  -0.39%

geometric mean                                   +0.20%

Manually checked 473 and 471 to verify the diff is in the noise range.

Reviewers: rengolin, davidxl

Subscribers: llvm-commits

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

llvm-svn: 284541

7 years agodwarfdump: add space missing from the type unit header description
David Blaikie [Tue, 18 Oct 2016 21:18:43 +0000 (21:18 +0000)]
dwarfdump: add space missing from the type unit header description

llvm-svn: 284540

7 years agodwarfdump: Include the name in the unit description, even in non-summarized mode
David Blaikie [Tue, 18 Oct 2016 21:16:45 +0000 (21:16 +0000)]
dwarfdump: Include the name in the unit description, even in non-summarized mode

(accidentally removed this from my previous change when I was rejecting
some clang-format formatting... )

llvm-svn: 284539

7 years agoAdd target for test to fix regression introduced by r284533.
Dehao Chen [Tue, 18 Oct 2016 21:13:31 +0000 (21:13 +0000)]
Add target for test to fix regression introduced by r284533.

llvm-svn: 284538

7 years agodwarfdump: -summarize-types: print a short summary (unqualified type name, hash,...
David Blaikie [Tue, 18 Oct 2016 21:09:48 +0000 (21:09 +0000)]
dwarfdump: -summarize-types: print a short summary (unqualified type name, hash, length) of type units rather than dumping contents

This is just a quick utility handy for getting rough summaries of types
in a given object or dwo file. I've been using it to investigate the
amount of type info redundancy across a project build, for example.

llvm-svn: 284537

7 years agoImprove ARM lowering for "icmp <2 x i64> eq".
Eli Friedman [Tue, 18 Oct 2016 21:03:40 +0000 (21:03 +0000)]
Improve ARM lowering for "icmp <2 x i64> eq".

The custom lowering is pretty straightforward: basically, just AND
together the two halves of a <4 x i32> compare.

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

llvm-svn: 284536

7 years ago[GVN] Consistently use division instead of shift. NFCI.
Davide Italiano [Tue, 18 Oct 2016 21:02:27 +0000 (21:02 +0000)]
[GVN] Consistently use division instead of shift. NFCI.

This is in line with other places of GVN (e.g. load coercion
logic).

llvm-svn: 284535

7 years ago[GVN] Remove dead code. NFC.
Davide Italiano [Tue, 18 Oct 2016 21:00:26 +0000 (21:00 +0000)]
[GVN] Remove dead code. NFC.

llvm-svn: 284534

7 years agoUse profile info to set function section prefix to group hot/cold functions.
Dehao Chen [Tue, 18 Oct 2016 20:42:47 +0000 (20:42 +0000)]
Use profile info to set function section prefix to group hot/cold functions.

Summary:
The original implementation is in r261607, which was reverted in r269726 to accomendate the ProfileSummaryInfo analysis pass. The new implementation:
1. add a new metadata for function section prefix
2. query against ProfileSummaryInfo in CGP to set the correct section prefix for each function
3. output the section prefix set by CGP

Reviewers: davidxl, eraman

Subscribers: vsk, llvm-commits

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

llvm-svn: 284533

7 years ago[AArch64] Fix test triplet
Evandro Menezes [Tue, 18 Oct 2016 20:41:30 +0000 (20:41 +0000)]
[AArch64] Fix test triplet

llvm-svn: 284532

7 years ago[AArch64] Avoid materializing 0.0 when generating FP SELECT
Evandro Menezes [Tue, 18 Oct 2016 20:37:35 +0000 (20:37 +0000)]
[AArch64] Avoid materializing 0.0 when generating FP SELECT

Transform `a == 0.0 ? 0.0 : x` to `a == 0.0 ? a : x` and `a != 0.0 ? x : 0.0`
to `a != 0.0 ? x : a` to avoid materializing 0.0 for FCSEL, since it does not
have to be materialized beforehand for FCMP, as it has a form that has 0.0
as an implicit operand.

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

llvm-svn: 284531

7 years agoAdd missing warning for use of C++1z init-statements in C++14 and before.
Richard Smith [Tue, 18 Oct 2016 20:27:16 +0000 (20:27 +0000)]
Add missing warning for use of C++1z init-statements in C++14 and before.

llvm-svn: 284530

7 years agoOne more additional error check for invalid Mach-O files for a
Kevin Enderby [Tue, 18 Oct 2016 20:24:12 +0000 (20:24 +0000)]
One more additional error check for invalid Mach-O files for a
load command that use the MachO:: linkedit_data_command
type but is not used in llvm libObject code but used in llvm tool code.

This is for the LC_CODE_SIGNATURE load command.

llvm-svn: 284529

7 years ago[c++1z] Fix corner case where we could create a function type whose canonical type...
Richard Smith [Tue, 18 Oct 2016 20:13:25 +0000 (20:13 +0000)]
[c++1z] Fix corner case where we could create a function type whose canonical type is not actually canonical.

llvm-svn: 284528

7 years agoGlobalISel: translate the @llvm.objectsize intrinsic.
Tim Northover [Tue, 18 Oct 2016 20:03:51 +0000 (20:03 +0000)]
GlobalISel: translate the @llvm.objectsize intrinsic.

llvm-svn: 284527

7 years agoGlobalISel: select small binary operations on AArch64.
Tim Northover [Tue, 18 Oct 2016 20:03:48 +0000 (20:03 +0000)]
GlobalISel: select small binary operations on AArch64.

AArch64 actually supports many 8-bit operations under the definition used by
GlobalISel: the designated information-carrying bits of a GPR32 get the right
value if you just use the normal 32-bit instruction.

llvm-svn: 284526

7 years agoGlobalISel: translate memcpy intrinsics.
Tim Northover [Tue, 18 Oct 2016 20:03:45 +0000 (20:03 +0000)]
GlobalISel: translate memcpy intrinsics.

llvm-svn: 284525

7 years agoRemove unused typedef
Mandeep Singh Grang [Tue, 18 Oct 2016 20:01:12 +0000 (20:01 +0000)]
Remove unused typedef

Summary: Unused: typedef SmallSetVector<RegionT *, 4> RegionSet

Reviewers: MatzeB, grosser

Subscribers: zinob

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

llvm-svn: 284524

7 years agoGlobalISel: support floating-point constants on AArch64.
Tim Northover [Tue, 18 Oct 2016 19:47:57 +0000 (19:47 +0000)]
GlobalISel: support floating-point constants on AArch64.

Patch from Ahmed Bougacha.

llvm-svn: 284523

7 years ago[Hexagon] Handle block live-ins with lane masks in HexagonBlockRanges
Krzysztof Parzyszek [Tue, 18 Oct 2016 19:47:20 +0000 (19:47 +0000)]
[Hexagon] Handle block live-ins with lane masks in HexagonBlockRanges

llvm-svn: 284522

7 years agoReduce global namespace pollution. NFC.
Benjamin Kramer [Tue, 18 Oct 2016 19:39:31 +0000 (19:39 +0000)]
Reduce global namespace pollution. NFC.

llvm-svn: 284521

7 years ago[esan] Remove global variable.
Benjamin Kramer [Tue, 18 Oct 2016 19:39:23 +0000 (19:39 +0000)]
[esan] Remove global variable.

It's not thread safe and completely unnecessary.

llvm-svn: 284520

7 years agoWhen two function types have equivalent (but distinct) noexcept specifications, creat...
Richard Smith [Tue, 18 Oct 2016 19:29:18 +0000 (19:29 +0000)]
When two function types have equivalent (but distinct) noexcept specifications, create separate type sugar nodes. This is necessary so that substitution into the exception specification will substitute into the correct expression.

llvm-svn: 284519

7 years ago[X86][SSE] Added vector lshr/shl combine tests
Simon Pilgrim [Tue, 18 Oct 2016 19:28:12 +0000 (19:28 +0000)]
[X86][SSE] Added vector lshr/shl combine tests

This doesn't cover all combines in DAGCombiner::visitSRL/visitSHL yet, but identifies several cases where we fail to combine vectors (or non-splatted) vectors

llvm-svn: 284518

7 years agoFix clang tests
Mandeep Singh Grang [Tue, 18 Oct 2016 19:22:20 +0000 (19:22 +0000)]
Fix clang tests

Summary:
Add REQUIRES for target specific tests.

Patch by Azharuddin Mohammed.

Reviewers: apazos, weimingz, rsmith, ddunbar, spop, mgrang

Subscribers: sebpop, llvm-commits

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

llvm-svn: 284517

7 years ago[CodeGen][ObjC] Do not call objc_storeStrong when initializing a
Akira Hatanaka [Tue, 18 Oct 2016 19:05:41 +0000 (19:05 +0000)]
[CodeGen][ObjC] Do not call objc_storeStrong when initializing a
constexpr variable.

When compiling a constexpr NSString initialized with an objective-c
string literal, CodeGen emits objc_storeStrong on an uninitialized
alloca, which causes a crash.

This patch folds the code in EmitScalarInit into EmitStoreThroughLValue
and fixes the crash by calling objc_retain on the string instead of
using objc_storeStrong.

rdar://problem/28562009

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

llvm-svn: 284516

7 years ago[InterleavedAccessPass] Remove global variable.
Benjamin Kramer [Tue, 18 Oct 2016 18:59:58 +0000 (18:59 +0000)]
[InterleavedAccessPass] Remove global variable.

This is a threading hazard and rightfully complained about by tsan. No
functionality change.

llvm-svn: 284515

7 years ago[libFuzzer] detect leaks after every run when executing fixed inputs (./fuzzer -runs...
Kostya Serebryany [Tue, 18 Oct 2016 18:38:08 +0000 (18:38 +0000)]
[libFuzzer] detect leaks after every run when executing fixed inputs (./fuzzer -runs=1000000 my-file)

llvm-svn: 284514

7 years agorevert r284495: [Target] remove TargetRecip class
Sanjay Patel [Tue, 18 Oct 2016 18:36:49 +0000 (18:36 +0000)]
revert r284495: [Target] remove TargetRecip class

There's something wrong with the StringRef usage while parsing the attribute string.

llvm-svn: 284513

7 years ago[tsan] Always use -std=c++11 in TSan tests
Kuba Brecka [Tue, 18 Oct 2016 18:33:42 +0000 (18:33 +0000)]
[tsan] Always use -std=c++11 in TSan tests

We currently only pass -std=c++11 when we have an instrumented libcxx.

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

llvm-svn: 284512

7 years agoDrop a redundant ".get()" call (NFC)
Vedant Kumar [Tue, 18 Oct 2016 18:19:02 +0000 (18:19 +0000)]
Drop a redundant ".get()" call (NFC)

Pointed out by Malcolm Parsons.

llvm-svn: 284510

7 years ago[sancov] add __sanitizer_cov_trace_pc_guard to the supported coverage points
Kostya Serebryany [Tue, 18 Oct 2016 18:11:42 +0000 (18:11 +0000)]
[sancov] add __sanitizer_cov_trace_pc_guard to the supported coverage points

llvm-svn: 284509

7 years ago[libFuzzer] reshuffle the code for -exit_on_src_pos and -exit_on_item
Kostya Serebryany [Tue, 18 Oct 2016 18:06:05 +0000 (18:06 +0000)]
[libFuzzer] reshuffle the code for -exit_on_src_pos and -exit_on_item

llvm-svn: 284508

7 years ago[asan] Rename test file as the poisoning is not "experimental"
Vitaly Buka [Tue, 18 Oct 2016 18:05:06 +0000 (18:05 +0000)]
[asan] Rename test file as the poisoning is not "experimental"

Reviewers: eugenis

Subscribers: llvm-commits

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

llvm-svn: 284507

7 years ago[asan] Combine check-prefixes in stack-poisoning test
Vitaly Buka [Tue, 18 Oct 2016 18:05:04 +0000 (18:05 +0000)]
[asan] Combine check-prefixes in stack-poisoning test

Reviewers: eugenis

Subscribers: llvm-commits

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

llvm-svn: 284506

7 years ago[asan] Make -asan-experimental-poisoning the only behavior
Vitaly Buka [Tue, 18 Oct 2016 18:04:59 +0000 (18:04 +0000)]
[asan] Make -asan-experimental-poisoning the only behavior

Reviewers: eugenis

Subscribers: llvm-commits

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

llvm-svn: 284505

7 years agoNext set of additional error checks for invalid Mach-O files for the
Kevin Enderby [Tue, 18 Oct 2016 17:54:17 +0000 (17:54 +0000)]
Next set of additional error checks for invalid Mach-O files for the
load commands that use the MachO::routines_command and
and MachO::routines_command_64 types but are not used in llvm
libObject code but used in llvm tool code.

This includes the LC_ROUTINES and LC_ROUTINES_64
load commands.

llvm-svn: 284504

7 years ago[ADT] Remove CachedHash<T>.
Justin Lebar [Tue, 18 Oct 2016 17:50:39 +0000 (17:50 +0000)]
[ADT] Remove CachedHash<T>.

Nobody is using it.

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

llvm-svn: 284503

7 years agoUse CachedHashStringRef instead of CachedHash<StringRef>.
Justin Lebar [Tue, 18 Oct 2016 17:50:36 +0000 (17:50 +0000)]
Use CachedHashStringRef instead of CachedHash<StringRef>.

Summary:
This uses one less word on 64-bit platforms, so should be a strict
improvement.  This change also lets us get rid of llvm::CachedHash.

Reviewers: rafael, timshen

Subscribers: llvm-commits

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

llvm-svn: 284502

7 years ago[SCEV] Make CompareValueComplexity a little bit smarter
Sanjoy Das [Tue, 18 Oct 2016 17:45:16 +0000 (17:45 +0000)]
[SCEV] Make CompareValueComplexity a little bit smarter

This helps canonicalization in some cases.

Thanks to Pankaj Chawla for the investigation and the test case!

llvm-svn: 284501

7 years ago[SCEV] Extract out a helper function; NFC
Sanjoy Das [Tue, 18 Oct 2016 17:45:13 +0000 (17:45 +0000)]
[SCEV] Extract out a helper function; NFC

llvm-svn: 284500

7 years agoFix OpenMP 4.0 library build
Jonathan Peyton [Tue, 18 Oct 2016 17:39:06 +0000 (17:39 +0000)]
Fix OpenMP 4.0 library build

Patch by Andrey Churbanov

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

llvm-svn: 284499

7 years ago[X86][SSE] Added vector ashr combine tests
Simon Pilgrim [Tue, 18 Oct 2016 17:31:07 +0000 (17:31 +0000)]
[X86][SSE] Added vector ashr combine tests

This doesn't cover all combines in DAGCombiner::visitSRA yet, but identifies several cases where we fail to combine vectors (or non-splatted) vectors

llvm-svn: 284498

7 years ago[docs] Increase minimum supported GCC version for building LLVM to 4.8
Teresa Johnson [Tue, 18 Oct 2016 17:17:37 +0000 (17:17 +0000)]
[docs] Increase minimum supported GCC version for building LLVM to 4.8

Summary:
The RFC proposal sent to increase the minimum required GCC version
to 4.8 received a lot of support. See the following thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105955.html,

This patch implements that by updating the docs. I believe the
references to libstdc++ 4.7 issues can be removed as well, please
let me know if that is not the case or if they should be updated
a different way.

Reviewers: rengolin

Subscribers: llvm-commits

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

llvm-svn: 284497

7 years ago[cmake] Update lit search to match the one in LLVM
Michal Gorny [Tue, 18 Oct 2016 17:07:30 +0000 (17:07 +0000)]
[cmake] Update lit search to match the one in LLVM

Update the lit search logic to support all names supported in LLVM
(since r283029). The search order (i.e. PATHS vs HINTS) does no really
matter since the established path is not used, except for determining
whether lit is available.

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

llvm-svn: 284496

7 years ago[Target] remove TargetRecip class; move reciprocal estimate isel functionality to...
Sanjay Patel [Tue, 18 Oct 2016 17:05:05 +0000 (17:05 +0000)]
[Target] remove TargetRecip class; move reciprocal estimate isel functionality to TargetLowering

This is a follow-up to D24816 - where we changed reciprocal estimates to be function attributes
rather than TargetOptions.

This patch is intended to be a structural, but not functional change. By moving all of the
TargetRecip functionality into TargetLowering, we can remove all of the reciprocal estimate
state, shield the callers from the string format implementation, and simplify/localize the
logic needed for a target to enable this.

If a function has a "reciprocal-estimates" attribute, those settings may override the target's
default reciprocal preferences for whatever operation and data type we're trying to optimize.
If there's no attribute string or specific setting for the op/type pair, just use the target
default settings.

As noted earlier, a better solution would be to move the reciprocal estimate settings to IR
instructions and SDNodes rather than function attributes, but that's a multi-step job that
requires infrastructure improvements. I intend to work on that, but it's not clear how long
it will take to get all the pieces in place.

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

llvm-svn: 284495

7 years ago[solaris] Convert the support library to C++ to fix -std=c++11 build
Michal Gorny [Tue, 18 Oct 2016 16:54:59 +0000 (16:54 +0000)]
[solaris] Convert the support library to C++ to fix -std=c++11 build

Convert the Solaris xlocale.c compatibility library from plain C to C++
in order to fix the build failures caused by the addition of -std=c++11
to LIBCXX_COMPILE_FLAGS. The additional flag got propagated to the C
file, resulting in error with strict compilers.

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

llvm-svn: 284494

7 years ago[solaris] Fix iswxdigit_l() support function prototype
Michal Gorny [Tue, 18 Oct 2016 16:54:54 +0000 (16:54 +0000)]
[solaris] Fix iswxdigit_l() support function prototype

Fix the iswxdigit_l() function prototype to take wint_t parameter
instead of incorrect wchar_t.

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

llvm-svn: 284493

7 years agoFix a compile error on musl-libc due to strerror_r() prototype
Michal Gorny [Tue, 18 Oct 2016 16:38:44 +0000 (16:38 +0000)]
Fix a compile error on musl-libc due to strerror_r() prototype

Function strerror_r() has different signatures in different
implementations of libc: glibc's version returns a char*, while BSDs
and musl return a int. libomp unconditionally assumes glibc on Linux
and thus fails to compile against musl-libc. This patch addresses this
issue.

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

llvm-svn: 284492

7 years ago[DAGCombiner] Add splatted vector support to (udiv x, (shl pow2, y)) -> x >>u (log2...
Simon Pilgrim [Tue, 18 Oct 2016 16:36:00 +0000 (16:36 +0000)]
[DAGCombiner] Add splatted vector support to (udiv x, (shl pow2, y)) -> x >>u (log2(pow2)+y)

llvm-svn: 284491

7 years agoDisable fatal errors in the Verifier instantiated by bugpoint's crash
Adrian Prantl [Tue, 18 Oct 2016 16:24:43 +0000 (16:24 +0000)]
Disable fatal errors in the Verifier instantiated by bugpoint's crash
debugger.

When bugpoint hacks at a testcase it may at one point create illegal
debug info metadata that won't even pass the Verifier. A bugpoint
*driver* built with assertions should not assert on it, but reject the
malformed intermediate step and continue to do its job.

llvm-svn: 284490

7 years agoMixed type atomic routines added for capture and update/capture reverse.
Jonathan Peyton [Tue, 18 Oct 2016 16:20:55 +0000 (16:20 +0000)]
Mixed type atomic routines added for capture and update/capture reverse.

New mixed type atomic routines added for regular capture operations as well as
reverse update/capture operations.  LHS - all integer and float types (no
complex so far), RHS - float16.

Patch by Olga Malysheva

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

llvm-svn: 284489

7 years ago[X86][AVX512] Add mask/maskz writemask support to constant pool shuffle decode commentx
Simon Pilgrim [Tue, 18 Oct 2016 15:45:37 +0000 (15:45 +0000)]
[X86][AVX512] Add mask/maskz writemask support to constant pool shuffle decode commentx

llvm-svn: 284488

7 years agoUse reserve instead of grow.
Rafael Espindola [Tue, 18 Oct 2016 15:31:23 +0000 (15:31 +0000)]
Use reserve instead of grow.

The table was still being resized as grow doesn't account for the fact
that the table needs to remain 3/4 full.

llvm-svn: 284487

7 years agoRevert r284265 "[Sema] Refactor context checking for availability diagnostics"
Erik Pilkington [Tue, 18 Oct 2016 15:26:43 +0000 (15:26 +0000)]
Revert r284265 "[Sema] Refactor context checking for availability diagnostics"

This has a bug in it, pointed out by Bob Wilson!

llvm-svn: 284486

7 years ago[mips][ias] Handle more complicated expressions for memory operands
Simon Dardis [Tue, 18 Oct 2016 15:17:17 +0000 (15:17 +0000)]
[mips][ias] Handle more complicated expressions for memory operands

This patch teaches ias for mips to handle expressions such as
(8*4)+(8*31)($sp). Such expression typically occur from the expansion
of multiple macro definitions.

This partially resolves PR/30383.

Thanks to Sean Bruno for reporting the issue!

Reviewers: zoran.jovanovic, vkalintiris

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

llvm-svn: 284485

7 years agoxfail TestMiSyntax.py's test_lldbmi_output_grammar on macOS
Todd Fiala [Tue, 18 Oct 2016 15:15:24 +0000 (15:15 +0000)]
xfail TestMiSyntax.py's test_lldbmi_output_grammar on macOS

Needs to be investigated.  This is failing locally and on the
Xcode CI.

rdar://28805064

llvm-svn: 284484

7 years ago[mips] Fix sync instruction definition
Simon Dardis [Tue, 18 Oct 2016 14:42:13 +0000 (14:42 +0000)]
[mips] Fix sync instruction definition

The 'sync' instruction for MIPS was defined in MIPS-II as taking no operands.
MIPS32 extended the define of 'sync' as taking an optional unsigned 5 bit
immediate.

This patch correct the definition of sync so that it is accepted with an
operand of 0 or no operand for MIPS-II to MIPS-V, and a 5 bit unsigned
immediate for MIPS32 and later revisions.

Additionally a clear error is given when the MIPS32 version of sync is
used when targeting pre MIPS32.

This partially resolves PR/30714.

Thanks to Daniel Sanders for reporting this issue!

Reveiwers: vkalintiris

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

llvm-svn: 284483

7 years agoDebugInfo: change alignment type from uint64_t to uint32_t to save space.
Victor Leschuk [Tue, 18 Oct 2016 14:31:22 +0000 (14:31 +0000)]
DebugInfo: change alignment type from uint64_t to uint32_t to save space.
In futher patches we shall have alignment field added to DIVariable family
and switching from uint64_t to uint32_t will save 4 bytes per variable.

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

llvm-svn: 284482

7 years ago[mips] Macro expansion for ld, sd for O32
Simon Dardis [Tue, 18 Oct 2016 14:28:00 +0000 (14:28 +0000)]
[mips] Macro expansion for ld, sd for O32

ld and sd when assembled for the O32 ABI expand to a pair of 32 bit word loads
or stores using the specified source or destination register and the next
register.

This patch does not add support for the cases where the offset is greater than
a 16 bit signed immediate as that would lead to a wrong/misleading error
message as the assembler would report "instruction requires a CPU feature
not currently enabled" for ld & sd for MIPS64 when their offset is not a signed
16 bit number.

This fixes PR/29159.

Thanks to Sean Bruno for reporting this issue!

Reviewers: vkalintiris, seanbruno, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D24556

llvm-svn: 284481

7 years ago[x86][inline-asm][avx512] allow swapping of '{k<num>}' & '{z}' marks
Michael Zuckerman [Tue, 18 Oct 2016 13:52:39 +0000 (13:52 +0000)]
[x86][inline-asm][avx512] allow swapping of '{k<num>}' & '{z}' marks

Committing on behalf of Coby Tayree: After check-all and LGTM

Desc:

AVX512 allows dest operand to be followed by an op-mask register specifier ('{k<num>}', which in turn may be followed by a merging/zeroing specifier ('{z}')
 Currently, the following forms are allowed:
 {k<num>}
 {k<num>}{z}

This patch allows the following forms:
 {z}{k<num>}

and ignores the next form:
 {z}

Justification would be quite simple - GCC

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

llvm-svn: 284479

7 years agoStrip trailing whitespace (NFCI)
Simon Pilgrim [Tue, 18 Oct 2016 13:44:00 +0000 (13:44 +0000)]
Strip trailing whitespace (NFCI)

llvm-svn: 284478

7 years agoalpha.core.UnreachableCode - don't warn about unreachable code inside macro
Daniel Marjamaki [Tue, 18 Oct 2016 13:16:53 +0000 (13:16 +0000)]
alpha.core.UnreachableCode - don't warn about unreachable code inside macro

In macros, 'do {...} while (0)' is often used. Don't warn about the condition 0 when it is unreachable.

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

llvm-svn: 284477

7 years agoFix signed/unsigned comparison warnings
Simon Pilgrim [Tue, 18 Oct 2016 13:15:31 +0000 (13:15 +0000)]
Fix signed/unsigned comparison warnings

llvm-svn: 284476

7 years ago[mips][FastISel] Instantiate the MipsFastISel class only for targets that support...
Vasileios Kalintiris [Tue, 18 Oct 2016 13:05:42 +0000 (13:05 +0000)]
[mips][FastISel] Instantiate the MipsFastISel class only for targets that support FastISel.

Summary:
Instead of instantiating the MipsFastISel class and checking if the
target is supported in the overriden methods, we should perform that
check before creating the class. This allows us to enable FastISel *only*
for targets that truly support it, ie. MIPS32 to MIPS32R5.

Reviewers: sdardis

Subscribers: ehostunreach, llvm-commits

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

llvm-svn: 284475

7 years ago[ELF] - Update testcases after llvm change.
George Rimar [Tue, 18 Oct 2016 11:11:03 +0000 (11:11 +0000)]
[ELF] - Update testcases after llvm change.

llvm-svn: 284474

7 years ago[analyzer] Add NumberObjectConversion checker.
Artem Dergachev [Tue, 18 Oct 2016 11:06:28 +0000 (11:06 +0000)]
[analyzer] Add NumberObjectConversion checker.

When dealing with objects that represent numbers, such as Objective-C NSNumber,
the language provides little protection from accidentally interpreting
the value of a pointer to such object as the value of the number represented
by the object. Results of such mis-interpretation may be unexpected.

The checker attempts to fill this gap in cases when the code is obviously
incorrect.

With "Pedantic" option enabled, this checker enforces a coding style to
completely prevent errors of this kind (off by default).

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

llvm-svn: 284473