[LLVMdev] Lowering formal pointer arguments

Akira Hatanaka ahatanak at gmail.com
Wed Mar 14 19:07:13 PDT 2012


If you need llvm::Argument, this returns the iterator pointing to the
first argument:

Function::const_arg_iterator Arg =
DAG.getMachineFunction().getFunction()->arg_begin();

On Wed, Mar 14, 2012 at 8:16 AM, Ivan Llopard <ivanllopard at gmail.com> wrote:
> Hi,
>
> How can I get the llvm-type of the formal argument while lowering it ?
>
> My target needs to map pointer and non-pointer parameters to different
> registers. In addition, parameter lowering is address space dependent
> (another reason why I need such information). Looking at the DAGBuilder,
> I found that it is dropping it when translating llvm-types to BE types.
> Even if the base type is saved into the MVT structure, it's a private
> member. What's the reason for hiding it ? Why not to keep such information ?
>
> Thanks in advance,
>
> Ivan
> _______________________________________________
> 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