add unpredictable metadata type for control flow
authorSanjay Patel <spatel@rotateright.com>
Wed, 2 Sep 2015 19:06:43 +0000 (19:06 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 2 Sep 2015 19:06:43 +0000 (19:06 +0000)
commit1cded9afe4df04564b38d63556fa4f7c53c52e2b
treeff5c89fdda7f8fd583a63586810c3836da1cb8f0
parentcced5262c4d4241eb8d52bd23a5f846bf1ac9eee
add unpredictable metadata type for control flow

This patch defines 'unpredictable' metadata. This metadata can be used to signal to the optimizer
or backend that a branch or switch is unpredictable, and therefore, it's probably better to not
split a compound predicate into multiple branches such as in CodeGenPrepare::splitBranchCondition().

This was discussed in:
https://llvm.org/bugs/show_bug.cgi?id=23827

Dependent patches to alter codegen and expose this in clang to follow.

Differential Revision; http://reviews.llvm.org/D12341

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246688 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
include/llvm/IR/IRBuilder.h
include/llvm/IR/LLVMContext.h
include/llvm/IR/MDBuilder.h
lib/IR/LLVMContext.cpp
lib/IR/MDBuilder.cpp