This patch introduces a new option '--regbankselect-global' to the
register bank selector. The algorithm is based on dynamic programming
and works as follows:
- For each instruction, working top-down, compute cost of applying each InstructionMapping. If the result needs to be converted into some other register bank not supported by any of the InstructionMappings, compute the cost of introducing a copy.
- For each instruction, working bottom-up, select the InstructionMapping with the highest utilization score. The utilization score is the sum of the cost of all mappings that make use of this mapping.
- For each instruction, working top-down, apply the selected mapping.
Compared to the greedy version, which looks at and make decision for one
instruction at a time, this version operates at a global scope.
clang-format not found in user's PATH; not linting file.