[LLVMdev] Lowering formal pointer arguments

Ivan Llopard ivanllopard at gmail.com
Thu Mar 15 02:02:15 PDT 2012


Le 15/03/2012 03:07, Akira Hatanaka a écrit :
> If you need llvm::Argument, this returns the iterator pointing to the
> first argument:
>
> Function::const_arg_iterator Arg =
> DAG.getMachineFunction().getFunction()->arg_begin();

Thanks Akira.

Ivan
>
> 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