[PATCH] D15124: Use @llvm.invariant.start/end intrinsics to extend the meaning of basic AA's pointsToConstantMemory(), for GVN-based load elimination purposes
Larisse Voufo via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 1 12:14:10 PST 2015
lvoufo created this revision.
lvoufo added reviewers: reames, nlewycky, chandlerc.
lvoufo added a subscriber: llvm-commits.
A new pass is added, -invariant-info-marker, that facilitates the management of invariant info as @llvm.invariant.start/end intrinsic calls are processed within GVN (and memdep analysis) and the result of the process is exploited by basic AA to determine if a given load instruction can be merged into a previous one.
The -invariant-info-marker pass is essentially modeled after the -assumption-cache-tracker pass, but is only required in -gvn, which in turns requires memdep analysis and basic AA. Both memdep analysis and basic AA then have access to invariant info whenever -gvn is enabled.
Within a given invariant_start/end intrinsic calls pair, loads from the same pointer value can be combined as they are not clobbered by interleaving function calls. A test case is added that demonstrates this load elimination.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 23433 bytes
Desc: not available
More information about the llvm-commits