How do I get the whole name of an operator in LLVM?
I'm iterating through blocks, and then, in each of their instructions, I try to get the operator name, but I do only get a part of it. Running the following code:
virtual bool runOnBasicBlock(BasicBlock &bb) {
for (auto it(bb.begin()); it != bb.end(); ++it) {
errs() << it->getName() << '\t' << *it << '\n';
}
}
I get output lines like:
icmp %cmp = icmp slt i32 %i.0, %argc
icmp %cmp1 = icmp sgt i32 %call, %max.0
add %inc = add nsw i32 %i.0, 1
I'd like to get icmp slt
, icmp sgt
, and add nsw
, instead of icmp
and add
.