Created
November 15, 2013 17:11
-
-
Save kaworu/7487982 to your computer and use it in GitHub Desktop.
Patch for LLVM to build under DragonFly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/include/llvm/Analysis/BlockFrequencyImpl.h b/include/llvm/Analysis/BlockFrequencyImpl.h | |
index 817a441..cbbd934 100644 | |
--- a/include/llvm/Analysis/BlockFrequencyImpl.h | |
+++ b/include/llvm/Analysis/BlockFrequencyImpl.h | |
@@ -235,8 +235,9 @@ class BlockFrequencyImpl { | |
// | |
// Iterations = 1 / ExitProb | |
// | |
- uint64_t D = std::max(getBlockFreq(Head).getFrequency(), UINT64_C(1)); | |
- uint64_t N = std::max(BackFreq.getFrequency(), UINT64_C(1)); | |
+ uint64_t one = UINT64_C(1); | |
+ uint64_t D = std::max(getBlockFreq(Head).getFrequency(), one); | |
+ uint64_t N = std::max(BackFreq.getFrequency(), one); | |
if (N < D) | |
N = D - N; | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment