user35443
user35443

Reputation: 6403

LLVM IR opcode documentation

I have read LLVM IR language reference and bitcode file format, but I haven't found any documentation containing an opcode list or explaining the instruction encoding.

Is there any place where it'd be possible to find this information, or searching the source code is necessary?

Upvotes: 10

Views: 4954

Answers (1)

Oak
Oak

Reputation: 26868

You'll have to look in the source code. Fortunately for you, it's all pretty neatly laid out in LLVMBitCodes.h.

Just keep in mind that the encoding does occasionally change, so be careful if you depend on it for anything (though I think things are only added to the enums, not removed or changed).

Upvotes: 6

Related Questions