[Mlir-commits] [mlir] 320f0b0 - [mlir] Change EffectKind in unsigned for bitfield to avoid miscompile in
River Riddle
llvmlistbot at llvm.org
Fri Mar 6 23:04:02 PST 2020
Author: River Riddle
Date: 2020-03-06T23:01:49-08:00
New Revision: 320f0b003682a7bf5f0a89827763dcb1443c96e9
URL: https://github.com/llvm/llvm-project/commit/320f0b003682a7bf5f0a89827763dcb1443c96e9
DIFF: https://github.com/llvm/llvm-project/commit/320f0b003682a7bf5f0a89827763dcb1443c96e9.diff
LOG: [mlir] Change EffectKind in unsigned for bitfield to avoid miscompile in
MSVC
MSVC has problems if the type of the bitfield is different, leading to
invalid code generation.
Added:
Modified:
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
index e5c6c560f1d1..69d5e97fa7d4 100644
--- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
@@ -1176,12 +1176,12 @@ void OpEmitter::genSideEffectInterfaceMethods() {
unsigned index : 30;
/// The kind of the location.
- EffectKind kind : 2;
+ unsigned kind : 2;
};
StringMap<SmallVector<EffectLocation, 1>> interfaceEffects;
auto resolveDecorators = [&](Operator::var_decorator_range decorators,
- unsigned index, EffectKind kind) {
+ unsigned index, unsigned kind) {
for (auto decorator : decorators)
if (SideEffect *effect = dyn_cast<SideEffect>(&decorator))
interfaceEffects[effect->getInterfaceTrait()].push_back(
More information about the Mlir-commits
mailing list