[PATCH] D15136: Adapt the use of @llvm.invariant.start/end intrinsics for load elimination purposes from -gvn to -instcombine
Larisse Voufo via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 18:19:44 PST 2015
lvoufo created this revision.
lvoufo added reviewers: nlewycky, reames, chandlerc.
lvoufo added a subscriber: llvm-commits.
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]
http://reviews.llvm.org/D15136
Files:
include/llvm/Analysis/Loads.h
lib/Analysis/Lint.cpp
lib/Analysis/Loads.cpp
lib/Passes/PassBuilder.cpp
lib/Passes/PassRegistry.def
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/LoadElim/invariant.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15136.41584.patch
Type: text/x-patch
Size: 12377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151202/c73eedd2/attachment.bin>
More information about the llvm-commits
mailing list