[PATCH] D73832: Ignore/Drop droppable uses for code-sinking in InstCombine
Tyker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 03:08:57 PST 2020
Tyker marked an inline comment as done.
Tyker added inline comments.
================
Comment at: llvm/lib/IR/AsmWriter.cpp:2557
+ /// Bundles containing dropped values should be ignored.
+ if (any_of(BU.Inputs, [](const Use &U) { return !U.get(); }))
----------------
Tyker wrote:
> lebedev.ri wrote:
> > Would it be better to ensure that we can't end up in such
> > seemingly-degenerate state in the first place,
> > by cleaning up bundles?
> i agree than not having that state would be better but i don't think it is possible without rebuilding instruction after we dropped uses in them.
>
> an other solution could be to mark dropped uses with an undef value instead of a nullptr.
i tried to find a better solution to represent "dropped" values. but not solution seems to be good.
- nullptr is problematic because many place assume that operands are never null.
- rebuilding instructions seems like too expensive for what we are trying to do.
maybe adding a new kind of value to represent it, that is ignored everywhere. but changing the IR for this seems like overkill.
any thought ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73832/new/
https://reviews.llvm.org/D73832
More information about the llvm-commits
mailing list