[PATCH] Preserving 'nonnull' metadata in SimplifyCFG
hfinkel at anl.gov
hfinkel at anl.gov
Wed Oct 22 09:26:03 PDT 2014
Full context patch please ;)
Generally speaking, I think it must be legal to preserve nonnull anywhere that preserving range metadata is preserved. Since we're hoisting common code to both sides of the branch, there can't be any control-dependency issues here, and I think that the preservation is correct.
LGTM.
================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1315
@@ -1313,2 +1314,3 @@
I1->intersectOptionalDataWith(I2);
+ // Should we be combining metadata here?
I2->eraseFromParent();
----------------
Yes, it looks like we should be doing this. Since this is common-code combining, I think there are no control dependency issues here (feel free to do so).
http://reviews.llvm.org/D5910
More information about the llvm-commits
mailing list