summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reinstate r133513 (reverted in r133700) with an additional fix for aJay Foad2011-06-231-3/+3
| | | | | | -Wshorten-64-to-32 warning in Instructions.h. llvm-svn: 133708
* Revert r133513:Eric Christopher2011-06-231-3/+3
| | | | | | | | | "Reinstate r133435 and r133449 (reverted in r133499) now that the clang self-hosted build failure has been fixed (r133512)." Due to some additional warnings. llvm-svn: 133700
* Reinstate r133435 and r133449 (reverted in r133499) now that the clangJay Foad2011-06-211-3/+3
| | | | | | self-hosted build failure has been fixed (r133512). llvm-svn: 133513
* Revert r133435 and r133449 to appease buildbots.Chad Rosier2011-06-211-3/+3
| | | | llvm-svn: 133499
* Change how PHINodes store their operands.Jay Foad2011-06-201-3/+3
| | | | | | | | | | | | | | | | | | | Change PHINodes to store simple pointers to their incoming basic blocks, instead of full-blown Uses. Note that this loses an optimization in SplitCriticalEdge(), because we can no longer walk the use list of a BasicBlock to find phi nodes. See the comment I removed starting "However, the foreach loop is slow for blocks with lots of predecessors". Extend replaceAllUsesWith() on a BasicBlock to also update any phi nodes in the block's successors. This mimics what would have happened when PHINodes were proper Users of their incoming blocks. (Note that this only works if OldBB->replaceAllUsesWith(NewBB) is called when OldBB still has a terminator instruction, so it still has some successors.) llvm-svn: 133435
* Revamp the ValueMapper interfaces in a couple ways:Chris Lattner2011-01-081-11/+11
| | | | | | | | | | | | | | | | 1. Take a flags argument instead of a bool. This makes it more clear to the reader what it is used for. 2. Add a flag that says that "remapping a value not in the map is ok". 3. Reimplement MapValue to share a bunch of code and be a lot more efficient. For lookup failures, don't drop null values into the map. 4. Using the new flag a bunch of code can vaporize in LinkModules and LoopUnswitch, kill it. No functionality change. llvm-svn: 123058
* Fix PR8313 by changing ValueToValueMap use a TrackingVH.Rafael Espindola2010-10-131-7/+13
| | | | llvm-svn: 116390
* Reapply r112091 and r111922, support for metadata linking, with aDan Gohman2010-08-261-10/+16
| | | | | | | | | | | | | | fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. llvm-svn: 112190
* Use MapValue in the Linker instead of having a private functionDan Gohman2010-08-241-1/+1
| | | | | | | | which does the same thing. This eliminates redundant code and handles MDNodes better. MDNode linking still doesn't fully work yet though. llvm-svn: 111941
* Use DebugLocs instead of MDNodes.Dan Gohman2010-07-201-32/+27
| | | | llvm-svn: 108967
* Don't look up the "dbg" metadata kind by name.Dan Gohman2010-07-201-8/+7
| | | | llvm-svn: 108961
* Use available typedef for " DenseMap<const Value*, Value*>".Devang Patel2010-06-241-6/+6
| | | | llvm-svn: 106699
* Cosmetic change.Devang Patel2010-06-231-49/+49
| | | | | | Do not use "ValueMap" as a name for a local variable or an argument. llvm-svn: 106698
* Use overloaded operators instead of DIDescriptor::getNode()Devang Patel2010-05-071-1/+1
| | | | llvm-svn: 103276
* There is no need to install ValueMapper.h header. Devang Patel2010-04-201-1/+1
| | | | llvm-svn: 101949
* Avoid using DIDescriptor.isNull(). Devang Patel2010-03-081-3/+3
| | | | | | This is a first step towards eliminating checks in Descriptor constructors. llvm-svn: 97975
* Revert r97947.Devang Patel2010-03-081-3/+3
| | | | llvm-svn: 97963
* Avoid using DIDescriptor.isNull().Devang Patel2010-03-081-3/+3
| | | | | | This is a first step towards eliminating unncessary constructor checks in light weight DIDescriptor wrappers. llvm-svn: 97947
* Don't bother with sprintf, just pass the Twine through.Benjamin Kramer2010-01-271-1/+1
| | | | llvm-svn: 94684
* Remove dead debug info intrinsics.Devang Patel2010-01-051-15/+1
| | | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start AutoUpgrade simply ignores these intrinsics now. llvm-svn: 92557
* fix Analysis/DebugInfo.h to not include Metadata.h. Do thisChris Lattner2009-12-311-0/+1
| | | | | | | by moving one method out of line and eliminating redundant checks from other methods. llvm-svn: 92337
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-3/+3
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Use an array instead of a SmallVector.Benjamin Kramer2009-12-291-7/+7
| | | | llvm-svn: 92264
* Final step in the metadata API restructuring: move the Chris Lattner2009-12-291-2/+1
| | | | | | | | getMDKindID/getMDKindNames methods to LLVMContext (and add convenience methods to Module), eliminating MetadataContext. Move the state that it maintains out to LLVMContext. llvm-svn: 92259
* remove useless argument.Chris Lattner2009-12-291-8/+7
| | | | llvm-svn: 92256
* This is a major cleanup of the instruction metadata interfaces thatChris Lattner2009-12-281-7/+13
| | | | | | | | | | | | | | | | | | | | | | I asked Devang to do back on Sep 27. Instead of going through the MetadataContext class with methods like getMD() and getMDs(), just ask the instruction directly for its metadata with getMetadata() and getAllMetadata(). This includes a variety of other fixes and improvements: previously all Value*'s were bloated because the HasMetadata bit was thrown into value, adding a 9th bit to a byte. Now this is properly sunk down to the Instruction class (the only place where it makes sense) and it will be folded away somewhere soon. This also fixes some confusion in getMDs and its clients about whether the returned list is indexed by the MDID or densely packed. This is now returned sorted and densely packed and the comments make this clear. This introduces a number of fixme's which I'll follow up on. llvm-svn: 92235
* rename getMDKind -> getMDKindID, make it autoinsert if an MD KindChris Lattner2009-12-281-1/+1
| | | | | | | doesn't exist already, eliminate registerMDKind. Tidy up a bunch of random stuff. llvm-svn: 92225
* Add the braces gcc suggested.Daniel Dunbar2009-11-121-5/+8
| | | | llvm-svn: 86933
* Implement support to debug inlined functions.Devang Patel2009-11-101-3/+56
| | | | llvm-svn: 86748
* fix ConstantFoldCompareInstOperands to take the LHS/RHS asChris Lattner2009-11-091-2/+2
| | | | | | individual operands instead of taking a temporary array llvm-svn: 86619
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-061-5/+2
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* MapValue doesn't needs its LLVMContext argument.Dan Gohman2009-10-241-5/+2
| | | | llvm-svn: 85020
* Remove an unnnecessary LLVMContext argument inDan Gohman2009-10-051-1/+1
| | | | | | ConstantFoldLoadThroughGEPConstantExpr. llvm-svn: 83311
* Instruction::clone does not need to take an LLVMContext&. Remove that andNick Lewycky2009-09-271-3/+3
| | | | | | update all the callers. llvm-svn: 82889
* Reapply 79977.Devang Patel2009-08-281-1/+1
| | | | | | Use MDNodes to encode debug info in llvm IR. llvm-svn: 80406
* smallvectorize the list of returns built by CloneAndPruneFunctionInto.Chris Lattner2009-08-271-6/+6
| | | | llvm-svn: 80202
* Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.Devang Patel2009-08-261-1/+1
| | | | llvm-svn: 80073
* Update DebugInfo interface to use metadata, instead of special named ↵Devang Patel2009-08-251-1/+1
| | | | | | | | llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well. This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!) llvm-svn: 79977
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-2/+2
| | | | llvm-svn: 78948
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-1/+1
| | | | llvm-svn: 77635
* Move types back to the 2.5 API.Owen Anderson2009-07-291-2/+1
| | | | llvm-svn: 77516
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-7/+7
| | | | llvm-svn: 76702
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-3/+3
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* "LLVMContext* " --> "LLVMContext *"Owen Anderson2009-07-061-2/+2
| | | | llvm-svn: 74878
* Thread LLVMContext through the constant folding APIs, which touches a lot of ↵Owen Anderson2009-07-061-3/+4
| | | | | | files. llvm-svn: 74844
* More LLVMContext-ification.Owen Anderson2009-07-051-4/+11
| | | | llvm-svn: 74807
* While inlining, clone llvm.dbg.func.start intrinsic and adjust Devang Patel2009-04-151-3/+7
| | | | | | llvm.dbg.region.end instrinsic. This nested llvm.dbg.func.start/llvm.dbg.region.end pair now enables DW_TAG_inlined_subroutine support in code generator. llvm-svn: 69118
* Factorize out a concept - no functionality change.Duncan Sands2009-03-211-2/+1
| | | | llvm-svn: 67454
OpenPOWER on IntegriCloud