summaryrefslogtreecommitdiff
path: root/include/llvm/Support/TargetFolder.h
Commit message (Collapse)AuthorAge
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for the include/... tree with the script.Chandler Carruth2012-12-03
| | | | | | | | | | AKA: Recompile *ALL* the source code! This one went much better. No manual edits here. I spot-checked for silliness and grep-checked for really broken edits and everything seemed good. It all still compiles. Yell if you see something that looks goofy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetData to DataLayout.Micah Villmow2012-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing function CreateFPCast to the TargetFolder. It's there in the otherNick Lewycky2012-09-27
| | | | | | | | | | | | | folders and not having it here fails to compile if you actually try to use it. Also, CreatePointerCast was failing to do the part where it does TD-aware constant folding. Granted there is exactly one case where that it will ever do anything, but there's no reason to skip it. For reference, that case is a subtraction between two constant offsets on the same global variable, eg., "&A[123] - &A[4].f". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164760 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-21
| | | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
* Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIsJay Foad2011-07-21
| | | | | | | to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135672 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert ConstantFolder APIs to use ArrayRef.Jay Foad2011-07-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135671 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.Jay Foad2011-07-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135040 91177308-0d34-0410-b5e6-96231b3b80d8
* switch the constantexpr, target folder, and IRBuilder interfacesChris Lattner2011-02-10
| | | | | | | | for NSW/NUW binops to follow the pattern of exact binops. This allows someone to use Builder.CreateAdd(x, y, "tmp", MaybeNUW); git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125270 91177308-0d34-0410-b5e6-96231b3b80d8
* enrich folder interfaces around exactness.Chris Lattner2011-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125191 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IRBuilder methods for creating an exact udiv, like for exact sdiv.Duncan Sands2011-02-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125002 91177308-0d34-0410-b5e6-96231b3b80d8
* add missing method, PR6284Chris Lattner2010-02-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96489 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding missing methods for creating Add, Mul, Neg and Sub with NUW.Duncan Sands2010-02-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95086 91177308-0d34-0410-b5e6-96231b3b80d8
* Add utility routines for NSW multiply.Dan Gohman2009-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91664 91177308-0d34-0410-b5e6-96231b3b80d8
* Add utility routines for creating integer negation operators with NSW set.Dan Gohman2009-12-18
| | | | | | | Integer negation only overflows with INT_MIN, but that's an important case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91662 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some more Context arguments.Chris Lattner2009-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86235 91177308-0d34-0410-b5e6-96231b3b80d8
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-06
| | | | | | | from various APIs, addressing PR5325. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86231 91177308-0d34-0410-b5e6-96231b3b80d8
* InstrTypes.h includes Instruction.h, so it's not necessary to include both.Dan Gohman2009-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86162 91177308-0d34-0410-b5e6-96231b3b80d8
* Make two more LLVM headers standaloneDouglas Gregor2009-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86131 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CreateZExtOrBitCast and CreateSExtOrBitCast to TargetFolderDan Gohman2009-10-26
| | | | | | | for consistency with ConstantFolder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85137 91177308-0d34-0410-b5e6-96231b3b80d8
* For the NSWSub support in the builder to actually be useable,Duncan Sands2009-09-26
| | | | | | | | there need to be corresponding changes to the constant folders, done in this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82862 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 80959. It isn't sufficient to solve the full problem. And itDan Gohman2009-09-03
| | | | | | | introduced regressions in the Ocaml bindings tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80969 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,Dan Gohman2009-09-03
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80959 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenience functions for creating nsw add operators.Dan Gohman2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78707 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenience functions for creating inbounds GEPs.Dan Gohman2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78695 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
* Add convenience functions for creating exact sdiv operators, andDan Gohman2009-08-11
| | | | | | | use them in CreatePtrDiff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78682 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-04
| | | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the Pass+Context magic.Owen Anderson2009-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish pushing LLVMContext through the IRBuilder/ConstantFolder interface.Owen Anderson2009-07-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75213 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-08
| | | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74991 91177308-0d34-0410-b5e6-96231b3b80d8
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74878 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-06
| | | | | | files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74844 91177308-0d34-0410-b5e6-96231b3b80d8
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-04
| | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72897 91177308-0d34-0410-b5e6-96231b3b80d8
* Change TargetFolder's TD member from a reference to aDan Gohman2009-06-03
| | | | | | | | pointer, now that ConstantFoldConstantExpression can accept a null TargetData pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72744 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a NullFolder class that doesn't fold constants.Duncan Sands2008-08-12
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54698 91177308-0d34-0410-b5e6-96231b3b80d8
* Point people to ConstantExpr and ConstantFolding,Duncan Sands2008-08-12
| | | | | | | in case they get the wrong idea. Fit in 80 columns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54676 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to use different constantDuncan Sands2008-08-11
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54640 91177308-0d34-0410-b5e6-96231b3b80d8