A single-offset GEP such as:
getelementptr i8*, i8* %base, i32 %offset
doesn't make sense to split apart. There is no complex calculation to CSE.
Differential D9149
[SeparateConstOffsetFromGEP] Bail there is only one GEP offset jingyue on Apr 21 2015, 6:54 AM. Authored by
Details
Diff Detail Event TimelineComment Actions Hi James, I don't get why getelementptr i8*, i8* %base, i32 %offset is not worth splitting if %offset can be reassociated to variadic+const. base+variadic may still be CSE'ed in that case. Comment Actions For example, p1 = &base[offset + 1]; Reassociating GEPs gives us p1 = (&base[offset]) + 1 where &base[offset] can be CSE'ed. Can you show me the code patterns you discovered that demonstrates the Jingyue
Comment Actions Oops... I pressed the wrong button. I meant to say "need revision". jmolly@, feel free to reclaim it. |
Please comment on the rationale for ==2. Is there a more general cost model problem?