[llvm-dev] What is HexagonCommonGEP.cpp for?
陳韋任 via llvm-dev
llvm-dev at lists.llvm.org
Wed Jun 14 06:16:31 PDT 2017
Sounds like you break a single getelementptr into a few smaller ones, then
do CSE-like optimization?
2017-06-14 21:11 GMT+08:00 Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org>:
> On 6/14/2017 7:44 AM, 陳韋任 via llvm-dev wrote:
>> Skim through Hexagon backend, I notice there is HexagonCommonGEP.cpp
>> which seems
>> try to do something on `getelementptr` LLVM instruction. But what exactly
>> it want to do?
>> Anyone knows?
> Each getelementptr is a chain that starts with a pointer, followed by an
> index, which together produce a new pointer. That new pointer coupled with
> the next index on the operand list produced yet another pointer, and so on.
> Each GEP can actually be broken up into shorter GEPs, where the next one
> starts at the address generated by the previous one. It is fairly common to
> have GEP instructions that in their entirety generate different pointers,
> but where the initial few pointers are identical. The core task of
> HexagonCommonGEP is to isolate the initial identical addresses into their
> own GEP instructions. It then does several other things, like finding the
> best placement of the commoned GEPs (with respect to loop invariance), etc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
> by The Linux Foundation
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
Wei-Ren Chen (陳韋任)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev