summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Support/ConstantFolder.h
Commit message (Collapse)AuthorAgeFilesLines
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-8/+6
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* Convert ConstantFolder APIs to use ArrayRef.Jay Foad2011-07-211-16/+30
| | | | llvm-svn: 135671
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-10/+10
| | | | llvm-svn: 135375
* Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.Jay Foad2011-07-131-5/+5
| | | | llvm-svn: 135040
* Remove the LLVMContext& arguments from *Folder constructors, as they don't ↵Frits van Bommel2011-04-031-3/+1
| | | | | | seem to be used anywhere. llvm-svn: 128793
* switch the constantexpr, target folder, and IRBuilder interfacesChris Lattner2011-02-101-34/+15
| | | | | | | for NSW/NUW binops to follow the pattern of exact binops. This allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW); llvm-svn: 125270
* enrich folder interfaces around exactness.Chris Lattner2011-02-091-14/+12
| | | | llvm-svn: 125191
* Add IRBuilder methods for creating an exact udiv, like for exact sdiv.Duncan Sands2011-02-071-0/+3
| | | | llvm-svn: 125002
* Adding missing methods for creating Add, Mul, Neg and Sub with NUW.Duncan Sands2010-02-021-0/+12
| | | | llvm-svn: 95086
* Add utility routines for NSW multiply.Dan Gohman2009-12-181-0/+3
| | | | llvm-svn: 91664
* Add utility routines for creating integer negation operators with NSW set.Dan Gohman2009-12-181-0/+3
| | | | | | Integer negation only overflows with INT_MIN, but that's an important case. llvm-svn: 91662
* InstrTypes.h includes Instruction.h, so it's not necessary to include both.Dan Gohman2009-11-051-1/+0
| | | | llvm-svn: 86162
* Make two more LLVM headers standaloneDouglas Gregor2009-11-051-0/+2
| | | | llvm-svn: 86131
* For the NSWSub support in the builder to actually be useable,Duncan Sands2009-09-261-0/+3
| | | | | | | there need to be corresponding changes to the constant folders, done in this patch. llvm-svn: 82862
* Revert 80959. It isn't sufficient to solve the full problem. And itDan Gohman2009-09-031-4/+4
| | | | | | introduced regressions in the Ocaml bindings tests. llvm-svn: 80969
* Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,Dan Gohman2009-09-031-4/+4
| | | | | | | | | | | | | | | and exact flags. Because ConstantExprs are uniqued, creating an expression with this flag causes all expressions with the same operands to have the same flag, which may not be safe. Add, sub, mul, and sdiv ConstantExprs are usually folded anyway, so the main interesting flag here is inbounds, and the constant folder already knows how to set the inbounds flag automatically in most cases, so there isn't an urgent need for the API support. This can be reconsidered in the future, but for now just removing these API bits eliminates a source of potential trouble with little downside. llvm-svn: 80959
* Add more casts to the IRBuilder.Erick Tryzelaar2009-08-161-0/+13
| | | | llvm-svn: 79158
* Add convenience functions for creating nsw add operators.Dan Gohman2009-08-111-0/+3
| | | | llvm-svn: 78707
* Add convenience functions for creating inbounds GEPs.Dan Gohman2009-08-111-0/+9
| | | | llvm-svn: 78695
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-111-1/+1
| | | | llvm-svn: 78690
* Fix struct/class mismatch.Benjamin Kramer2009-08-111-1/+1
| | | | llvm-svn: 78686
* Add convenience functions for creating exact sdiv operators, andDan Gohman2009-08-111-0/+3
| | | | | | use them in CreatePtrDiff. llvm-svn: 78682
* ConstantFolder and NoFolder no longer require their Context members.Dan Gohman2009-08-111-5/+4
| | | | llvm-svn: 78673
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-35/+35
| | | | llvm-svn: 77494
* Finish pushing LLVMContext through the IRBuilder/ConstantFolder interface.Owen Anderson2009-07-101-36/+40
| | | | llvm-svn: 75213
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-8/+0
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-0/+12
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Add a NullFolder class that doesn't fold constants.Duncan Sands2008-08-121-2/+14
| | | | | | | | | | | | This may be used as the second IRBuilder template parameter, the idea being that people learning LLVM may find it helpful (several people asked on IRC if it was possible to turn off constant folding because it made it hard for them to see what was going on). Compiles, but otherwise completely untested. llvm-svn: 54698
* Point people to ConstantExpr and ConstantFolding,Duncan Sands2008-08-121-2/+4
| | | | | | in case they get the wrong idea. Fit in 80 columns. llvm-svn: 54676
* Make it possible to use different constantDuncan Sands2008-08-111-0/+175
folding policies with IRBuilder. The default, provided by ConstantFolder, is to do minimal folding like now: what ConstantExpr provides. An alternative is to use TargetFolder, which uses target information to fold constants more. llvm-svn: 54640
OpenPOWER on IntegriCloud