This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Split main function of RegBankSelect up
ClosedPublic

Authored by arsenm on Jan 18 2023, 4:26 AM.

Details

Reviewers
qcolombet
aemerson
paquette
rovka
Group Reviewers
Restricted Project
Summary

This will allow for easier overriding of the pass.

Diff Detail

Event Timeline

arsenm created this revision.Jan 18 2023, 4:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 4:26 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
arsenm requested review of this revision.Jan 18 2023, 4:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 4:26 AM
Herald added a subscriber: wdng. · View Herald Transcript
rovka accepted this revision as: rovka.Jan 19 2023, 1:50 AM
rovka added a subscriber: rovka.

Smaller functions FTW, regardless of whether or not we ever override them :)

This revision is now accepted and ready to land.Jan 19 2023, 1:50 AM
qcolombet accepted this revision.Jan 19 2023, 5:39 AM

LGTM

llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h
645

+1 :D

llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
726

Nit: I would remove the NDEBUG guards here.

In this patch the caller is already doing that and longer term if other users appear, I would expect that they would want to actually check something (or wrap that in their own guards, e.g., assert).