Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | convert builtin_unpredictable on a switch into metadata for LLVM | Sanjay Patel | 2015-09-09 | 1 | -3/+11 |
| | | | | llvm-svn: 247203 | ||||
* | add __builtin_unpredictable and convert to metadata | Sanjay Patel | 2015-09-02 | 1 | -0/+38 |
This patch depends on r246688 (D12341). The goal is to make LLVM generate different code for these functions for a target that has cheap branches (see PR23827 for more details): int foo(); int normal(int x, int y, int z) { if (x != 0 && y != 0) return foo(); return 1; } int crazy(int x, int y) { if (__builtin_unpredictable(x != 0 && y != 0)) return foo(); return 1; } Differential Revision: http://reviews.llvm.org/D12458 llvm-svn: 246699 |