[llvm] [IR][NFC] Add LoadStoreInstAttributes to copy load/store attrs (PR #206470)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 05:51:34 PDT 2026
================
@@ -249,6 +257,19 @@ class LoadInst : public UnaryInstruction {
setSyncScopeID(SSID);
}
+ /// Returns the attributes of this load instruction.
+ LoadStoreInstAttributes getAttributes() const {
+ return {isVolatile(), getAlign(), getOrdering(), getSyncScopeID()};
+ }
+
+ /// Sets the attributes of this load instruction.
+ void setAttributes(const LoadStoreInstAttributes &Attrs) {
----------------
antoniofrighetto wrote:
```suggestion
void setProperties(const LoadStoreInstAttributes &Attrs) {
```
https://github.com/llvm/llvm-project/pull/206470
More information about the llvm-commits
mailing list