[LLVMdev] [cfe-dev] want to intercept array dereferences

Gry Gunvor gry.gunvor at gmail.com
Thu Apr 9 10:59:55 PDT 2015


On Thu, Apr 9, 2015 at 10:47 AM, Jonathan Roelofs
<jonathan at codesourcery.com> wrote:
>> Again, I asked the LLVM list if, since LLVM is a typed assembly
>> language, if I could just look for pointer plus offset followed by a
>> dereference.  They seemed to suggest that looking for that idiom would

> JFTR, we're one big community, and it's not as segregated into "the clang
> devs" vs "the llvm devs" as you might think.

On the LLVM list I was told "That would need to be in Clang" so I am
writing the front-end list.

> It's encouraged to cc both lists (as appropriate) when having these sorts of
> discussions that span the interface between the two projects. This helps
> give context to statements like "well I asked the other list", without
> having to dig for that other message. At the very least you should provide a
> link to the other discussion.

Ok, in the future I will write both list, but I initially thought it
was a purely backend question.  The other discussion starts here:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-April/084280.html

So now that I am writing both lists: where can I intercept a
Clang/LLVM compile that will catch expressions that locally look like
a[n] or *(a+n) ?

My guess is sometime after a[n] is lowered to *(a+n) (if you do that)
and sometime before optimization passes start chewing on it.

Gry



More information about the llvm-dev mailing list