OSDN Git Service

Re-enable "[MachineCopyPropagation] Extend pass to do COPY source forwarding"
authorGeoff Berry <gberry@codeaurora.org>
Thu, 17 Aug 2017 23:06:55 +0000 (23:06 +0000)
committerGeoff Berry <gberry@codeaurora.org>
Thu, 17 Aug 2017 23:06:55 +0000 (23:06 +0000)
commitd93db263e5fb02b83f18715db3be7d4540ff194f
treeb5fc7a4295732549b5be2ff810456d1095186900
parentb5c199a647591aafa04d1af51353ddad99e324ed
Re-enable "[MachineCopyPropagation] Extend pass to do COPY source forwarding"

    Two issues identified by buildbots were addressed:
    - The pass no longer forwards COPYs to physical register uses, since
      doing so can break code that implicitly relies on the physical
      register number of the use.
    - The pass no longer forwards COPYs to undef uses, since doing so
      can break the machine verifier by creating LiveRanges that don't
      end on a use (since the undef operand is not considered a use).

    [MachineCopyPropagation] Extend pass to do COPY source forwarding

    This change extends MachineCopyPropagation to do COPY source forwarding.

    This change also extends the MachineCopyPropagation pass to be able to
    be run during register allocation, after physical registers have been
    assigned, but before the virtual registers have been re-written, which
    allows it to remove virtual register COPY LiveIntervals that become dead
    through the forwarding of all of their uses.

    Reviewers: qcolombet, javed.absar, MatzeB, jonpa

    Subscribers: jyknight, nemanjai, llvm-commits, nhaehnle, mcrosier, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311135 91177308-0d34-0410-b5e6-96231b3b80d8
77 files changed:
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
lib/CodeGen/CodeGen.cpp
lib/CodeGen/MachineCopyPropagation.cpp
lib/CodeGen/TargetPassConfig.cpp
test/CodeGen/AArch64/aarch64-fold-lslfast.ll
test/CodeGen/AArch64/arm64-AdvSIMD-Scalar.ll
test/CodeGen/AArch64/arm64-zero-cycle-regmov.ll
test/CodeGen/AArch64/f16-instructions.ll
test/CodeGen/AArch64/flags-multiuse.ll
test/CodeGen/AArch64/merge-store-dependency.ll
test/CodeGen/AArch64/neg-imm.ll
test/CodeGen/AMDGPU/callee-special-input-sgprs.ll
test/CodeGen/AMDGPU/ret.ll
test/CodeGen/ARM/atomic-op.ll
test/CodeGen/ARM/swifterror.ll
test/CodeGen/Mips/llvm-ir/sub.ll
test/CodeGen/PowerPC/fma-mutate.ll
test/CodeGen/PowerPC/inlineasm-i64-reg.ll
test/CodeGen/PowerPC/tail-dup-layout.ll
test/CodeGen/SPARC/atomics.ll
test/CodeGen/Thumb/thumb-shrink-wrapping.ll
test/CodeGen/X86/2006-03-01-InstrSchedBug.ll
test/CodeGen/X86/arg-copy-elide.ll
test/CodeGen/X86/avg.ll
test/CodeGen/X86/avx-load-store.ll
test/CodeGen/X86/avx512-bugfix-25270.ll
test/CodeGen/X86/avx512-calling-conv.ll
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/avx512bw-intrinsics-upgrade.ll
test/CodeGen/X86/buildvec-insertvec.ll
test/CodeGen/X86/combine-fcopysign.ll
test/CodeGen/X86/complex-fastmath.ll
test/CodeGen/X86/divide-by-constant.ll
test/CodeGen/X86/fmaxnum.ll
test/CodeGen/X86/fminnum.ll
test/CodeGen/X86/fp128-i128.ll
test/CodeGen/X86/haddsub-2.ll
test/CodeGen/X86/haddsub-undef.ll
test/CodeGen/X86/half.ll
test/CodeGen/X86/inline-asm-fpstack.ll
test/CodeGen/X86/ipra-local-linkage.ll
test/CodeGen/X86/localescape.ll
test/CodeGen/X86/mul-i1024.ll
test/CodeGen/X86/mul-i512.ll
test/CodeGen/X86/mul128.ll
test/CodeGen/X86/pmul.ll
test/CodeGen/X86/powi.ll
test/CodeGen/X86/pr11334.ll
test/CodeGen/X86/pr29112.ll
test/CodeGen/X86/psubus.ll
test/CodeGen/X86/shrink-wrap-chkstk.ll
test/CodeGen/X86/sqrt-fastmath.ll
test/CodeGen/X86/sse1.ll
test/CodeGen/X86/sse3-avx-addsub-2.ll
test/CodeGen/X86/statepoint-live-in.ll
test/CodeGen/X86/statepoint-stack-usage.ll
test/CodeGen/X86/vec_fp_to_int.ll
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vec_minmax_sint.ll
test/CodeGen/X86/vec_shift4.ll
test/CodeGen/X86/vector-blend.ll
test/CodeGen/X86/vector-idiv-sdiv-128.ll
test/CodeGen/X86/vector-idiv-udiv-128.ll
test/CodeGen/X86/vector-rotate-128.ll
test/CodeGen/X86/vector-sext.ll
test/CodeGen/X86/vector-shift-ashr-128.ll
test/CodeGen/X86/vector-shift-lshr-128.ll
test/CodeGen/X86/vector-shift-shl-128.ll
test/CodeGen/X86/vector-shuffle-combining.ll
test/CodeGen/X86/vector-trunc-math.ll
test/CodeGen/X86/vector-zext.ll
test/CodeGen/X86/vselect-minmax.ll
test/CodeGen/X86/widen_conv-3.ll
test/CodeGen/X86/widen_conv-4.ll
test/CodeGen/X86/x86-shrink-wrap-unwind.ll
test/CodeGen/X86/x86-shrink-wrapping.ll