[PATCH] D103661: [IR] Add utility to convert constant expression operands (of an instruction) to instructions.

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 4 13:25:53 PDT 2021


rampitec added inline comments.


================
Comment at: llvm/lib/IR/ReplaceConstant.cpp:108
+    if (CE->getNumOperands()) {
+      SmallPtrSet<Value *, 4> Operands2;
+      for (Use &UU : CE->operands())
----------------
The loop below can be replaced with the initializer:

```
SmallPtrSet<Value *, 4> Operands2(CE->op_begin(), CE->op_end());
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103661



More information about the llvm-commits mailing list