[IR] Remove addPseudoProbeAttribute (NFC)
authorKazu Hirata <kazu@google.com>
Thu, 26 Aug 2021 16:02:26 +0000 (09:02 -0700)
committerKazu Hirata <kazu@google.com>
Thu, 26 Aug 2021 16:02:26 +0000 (09:02 -0700)
The last use was removed on Jun 17, 2021 in commit
bd52495518808bdbf24f4d8e9e20774d6d2e3333.

llvm/include/llvm/IR/PseudoProbe.h
llvm/lib/IR/PseudoProbe.cpp

index 53100f0..51ba7e6 100644 (file)
@@ -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();
index bd92c60..101cada 100644 (file)
@@ -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