Skip to content

Commit 1eaff19

Browse files
authored
Revert "Adding Matching and Inference Functionality to Propeller-PR4: Implement matching and inference and create clusters" (#167559)
Reverts #165868 due to buildbot failures Co-authored-by: spupyrev <[email protected]>
1 parent ee41ab3 commit 1eaff19

13 files changed

+6
-496
lines changed

llvm/include/llvm/CodeGen/BasicBlockMatchingAndInference.h

Lines changed: 0 additions & 62 deletions
This file was deleted.

llvm/include/llvm/CodeGen/BasicBlockSectionsProfileReader.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ class BasicBlockSectionsProfileReader {
8686
uint64_t getEdgeCount(StringRef FuncName, const UniqueBBID &SrcBBID,
8787
const UniqueBBID &SinkBBID) const;
8888

89-
// Return the complete function path and cluster info for the given function.
90-
std::pair<bool, FunctionPathAndClusterInfo>
91-
getFunctionPathAndClusterInfo(StringRef FuncName) const;
92-
9389
private:
9490
StringRef getAliasName(StringRef FuncName) const {
9591
auto R = FuncAliasMap.find(FuncName);
@@ -199,9 +195,6 @@ class BasicBlockSectionsProfileReaderWrapperPass : public ImmutablePass {
199195
uint64_t getEdgeCount(StringRef FuncName, const UniqueBBID &SrcBBID,
200196
const UniqueBBID &DestBBID) const;
201197

202-
std::pair<bool, FunctionPathAndClusterInfo>
203-
getFunctionPathAndClusterInfo(StringRef FuncName) const;
204-
205198
// Initializes the FunctionNameToDIFilename map for the current module and
206199
// then reads the profile for the matching functions.
207200
bool doInitialization(Module &M) override;

llvm/include/llvm/CodeGen/MachineBlockHashInfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ struct BlendedBlockHash {
8080
return Dist;
8181
}
8282

83-
uint16_t getOpcodeHash() const { return OpcodeHash; }
84-
8583
private:
8684
/// The offset of the basic block from the function start.
8785
uint16_t Offset{0};

llvm/include/llvm/CodeGen/Passes.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ LLVM_ABI MachineFunctionPass *createBasicBlockSectionsPass();
6969

7070
LLVM_ABI MachineFunctionPass *createBasicBlockPathCloningPass();
7171

72-
/// createBasicBlockMatchingAndInferencePass - This pass enables matching
73-
/// and inference when using propeller.
74-
LLVM_ABI MachineFunctionPass *createBasicBlockMatchingAndInferencePass();
75-
7672
/// createMachineBlockHashInfoPass - This pass computes basic block hashes.
7773
LLVM_ABI MachineFunctionPass *createMachineBlockHashInfoPass();
7874

llvm/include/llvm/InitializePasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ LLVM_ABI void initializeAlwaysInlinerLegacyPassPass(PassRegistry &);
5555
LLVM_ABI void initializeAssignmentTrackingAnalysisPass(PassRegistry &);
5656
LLVM_ABI void initializeAssumptionCacheTrackerPass(PassRegistry &);
5757
LLVM_ABI void initializeAtomicExpandLegacyPass(PassRegistry &);
58-
LLVM_ABI void initializeBasicBlockMatchingAndInferencePass(PassRegistry &);
5958
LLVM_ABI void initializeBasicBlockPathCloningPass(PassRegistry &);
6059
LLVM_ABI void
6160
initializeBasicBlockSectionsProfileReaderWrapperPassPass(PassRegistry &);

llvm/include/llvm/Transforms/Utils/SampleProfileInference.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,6 @@ template <typename FT> class SampleProfileInference {
130130
SampleProfileInference(FunctionT &F, BlockEdgeMap &Successors,
131131
BlockWeightMap &SampleBlockWeights)
132132
: F(F), Successors(Successors), SampleBlockWeights(SampleBlockWeights) {}
133-
SampleProfileInference(FunctionT &F, BlockEdgeMap &Successors,
134-
BlockWeightMap &SampleBlockWeights,
135-
EdgeWeightMap &SampleEdgeWeights)
136-
: F(F), Successors(Successors), SampleBlockWeights(SampleBlockWeights),
137-
SampleEdgeWeights(SampleEdgeWeights) {}
138133

139134
/// Apply the profile inference algorithm for a given function
140135
void apply(BlockWeightMap &BlockWeights, EdgeWeightMap &EdgeWeights);
@@ -162,9 +157,6 @@ template <typename FT> class SampleProfileInference {
162157

163158
/// Map basic blocks to their sampled weights.
164159
BlockWeightMap &SampleBlockWeights;
165-
166-
/// Map edges to their sampled weights.
167-
EdgeWeightMap SampleEdgeWeights;
168160
};
169161

170162
template <typename BT>
@@ -274,14 +266,6 @@ FlowFunction SampleProfileInference<BT>::createFlowFunction(
274266
FlowJump Jump;
275267
Jump.Source = BlockIndex[BB];
276268
Jump.Target = BlockIndex[Succ];
277-
auto It = SampleEdgeWeights.find(std::make_pair(BB, Succ));
278-
if (It != SampleEdgeWeights.end()) {
279-
Jump.HasUnknownWeight = false;
280-
Jump.Weight = It->second;
281-
} else {
282-
Jump.HasUnknownWeight = true;
283-
Jump.Weight = 0;
284-
}
285269
Func.Jumps.push_back(Jump);
286270
}
287271
}

llvm/lib/CodeGen/BasicBlockMatchingAndInference.cpp

Lines changed: 0 additions & 195 deletions
This file was deleted.

0 commit comments

Comments
 (0)