llvm to x86 IR conversion

Hi,

I am running a basic block pass (and iterating through each instruction).
Is it possible to convert the basic block instruction form llvm IR to x86 IR WITHIN the path ?

Thanks.

It seems to me that phi nodes would mean that you can't convert any
unit smaller than a function to native code.

~ Scott

Hi,

I believe that my question isn’t clear. So, please let me rephrase :

I am running a basic block pass (and iterating through each instruction).
Is it possible to convert the basic block instruction form llvm IR to x86 IR WITHIN the path ?

I mean: is LLVM API exists for this purpose ?

Again, thanks.

My point was that BasicBlockPass's runOnBasicBlock "is not allowed to
inspect or modify basic blocks other than the parameter," and thus you
don't have enough information to convert general LLVM IR to x86 IR, so
there cannot be an LLVM API to do it.

(I think.)