[llvm-commits] [llvm] r136253 - in /llvm/trunk: docs/ include/llvm-c/ include/llvm/ include/llvm/Bitcode/ include/llvm/Support/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/CBackend/ lib/Target/CppBackend/ lib/Transforms/IPO/ lib/Transforms/InstCombine/ lib/Transforms/Scalar/ lib/VMCore/ test/Feature/
Duncan Sands
baldrick at free.fr
Wed Jul 27 22:28:04 PDT 2011
Hi John,
>> --- llvm/trunk/include/llvm-c/Core.h (original)
>> +++ llvm/trunk/include/llvm-c/Core.h Wed Jul 27 15:18:04 2011
>> @@ -126,67 +126,69 @@
>> LLVMIndirectBr = 4,
>> LLVMInvoke = 5,
>> LLVMUnwind = 6,
>> - LLVMUnreachable = 7,
>> + LLVMResume = 7,
>> + LLVMUnreachable = 8,
>>
>> /* Standard Binary Operators */
>> - LLVMAdd = 8,
>> - LLVMFAdd = 9,
>> - LLVMSub = 10,
>> - LLVMFSub = 11,
>> - LLVMMul = 12,
>> - LLVMFMul = 13,
>> - LLVMUDiv = 14,
>> - LLVMSDiv = 15,
>> - LLVMFDiv = 16,
>> - LLVMURem = 17,
>> - LLVMSRem = 18,
>> - LLVMFRem = 19,
>> + LLVMAdd = 9,
>> + LLVMFAdd = 10,
>> + LLVMSub = 11,
>> + LLVMFSub = 12,
>> + LLVMMul = 13,
>> + LLVMFMul = 14,
>> + LLVMUDiv = 15,
>> + LLVMSDiv = 16,
>> + LLVMFDiv = 17,
>> + LLVMURem = 18,
>> + LLVMSRem = 19,
>> + LLVMFRem = 20,
>>
>> /* Logical Operators */
>> - LLVMShl = 20,
>> - LLVMLShr = 21,
>> - LLVMAShr = 22,
>> - LLVMAnd = 23,
>> - LLVMOr = 24,
>> - LLVMXor = 25,
>> + LLVMShl = 21,
>> + LLVMLShr = 22,
>> + LLVMAShr = 23,
>> + LLVMAnd = 24,
>> + LLVMOr = 25,
>> + LLVMXor = 26,
>>
>> /* Memory Operators */
>> - LLVMAlloca = 26,
>> - LLVMLoad = 27,
>> - LLVMStore = 28,
>> - LLVMGetElementPtr = 29,
>> + LLVMAlloca = 27,
>> + LLVMLoad = 28,
>> + LLVMStore = 29,
>> + LLVMGetElementPtr = 30,
>>
>> /* Cast Operators */
>> - LLVMTrunc = 30,
>> - LLVMZExt = 31,
>> - LLVMSExt = 32,
>> - LLVMFPToUI = 33,
>> - LLVMFPToSI = 34,
>> - LLVMUIToFP = 35,
>> - LLVMSIToFP = 36,
>> - LLVMFPTrunc = 37,
>> - LLVMFPExt = 38,
>> - LLVMPtrToInt = 39,
>> - LLVMIntToPtr = 40,
>> - LLVMBitCast = 41,
>> + LLVMTrunc = 31,
>> + LLVMZExt = 32,
>> + LLVMSExt = 33,
>> + LLVMFPToUI = 34,
>> + LLVMFPToSI = 35,
>> + LLVMUIToFP = 36,
>> + LLVMSIToFP = 37,
>> + LLVMFPTrunc = 38,
>> + LLVMFPExt = 39,
>> + LLVMPtrToInt = 40,
>> + LLVMIntToPtr = 41,
>> + LLVMBitCast = 42,
>>
>> /* Other Operators */
>> - LLVMICmp = 42,
>> - LLVMFCmp = 43,
>> - LLVMPHI = 44,
>> - LLVMCall = 45,
>> - LLVMSelect = 46,
>> + LLVMICmp = 43,
>> + LLVMFCmp = 44,
>> + LLVMPHI = 45,
>> + LLVMCall = 46,
>> + LLVMSelect = 47,
>> /* UserOp1 */
>> /* UserOp2 */
>> - LLVMVAArg = 49,
>> - LLVMExtractElement = 50,
>> - LLVMInsertElement = 51,
>> - LLVMShuffleVector = 52,
>> - LLVMExtractValue = 53,
>> - LLVMInsertValue = 54,
>> + LLVMVAArg = 50,
>> + LLVMExtractElement = 51,
>> + LLVMInsertElement = 52,
>> + LLVMShuffleVector = 53,
>> + LLVMExtractValue = 54,
>> + LLVMInsertValue = 55,
>> + LLVMLandingPad = 56,
>>
>> /* Atomic operators */
>> - LLVMFence = 55
>> + LLVMFence = 57
>> } LLVMOpcode;
>
> There was just discussion about these values being required to be stable. See r136245 and the review of r136124.
>
> If we can't just replace UnwindInst, that might force isa<TerminatorInst> to not use a simple range check.
The above enum is only for the C binding, nothing in LLVM itself uses it. The
enum in Instruction.def *can* be reordered, and that's what's used by (eg)
isa<TerminatorInst>, so there shouldn't be a problem.
Ciao, Duncan.
More information about the llvm-commits
mailing list