llvm-project/llvm/lib
Nirav Dave 4442667fc5 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

llvm-svn: 293893
2017-02-02 14:39:42 +00:00
..
Analysis [LV] Also port failure remarks to new OptimizationRemarkEmitter API 2017-02-02 05:41:51 +00:00
AsmParser Change debug-info-for-profiling from a TargetOption to a function attribute. 2017-02-01 22:45:09 +00:00
Bitcode Change debug-info-for-profiling from a TargetOption to a function attribute. 2017-02-01 22:45:09 +00:00
CodeGen In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-02-02 14:39:42 +00:00
DebugInfo Re-submit r293820: Return Error instead of bool from mergeTypeStreams(). 2017-02-02 00:47:10 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine RuntimeDyldELF: Don't abort on R_X86_64_NONE, it's a no-oop. 2017-01-28 18:39:01 +00:00
Fuzzer [libFuzzer] Disable afl tests on non-posix systems. 2017-02-01 22:40:50 +00:00
IR [LV] Also port failure remarks to new OptimizationRemarkEmitter API 2017-02-02 05:41:51 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LTO LTO: Link non-prevailing weak_odr or linkonce_odr globals into the combined module with available_externally linkage. 2017-02-02 05:22:42 +00:00
LibDriver LibDriver: Allow resource files to be archive members. 2016-12-15 19:37:46 +00:00
LineEditor
Linker Linker: Move special casing for available_externally in IRMover to clients. NFCI. 2017-02-02 05:12:15 +00:00
MC MCMacho: Allow __thread_ptr section after dwarf sections 2017-02-01 01:31:36 +00:00
Object [WebAssembly] Add wasm support for llvm-readobj 2017-01-30 23:30:52 +00:00
ObjectYAML Make this file clang-format friendly and clang-format it. 2017-01-31 21:11:12 +00:00
Option Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
Passes [PM] Port LoopLoadElimination to the new pass manager and wire it into 2017-01-27 01:32:26 +00:00
ProfileData Cleanup dump() functions. 2017-01-28 02:02:38 +00:00
Support Fix LLDB Android AArch64 GCC debug info build 2017-02-02 01:17:49 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target In visitSTORE, always use FindBetterChain, rather than only when UseAA is enabled. 2017-02-02 14:39:42 +00:00
Transforms [LICM] Hoist loads that are dominated by invariant.start intrinsic, and are invariant in the loop. 2017-02-02 13:22:03 +00:00
XRay [XRay] Define the InstrumentationMap type 2017-02-01 00:05:29 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00