TLI: Add addVectorizableFunctionsFromVecLib.
[oota-llvm.git] / include / llvm / Analysis / BranchProbabilityInfo.h
index 4414c84f6b7abf1ae8cd2a02bfcc602fbce34f86..89eef68d84316890baef9e632e03220b48f48b02 100644 (file)
@@ -111,6 +111,10 @@ public:
   void setEdgeWeight(const BasicBlock *Src, unsigned IndexInSuccessors,
                      uint32_t Weight);
 
+  static uint32_t getBranchWeightStackProtector(bool IsLikely) {
+    return IsLikely ? (1u << 20) - 1 : 1;
+  }
+
 private:
   // Since we allow duplicate edges from one basic block to another, we use
   // a pair (PredBlock and an index in the successors) to specify an edge.