@@ -194,12 +194,6 @@ struct SplitCacheDirected final : public SplitStrategy {
194
194
}
195
195
196
196
private:
197
- struct JumpInfo {
198
- bool HasUncondBranch = false ;
199
- BinaryBasicBlock *CondSuccessor = nullptr ;
200
- BinaryBasicBlock *UncondSuccessor = nullptr ;
201
- };
202
-
203
197
struct CallInfo {
204
198
size_t Length;
205
199
size_t Count;
@@ -218,7 +212,6 @@ struct SplitCacheDirected final : public SplitStrategy {
218
212
DenseMap<const BinaryBasicBlock *, size_t > GlobalIndices;
219
213
DenseMap<const BinaryBasicBlock *, size_t > BBSizes;
220
214
DenseMap<const BinaryBasicBlock *, size_t > BBOffsets;
221
- DenseMap<const BinaryBasicBlock *, JumpInfo> JumpInfos;
222
215
223
216
// Call graph.
224
217
std::vector<SmallVector<const BinaryBasicBlock *, 0 >> Callers;
@@ -231,27 +224,6 @@ struct SplitCacheDirected final : public SplitStrategy {
231
224
}
232
225
233
226
void initializeAuxiliaryVariables () {
234
- // Gather information about conditional and unconditional successors of
235
- // each basic block; this information will be used to estimate block size
236
- // increase due to hot-warm splitting.
237
- auto analyzeBranches = [&](BinaryBasicBlock &BB) {
238
- JumpInfo BBJumpInfo;
239
- const MCSymbol *TBB = nullptr ;
240
- const MCSymbol *FBB = nullptr ;
241
- MCInst *CondBranch = nullptr ;
242
- MCInst *UncondBranch = nullptr ;
243
- if (BB.analyzeBranch (TBB, FBB, CondBranch, UncondBranch)) {
244
- BBJumpInfo.HasUncondBranch = UncondBranch != nullptr ;
245
- if (BB.succ_size () == 1 ) {
246
- BBJumpInfo.UncondSuccessor = BB.getSuccessor ();
247
- } else if (BB.succ_size () == 2 ) {
248
- BBJumpInfo.CondSuccessor = BB.getConditionalSuccessor (true );
249
- BBJumpInfo.UncondSuccessor = BB.getConditionalSuccessor (false );
250
- }
251
- }
252
- return BBJumpInfo;
253
- };
254
-
255
227
for (BinaryFunction *BF : BC.getSortedFunctions ()) {
256
228
if (!shouldConsiderForCallGraph (*BF))
257
229
continue ;
@@ -273,9 +245,6 @@ struct SplitCacheDirected final : public SplitStrategy {
273
245
BBOffsets[BB] = OrigHotSectionSize;
274
246
if (!BB->isSplit ())
275
247
OrigHotSectionSize += BBSizes[BB];
276
-
277
- // (Un)Conditional branch instruction information.
278
- JumpInfos[BB] = analyzeBranches (*BB);
279
248
}
280
249
}
281
250
}
0 commit comments