OSDN Git Service

[JumpThreading] Clone noalias.scope.decl when threading blocks
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 21 Feb 2021 15:24:18 +0000 (16:24 +0100)
committerTom Stellard <tstellar@redhat.com>
Tue, 23 Feb 2021 00:49:46 +0000 (16:49 -0800)
commitda7fa7457800394d610e8cbd6befe7bc944ca7d0
treeb61373fa875c1c29ed5f534e685e87e6a28350bd
parenta750a2329c433e598f7fc9655d625c5ebb6bc400
[JumpThreading] Clone noalias.scope.decl when threading blocks

When cloning instructions during jump threading, also clone and
adapt any declared scopes. This is primarily important when
threading loop exits, because we'll end up with two dominating
scope declarations in that case (at least after additional loop
rotation). This addresses a loose thread from
https://reviews.llvm.org/rG2556b413a7b8#975012.

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

(cherry picked from commit 5e7e499b912d2c9ebaa91b5783ca123dbedeabcc)
llvm/include/llvm/Transforms/Utils/Cloning.h
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/lib/Transforms/Utils/CloneFunction.cpp
llvm/test/Transforms/JumpThreading/noalias-scope-decl.ll [new file with mode: 0644]