This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Make getInstSizeInBytes more generic
ClosedPublic

Authored by Joe_Nash on Nov 5 2021, 2:03 PM.

Details

Summary

NFC. This check mainly handles size affecting literals. Make it check all
explicit operands instead of a few by name. Also make the isLiteral
check handle the KIMM operands, see https://reviews.llvm.org/D111067

Change-Id: I1a362d55b2a10f5c74d445272e8b7829a8b77597

Diff Detail

Event Timeline

Joe_Nash created this revision.Nov 5 2021, 2:03 PM
Joe_Nash requested review of this revision.Nov 5 2021, 2:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 5 2021, 2:03 PM
foad added a comment.Nov 8 2021, 1:20 AM

Looks good to me if it passes an LLVM_ENABLE_EXPENSIVE_CHECKS build.

arsenm accepted this revision.Nov 8 2021, 5:43 AM
This revision is now accepted and ready to land.Nov 8 2021, 5:43 AM

Looks good to me if it passes an LLVM_ENABLE_EXPENSIVE_CHECKS build.

Yes, it does.

This revision was automatically updated to reflect the committed changes.
arsenm added inline comments.Aug 4 2023, 7:43 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
7319–7320

This change broke the handling of source modifiers. we're now treating any source modifier operand as a literal

Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2023, 7:43 AM
Herald added a subscriber: StephenFan. · View Herald Transcript