forked from OSchip/llvm-project
[IRTranslator] Add comments to explain the ordering of the switch. NFC.
Group arithmetic operations, bitwise operations, and branch operations. llvm-svn: 276305
This commit is contained in:
parent
1710e7cfa7
commit
19df8a1aba
|
@ -102,12 +102,15 @@ bool IRTranslator::translateBr(const Instruction &Inst) {
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue