Skip to content

Commit

Permalink
[IR] Remove addPseudoProbeAttribute (NFC)
Browse files Browse the repository at this point in the history
The last use was removed on Jun 17, 2021 in commit
bd52495.
  • Loading branch information
kazutakahirata committed Aug 26, 2021
1 parent c4dc81e commit cce49dc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions llvm/include/llvm/IR/PseudoProbe.h
Expand Up @@ -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();
Expand Down
8 changes: 0 additions & 8 deletions llvm/lib/IR/PseudoProbe.cpp
Expand Up @@ -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

0 comments on commit cce49dc

Please sign in to comment.