[llvm] [IR][NFC] Add LoadStoreProperties to copy load/store attrs (PR #206470)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 01:52:47 PDT 2026
================
@@ -172,6 +172,14 @@ class AllocaInst : public UnaryInstruction {
}
};
+/// A structure representing the attributes of a load or store instruction.
+struct LoadStoreInstAttributes {
----------------
antoniofrighetto wrote:
As we seem to reserve the section header to first-class instructions only, I would not add a dedicated section, and just move it right after the existing Load class banner:
```cpp
//===----------------------------------------------------------------------===//
// LoadInst Class
//===----------------------------------------------------------------------===//
/// A structure representing the properties of a load or store instruction.
struct LoadStoreInstProperties {
bool IsVolatile = false;
Align Alignment;
AtomicOrdering Ordering = AtomicOrdering::NotAtomic;
SyncScope::ID SSID = SyncScope::System;
};
/// An instruction for reading from memory. This uses the SubclassData field in
/// Value to store whether or not the load is volatile.
class LoadInst : public UnaryInstruction {
// ...
```
https://github.com/llvm/llvm-project/pull/206470
More information about the llvm-commits
mailing list