[LLVMdev] Operand, instruction

help__me_please krishnadhan at cse.iitb.ac.in
Thu Apr 22 11:39:09 PDT 2010


Thanks again for your reply.
You are right. But i am looking to change the value of that constant value
and use that as operand in other instruction. For example there is one
constant operand with value 6, i will multiply it with 2, and then use 12 as
operand in other instruction. So i need to convert 12 to value class and
then i will be able to set it as operand. 
Hope i am clear now.
Thanks. 

John Criswell-2 wrote:
> 
> help__me_please wrote:
>> Thanks for the quick reply.
>> I am able to get the numerical value. But i also need the numerical value
>> to
>> be in value type, so that it can be used as operand of other instruction.
>> For that i am trying to create a new ConstantInt, but i am unable to find
>> create() function for ConstantInt. 
>>   
> 
> There is no need to do that.  If you look at the inheritance hierarchy 
> in doxygen, ConstantInt inherits (indirectly) from Value.  You can use a 
> ConstantInt in any place where a Value can be used.
> 
> -- John T.
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 

-- 
View this message in context: http://old.nabble.com/Operand%2C-instruction-tp21961718p28333005.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.




More information about the llvm-dev mailing list