[LoopUnroll] Remove remapInstruction().
authorWhitney Tsang <whitneyt@ca.ibm.com>
Thu, 23 Jan 2020 20:11:28 +0000 (20:11 +0000)
committerWhitney Tsang <whitneyt@ca.ibm.com>
Mon, 27 Jan 2020 15:42:13 +0000 (15:42 +0000)
commit2b335e9aae857b63300c70435cde585c73760690
tree31c41f79ca60e25a436728c1cee0971ebeabe04a
parentc963b5fbd61ad1407dda1b1e5bb87dc0fc207266
[LoopUnroll] Remove remapInstruction().

Summary:
LoopUnroll can reuse the RemapInstruction() in ValueMapper, or
remapInstructionsInBlocks() in CloneFunction, depending on the needs.
There is no need to have its own version in LoopUnroll.

By calling RemapInstruction() without TypeMapper or Materializer and
with Flags (RF_NoModuleLevelChanges | RF_IgnoreMissingLocals), it does
the same as remapInstruction(). remapInstructionsInBlocks() calls
RemapInstruction() exactly as described.

Looking at the history, I cannot find any obvious reason to have its own
version.
Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto,
foad, aprantl
Reviewed By: jdoerfert
Subscribers: hiraditya, zzheng, llvm-commits, prithayan, anhtuyen
Tag: LLVM
Differential Revision: https://reviews.llvm.org/D73277
llvm/include/llvm/Transforms/Utils/UnrollLoop.h
llvm/lib/Transforms/Utils/LoopUnroll.cpp
llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp