This is an archive of the discontinued LLVM Phabricator instance.

[CallSiteSplitting] Don't let debug intrinsics affect optimizations
ClosedPublic

Authored by uabelho on Dec 11 2017, 6:52 AM.

Details

Summary

This solves PR35616.

We don't want the compiler to generate different code when we compile
with/without -g, so we now ignore debug intrinsics when determining if
the optimization can trigger or not.

Diff Detail

Repository
rL LLVM

Event Timeline

uabelho created this revision.Dec 11 2017, 6:52 AM

Does the patch make sense?

I don't know this code at all or if there are other problems that also needs to be addressed if we allow dbg.values to be
between the phi nodes and the call.

davide added a subscriber: davide.Dec 11 2017, 8:18 AM
junbuml edited edge metadata.Dec 11 2017, 10:28 AM

Thanks for catching this.
LGTM, assuming that the order of the call site and dbg doesn't matter as the dbg is placed after call-sites split after the transformation.

This revision was automatically updated to reflect the committed changes.

Thanks for catching this.
LGTM, assuming that the order of the call site and dbg doesn't matter as the dbg is placed after call-sites split after the transformation.

Thanks! Yes that's my assumption as well.