[PATCH] D21007: DSE: Don't remove stores made live by a call which unwinds.
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 5 18:58:43 PDT 2016
hfinkel added inline comments.
================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:860
@@ +859,3 @@
+ // the store.
+ // FIXME: Check whether a throwing call is actually between the stores, instead
+ // of just in the same block. Maybe using OrderedBasicBlock?
----------------
eli.friedman wrote:
> hfinkel wrote:
> > Not clear that OrderedBasicBlock will help here directly. I think you really want two maps:
> >
> > 1. Instruction* -> unsigned (for ordering)
> > 2. Instruction* -> Instruction* (or unsigned) (for the next call that might throw)
> >
> > Why not just collect the maps above (where you currently set MayThrow), and then answer the question precisely? I think it is likely I'll see performance regressions from this if we over-approximate.
> Yes, I can do something like that. Not sure the second map is necessary: I think we just need the most recently seen unwinding call in the block?
Ah, yes. You're right. Thanks!
http://reviews.llvm.org/D21007
More information about the llvm-commits
mailing list