[PATCH] D68488: [PATCH 05/38] [noalias] [IR] Introduce noalias_sidechannel for LoadInst/StoreInst

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 6 02:59:35 PDT 2019


lebedev.ri added a comment.

All that subtle magic about "we may have 2 operands but in some places we need to pretend that we have 3 operands" seems suboptimal to me.
Semantically, can we just always allocate space for 3 operands, but use either nullptr or undef as a magic to deduce whether we actually have the third operand?



================
Comment at: llvm/include/llvm/IR/Instructions.h:313
+  Value* getNoaliasSideChannelOperand() const {
+    assert(hasNoaliasSideChannelOperand());
+    return getOperand(1);
----------------
assertion message missing


================
Comment at: llvm/include/llvm/IR/Instructions.h:471
+  Value* getNoaliasSideChannelOperand() const {
+    assert(hasNoaliasSideChannelOperand());
+    return getOperand(2);
----------------
assertion message missing


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68488/new/

https://reviews.llvm.org/D68488





More information about the llvm-commits mailing list