Not all of these will be able to be used by atomics because tablegen, but it
still seems like a good change by itself.
Details
Diff Detail
- Build Status
Buildable 9807 Build 9807: arc lint + arc unit
Event Timeline
As an overall comment, this is awesome. Big fan of reducing syntactic noise.
lib/Target/WebAssembly/WebAssemblyInstrAtomics.td | ||
---|---|---|
27 | Is this actually different from LoadPatNoOffset? I'd think you could pass load or atomic_load as the node parameter and it should work either way. | |
34 | These look like they could use an ALoadPatImmOff Also technically this is defining additional patterns, and isn't covered by the commit message. I'm ok with that though. | |
48 | What are these non-atomic loads doing here? Also aren't these already represented in WebAssemblyInstrMemory.td? |
lib/Target/WebAssembly/WebAssemblyInstrAtomics.td | ||
---|---|---|
27 | Alas... you'd think so. I certainly thought so. However I tried it, and then I read include/llvm/Target/TargetSelectionDAG.td and found that load (and the extending loads) are actually PatFrags, while the atomic loads are SDNodes, so they can't be freely mixed in templates like that. I feel like you could maybe make a PatFrag to wrap around the atomic loads and then use the other classes, but I don't know how to do that yet. Perhaps I'll try but I don't know whether it will be worth it or not, especially given we'll have different rules for selecting extending loads anyway (since there are no extending atomic loads), and that there are only 2 types instead of 4. So we'll see when we get more concrete about all of that. | |
34 | Ah yeah. I had actually intended to back this part of the CL out once I got deep enough into refactoring the other td file. I'll do that. | |
48 | Yeah this is just a paste that I had before I got down the other rabbit hole. will remove it too. |
Is this actually different from LoadPatNoOffset? I'd think you could pass load or atomic_load as the node parameter and it should work either way.