Displaying 5 results from an estimated 5 matches for "icmpinstrarray".
2013 Jan 28
5
[LLVMdev] Value* to Instruction*/LoadInst* casting
Hello everyone,
Can you please tell me if it is possible in LLVM to cast a `Value*` to an
`Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true?
In my particular piece of code:
Value* V1 = icmpInstrArray[i]->getOperand(0);
Value* V2 = icmpInstrArray[i]->getOperand(1);
if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
...
if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
LoadInst *LD100 = cast<LoadInst>(icmpInstrArray[i]->getOperand(0));...
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
...xandruionutdiaconescu at gmail.com> wrote:
> Hello everyone,
>
> Can you please tell me if it is possible in LLVM to cast a `Value*` to an
> `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true?
> In my particular piece of code:
>
> Value* V1 = icmpInstrArray[i]->getOperand(0);
> Value* V2 = icmpInstrArray[i]->getOperand(1);
> if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
> ...
> if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
> LoadInst *LD100 = cast<LoadInst>(icmpInstrArray[i]-...
2013 Jan 28
1
[LLVMdev] Value* to Instruction*/LoadInst* casting
...m> wrote:
>
>> Hello everyone,
>>
>> Can you please tell me if it is possible in LLVM to cast a `Value*` to an
>> `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is true?
>> In my particular piece of code:
>>
>> Value* V1 = icmpInstrArray[i]->getOperand(0);
>> Value* V2 = icmpInstrArray[i]->getOperand(1);
>> if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
>> ...
>> if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
>> LoadInst *LD100 = cast<LoadInst>...
2013 Jan 28
0
[LLVMdev] Value* to Instruction*/LoadInst* casting
...please tell me if it is possible in LLVM to cast a `Value*` to
> an `Instruction*/LoadInst*` if for example `isa<LoadInst>(MyValue)` is
> true?
http://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates
In my particular piece of code:
>
> Value* V1 = icmpInstrArray[i]->getOperand(0);
> Value* V2 = icmpInstrArray[i]->getOperand(1);
> if (isa<LoadInst>(V1) || isa<LoadInst>(V2)){
> ...
> if(isa<LoadInst>(icmpInstrArray[i]->getOperand(0)))
> LoadInst *LD100 = cast<LoadInst>(icmpInstrArra...
2013 Jan 10
1
[LLVMdev] LLVM Instruction to ICmpInst conversion
Hello !
I want some piece of advice regarding a LLVM pass. My particular problem is:
There is a method
bool patternDC::runOnFunction(Function &F) {
...
if ( CC->operEquiv(icmpInstrArray[i], icmpInstrArray[j]) ) {...}
...
}
having the array elements of type Instruction* :
http://llvm.org/doxygen/classllvm_1_1Instruction.html
The called method is
bool ifChecker::operEquiv(Instruction *I1, Instruction *I2)
{
...
}
BUT I want to use the methods from class ICmpInst : clasa
http://l...