1

Where can I find the LLVM bytecode representation of the LLVM IR language?

Like this <result> = add <ty> <op1>, <op2>, but in binary form like this incept for LLVM instead of JVM. More specifically I want the opcode numbers so I can study the bitcode on a binary level.

zeitue
  • 1,674
  • 2
  • 20
  • 45

2 Answers2

2

I think the canonical source for LLVM Bit Codes is this file :

llvm-src/include/llvm/Bitcode/LLVMBitCodes.h

from the llvm source which can be found here: http://llvm.org/releases/

You may also want to look at the code in llvm-src/lib/Bitcode/Reader, which reads bitcode.

1

you can find opcode numbers in include/llvm/IR/Instruction.def

https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_14/include/llvm/Instruction.def

hadi sadeghi
  • 517
  • 4
  • 7