[LoopIdiomRecognizePass] Options to disable part or the entire Loop Idiom Recognize...
authorAnh Tuyen Tran <anhtuyen@ca.ibm.com>
Tue, 1 Sep 2020 13:59:24 +0000 (13:59 +0000)
committerAnh Tuyen Tran <anhtuyen@ca.ibm.com>
Tue, 1 Sep 2020 13:59:24 +0000 (13:59 +0000)
commit68717acb24e505169509b590e8c83557da54451e
treea8bc7e1067e00d0e80c1e0c20763c2b616ef1e98
parent5a3ede58e2c1df53cf1f74d2b8c4916c4a974b0b
[LoopIdiomRecognizePass] Options to disable part or the entire Loop Idiom Recognize Pass

Loop Idiom Recognize Pass (LIRP) attempts to transform loops with subscripted arrays
into memcpy/memset function calls. In some particular situation, this transformation
introduces negative impacts. For example: https://bugs.llvm.org/show_bug.cgi?id=47300

This patch will enable users to disable a particular part of the transformation, while
he/she can still enjoy the benefit brought about by the rest of LIRP. The default
behavior stays unchanged: no part of LIRP is disabled by default.

Reviewed By: etiotto (Ettore Tiotto)

Differential Revision: https://reviews.llvm.org/D86262
llvm/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h
llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
llvm/test/Transforms/LoopIdiom/disable-options.ll [new file with mode: 0644]