Enzyme icon indicating copy to clipboard operation
Enzyme copied to clipboard

Use of statement expression in tblgen generated code

Open PragmaTwice opened this issue 2 years ago • 2 comments

We generate some code in the form of statement expressions in tblgen here: https://github.com/EnzymeAD/Enzyme/blob/43f2c03825db2dbc46c86f10e46db6867595a1c0/enzyme/tools/enzyme-tblgen/enzyme-tblgen.cpp#L167-L203

Since statement expression is a GNU extension rather than c/c++ standard, and is not supported by MSVC, I am not sure whether we need to replace them via lambda expressions.

cc @ZuseZ4

PragmaTwice avatar May 20 '23 12:05 PragmaTwice

Interesting, didn't knew that. Given that we didn't receive any complaints yet I feel like your MPI work would probably benefit more people. But if it doesn't take too much of your time please also feel free to fix it, especially since it might be helpful to merge Enzyme into rustc.

ZuseZ4 avatar May 24 '23 16:05 ZuseZ4

Second thought, maybe we need to fix it to be integrated into rustc though? Not sure how their CI works for Windows. cc @bytesnake

ZuseZ4 avatar May 24 '23 16:05 ZuseZ4