[PATCH] D111765: [llvm-reduce] Add reduction passes to reduce operands to undef/1/0
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 18 21:18:14 PDT 2021
Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp:23
for (auto &Op : I.operands()) {
- // Filter Operands then set to undef.
- if (canReduceOperand(Op) && !O.shouldKeep()) {
- auto *Ty = Op->getType();
- Op.set(UndefValue::get(Ty));
- }
+ auto *Reduced = ReduceValue(Op);
+ if (Reduced && !O.shouldKeep())
----------------
According to the [[ https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable | LLVM coding standard ]], `auto` is used only in specific cases.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111765/new/
https://reviews.llvm.org/D111765
More information about the llvm-commits
mailing list