OSDN Git Service

[LoopRotate] Calls not lowered to calls should not block rotation.
authorFlorian Hahn <flo@fhahn.com>
Tue, 19 Jan 2021 14:34:55 +0000 (14:34 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 19 Jan 2021 14:37:36 +0000 (14:37 +0000)
commit3747b69b531299f7a2a0289b8a59ac7234e47d4f
tree776816914f78703207ab0d2fd15efac907cfe979
parentc42f5ca3d84c7b0d4e735ab3794718c429369309
[LoopRotate] Calls not lowered to calls should not block rotation.

83daa49758a1 made loop-rotate more conservative in the presence of
function calls in the prepare-for-lto stage. The code did not properly
account for calls that are no actual function calls, like calls to
intrinsics. This patch updates the code to ensure only calls that are
lowered to actual calls are considered inline candidates.
llvm/lib/Analysis/CodeMetrics.cpp
llvm/test/Transforms/LoopRotate/call-prepare-for-lto.ll