[PATCH] [Transforms/Scalar/SeparateConstOffsetFromGEP] Add the extracted offset using GEP
Eli Bendersky
eliben at google.com
Fri May 23 09:26:03 PDT 2014
LGTM
================
Comment at: lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp:552
@@ -554,6 +551,3 @@
//
- // TODO(jingyue): Emit a GEP instead of an "uglygep"
- // (http://llvm.org/docs/GetElementPtr.html#what-s-an-uglygep) to make the IR
- // prettier and more alias analysis friendly. One caveat: if the original GEP
- // ends with a StructType, we need to split the GEP at the last
- // SequentialType. For instance, consider the following IR:
+ // If AccumulativeByteOffset is not a multiple of sizeof(*%gep), we bitcast
+ // %gep2 to i8*, add the offset, and bitcast it back to the type of %gep:
----------------
Maybe still mention uglygep here, since you mention it later?
http://reviews.llvm.org/D3882
More information about the llvm-commits
mailing list