summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* Add a hasAddressTaken for BasicBlock.Dan Gohman2009-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85449 91177308-0d34-0410-b5e6-96231b3b80d8
* add IRBuilder support for IndirectBrChris Lattner2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85445 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r85346 change to control tail merging by CodeGenOpt::Level.Bob Wilson2009-10-28
| | | | | | | I'm going to redo this using the OptimizeForSize function attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85426 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend getMallocArraySize() to determine the array size if the malloc ↵Victor Hernandez2009-10-28
| | | | | | | | | | | | | | | | argument is: ArraySize * ElementSize ElementSize * ArraySize ArraySize << log2(ElementSize) ElementSize << log2(ArraySize) Refactor isArrayMallocHelper and delete isSafeToGetMallocArraySize, so that there is only 1 copy of the malloc array determining logic. Update users of getMallocArraySize() to not bother calling isArrayMalloc() as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85421 91177308-0d34-0410-b5e6-96231b3b80d8
* Make AntiDepReg.h internal.David Goodwin2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85412 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new 'SetCurrentDebugType' API (requested by Andrew Haley for JITChris Lattner2009-10-28
| | | | | | | | stuff) to programmatically control the current debug flavor. While I'm at it, doxygenate Debug.h and clean it up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85395 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ABCD, a generalized implementation of the Elimination of Array BoundsNick Lewycky2009-10-28
| | | | | | | | | Checks on Demand algorithm which looks at arbitrary branches instead of loop iterations. This is GSoC work by Andre Tavares with only editorial changes applied! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85382 91177308-0d34-0410-b5e6-96231b3b80d8
* bitcode writer support for blockaddress.Chris Lattner2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85376 91177308-0d34-0410-b5e6-96231b3b80d8
* Previously, all operands to Constant were themselves constant.Chris Lattner2009-10-28
| | | | | | | | | | In the new world order, BlockAddress can have a BasicBlock operand. This doesn't permute much, because if you have a ConstantExpr (or anything more specific than Constant) we still know the operand has to be a Constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85375 91177308-0d34-0410-b5e6-96231b3b80d8
* basic blocks can now have non-instruction users.Chris Lattner2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85365 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a second ValueType argument to isFPImmLegal.Evan Cheng2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85361 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove getIEEEFloatParts and getIEEEDoubleParts. They are not needed.Evan Cheng2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85358 91177308-0d34-0410-b5e6-96231b3b80d8
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85351 91177308-0d34-0410-b5e6-96231b3b80d8
* IR support for the new BlockAddress constant kind. This isChris Lattner2009-10-28
| | | | | | | | untested and there is no way to use it, next up: doing battle with asmparser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85349 91177308-0d34-0410-b5e6-96231b3b80d8
* Record CodeGen optimization level in the BranchFolding pass so that we canBob Wilson2009-10-27
| | | | | | | | | | | | | | | | | use it to control tail merging when there is a tradeoff between performance and code size. When there is only 1 instruction in the common tail, we have been merging. That can be good for code size but is a definite loss for performance. Now we will avoid tail merging in that case when the optimization level is "Aggressive", i.e., "-O3". Radar 7338114. Since the IfConversion pass invokes BranchFolding, it too needs to know the optimization level. Note that I removed the RegisterPass instantiation for IfConversion because it required a default constructor. If someone wants to keep that for some reason, we can add a default constructor with a hard-wired optimization level. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85346 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the API changes from r85295 to make it easier for people to buildJeffrey Yasskin2009-10-27
| | | | | | | against both 2.6 and HEAD. The default is still changed to eager jitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85330 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out redundancy from clone() implementations.Devang Patel2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85327 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new APFloat methods that return sign, exp, and mantissa of ieee float ↵Evan Cheng2009-10-27
| | | | | | and double values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85318 91177308-0d34-0410-b5e6-96231b3b80d8
* Random updates to passes for indbr, I need blockaddress before I can do much ↵Chris Lattner2009-10-27
| | | | | | more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85316 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the JIT to compile eagerly by default as agreed inJeffrey Yasskin2009-10-27
| | | | | | | | http://llvm.org/PR5184, and beef up the comments to describe what both options do and the risks of lazy compilation in the presence of threads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85295 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MallocFreeHelper as MemoryBuiltinsVictor Hernandez2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85286 91177308-0d34-0410-b5e6-96231b3b80d8
* Do away with addLegalFPImmediate. Add a target hook isFPImmLegal which ↵Evan Cheng2009-10-27
| | | | | | returns true if the fp immediate can be natively codegened by target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85281 91177308-0d34-0410-b5e6-96231b3b80d8
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-27
| | | | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85274 91177308-0d34-0410-b5e6-96231b3b80d8
* Type.h doesn't need to #include LLVMContext.hChris Lattner2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85254 91177308-0d34-0410-b5e6-96231b3b80d8
* trim another #includeChris Lattner2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85250 91177308-0d34-0410-b5e6-96231b3b80d8
* remove an unneeded #include.Chris Lattner2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85248 91177308-0d34-0410-b5e6-96231b3b80d8
* lang points out that the comment is out of date with the code.Chris Lattner2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85203 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix VS build, patch by Marius Wachtler.Mike Stump2009-10-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85198 91177308-0d34-0410-b5e6-96231b3b80d8
* Add objectsize intrinsic and hook it up through codegen. Doesn'tEric Christopher2009-10-27
| | | | | | | do anything than return "I don't know" at the moment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85189 91177308-0d34-0410-b5e6-96231b3b80d8
* Automatically do the equivalent of freeMachineCodeForFunction(F) when F isJeffrey Yasskin2009-10-27
| | | | | | | | | | | | | | being destroyed. This allows users to run global optimizations like globaldce even after some functions have been jitted. This patch also removes the Function* parameter to JITEventListener::NotifyFreeingMachineCode() since it can cause that to be called when the Function is partially destroyed. This change will be even more helpful later when I think we'll want to allow machine code to actually outlive its Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85182 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MallocHelper as MallocFreeHelper, since it now also identifies calls ↵Victor Hernandez2009-10-26
| | | | | | to free() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85181 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot to commit these.Owen Anderson2009-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85180 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove FreeInst.Victor Hernandez2009-10-26
| | | | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow the aggressive anti-dep breaker to process the same region multiple ↵David Goodwin2009-10-26
| | | | | | times. This is necessary because new anti-dependencies are exposed when "current" ones are broken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85166 91177308-0d34-0410-b5e6-96231b3b80d8
* Define virtual destructor in *.cpp file.David Goodwin2009-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85146 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in the experimental GEP splitter pass. This pass splits complexDan Gohman2009-10-26
| | | | | | | | | | | GEPs (more than one non-zero index) into simple GEPs (at most one non-zero index). In some simple experiments using this it's not uncommon to see 3% overall code size wins, because it exposes redundancies that can be eliminated, however it's tricky to use because instcombine aggressively undoes the work that this pass does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85144 91177308-0d34-0410-b5e6-96231b3b80d8
* Add virtual destructor.David Goodwin2009-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85141 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
* Break anti-dependence breaking out into its own class.David Goodwin2009-10-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85127 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to encode type info using llvm::Constant.Devang Patel2009-10-26
| | | | | | | Patch by Talin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85126 91177308-0d34-0410-b5e6-96231b3b80d8
* - Revert some changes from 85044, 85045, and 85047 that broke x86_64 tests andEvan Cheng2009-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | bootstrapping. It's not safe to leave identity subreg_to_reg and insert_subreg around. - Relax register scavenging to allow use of partially "not-live" registers. It's common for targets to operate on registers where the top bits are undef. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... = d0 When the insert_subreg is eliminated by the coalescer, the scavenger used to complain. The previous fix was to keep to insert_subreg around. But that's brittle and it's overly conservative when we want to use the scavenger to allocate registers. It's actually legal and desirable for other instructions to use the "undef" part of d0. e.g. s0 = d0 = insert_subreg d0<undef>, s0, 1 ... s1 = = s1 = d0 We probably need add a "partial-undef" marker on machine operand so the machine verifier would not complain. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85091 91177308-0d34-0410-b5e6-96231b3b80d8
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-26
| | | | | | | direct inclusion edge from System to Support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85086 91177308-0d34-0410-b5e6-96231b3b80d8
* Add isIdentityCopy to check for identity copy (or extract_subreg, etc.)Evan Cheng2009-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85044 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ICmpInst::isSignedPredicate which was a reimplementationNick Lewycky2009-10-25
| | | | | | | CmpInst::isSigned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85037 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink isTrueWhenEqual from ICmpInst to CmpInst. Add a matching isFalseWhenEqualNick Lewycky2009-10-25
| | | | | | | which is equal to !isTrueWhenEqual for ints but not for floats. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85036 91177308-0d34-0410-b5e6-96231b3b80d8
* MapValue doesn't needs its LLVMContext argument.Dan Gohman2009-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85020 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename isLoopExit to isLoopExiting, for consistency with the wordingDan Gohman2009-10-24
| | | | | | | | | used elsewhere - an exit block is a block outside the loop branched to from within the loop. An exiting block is a block inside the loop that branches out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85019 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DominanceFrontier::addBasicBlock return the iterator for the newlyDan Gohman2009-10-24
| | | | | | | inserted block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85010 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an explicit keyword.Dan Gohman2009-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85009 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-24
| | | | | | | | | Update all analysis passes and transforms to treat free calls just like FreeInst. Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84987 91177308-0d34-0410-b5e6-96231b3b80d8