Displaying 3 results from an estimated 3 matches for "aresame".
Did you mean:
allsame
2009 Apr 07
0
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi, Artur
> %1 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([16 x
> i8]* @.str, i32 0, i32 0), i32 %0) nounwind
> %10 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr ([11 x i8]*
> @.str2, i32 0, i32 0), i32 5) nounwind
>
> Instruction::isSameOperationAs() returns false for those two. Is it a
> bug or I misunderstood something?
These are two
2009 Apr 06
2
[LLVMdev] Patch: MSIL backend global pointers initialization
Hi Anton,
Anton Korobeynikov wrote:
> Minor comments:
>
Thanks for your comments and your patience, I'll now check the style
four times before I send anything ;)
>> + Instruction *instr =
>> + const_cast<Instruction*>(dynamic_cast<const
>> Instruction*>(*i));
>>
> Sounds hacky. Why do you need to cast away const?
2009 Apr 07
3
[LLVMdev] Patch: MSIL backend global pointers initialization
...just need the same signature for both of those instructions.
>
> > In any case I wrote my custom isSame() operator for this but I'll
> > appreciate any hints.
> Why do you need this? Won't be enough just to compare function types?
I do something like this:
static bool areSame(Instruction *A, Instruction *B) {
if (A->getOpcode() != B->getOpcode()) return false;
if (A->getType()->getTypeID() != B->getType()->getTypeID()) return false;
unsigned int a = A->getNumOperands();
if (a != B->getNumOperands()) return false;
for (unsigned int i = 0...