Florian Hahn via llvm-dev
2021-Aug-30 18:14 UTC
[llvm-dev] [llvm-reduce] Reduction to undef/poison/null?
> On 30 Aug 2021, at 19:59, David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Nicer because it's less likely to introduce new UB? Or some other reason? >Using undef/poison is problematic, because there are multiple ways this could cause new UB (e.g. branch on undef, passing poison/undef to a function with a noundef argument). I’m not sure if using zero will work well in certain cases, because it can introduce UB as well (e.g. load from null, passing as nonnull argument). I think ideally we would have a way to materialise values we know nothing about, but are not undef. Perhaps we could add some oracle function, but that would come with its own drawbacks. Cheers, Florian
Roman Lebedev via llvm-dev
2021-Aug-30 18:22 UTC
[llvm-dev] [llvm-reduce] Reduction to undef/poison/null?
I've been thinking we should be using `freeze poison`, but i don't think this question matters for the patch at hand, it should just stick to the current practice of using undef. Roman. On Mon, Aug 30, 2021 at 9:14 PM Florian Hahn via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > > > > On 30 Aug 2021, at 19:59, David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > Nicer because it's less likely to introduce new UB? Or some other reason? > > > > Using undef/poison is problematic, because there are multiple ways this could cause new UB (e.g. branch on undef, passing poison/undef to a function with a noundef argument). > > I’m not sure if using zero will work well in certain cases, because it can introduce UB as well (e.g. load from null, passing as nonnull argument). > > I think ideally we would have a way to materialise values we know nothing about, but are not undef. Perhaps we could add some oracle function, but that would come with its own drawbacks. > > Cheers, > Florian > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev