OSDN Git Service

VirtRegMap: Replace some identity copies with KILL instructions.
authorMatthias Braun <matze@braunis.de>
Sat, 9 Jul 2016 00:19:07 +0000 (00:19 +0000)
committerMatthias Braun <matze@braunis.de>
Sat, 9 Jul 2016 00:19:07 +0000 (00:19 +0000)
commit79519fecc311f2ced5d204a9f7de296aaa246e9b
tree699d58c054c190a039f4324211751c553bb0f1ce
parent93ad397da1c0d0df4e3a070de495801195b8efc9
VirtRegMap: Replace some identity copies with KILL instructions.

An identity COPY like this:
   %AL = COPY %AL, %EAX<imp-def>
has no semantic effect, but encodes liveness information: Further users
of %EAX only depend on this instruction even though it does not define
the full register.

Replace the COPY with a KILL instruction in those cases to maintain this
liveness information. (This reverts a small part of r238588 but this
time adds a comment explaining why a KILL instruction is useful).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274952 91177308-0d34-0410-b5e6-96231b3b80d8
80 files changed:
lib/CodeGen/VirtRegMap.cpp
test/CodeGen/AArch64/arm64-collect-loh.ll
test/CodeGen/PowerPC/machine-combiner.ll
test/CodeGen/SPARC/32abi.ll
test/CodeGen/X86/anyext.ll
test/CodeGen/X86/atomic-eflags-reuse.ll
test/CodeGen/X86/avx-cast.ll
test/CodeGen/X86/avx-intrinsics-fast-isel.ll
test/CodeGen/X86/avx-intrinsics-x86-upgrade.ll
test/CodeGen/X86/avx2-conversions.ll
test/CodeGen/X86/avx2-intrinsics-fast-isel.ll
test/CodeGen/X86/avx2-vector-shifts.ll
test/CodeGen/X86/avx512-arith.ll
test/CodeGen/X86/avx512-calling-conv.ll
test/CodeGen/X86/avx512-cvt.ll
test/CodeGen/X86/avx512-ext.ll
test/CodeGen/X86/avx512-extract-subvector.ll
test/CodeGen/X86/avx512-insert-extract.ll
test/CodeGen/X86/avx512-intrinsics-upgrade.ll
test/CodeGen/X86/avx512-intrinsics.ll
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/avx512-select.ll
test/CodeGen/X86/avx512-trunc.ll
test/CodeGen/X86/avx512-vbroadcast.ll
test/CodeGen/X86/avx512-vec-cmp.ll
test/CodeGen/X86/avx512bw-mov.ll
test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll
test/CodeGen/X86/avx512bwvl-intrinsics.ll
test/CodeGen/X86/avx512dq-intrinsics.ll
test/CodeGen/X86/avx512dq-mask-op.ll
test/CodeGen/X86/avx512dqvl-intrinsics.ll
test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
test/CodeGen/X86/avx512vl-intrinsics.ll
test/CodeGen/X86/bitreverse.ll
test/CodeGen/X86/bmi.ll
test/CodeGen/X86/clz.ll
test/CodeGen/X86/extractelement-index.ll
test/CodeGen/X86/f16c-intrinsics-fast-isel.ll
test/CodeGen/X86/fixup-bw-copy.ll
test/CodeGen/X86/h-registers-3.ll
test/CodeGen/X86/machine-combiner-int.ll
test/CodeGen/X86/masked_gather_scatter.ll
test/CodeGen/X86/masked_memop.ll
test/CodeGen/X86/materialize.ll
test/CodeGen/X86/movmsk.ll
test/CodeGen/X86/or-lea.ll
test/CodeGen/X86/pmul.ll
test/CodeGen/X86/pr28173.ll
test/CodeGen/X86/promote-i16.ll
test/CodeGen/X86/tbm-intrinsics-fast-isel.ll
test/CodeGen/X86/urem-i8-constant.ll
test/CodeGen/X86/urem-power-of-two.ll
test/CodeGen/X86/vec_fp_to_int.ll
test/CodeGen/X86/vec_insert-5.ll
test/CodeGen/X86/vec_insert-mmx.ll
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vec_ss_load_fold.ll
test/CodeGen/X86/vec_uint_to_fp-fastmath.ll
test/CodeGen/X86/vector-bitreverse.ll
test/CodeGen/X86/vector-compare-results.ll
test/CodeGen/X86/vector-half-conversions.ll
test/CodeGen/X86/vector-idiv-sdiv-512.ll
test/CodeGen/X86/vector-lzcnt-128.ll
test/CodeGen/X86/vector-lzcnt-256.ll
test/CodeGen/X86/vector-sext.ll
test/CodeGen/X86/vector-shift-ashr-128.ll
test/CodeGen/X86/vector-shift-ashr-256.ll
test/CodeGen/X86/vector-shift-lshr-128.ll
test/CodeGen/X86/vector-shift-lshr-256.ll
test/CodeGen/X86/vector-shift-shl-128.ll
test/CodeGen/X86/vector-shift-shl-256.ll
test/CodeGen/X86/vector-shuffle-256-v4.ll
test/CodeGen/X86/vector-shuffle-combining-avx2.ll
test/CodeGen/X86/vector-shuffle-v1.ll
test/CodeGen/X86/vector-shuffle-variable-128.ll
test/CodeGen/X86/vector-trunc-math.ll
test/CodeGen/X86/vector-trunc.ll
test/CodeGen/X86/widen_bitops-0.ll
test/CodeGen/X86/x86-shrink-wrap-unwind.ll
test/CodeGen/X86/xaluo.ll