Rework InstrTypes.h so to reduce the repetition around the NSW/NUW/Exact
authorChris Lattner <sabre@nondot.org>
Wed, 9 Feb 2011 17:00:45 +0000 (17:00 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 9 Feb 2011 17:00:45 +0000 (17:00 +0000)
commitaeaf3d484b4d4c35e8794378c4b6cfbbde718dd1
tree4d27812ae07d87c3fb7a1fa51aa2582428764ce2
parent1aac1864cfb66ae3d322ff7e28738d03bc1d1bfc
Rework InstrTypes.h so to reduce the repetition around the NSW/NUW/Exact
versions of creation functions.  Eventually, the "insertion point" versions
of these should just be removed, we do have IRBuilder afterall.

Do a massive rewrite of much of pattern match.  It is now shorter and less
redundant and has several other widgets I will be using in other patches.
Among other changes, m_Div is renamed to m_IDiv (since it only matches
integer divides) and m_Shift is gone (it used to match all binops!!) and
we now have m_LogicalShift for the one client to use.

Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv
and reduce redundancy within IRbuilder by having these methods chain to
each other more instead of duplicating code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125194 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/InstrTypes.h
include/llvm/Support/IRBuilder.h
include/llvm/Support/PatternMatch.h
lib/Analysis/InstructionSimplify.cpp
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp