Adds support for memory(...) function attributes in SPIR-V function control info lowering. More about the memory effects attributes changes can be found here: https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This patch fixes the trivial-function-with-attributes.ll LIT test that is already present in the repository. Additionally, also the get_global_offset.ll test passes.
llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp | ||
---|---|---|
62 | ReadNone still exists? I thought it was removed. Why check it? |
llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp | ||
---|---|---|
62 | Oh, readnone still exists but only applies to parameters now. There's no point in checking it on a function |
@arsenm I have removed the checks for ReadNone and also for ReadOnly. Both are replaced with the new memory(...) attributes in functions. I will keep tests for the legacy attributes because we have compilers feeding old LLVM IR into the SPIR-V backend.
The old attributes are converted into the new one during IR parsing, so that probably doesn't really test anything useful?
Are there any plans to remove the conversion in the long term? If there are/would be then the LIT tests would give us useful information why some runtime tests are failing without the need for debugging.
The tests you have here would break if the parsing stops recognizing it. There's no plus to keeping the legacy check here
ReadNone still exists? I thought it was removed. Why check it?