This is an archive of the discontinued LLVM Phabricator instance.

[FuncSpec] Prefer DataLayout-aware constant folding of GEPs.
ClosedPublic

Authored by labrinea on Jul 10 2023, 1:58 AM.

Details

Summary

As shown in D154820, the DataLayout-independent constant folding interface is not
good enough for handling GEPs. Instead we should be using the DataLayout-aware
constant folding interface. Since there isn't a method to specifically handle GEPs we
can use the one which folds generic instruction operands.

Diff Detail

Event Timeline

labrinea created this revision.Jul 10 2023, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 1:58 AM
labrinea requested review of this revision.Jul 10 2023, 1:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 1:58 AM
ChuanqiXu accepted this revision.Jul 10 2023, 2:09 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Jul 10 2023, 2:09 AM
labrinea retitled this revision from [FuncSpec] Data layout aware constant folding of GEPs. to [FuncSpec] Prefer DataLayout-aware constant folding of GEPs..Jul 10 2023, 7:23 AM
labrinea edited the summary of this revision. (Show Details)
labrinea edited the summary of this revision. (Show Details)Jul 10 2023, 8:13 AM
This revision was landed with ongoing or failed builds.Jul 11 2023, 5:48 AM
This revision was automatically updated to reflect the committed changes.