This is an archive of the discontinued LLVM Phabricator instance.

Adapt the use of @llvm.invariant.start/end intrinsics for load elimination purposes from -gvn to -instcombine
Needs ReviewPublic

Authored by lvoufo on Dec 1 2015, 6:19 PM.

Details

Summary

Like -gvn (and -globalopt), -instcombine is made to require the -invariant-info-marker pass; and the lookup of available loads that it depends on (FindAvailableLoadedValue() in Loads.cpp) also takes invariant info into consideration.

Changes in the definition of FindAvailableLoadedValue() prompt updates of its calls in Lint.cpp and JumpTherading.cpp.

In addition, invariant info analysis must be registered as a function analysis to preserve regression tests with 'opt -passes=instcombine' such as 'test/Transforms/InstCombine/load.ll'. [cf. PassBuilder.cpp and PassRegistry.cpp]

Diff Detail

Event Timeline

lvoufo updated this revision to Diff 41584.Dec 1 2015, 6:19 PM
lvoufo retitled this revision from to Adapt the use of @llvm.invariant.start/end intrinsics for load elimination purposes from -gvn to -instcombine.
lvoufo updated this object.
lvoufo added reviewers: nlewycky, reames, chandlerc.
lvoufo added a subscriber: llvm-commits.
lvoufo updated this revision to Diff 41587.Dec 1 2015, 6:30 PM

Fix patch.

reames resigned from this revision.Apr 18 2016, 4:56 PM
reames removed a reviewer: reames.