Add support for attaching branch weight metadata directly from the IRBuilder.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 16 Jul 2012 07:45:06 +0000 (07:45 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 16 Jul 2012 07:45:06 +0000 (07:45 +0000)
commit299493720382ab26e0842eca233fd240dce3b3d6
treed9d900033902354b0b64e4f30202880baa69e60b
parent4b31c4d93ff23c4b9a5d9169ff5e6f51731fca17
Add support for attaching branch weight metadata directly from the IRBuilder.

Added a basic unit test for this with CreateCondBr. I didn't go all the
way and test the switch side as the boilerplate for setting up the
switch IRBuilder unit tests is a lot more. Fortunately, the two share
all the interesting code paths.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160251 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IRBuilder.h
unittests/VMCore/IRBuilderTest.cpp