Hi. I’m a new learner for LLVM. I want to write a pass to add some custom instructions to check zero for DIV. (X86-64 architecture)
before:
IDIV EBX
after:
TEST EBX, EBX
JNZ L1
MOV EBX, 1
L1:
IDIV EBX
I think it’s need to modify some code in instruction generate pass, but I don’t know where is the relation files.