[PATCH] MergeFuncs should handle dynamic GEPs
Stepan Dyatkovskiy
stpworld at narod.ru
Wed Jan 28 06:02:32 PST 2015
Hi Pete,
Thanks for patch. The idea looks good, but I'm still in middle of review..
================
Comment at: lib/Transforms/IPO/MergeFunctions.cpp:895
@@ +894,3 @@
+ // TODO: Handle case where only one side is a struct, so long as both
+ // sides have a constant at this index, and the fielf offsets are a match.
+ if (int Res = cmpNumbers(!!StTyL, !!StTyR))
----------------
"fielf" => "field"
================
Comment at: lib/Transforms/IPO/MergeFunctions.cpp:900
@@ +899,3 @@
+ if (StTyL) {
+ unsigned IntL = cast<Constant>(OpL)->getUniqueInteger().getZExtValue();
+ unsigned IntR = cast<Constant>(OpR)->getUniqueInteger().getZExtValue();
----------------
May be "cast<ConstantInt>"?
================
Comment at: lib/Transforms/IPO/MergeFunctions.cpp:926
@@ +925,3 @@
+
+ if (ConstL) {
+ bool ZeroL = ConstL->isZero();
----------------
I stopped here :-)
http://reviews.llvm.org/D7170
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list