summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r86077 because it caused crashes in 179.art and 175.vpr on ARMVictor Hernandez2009-11-061-3/+1
| | | | llvm-svn: 86213
* Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez2009-11-051-1/+3
| | | | | | | | | | | | | | | | | | 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
* Revert 85678/85680. The decision is to stay with the current form of Chris Lattner2009-11-011-3/+2
| | | | | | | 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-311-2/+3
| | | | | | | | | | | | 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
* add bitcode reader support for blockaddress. We can now fullyChris Lattner2009-10-282-2/+45
| | | | | | | | | | round trip blockaddress through .ll and .bc files, so add a testcase. There are still a bunch of places in the optimizer and other places that need to be updated to work with these constructs, but at least the basics are in now. llvm-svn: 85377
* rename indbr -> indirectbr to appease the residents of #llvm.Chris Lattner2009-10-281-5/+5
| | | | llvm-svn: 85351
* add enough support for indirect branch for the feature test to passChris Lattner2009-10-271-2/+23
| | | | | | | (assembler,asmprinter, bc reader+writer) and document it. Codegen currently aborts on it. llvm-svn: 85274
* Suppress -Asserts warning.Daniel Dunbar2009-10-251-0/+2
| | | | llvm-svn: 85078
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-1/+2
| | | | | | | 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. llvm-svn: 84987
* Hide MetadataContext implementation details.Devang Patel2009-10-221-1/+9
| | | | llvm-svn: 84886
* Rename msasm to alignstack per review.Dale Johannesen2009-10-211-2/+2
| | | | llvm-svn: 84795
* Make changes to rev 84292 as requested by Chris Lattner.Victor Hernandez2009-10-211-7/+4
| | | | | | | Most changes are cleanup, but there is 1 correctness fix: I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects). llvm-svn: 84772
* Autoupgrade malloc insts to malloc calls.Victor Hernandez2009-10-171-2/+9
| | | | | | | | Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. llvm-svn: 84292
* Add an "msasm" flag to inline asm as suggested in PR 5125.Dale Johannesen2009-10-131-2/+3
| | | | | | | A little ugliness is accepted to keep the binary file format compatible. No functional change yet. llvm-svn: 84020
* Remove unnecessary assert.Devang Patel2009-10-131-3/+0
| | | | llvm-svn: 84004
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-7/+7
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* Only one custom meadata of each kind can be attached with an instruction.Devang Patel2009-09-291-1/+1
| | | | llvm-svn: 83105
* s/class Metadata/class MetadataContext/gDevang Patel2009-09-281-2/+2
| | | | llvm-svn: 83019
* Do not use global typedef for MDKindID.Devang Patel2009-09-281-2/+2
| | | | llvm-svn: 83016
* Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it ↵Victor Hernandez2009-09-251-9/+2
| | | | | | causes regressions in the nightly tests. llvm-svn: 82784
* Auto-upgrade malloc instructions to malloc calls.Victor Hernandez2009-09-241-2/+9
| | | | | | Reviewed by Devang Patel. llvm-svn: 82694
* Tabs -> spaces, and remove trailing whitespace.Daniel Dunbar2009-09-201-206/+206
| | | | llvm-svn: 82355
* Write and read metadata attachments.Devang Patel2009-09-182-1/+94
| | | | llvm-svn: 82259
* Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.Dan Gohman2009-09-071-22/+34
| | | | llvm-svn: 81172
* Public and private corrections, warned about by icc (#304).Duncan Sands2009-09-061-1/+1
| | | | | | Patch by Erick Tryzelaar. llvm-svn: 81107
* Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", thisDaniel Dunbar2009-09-061-34/+22
| | | | | | breaks MiniSAT on x86_64. llvm-svn: 81098
* Include optional subclass flags, such as inbounds, nsw, etc., in theDan Gohman2009-09-041-22/+34
| | | | | | | | | | | | | | | | | Constant uniquing tables. This allows distinct ConstantExpr objects with the same operation and different flags. Even though a ConstantExpr "a + b" is either always overflowing or never overflowing (due to being a ConstantExpr), it's still necessary to be able to represent it both with and without overflow flags at the same time within the IR, because the safety of the flag may depend on the context of the use. If the constant really does overflow, it wouldn't ever be safe to use with the flag set, however the use may be in code that is never actually executed. This also makes it possible to merge all the flags tests into a single test. llvm-svn: 80998
* Add new value for given index in MDValuePtrs.Devang Patel2009-09-031-0/+3
| | | | llvm-svn: 80867
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-021-3/+5
| | | | llvm-svn: 80773
* Reapply 79977.Devang Patel2009-08-281-2/+5
| | | | | | Use MDNodes to encode debug info in llvm IR. llvm-svn: 80406
* Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.Devang Patel2009-08-261-5/+2
| | | | llvm-svn: 80073
* Eliminate the unused Context argument on one of the ICmpInst and FCmpInstDan Gohman2009-08-251-2/+2
| | | | | | constructors. llvm-svn: 80049
* Update DebugInfo interface to use metadata, instead of special named ↵Devang Patel2009-08-251-2/+5
| | | | | | | | 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
* eliminate the std::ostream forms of the bitcode writing APIs.Chris Lattner2009-08-231-9/+5
| | | | llvm-svn: 79840
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-201-4/+4
| | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. llvm-svn: 79539
* Switch to SmallString::str from SmallString::c_str, and removeDaniel Dunbar2009-08-191-1/+1
| | | | | | SmallString::c_str. llvm-svn: 79456
* Actually privatize a IntegerTypes, and fix a few bugs exposed by this.Owen Anderson2009-08-131-2/+2
| | | | llvm-svn: 78955
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-132-43/+43
| | | | llvm-svn: 78948
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-111-1/+1
| | | | llvm-svn: 78690
* Change llvm-c's ordering of contexts to make it consistent.Erick Tryzelaar2009-08-111-6/+6
| | | | llvm-svn: 78656
* Privatize the StructType table, which unfortunately involves routing ↵Owen Anderson2009-08-051-2/+2
| | | | | | contexts through a number of APIs. llvm-svn: 78258
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-041-1/+1
| | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. llvm-svn: 78115
* Use separate ValueList for metadata.Devang Patel2009-08-042-8/+85
| | | | | | This fixes PR4666. llvm-svn: 78056
* Move the metadata constructors back to 2.5 syntax.Owen Anderson2009-07-311-2/+3
| | | | llvm-svn: 77733
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-2/+2
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move more code back to 2.5 APIs.Owen Anderson2009-07-301-8/+8
| | | | llvm-svn: 77635
* Read and write NamedMDNode.Devang Patel2009-07-291-0/+27
| | | | llvm-svn: 77517
* Move types back to the 2.5 API.Owen Anderson2009-07-291-11/+11
| | | | llvm-svn: 77516
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-10/+10
| | | | llvm-svn: 77494
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-281-1/+1
| | | | | | New name is Metadata.h. llvm-svn: 77370
OpenPOWER on IntegriCloud