[PATCH] D127134: [llvm] Add DW_CC_nocall to function debug metadata when either return values or arguments are removed

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 14:20:46 PDT 2022


dblaikie added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1085-1088
+    for (uint8_t I = 0; I < SP->getNumOperands(); ++I)
+      if (SP->getOperand(I).get() == SPTy)
+        SP->replaceOperandWith(I,
+                               MDNode::replaceWithPermanent(std::move(Temp)));
----------------
Writing a loop to do this seems unfortunate when it should always be a known operand number - perhaps there's some nicer way to do this? (while keeping it maintainable/not hardcoding an operand number in this code)

Are there other examples of field updates we could draw inspiration from?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127134



More information about the llvm-commits mailing list