This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Make known bits/alignment API more consistent
ClosedPublic

Authored by arsenm on Jun 4 2020, 8:39 AM.

Details

Summary

Just computing the alignment makes sense without caring about the
general known bits, such as for non-integral pointers. Separate the
two and start calling into the TargetLowering hooks for frame indexes.

Start calling the TargetLowering implementation for FrameIndexes,
which improves the AMDGPU matching for stack addressing modes. Also
introduce a new hook for returning known alignment of target
instructions. For AMDGPU, it would be useful to report the known
alignment implied by certain intrinsic calls.

Also stop using MaybeAlign.

Diff Detail

Event Timeline

arsenm created this revision.Jun 4 2020, 8:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 4 2020, 8:39 AM
paquette accepted this revision.Jun 5 2020, 9:30 AM

LGTM aside from nits

llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
78

Fancy Doxygen \return?

llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
49

String on the assert?

This revision is now accepted and ready to land.Jun 5 2020, 9:30 AM