[llvm] [SandboxIR] Added setVolatile member function to LoadInst and StoreInst (PR #101284)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 08:50:40 PDT 2024


================
@@ -213,6 +213,25 @@ class CallBrInstSetIndirectDest : public IRChangeBase {
 #endif
 };
 
+class SetVolatile : public IRChangeBase {
+  Instruction *Inst;
+  bool WasVolatile;
+  /// This could either be StoreInst or LoadInst
+  PointerUnion<StoreInst *, LoadInst *> InstUnion;
+
+public:
+  SetVolatile(Instruction *I, bool WasVolatile, Tracker &Tracker);
----------------
vporpo wrote:

No need for a `bool WasVolatile` argument, we can check `isVolatile()` within the constructor body.

https://github.com/llvm/llvm-project/pull/101284


More information about the llvm-commits mailing list