[llvm-dev] [GlobalISel] Can we drop RegisterBankInfo::getInstrAlternativeMappings() ?

Tom Stellard via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 28 13:15:49 PDT 2016


I've spent some time playing around with GlobalISel on the AMDGPU target, and I
was wondering if there is any reason to have
RegisterBankInfo::getInstrAlternativeMappings() and
RegisterBankInfo::getInstrMapping() as separate functions.

Could we instead replace these two functions with just one:
RegisterBankInfo::getInstrMappings() and then just treat the first mapping
in the list as the 'default' mapping to use for 'Fast' RegBankSelect mode?

The reason this would make sense (at least for the AMDGPU target) is
because both functions need to do the exact same analysis in order
to compute the cost and order for the InstrMappings, so we end up
with a lot of duplicated computations.


More information about the llvm-dev mailing list