This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Teach LLVM about guaranteed alignment for malloc and others
AbandonedPublic

Authored by xbolva00 on Apr 20 2021, 9:04 AM.

Details

Summary

LLVM should be smarter about *known* malloc's alignment and this knowledge may enable other optimizations.

Diff Detail

Event Timeline

xbolva00 created this revision.Apr 20 2021, 9:04 AM
xbolva00 requested review of this revision.Apr 20 2021, 9:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 9:04 AM
xbolva00 added inline comments.Apr 20 2021, 9:07 AM
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
2052
2068

Open question for review

I do not believe we should be doing this in LLVM middle-end.

I do not believe we should be doing this in LLVM middle-end.

Yeah. But on the other side, LLVM already does a lot ot work with libcalls and attrs (it should be Clang job, but...).

But yes, doing this in Clang seems to be a better idea.

xbolva00 abandoned this revision.Apr 20 2021, 12:01 PM

Abandoned, posted Clang patch. https://reviews.llvm.org/D100879