llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.82k stars 11.91k forks source link

TableGen: error in enums generated for relationship maps. #15618

Open llvmbot opened 11 years ago

llvmbot commented 11 years ago
Bugzilla Link 15246
Version trunk
OS Windows NT
Reporter LLVM Bugzilla Contributor
llvmbot commented 11 years ago

Previous diagnosis was incorrect. Segmentation fault reported earlier was due to 'isBrTaken' field present in RowFields list but not present in the instruction records. Problem disappeared when 'isBrTaken' was removed from RowFields list.

The out-of-bound error in utils/TableGen/CodeGenMapTable.cpp caused enums to be generated incorrectly when the following relationship map was added into Hexagon.td file:

//===----------------------------------------------------------------------===// // Generate mapping table to relate predicate-false instructions with their // predicate-true forms // def getTruePredOpcode : InstrMapping { let FilterClass = "PredRel"; let RowFields = ["BaseOpcode", "PNewValue", "isNVStore"]; let ColFields = ["PredSense"]; let KeyCol = ["false"]; let ValueCols = [["true"]]; }

llvmbot commented 11 years ago

Out-of-bound error in utils/TableGen/CodeGenMapTable.cpp causes TableGen to segfault for the following relationship map:

//===----------------------------------------------------------------------===// // Generate mapping table to relate predicate-false instructions with their // predicate-true forms // def getTruePredOpcode : InstrMapping { let FilterClass = "PredRel"; let RowFields = ["BaseOpcode", "PNewValue", "isNVStore", "isBrTaken"]; let ColFields = ["PredSense"]; let KeyCol = ["false"]; let ValueCols = [["true"]]; }