diff options
author | Dan Gohman <dan433584@gmail.com> | 2016-10-03 22:43:53 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2016-10-03 22:43:53 +0000 |
commit | e040533ecec5b1c0ab83c1c7b65342d46478afc5 (patch) | |
tree | a6b4a39b1f634ba7c71c9099947c293a693b09d2 /llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | |
parent | ffc184bb1dd8a0f0815f12272286d24a2adefcc1 (diff) | |
download | llvm-e040533ecec5b1c0ab83c1c7b65342d46478afc5.zip llvm-e040533ecec5b1c0ab83c1c7b65342d46478afc5.tar.gz llvm-e040533ecec5b1c0ab83c1c7b65342d46478afc5.tar.bz2 |
[WebAssembly] Update to more stack-machine-oriented terminology.
WebAssembly has officially switched from being an AST to being a stack
machine. Update various bits of terminology and README.md entries
accordingly.
llvm-svn: 283154
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp index 1b71765..6de724cf 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp @@ -13,10 +13,10 @@ /// This pass reorders instructions to put register uses and defs in an order /// such that they form single-use expression trees. Registers fitting this form /// are then marked as "stackified", meaning references to them are replaced by -/// "push" and "pop" from the stack. +/// "push" and "pop" from the value stack. /// /// This is primarily a code size optimization, since temporary values on the -/// expression don't need to be named. +/// value stack don't need to be named. /// //===----------------------------------------------------------------------===// @@ -73,15 +73,15 @@ FunctionPass *llvm::createWebAssemblyRegStackify() { // expression stack ordering constraints for an instruction which is on // the expression stack. static void ImposeStackOrdering(MachineInstr *MI) { - // Write the opaque EXPR_STACK register. - if (!MI->definesRegister(WebAssembly::EXPR_STACK)) - MI->addOperand(MachineOperand::CreateReg(WebAssembly::EXPR_STACK, + // Write the opaque VALUE_STACK register. + if (!MI->definesRegister(WebAssembly::VALUE_STACK)) + MI->addOperand(MachineOperand::CreateReg(WebAssembly::VALUE_STACK, /*isDef=*/true, /*isImp=*/true)); - // Also read the opaque EXPR_STACK register. - if (!MI->readsRegister(WebAssembly::EXPR_STACK)) - MI->addOperand(MachineOperand::CreateReg(WebAssembly::EXPR_STACK, + // Also read the opaque VALUE_STACK register. + if (!MI->readsRegister(WebAssembly::VALUE_STACK)) + MI->addOperand(MachineOperand::CreateReg(WebAssembly::VALUE_STACK, /*isDef=*/false, /*isImp=*/true)); } @@ -813,12 +813,12 @@ bool WebAssemblyRegStackify::runOnMachineFunction(MachineFunction &MF) { } } - // If we used EXPR_STACK anywhere, add it to the live-in sets everywhere so + // If we used VALUE_STACK anywhere, add it to the live-in sets everywhere so // that it never looks like a use-before-def. if (Changed) { - MF.getRegInfo().addLiveIn(WebAssembly::EXPR_STACK); + MF.getRegInfo().addLiveIn(WebAssembly::VALUE_STACK); for (MachineBasicBlock &MBB : MF) - MBB.addLiveIn(WebAssembly::EXPR_STACK); + MBB.addLiveIn(WebAssembly::VALUE_STACK); } #ifndef NDEBUG |