search for: selectiondagbuld

Displaying 2 results from an estimated 2 matches for "selectiondagbuld".

Did you mean: selectiondagbuild
2019 Oct 23
2
Inserting instructions when encountered a specific label
Hello, I’m trying to insert an instruction if a specific label name/string is encountered and would appreciate some guidance on where I should start. Basically when parsing going through this .ll file: ; Function Attrs: noinline nounwind optnone uwtable define i32 @main(i32, i8**) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 %5 = alloca i8**, align 8 %6 = alloca i32, align
2019 Oct 23
3
Inserting instructions when encountered a specific label
...instruction is visited in the visit(…) function. And it prints out the instruction’s number but it prints out only %2 when I call printAsOperand on the instruction’s parent, hence why I assumed that the visit function was going over only the main block. It's probably easier if it's before SelectionDAGBulder (or at the very beginning of its runOnFunction) so you can modify the IR without worrying about whether SelectionDAG will notice the new instructions. That’s true. I’m now trying to detect the specific label in the LLParser and hopefully can insert my instruction there. Would creating a new pseud...