aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Operator.h
Commit message (Collapse)AuthorAgeFilesLines
* Add support for vectors of pointers.Nadav Rotem2011-12-051-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145801 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r133373. I was going to use this to teach the Verifier to verify constantNick Lewycky2011-06-191-101/+1
| | | | | | | | expressions, but Chris wants to instead reduce the set of possible constant expression types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133374 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the remaining instructions/constant expressions as Operators so that codeNick Lewycky2011-06-191-1/+101
| | | | | | | can manipulate instructions and constantexpr's uniformly. No users yet though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133373 91177308-0d34-0410-b5e6-96231b3b80d8
* PR9869: Add explicit destructor declarations to Operator subclasses, to allowEli Friedman2011-05-081-8/+26
| | | | | | | | compiling Operator.h with gcc 4.6 in C++0x mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131062 91177308-0d34-0410-b5e6-96231b3b80d8
* implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-071-106/+50
| | | | | | | Factor some code better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125006 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IRBuilder methods for creating an exact udiv, like for exact sdiv.Duncan Sands2011-02-071-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125002 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-061-9/+44
| | | | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid warnings about implicit conversions to `bool' in MSVC. This timeOscar Fuentes2010-09-251-1/+1
| | | | | | | | for real. Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114796 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid warnings about conversions to `bool' in MS compilers.Oscar Fuentes2010-09-231-1/+1
| | | | | | Patch by Nathan Jeffords! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114662 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a bunch of unused arguments from functions, silencing aEric Christopher2009-10-141-2/+2
| | | | | | | warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84130 91177308-0d34-0410-b5e6-96231b3b80d8
* add a helper method.Chris Lattner2009-09-211-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82438 91177308-0d34-0410-b5e6-96231b3b80d8
* Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.Dan Gohman2009-09-071-16/+50
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81172 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", thisDaniel Dunbar2009-09-061-50/+16
| | | | | | breaks MiniSAT on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81098 91177308-0d34-0410-b5e6-96231b3b80d8
* Include optional subclass flags, such as inbounds, nsw, etc., in theDan Gohman2009-09-041-16/+50
| | | | | | | | | | | | | | | | | | Constant uniquing tables. This allows distinct ConstantExpr objects with the same operation and different flags. Even though a ConstantExpr "a + b" is either always overflowing or never overflowing (due to being a ConstantExpr), it's still necessary to be able to represent it both with and without overflow flags at the same time within the IR, because the safety of the flag may depend on the context of the use. If the constant really does overflow, it wouldn't ever be safe to use with the flag set, however the use may be in code that is never actually executed. This also makes it possible to merge all the flags tests into a single test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80998 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-8/+8
| | | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
* Add unimplemented destructor declarations to hopefully addressDan Gohman2009-08-131-0/+6
| | | | | | | compiler warnings on windows (PR4714). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78934 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid implicitly depending on Instructions.h.Dan Gohman2009-08-111-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78681 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new keyword 'inbounds' for use with getelementptr. See theDan Gohman2009-07-271-0/+9
| | | | | | | LangRef.html changes for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
* Order unsigned before signed, for consistency.Dan Gohman2009-07-271-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77257 91177308-0d34-0410-b5e6-96231b3b80d8
* Add specific classes for Add, Sub, and Mul, for convenience.Dan Gohman2009-07-241-0/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76981 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify that OverflowingBinaryOperator is not used for SDiv, even thoughDan Gohman2009-07-201-1/+2
| | | | | | | SDiv is a binary operation that can overflow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76464 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop UDivOperator and introduce SDivOperator. Thanks to ChrisDan Gohman2009-07-201-5/+5
| | | | | | | for noticing this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76440 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the addition of hasNoPointerOverflow to GEPOperator.Dan Gohman2009-07-201-18/+0
| | | | | | | | | | | | | Getelementptrs that are defined to wrap are virtually useless to optimization, and getelementptrs that are undefined on any kind of overflow are too restrictive -- it's difficult to ensure that all intermediate addresses are within bounds. I'm going to take a different approach. Remove a few optimizations that depended on this flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76437 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert more code to use Operator instead of explicitly handling bothDan Gohman2009-07-171-0/+42
| | | | | | | | ConstantExpr and Instruction. This involves duplicating some code between GetElementPtrInst and GEPOperator, but it's not a lot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76265 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a GEPOperator class, and move the hasNoPointerOverflowDan Gohman2009-07-171-0/+35
| | | | | | | accessors into it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76245 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new Operator class, for handling Instructions and ConstantExprsDan Gohman2009-07-171-0/+132
in a convenient manner, factoring out some common code from InstructionCombining and ValueTracking. Move the contents of BinaryOperators.h into Operator.h and use Operator to generalize them to support ConstantExprs as well as Instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76232 91177308-0d34-0410-b5e6-96231b3b80d8