[PATCH] D18729: [llvm-c] Improve IR Introspection: Add ValueKind
whitequark via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 3 15:09:15 PDT 2016
whitequark added a comment.
The reason the table exists is for bindings. Without LLVMGetValueKind(), a binding that wishes to introspect an instruction has to call the multitude of LLVMIsA* functions in sequence, which is:
1. Slow (many bindings use libffi)
2. Usually cannot be inlined (see 1)
3. Fragile and hostile to upgrades of LLVM, as there isn't even an easy way to figure out the type of the value that broke the check
http://reviews.llvm.org/D18729
More information about the llvm-commits
mailing list