[llvm] r276305 - [IRTranslator] Add comments to explain the ordering of the switch. NFC.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 10:26:41 PDT 2016
Author: qcolombet
Date: Thu Jul 21 12:26:41 2016
New Revision: 276305
URL: http://llvm.org/viewvc/llvm-project?rev=276305&view=rev
Log:
[IRTranslator] Add comments to explain the ordering of the switch. NFC.
Group arithmetic operations, bitwise operations, and branch operations.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp?rev=276305&r1=276304&r2=276305&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp Thu Jul 21 12:26:41 2016
@@ -102,12 +102,15 @@ bool IRTranslator::translateBr(const Ins
bool IRTranslator::translate(const Instruction &Inst) {
MIRBuilder.setDebugLoc(Inst.getDebugLoc());
switch(Inst.getOpcode()) {
+ // Arithmetic operations.
case Instruction::Add:
return translateBinaryOp(TargetOpcode::G_ADD, Inst);
+ // Bitwise operations.
case Instruction::And:
return translateBinaryOp(TargetOpcode::G_AND, Inst);
case Instruction::Or:
return translateBinaryOp(TargetOpcode::G_OR, Inst);
+ // Branch operations.
case Instruction::Br:
return translateBr(Inst);
case Instruction::Ret:
More information about the llvm-commits
mailing list