File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ struct MachineJumpTableEntry {
3636 // / MBBs - The vector of basic blocks from which to create the jump table.
3737 std::vector<MachineBasicBlock*> MBBs;
3838
39+ // / The hotness of MJTE is inferred from the hotness of the source basic
40+ // / block(s) that reference it.
3941 MachineFunctionDataHotness Hotness;
4042
4143 explicit MachineJumpTableEntry (const std::vector<MachineBasicBlock *> &M);
Original file line number Diff line number Diff line change @@ -1347,9 +1347,7 @@ unsigned MachineJumpTableInfo::createJumpTableIndex(
13471347bool MachineJumpTableInfo::updateJumpTableEntryHotness (
13481348 size_t JTI, MachineFunctionDataHotness Hotness) {
13491349 assert (JTI < JumpTables.size () && " Invalid JTI!" );
1350- // Note record the largest hotness is important for mergable data (constant
1351- // pools). Even if jump table instances are not merged, record the largest
1352- // value seen fwiw.
1350+ // Record the largest hotness value.
13531351 if (Hotness <= JumpTables[JTI].Hotness )
13541352 return false ;
13551353
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class StaticDataSplitter : public MachineFunctionPass {
5858 bool splitJumpTables (MachineFunction &MF);
5959
6060 // Same as above but works on functions with profile information.
61- bool splitJumpTablesWithProfiles (MachineFunction &MF,
61+ bool splitJumpTablesWithProfiles (const MachineFunction &MF,
6262 MachineJumpTableInfo &MJTI);
6363
6464public:
@@ -89,7 +89,7 @@ bool StaticDataSplitter::runOnMachineFunction(MachineFunction &MF) {
8989}
9090
9191bool StaticDataSplitter::splitJumpTablesWithProfiles (
92- MachineFunction &MF, MachineJumpTableInfo &MJTI) {
92+ const MachineFunction &MF, MachineJumpTableInfo &MJTI) {
9393 int NumChangedJumpTables = 0 ;
9494
9595 // Jump table could be used by either terminating instructions or
Original file line number Diff line number Diff line change 77; RUN: llc --run-pass=static-data-splitter -stats -x mir %t.mir -o - 2>&1 | FileCheck %s --check-prefix=STAT
88
99; Tests stat messages are expected.
10- ; TODO : Update test to verify section suffixes when target-lowering and assembler changes are implemented.
11- ; TODO : Also run static-data-splitter pass with -static-data-default-hotness=cold and check data section suffix.
10+ ; COM : Update test to verify section suffixes when target-lowering and assembler changes are implemented.
11+ ; COM : Also run static-data-splitter pass with -static-data-default-hotness=cold and check data section suffix.
1212
1313; STAT-DAG: 2 static-data-splitter - Number of cold jump tables seen
1414; STAT-DAG: 2 static-data-splitter - Number of hot jump tables seen
You can’t perform that action at this time.
0 commit comments