[llvm-dev] Question about struct StackObject in MachineFrameInfo

Zhaomo Yang via llvm-dev llvm-dev at lists.llvm.org
Mon Feb 1 11:18:17 PST 2016


Hi folks,

In include/llvm/CodeGen/MachineFrameInfo.h, there is a StackObject struct
representing objects on an abstract stack frame (class MachineFrameInfo).

In the struct StackObject, there is the following field and comment:

    /// If this stack object is originated from an Alloca instruction
    /// this value saves the original IR allocation. Can be NULL.
    const AllocaInst *Alloca;

What does "Can be NULL" mean here? Does it mean that the Alloca field may
be null even when the stack object is originated form an Alloca? In other
words, is this a reliable way to determine if an stack object is originated
from an alloca?

Thanks,
Zhaomo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160201/0d0bb9f4/attachment.html>


More information about the llvm-dev mailing list