Page MenuHomePhabricator

Prototype OpInterface fallback to Dialects
Needs ReviewPublic

Authored by mehdi_amini on Dec 10 2020, 9:21 PM.

Details

Diff Detail

Unit TestsFailed

TimeTest
50 msx64 windows > LLVM.CodeGen/XCore::threads.ll
Script: -- : 'RUN: at line 1'; c:\ws\w64\llvm-project\premerge-checks\build\bin\llc.exe -march=xcore < C:\ws\w64\llvm-project\premerge-checks\llvm\test\CodeGen\XCore\threads.ll | c:\ws\w64\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w64\llvm-project\premerge-checks\llvm\test\CodeGen\XCore\threads.ll

Event Timeline

mehdi_amini created this revision.Dec 10 2020, 9:21 PM
mehdi_amini requested review of this revision.Dec 10 2020, 9:21 PM

Remove interfacemap

I forget, what was River's suggestion to make this more efficient?

mlir/include/mlir/IR/OpDefinition.h
1747

Nit:

if (auto *opIface = ...) return

to reduce scope (and not used in early return)

mlir/test/lib/Dialect/Test/TestDialect.cpp
177

If this was

return op->getName().getStringRef() == "test.unregistered_side_effect_op";

would that also restrict it to this op?

181

Why is ::mlir needed?

203

Instantiate

205

Is there a reason why not unique_ptr?

222

So for every op, one would have an entry here? Probably up to dialect to implement in efficient way for the fallback behavior they want.

I forget, what was River's suggestion to make this more efficient?

There wasn't an efficiency aspect left, the idea River had was about generating a different base class with TableGen so that the subclass implementation for the interface fallback could be friendlier to write.

I forget, what was River's suggestion to make this more efficient?

There wasn't an efficiency aspect left, the idea River had was about generating a different base class with TableGen so that the subclass implementation for the interface fallback could be friendlier to write.

So just convenience generation pending?

I forget, what was River's suggestion to make this more efficient?

There wasn't an efficiency aspect left, the idea River had was about generating a different base class with TableGen so that the subclass implementation for the interface fallback could be friendlier to write.

So just convenience generation pending?

Yes.
I plan to get back to this in order to prototype a new TF control dialect.