]> granicus.if.org Git - llvm/commit
[LICM] Report failing to hoist a load with an invariant address
authorAdam Nemet <anemet@apple.com>
Wed, 11 Jan 2017 04:39:45 +0000 (04:39 +0000)
committerAdam Nemet <anemet@apple.com>
Wed, 11 Jan 2017 04:39:45 +0000 (04:39 +0000)
commitf5fda305e6c185b383ad96ab5667175ddccb2c3d
treed83d788239512ff192d8049aee61ac86b2106f7e
parent468290d3389b99be3ddab43d4e5a2998025b444f
[LICM] Report failing to hoist a load with an invariant address

These are interesting because lack of precision in alias information
could be standing in the way of this optimization.

An example is the case in the test suite that I showed in the DevMeeting
talk:

http://lab.llvm.org:8080/artifacts/opt-view_test-suite/build/MultiSource/Benchmarks/FreeBench/distray/CMakeFiles/distray.dir/html/_org_test-suite_MultiSource_Benchmarks_FreeBench_distray_distray.c.html#L236

canSinkOrHoistInst is also used from LoopSink, which does not use
opt-remarks so we need to take ORE as an optional argument.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291648 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Scalar/LICM.cpp
test/Transforms/LICM/opt-remarks-intervening-store.ll [new file with mode: 0644]