Update the branch weight metadata in JumpThreading pass.
[oota-llvm.git] / lib / Analysis / BlockFrequencyInfo.cpp
index ac4ee8f11e0a0e5189fb921716ba13b61d99a81c..90b7a339a0fe2d13b37ed0420c74565fe72ac63c 100644 (file)
@@ -129,6 +129,12 @@ BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const {
   return BFI ? BFI->getBlockFreq(BB) : 0;
 }
 
+void BlockFrequencyInfo::setBlockFreq(const BasicBlock *BB,
+                                      uint64_t Freq) {
+  assert(BFI && "Expected analysis to be available");
+  BFI->setBlockFreq(BB, Freq);
+}
+
 /// Pop up a ghostview window with the current block frequency propagation
 /// rendered using dot.
 void BlockFrequencyInfo::view() const {