summaryrefslogtreecommitdiff
path: root/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2015-12-23 00:22:04 +0000
committerDan Gohman <dan433584@gmail.com>2015-12-23 00:22:04 +0000
commit97cdf9dc307204455ec70756226c9799afddcd4c (patch)
tree8bee5cfa657d70fe0c2d53aa28921ac0b7211ab5 /lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
parent982e9b7f0d95a061f9253edf5bbc2689f82a0e32 (diff)
[WebAssembly] Add a TODO comment for a possible future optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp')
-rw-r--r--lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp b/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
index 0a945336a2b..f621db070b5 100644
--- a/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
+++ b/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp
@@ -82,7 +82,8 @@ bool WebAssemblyRegNumbering::runOnMachineFunction(MachineFunction &MF) {
}
// Then assign regular WebAssembly registers for all remaining used
- // virtual registers.
+ // virtual registers. TODO: Consider sorting the registers by frequency of
+ // use, to maximize usage of small immediate fields.
unsigned NumArgRegs = MFI.getParams().size();
unsigned NumVRegs = MF.getRegInfo().getNumVirtRegs();
unsigned NumStackRegs = 0;