[LLVMdev] How to recognize the declaring code scopes of stack variables

David Blaikie dblaikie at gmail.com
Thu Jul 11 19:57:24 PDT 2013


Clang can/now emits lifetime intrinsics to mark this information, I
believe - but I'm not sure if they'll suit your needs.

What are you trying to do with this information?

On Thu, Jul 11, 2013 at 7:45 PM, Eric Lu <eirc.lew at gmail.com> wrote:
> Hi,
>
>   If I want to know where the stack variables are declared? For example,
> whether it is declared within a loop or not?  Like variables a[100] and
> temp.
>
>   int a[100];
>   for( int i = 0; i < N; i++){
>       int temp;
>     }
>
>   Can this be done in LLVM IR? Or should be implemented in Clang.
>
>
> Thanks!
>
>
> Eric
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list