summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
...
* Add MSP430 interrupt calling conv. No functionality change yet.Anton Korobeynikov2009-12-071-0/+3
| | | | llvm-svn: 90738
* Avoid creating a metadata slot for all metadata that contains an instructionVictor Hernandez2009-12-041-6/+6
| | | | llvm-svn: 90581
* Fix crasher when N->getElement(n) is NULLVictor Hernandez2009-12-041-1/+1
| | | | llvm-svn: 90572
* Added debug output for inherited passes that are invalidated.Andreas Neustifter2009-12-041-1/+7
| | | | llvm-svn: 90553
* Teach AsmWriter to write inline (not via a global metadata slot) metadata ↵Victor Hernandez2009-12-041-1/+25
| | | | | | that contains an instruction llvm-svn: 90512
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-1/+1
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias GrosserNick Lewycky2009-11-271-1/+1
| | | | | | for pointing this out. llvm-svn: 90015
* Fix typo spotted by Gabor Greif.Nick Lewycky2009-11-261-3/+3
| | | | llvm-svn: 89976
* Clean up file, no functionality change.Nick Lewycky2009-11-261-24/+11
| | | | llvm-svn: 89974
* Move FunctionPassManagerImpl's dumpArguments and dumpPasses callsDan Gohman2009-11-231-3/+3
| | | | | | | out of its run function and into its doInitialization method, so that it does the dump once instead of once per function. llvm-svn: 89660
* I forgot to update the prototype for LLVMBuildIntCast when correctingDuncan Sands2009-11-231-3/+3
| | | | | | | | | | | | the body to not pass the name for the isSigned parameter. However it seems that changing prototypes is a big-no-no, so here I revert the previous change and pass "true" for isSigned, meaning this always does a signed cast, which was the previous behaviour assuming the name was not NULL! Some other C function needs to be introduced for the general case of signed or unsigned casts. This hopefully unbreaks the ocaml binding. llvm-svn: 89648
* Start catching LLVMContext misuse in the verifier.Nick Lewycky2009-11-231-0/+3
| | | | llvm-svn: 89646
* In GlobalVariable::setInitializer, assert that the initializer has theJeffrey Yasskin2009-11-171-0/+15
| | | | | | right type. llvm-svn: 89014
* BuildIntCast takes an additional parameter, isSigned.Duncan Sands2009-11-161-2/+3
| | | | llvm-svn: 88910
* Special case FixedStackPseudoSourceValueVal as well. Do we really need to ↵Evan Cheng2009-11-161-1/+2
| | | | | | differentiate PseudoSourceValueVal from FixedStackPseudoSourceValueVal at this level? llvm-svn: 88902
* Remove extraneous commit.Eric Christopher2009-11-131-5/+0
| | | | llvm-svn: 88716
* Print out something, even if it's non-parseable later when we'veEric Christopher2009-11-131-2/+7
| | | | | | got ghost linkage. It's better than aborting. llvm-svn: 88715
* Do not use StringRef in DebugInfo interface. Devang Patel2009-11-121-0/+11
| | | | | | | This allows StringRef to skip controversial if(str) check in constructor. Buildbots, wait for corresponding clang and llvm-gcc FE check-ins! llvm-svn: 86914
* Reject duplicate case values in a switch, PR5450.Chris Lattner2009-11-111-1/+5
| | | | llvm-svn: 86846
* make this handle redefinition of malloc function with different prototype ↵Victor Hernandez2009-11-101-7/+9
| | | | | | correctly llvm-svn: 86712
* Fix DenseMap iterator constness.Jeffrey Yasskin2009-11-101-2/+2
| | | | | | | | | | | | | | | | | | | This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! llvm-svn: 86636
* Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a ↵Daniel Dunbar2009-11-101-6/+8
| | | | | | | | lame API. Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs. llvm-svn: 86630
* make this handle redefinition of malloc with different prototype correctly.Chris Lattner2009-11-091-3/+3
| | | | llvm-svn: 86525
* prune #include / layering violationChris Lattner2009-11-071-2/+0
| | | | llvm-svn: 86365
* Fit in 80 columnsVictor Hernandez2009-11-071-2/+4
| | | | llvm-svn: 86316
* Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.Victor Hernandez2009-11-072-33/+34
| | | | | | | | | | | | | | | | | | | | | | | Here is the original commit message: This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments. Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. llvm-svn: 86311
* CallInst::CreateMalloc() and CallInst::CreateFree() need to create calls ↵Victor Hernandez2009-11-061-2/+4
| | | | | | with correct calling convention llvm-svn: 86290
* Pass StringRef by value.Daniel Dunbar2009-11-067-38/+37
| | | | llvm-svn: 86251
* remove a bunch of extraneous LLVMContext argumentsChris Lattner2009-11-062-5/+2
| | | | | | from various APIs, addressing PR5325. llvm-svn: 86231
* Revert r86077 because it caused crashes in 179.art and 175.vpr on ARMVictor Hernandez2009-11-062-34/+33
| | | | llvm-svn: 86213
* Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez2009-11-052-33/+34
| | | | | | | | | | | | | | | | | | MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. llvm-svn: 86077
* Changes requested (avoid getFunction(), avoid Type creation via isVoidTy(), ↵Victor Hernandez2009-11-031-37/+5
| | | | | | and avoid redundant isFreeCall cases) in feedback to r85176 llvm-svn: 85936
* remove a bunch of locking from LLVMContextImpl. Since only one threadChris Lattner2009-11-018-87/+0
| | | | | | | can be banging on a context at a time, this isn't needed. Owen, please review. llvm-svn: 85728
* the verifier shouldn't modify the IR.Chris Lattner2009-11-013-9/+16
| | | | llvm-svn: 85722
* fix an issue where the verifier would reject a function whose entryChris Lattner2009-11-012-2/+15
| | | | | | block had its address taken even if the blockaddress was dead. llvm-svn: 85706
* Fix BlockAddress::replaceUsesOfWithOnConstant to correctly Chris Lattner2009-11-011-5/+8
| | | | | | maintain the block use count in SubclassData. llvm-svn: 85701
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-013-10/+8
| | | | | | | indirectbr, thus we don't need "blockaddr(@func, null)". Eliminate it for simplicity. llvm-svn: 85699
* Make blockaddress(@func, null) be valid, and make 'deleting a basic Chris Lattner2009-10-313-8/+10
| | | | | | | | | | | | block with a blockaddress still referring to it' replace the invalid blockaddress with a new blockaddress(@func, null) instead of a inttoptr(1). This changes the bitcode encoding format, and still needs codegen support (this should produce a non-zero value, referring to the entry block of the function would also be quite reasonable). llvm-svn: 85678
* if basic blocks are destroyed while there are *just* BlockAddress' hanging Chris Lattner2009-10-301-0/+18
| | | | | | | around, then zap them. This is analogous to dangling constantexprs hanging off functions. llvm-svn: 85627
* make hasAddressTaken() constant time by storing a refcount in BB's subclass ↵Chris Lattner2009-10-302-13/+7
| | | | | | data. llvm-svn: 85625
* it isn't valid to take the address of the entry block.Chris Lattner2009-10-301-0/+2
| | | | llvm-svn: 85621
* Simplify this code and avoid an extra space character in the output.Dan Gohman2009-10-301-2/+1
| | | | llvm-svn: 85568
* add sanity check for indbr.Chris Lattner2009-10-291-1/+2
| | | | llvm-svn: 85496
* Add a hasAddressTaken for BasicBlock.Dan Gohman2009-10-291-0/+9
| | | | llvm-svn: 85449
* Previously, all operands to Constant were themselves constant.Chris Lattner2009-10-282-19/+27
| | | | | | | | | 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. llvm-svn: 85375
* 'static const void *X = &&y' can only be put in the Chris Lattner2009-10-281-0/+3
| | | | | | | readonly section if a reference to the containing function is valid in the readonly section. llvm-svn: 85370
* asmprinter support for BlockAddress.Chris Lattner2009-10-281-0/+9
| | | | llvm-svn: 85367
* when we tear down a module, we need to be careful to Chris Lattner2009-10-281-1/+14
| | | | | | zap BlockAddress values. llvm-svn: 85366
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-283-21/+22
| | | | llvm-svn: 85351
* IR support for the new BlockAddress constant kind. This isChris Lattner2009-10-282-6/+74
| | | | | | | untested and there is no way to use it, next up: doing battle with asmparser. llvm-svn: 85349
OpenPOWER on IntegriCloud