The StringAttr version doesn't need a context, so we can just use the
existing SymbolRefAttr::get form. The StringRef version isn't preferred
so we want to encourage people to use StringAttr. The Operation* version
also doesn't need a context, so it can just move over to SymbolRefAttr to
make the family be consistent.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The build status on this revision is broken FYI (in case you didn't notice), it seems that both Toy and Flang need an update.
Eliminate the Symbol operation forms of getSymbolRefAttr, moving them over to SymbolRefAttr::get also. Update Ch7 of examples and flang as well.
This keeps all the builders more consistent.
I am not 100% sure what the "patch application failed" means, but perhaps you can rebase so we get a build bot result before submitting just to make sure we are green?
Sure, happy to. I'm not sure what the problem is here, but it doesn't look related, I'll rebase:
Another git process seems to be running in this repository, e.g. an editor opened by 'git commit'. Please make sure all processes are terminated then try again. If it still fails, a git process may have crashed in this repository earlier: remove the file manually to continue.') ERROR exception: Cmd('git') failed due to: exit code(128) cmdline: git reset --hard stderr: 'fatal: Unable to create '/var/lib/buildkite-agent/builds/llvm-project-fork/.git/index.lock': File exists.
Thanks! I have seen the "patch application failed" a few times myself, and always rebased assuming it was some conflict.
But perhaps it is even simpler than that ;-)
flang/include/flang/Optimizer/Dialect/FIROps.td | ||
---|---|---|
2564–2565 ↗ | (On Diff #369513) |
FYI, the bot sees still an issue with Toy:
/var/lib/buildkite-agent/builds/llvm-project/mlir/examples/toy/Ch7/mlir/MLIRGen.cpp:525:9: error: use of undeclared identifier 'SymbolRefAttr'; did you mean 'mlir::SymbolRefAttr'? SymbolRefAttr::get(builder.getContext(), callee), operands); ^~~~~~~~~~~~~ mlir::SymbolRefAttr
Fix build problems with examples. I actually built them and ran the example
tests this time, yay.
There may still be problems with Fortran, I will not push this until they
get settled of course.