[llvm] cce49dc - [IR] Remove addPseudoProbeAttribute (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 26 09:02:37 PDT 2021
Author: Kazu Hirata
Date: 2021-08-26T09:02:26-07:00
New Revision: cce49dcb8578a18e34557c0be7daa6c9a6336283
URL: https://github.com/llvm/llvm-project/commit/cce49dcb8578a18e34557c0be7daa6c9a6336283
DIFF: https://github.com/llvm/llvm-project/commit/cce49dcb8578a18e34557c0be7daa6c9a6336283.diff
LOG: [IR] Remove addPseudoProbeAttribute (NFC)
The last use was removed on Jun 17, 2021 in commit
bd52495518808bdbf24f4d8e9e20774d6d2e3333.
Added:
Modified:
llvm/include/llvm/IR/PseudoProbe.h
llvm/lib/IR/PseudoProbe.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/PseudoProbe.h b/llvm/include/llvm/IR/PseudoProbe.h
index 53100f0499100..51ba7e675efe2 100644
--- a/llvm/include/llvm/IR/PseudoProbe.h
+++ b/llvm/include/llvm/IR/PseudoProbe.h
@@ -27,10 +27,6 @@ constexpr const char *PseudoProbeDescMetadataName = "llvm.pseudo_probe_desc";
enum class PseudoProbeType { Block = 0, IndirectCall, DirectCall };
-enum class PseudoProbeAttributes {
- Reserved = 0x1, // Reserved for future use.
-};
-
// The saturated distrution factor representing 100% for block probes.
constexpr static uint64_t PseudoProbeFullDistributionFactor =
std::numeric_limits<uint64_t>::max();
diff --git a/llvm/lib/IR/PseudoProbe.cpp b/llvm/lib/IR/PseudoProbe.cpp
index bd92c604da2c8..101cada77ff9e 100644
--- a/llvm/lib/IR/PseudoProbe.cpp
+++ b/llvm/lib/IR/PseudoProbe.cpp
@@ -98,12 +98,4 @@ void setProbeDistributionFactor(Instruction &Inst, float Factor) {
}
}
-void addPseudoProbeAttribute(PseudoProbeInst &Inst,
- PseudoProbeAttributes Attr) {
- IRBuilder<> Builder(&Inst);
- uint32_t OldAttr = Inst.getAttributes()->getZExtValue();
- uint32_t NewAttr = OldAttr | (uint32_t)Attr;
- if (OldAttr != NewAttr)
- Inst.replaceUsesOfWith(Inst.getAttributes(), Builder.getInt32(NewAttr));
-}
} // namespace llvm
More information about the llvm-commits
mailing list