[PATCH] D68488: [PATCH 05/38] [noalias] [IR] Introduce noalias_sidechannel for LoadInst/StoreInst
Jeroen Dobbelaere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 6 12:41:50 PDT 2019
jeroen.dobbelaere added a comment.
In D68488#1696512 <https://reviews.llvm.org/D68488#1696512>, @lebedev.ri wrote:
> 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?
It is kind of magic and it took some time to get it right. The technique comes from GlobalVariable where there is either 0 or 1 operands.
There are 2 operands allocated for LoadInst, 3 for StoreInst. The challenge is that the operands are allocated before the instruction.
When the `NumUserOperands` changes, suddenly all operands are shifted. That is not convenient. That's why I choose to keep NumUserOperands constant, and to
add an extra 'delta'. Any better solution that works is welcome though.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68488/new/
https://reviews.llvm.org/D68488
More information about the llvm-commits
mailing list