aemerson wrote: > > However what we want to achieve with this is to make the state of the > > streaming mode known to potentially inlineable called functions, allowing > > for further inlining and identification/removal of dead code > > It seems like we're in agreement that the llvm.assume doesn't actually add > any information to the IR that the optimizer can't figure out itself. It > sounds like the issue here is that you don't just need the call to be folded; > you need the InlineCost evaluator to constant-fold the call? That makes > things a little more complicated, but it still seems solvable... > > llvm.assume handling is relatively expensive, so we don't want to scatter > assume calls across emitted code when it isn't necessary.
This. Assume calls and emitting code before call sites seems an awfully big hammer for this kind of problem. We should try to use existing mechanisms if we can first. https://github.com/llvm/llvm-project/pull/121917 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits