[PATCH] D85632: [Attributor] Implement AAPotentialValues
Shinji Okumura via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 19:35:40 PDT 2020
okura added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7343
+ const APInt &LHS, const APInt &RHS,
+ bool &Valid) {
+ Instruction::BinaryOps BinOpcode = BinOp->getOpcode();
----------------
jdoerfert wrote:
> Add a TODO that we should look at `nsw` and `nuw` to help, e.g., to exclude certain results that cannot happen without creating `undef`. Similarly, division by `undef` should not make the result invalid but simply skip this operand pair.
I understand you mean that we can assume the operation result is not a poison value or undef and that we can ignore such operand pair. Is that right?
I'm thinking of adding a new argument `bool &Unsupported` to this to distinguish the above case from the case opcode is unsupported.
In the former case we skip the operand pair, and in the latter case we give up (i.e. call `indicatePessimisticFixpoint`).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85632/new/
https://reviews.llvm.org/D85632
More information about the llvm-commits
mailing list