[LLVMdev] Patch: MSIL backend global pointers initialization
artur.pietrek at kalray.eu
Mon Apr 6 09:01:22 CDT 2009
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
> Sounds hacky. Why do you need to cast away const? Maybe you just need
> use_iterator instead?
Ok, I've fixed this.
I didn't attached the new patch because I found a bug in my code - in
special cases I get doubled declarations.
If I have two instructions like those:
%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?
In any case I wrote my custom isSame() operator for this but I'll
appreciate any hints.
More information about the LLVMdev