Commit Graph

144477 Commits

Author SHA1 Message Date
Krzysztof Parzyszek
4dfaf93885 [Hexagon] Remove A4_ext_* pseudo instructions
Patch by Colin LeMahieu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 19:58:22 +00:00
Kostya Serebryany
5459106ddf [libFuzzer] reorganize the tracing code to make it easier to experiment with inlined coverage instrumentation. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293928 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 19:56:01 +00:00
Krzysztof Parzyszek
4ea8989ed6 [Hexagon] Fix insertBranch for loops with multiple ENDLOOP instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293925 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 19:36:37 +00:00
Dan Gohman
e56a9ab847 [WebAssembly] Add instruction definitions for drop and get/set_global.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293922 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 19:29:44 +00:00
Xinliang David Li
53438cdcee [PGO] make graph view internal options available for all builds
Differential Revision: https://reviews.llvm.org/D29259


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293921 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 19:18:56 +00:00
Marcos Pividori
ebf6feac60 [libFuzzer] Properly handle exceptions with UnhandledExceptionFilter.
Use SetUnhandledExceptionFilter instead of AddVectoredExceptionHandler.

According to the documentation on Structured Exception Handling, this is the
order for the Exception Dispatching:
+ If the process is being debugged, the system notifies the debugger.
+ The Vectored Exception Handler is called.
+ The system attempts to locate a frame-based exception handler by searching the
 stack frames of the thread in which the exception occurred.
+ If no frame-based handler can be found, the UnhandledExceptionFilter filter is
 called.
+ Default handling based on the exception type.

So, similar to what we do for asan, we should use SetUnhandledExceptionFilter
instead of AddVectoredExceptionHandler, so user's code that is being fuzzed can
execute frame-based exception handlers before we catch them . We want to catch
unhandled exceptions, not all the exceptions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293920 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 19:07:53 +00:00
Peter Collingbourne
1d1bfded4b FunctionImport: Remove the -disable-force-link-odr flag and change importFunctions to never force link.
This removes some functionality that was only being used by tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293919 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 18:42:25 +00:00
Mehdi Amini
20af8a7bb3 [ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the
DSO, it is can be hidden. Usually we try to internalize
as much as possible, but it is not always possible, for
instance a symbol can be referenced outside of the LTO
unit, or there can be cross-module reference in ThinLTO.

This is a recommit of r293912 after fixing build failures.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293918 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 18:31:35 +00:00
Simon Pilgrim
2a8f190124 [X86][XOP] Added FIXME comments to missed shuffle combine opportunities
Requested by @silvas

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293916 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 18:26:28 +00:00
Nirav Dave
529986a15d Revert "In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled."
This reverts commit r293893 which is miscompiling lua on ARM and
bootstrapping for x86-windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293915 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 18:24:55 +00:00
Mehdi Amini
416bf90086 Revert "[ThinLTO] Add an auto-hide feature"
This reverts r293912, bots are broken.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293914 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 18:24:37 +00:00
Mehdi Amini
73efdef798 [ThinLTO] Add an auto-hide feature
When a symbol is not exported outside of the
DSO, it is can be hidden. Usually we try to internalize
as much as possible, but it is not always possible, for
instance a symbol can be referenced outside of the LTO
unit, or there can be cross-module reference in ThinLTO.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293912 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 18:13:46 +00:00
Teresa Johnson
8ffb6b14bb [ThinLTO] PrintStatistics when we exit early for thinlto-index-only
Summary:
This is necessary to get stats from the ThinLink printed before the
early exit when compiling in a distributed build.

Reviewers: mehdi_amini

Subscribers: Prazek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293908 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 17:33:53 +00:00
Simon Pilgrim
bb3b2011b8 [X86][SSE] Add test case for PR18344
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293907 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 17:23:57 +00:00
Simon Dardis
cdb5e1caf7 [mips] Expansion of BEQL and BNEL with immediate operands
Adds support for BEQL and BNEL macros with immediate operands.

Patch by: Srdjan Obucina

Reviewers: dsanders, zoran.jovanovic, vkalintiris, sdardis, obucina, seanbruno

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 16:13:49 +00:00
Amaury Sechet
8f643cf8d8 Use N0 instead of N->getOperand(0) in DagCombiner::visitAdd. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293903 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 16:07:44 +00:00
Kamil Rytarowski
a43456d7b9 Make llvm::call_once more convenient to reuse out of LLVM
Summary:
Currently users need to set call `using namespace llvm;`, with this change it's no longer needed.

Sponsored by <The NetBSD Foundation>

Reviewers: labath, emaste, joerg, clayborg, mehdi_amini

Reviewed By: mehdi_amini

Subscribers: chandlerc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293902 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 16:06:33 +00:00
Teresa Johnson
2b81fe1bf3 [ThinLTO] Resolve old FIXME for alias importing in test
This FIXME was added with r265941 and should have been resolved with
r266517.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293901 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 15:58:06 +00:00
Jonas Paulsson
dc53ecaf9b [SystemZ] Add comment for ISD::FP_TO_UINT expansion.
(Copied from the fp-conv-10.ll test to SystemZISelLowering.cpp)

Review: Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293900 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 15:42:14 +00:00
Krzysztof Parzyszek
07f9e9b603 [Hexagon] Emitting individual instructions without copying them
Patch by Colin LeMahieu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293899 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 15:32:26 +00:00
Jun Bum Lim
0de282c060 [JumpThread] Enhance finding partial redundant loads by continuing scanning single predecessor
Summary: While scanning predecessors to find an available loaded value, if the predecessor has a single predecessor, we can continue scanning through the single predecessor.

Reviewers: mcrosier, rengolin, reames, davidxl, haicheng

Reviewed By: rengolin

Subscribers: zzheng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293896 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 15:12:34 +00:00
Krzysztof Parzyszek
06ff48c9a0 [Hexagon] Rename TypeCOMPOUND to TypeCJ
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293894 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 15:03:30 +00:00
Nirav Dave
99b0642f83 In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled.
Recommiting after fixing X86 inc/dec chain bug.

    * Simplify Consecutive Merge Store Candidate Search

    Now that address aliasing is much less conservative, push through
    simplified store merging search and chain alias analysis which only
    checks for parallel stores through the chain subgraph. This is cleaner
    as the separation of non-interfering loads/stores from the
    store-merging logic.

    When merging stores search up the chain through a single load, and
    finds all possible stores by looking down from through a load and a
    TokenFactor to all stores visited.

    This improves the quality of the output SelectionDAG and the output
    Codegen (save perhaps for some ARM cases where we correctly constructs
    wider loads, but then promotes them to float operations which appear
    but requires more expensive constant generation).

    Some minor peephole optimizations to deal with improved SubDAG shapes (listed below)

    Additional Minor Changes:

      1. Finishes removing unused AliasLoad code

      2. Unifies the chain aggregation in the merged stores across code
         paths

      3. Re-add the Store node to the worklist after calling
         SimplifyDemandedBits.

      4. Increase GatherAllAliasesMaxDepth from 6 to 18. That number is
         arbitrary, but seems sufficient to not cause regressions in
         tests.

      5. Remove Chain dependencies of Memory operations on CopyfromReg
         nodes as these are captured by data dependence

      6. Forward loads-store values through tokenfactors containing
          {CopyToReg,CopyFromReg} Values.

      7. Peephole to convert buildvector of extract_vector_elt to
         extract_subvector if possible (see
         CodeGen/AArch64/store-merge.ll)

      8. Store merging for the ARM target is restricted to 32-bit as
         some in some contexts invalid 64-bit operations are being
         generated. This can be removed once appropriate checks are
         added.

    This finishes the change Matt Arsenault started in r246307 and
    jyknight's original patch.

    Many tests required some changes as memory operations are now
    reorderable, improving load-store forwarding. One test in
    particular is worth noting:

      CodeGen/PowerPC/ppc64-align-long-double.ll - Improved load-store
      forwarding converts a load-store pair into a parallel store and
      a memory-realized bitcast of the same value. However, because we
      lose the sharing of the explicit and implicit store values we
      must create another local store. A similar transformation
      happens before SelectionDAG as well.

    Reviewers: arsenm, hfinkel, tstellarAMD, jyknight, nhaehnle

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293893 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 14:39:42 +00:00
Nirav Dave
a25e135627 [X86,ISEL] Fix X86 increment chain dependence calculation
Merging Load-add-store pattern into a increment op previously dropped
the load's chain from the instructions dependence if the store is
chained to a TokenFactor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293892 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 14:39:26 +00:00
Diana Picus
c53d2b802e [ARM] GlobalISel: Lower pointer args and returns
It is important to change the ArgInfo's type from pointer to integer, otherwise
the CC assign function won't know what to do. Instead of hacking it up, we use
ComputeValueVTs and introduce some of the helpers that we will need later on for
lowering more complex types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293889 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 14:01:00 +00:00
Diana Picus
a2eb1ad2cd [ARM] GlobalISel: Error out instead of asserting
Allow unknown types in TLI.getValueType, otherwise we get asserts for certain
types that we do not support yet (instead of returning that we don't support
them and falling through the normal error path).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293888 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 14:00:54 +00:00
Anna Thomas
d63d59a787 [LICM] Hoist loads that are dominated by invariant.start intrinsic, and are invariant in the loop.
Summary:
We can hoist out loads that are dominated by invariant.start, to the preheader.
We conservatively assume the load is variant, if we see a corresponding
use of invariant.start (it could be an invariant.end or an escaping
call).

Reviewers: mkuper, sanjoy, reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293887 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 13:22:03 +00:00
Diana Picus
e92069833f [ARM] GlobalISel: Legalize loading pointers
Make it legal to load pointer values. Also check that pointers are assigned
to the GPR reg bank by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293886 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 13:20:49 +00:00
Diana Picus
10282bda8c [ARM] GlobalISel: Test default banks for load results. NFC.
Check that all scalars are loaded into the GPR by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293883 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 13:00:24 +00:00
Simon Pilgrim
178f518f3e [X86][SSE] Use MOVMSK for all_of/any_of reduction patterns
This is a first attempt at using the MOVMSK instructions to replace all_of/any_of reduction patterns (i.e. an and/or + shuffle chain).

So far this only matches patterns where we are reducing an all/none bits source vector (i.e. a comparison result) but we should be able to expand on this in conjunction with improvements to 'bool vector' handling both in the x86 backend as well as the vectorizers etc.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293880 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 11:52:33 +00:00
NAKAMURA Takumi
69ad39a4a1 DIBuilder.h: Fix a typo. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293876 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 09:55:22 +00:00
Craig Topper
502509df25 [X86] Remove some unused DAGCombinerInfo parameters. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293873 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 08:03:23 +00:00
Craig Topper
a0d05ab6f4 [X86] Move some INSERT_SUBVECTOR optimizations from legalize to DAG combine.
This moves creation of SUBV_BROADCAST and merging of adjacent loads that are being inserted together.

This is a step towards removing legalizing of INSERT_SUBVECTOR except for vXi1 cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293872 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 08:03:20 +00:00
Adam Nemet
77d2e8630d [opt-viewer] HTML-escape function names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293869 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 05:49:02 +00:00
Adam Nemet
73efe1f22d [opt-viewer] Alternating row background colors on index page
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293868 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 05:49:00 +00:00
Adam Nemet
49e45b454f [LV] Also port failure remarks to new OptimizationRemarkEmitter API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293866 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 05:41:51 +00:00
Peter Collingbourne
d69c1efa38 LTO: Link non-prevailing weak_odr or linkonce_odr globals into the combined module with available_externally linkage.
These linkages mean that the ultimately prevailing symbol will have the same
semantics as any non-prevailing copy of the symbol, so we are free to ignore
the linker's resolution.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293865 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 05:22:42 +00:00
Peter Collingbourne
e482a05c06 Linker: Move special casing for available_externally in IRMover to clients. NFCI.
The goal is to simplify the semantic model for clients of IRMover.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 05:12:15 +00:00
Craig Topper
12523529e8 [AVX-512] Fix the implicit defs for VZEROALL/VZEROUPPER to include YMM16-YMM31.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293862 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 04:17:18 +00:00
Craig Topper
8dabf9ee24 [AVX-512] Add test case demonstrating that we have an incomplete implicit def list for VZEROALL/VZEROUPPER. YMM16-YMM31 should also be defs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293861 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 04:17:15 +00:00
Craig Topper
2609c65f3f [X86] Use update_llc_test_checks.py to regenerate a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293860 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 04:17:12 +00:00
Matt Arsenault
b324cd9254 InferAddressSpaces: Handle more cases with constant select operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293859 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 03:37:22 +00:00
Matt Arsenault
9f7e91552b AMDGPU: Use source modifiers with f16->f32 conversions
The operand types were defined to fit the fp16_to_fp node, which
has the half as an integer type. v_cvt_f32_f16 does support
source modifiers, so change this to have an FP type and modifiers.

For targets without legal f16, this requires recognizing the
bit operations and trying to produce them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293857 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 02:27:04 +00:00
Matthias Braun
a7f81dbadd RegisterCoalescer: Cleanup joinReservedPhysReg(); NFC
- Factor out a common subexpression
- Add some helpful comments
- Fix printing of a register in a debug message

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293856 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 02:23:27 +00:00
Matthias Braun
6d3eeb8c99 AArch64RegisterInfo: Simplify getReservedReg(); NFC
After marking a 32bit register and all its super registers the 64bit
register does not need to be marked again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293855 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 02:23:25 +00:00
Dehao Chen
5682e20c6d Refactor the gmlt tests. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293852 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 01:21:13 +00:00
Matt Arsenault
8c93ddba10 NVPTX: Fix not preserving volatile when expanding memset
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293851 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 01:20:34 +00:00
Omair Javaid
367ed08f22 Fix LLDB Android AArch64 GCC debug info build
Committing after fixing suggested changes and tested release/debug builds on 
x86_64-linux and arm/aarch64 builds.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293850 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 01:17:49 +00:00
Rui Ueyama
57b15082cd Re-submit r293820: Return Error instead of bool from mergeTypeStreams().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293847 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:47:10 +00:00
Davide Italiano
861b997813 [IPSCCP] Restore the old behaviour (pre r293799).
It's not clear the change I made a good idea, and it definitely needs
further discussion. Thanks to Eli for pointing out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293846 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:46:54 +00:00