Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/lib/Dialect/Test/TestPatterns.cpp
Show First 20 Lines • Show All 237 Lines • ▼ Show 20 Lines | |||||
} // end anonymous namespace | } // end anonymous namespace | ||||
void TestDerivedAttributeDriver::runOnFunction() { | void TestDerivedAttributeDriver::runOnFunction() { | ||||
getFunction().walk([](DerivedAttributeOpInterface dOp) { | getFunction().walk([](DerivedAttributeOpInterface dOp) { | ||||
auto dAttr = dOp.materializeDerivedAttributes(); | auto dAttr = dOp.materializeDerivedAttributes(); | ||||
if (!dAttr) | if (!dAttr) | ||||
return; | return; | ||||
for (auto d : dAttr) | for (auto d : dAttr) | ||||
dOp.emitRemark() << d.first << " = " << d.second; | dOp.emitRemark() << d.first.getValue() << " = " << d.second; | ||||
}); | }); | ||||
} | } | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Legalization Driver. | // Legalization Driver. | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
namespace { | namespace { | ||||
▲ Show 20 Lines • Show All 1,026 Lines • Show Last 20 Lines |