@@ -59,7 +59,7 @@ class AArch64CompressJumpTables : public MachineFunctionPass {
59
59
}
60
60
};
61
61
char AArch64CompressJumpTables::ID = 0 ;
62
- }
62
+ } // namespace
63
63
64
64
INITIALIZE_PASS (AArch64CompressJumpTables, DEBUG_TYPE,
65
65
" AArch64 compress jump tables pass" , false , false )
@@ -104,7 +104,7 @@ bool AArch64CompressJumpTables::compressJumpTable(MachineInstr &MI,
104
104
int MaxOffset = std::numeric_limits<int >::min (),
105
105
MinOffset = std::numeric_limits<int >::max ();
106
106
MachineBasicBlock *MinBlock = nullptr ;
107
- for (auto Block : JT.MBBs ) {
107
+ for (auto * Block : JT.MBBs ) {
108
108
int BlockOffset = BlockInfo[Block->getNumber ()];
109
109
assert (BlockOffset % 4 == 0 && " misaligned basic block" );
110
110
@@ -124,13 +124,14 @@ bool AArch64CompressJumpTables::compressJumpTable(MachineInstr &MI,
124
124
}
125
125
126
126
int Span = MaxOffset - MinOffset;
127
- auto AFI = MF->getInfo <AArch64FunctionInfo>();
127
+ auto * AFI = MF->getInfo <AArch64FunctionInfo>();
128
128
if (isUInt<8 >(Span / 4 )) {
129
129
AFI->setJumpTableEntryInfo (JTIdx, 1 , MinBlock->getSymbol ());
130
130
MI.setDesc (TII->get (AArch64::JumpTableDest8));
131
131
++NumJT8;
132
132
return true ;
133
- } else if (isUInt<16 >(Span / 4 )) {
133
+ }
134
+ if (isUInt<16 >(Span / 4 )) {
134
135
AFI->setJumpTableEntryInfo (JTIdx, 2 , MinBlock->getSymbol ());
135
136
MI.setDesc (TII->get (AArch64::JumpTableDest16));
136
137
++NumJT16;
0 commit comments