Make SimplifyCFG simply depend upon TargetTransformInfo and pass it
authorChandler Carruth <chandlerc@gmail.com>
Mon, 7 Jan 2013 03:53:25 +0000 (03:53 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 7 Jan 2013 03:53:25 +0000 (03:53 +0000)
commit5f46c3c2e8d13c6ac8d3863d84e887f84c73f27a
tree3d5fa965599ec5a59ce64f2b21c4c111e36a1781
parent6554666e0034ea1cc5c8095b34d1ffbe0f62f363
Make SimplifyCFG simply depend upon TargetTransformInfo and pass it
through as a reference rather than a pointer. There is always *some*
implementation of this available, so this simplifies code by not having
to test for whether it is available or not.

Further, it turns out there were piles of places where SimplifyCFG was
recursing and not passing down either TD or TTI. These are fixed to be
more pedantically consistent even though I don't have any particular
cases where it would matter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171691 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/Local.h
lib/Transforms/Scalar/SimplifyCFGPass.cpp
lib/Transforms/Utils/SimplifyCFG.cpp