[PATCH] D104805: IR: Fix use-list-order round-tripping for call and invoke
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 11:48:01 PDT 2021
dexonsmith added a comment.
In D104805#2836738 <https://reviews.llvm.org/D104805#2836738>, @nikic wrote:
> Can you please point me to the code where the use-list order prediction is made?
The relevant code for AsmWriter is:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/IR/AsmWriter.cpp#L232
// LID and RID are equal, so we have different operands of the same user.
// Assume operands are added in order for all instructions.
if (GetsReversed)
if (LID <= ID)
return LU->getOperandNo() < RU->getOperandNo();
return LU->getOperandNo() > RU->getOperandNo();
I'll need a minute to find it for BitcodeWriter.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104805/new/
https://reviews.llvm.org/D104805
More information about the llvm-commits
mailing list