summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore
Commit message (Collapse)AuthorAgeFilesLines
* Add lengthof and endof templates that hide a lot of sizeof computations.Owen Anderson2007-09-071-3/+2
| | | | | | Patch by Sterling Stein! llvm-svn: 41758
* Next round of APFloat changes.Dale Johannesen2007-09-063-98/+111
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Update GEP constructors to use an iterator interface to fixDavid Greene2007-09-045-79/+11
| | | | | | GLIBCXX_DEBUG issues. llvm-svn: 41697
* Change LegalFPImmediates to use APFloat.Dale Johannesen2007-08-301-7/+38
| | | | | | | | | Add APFloat interfaces to ConstantFP, SelectionDAG. Fix integer bit in double->APFloat conversion. Convert LegalizeDAG to use APFloat interface in ConstantFPSDNode uses. llvm-svn: 41587
* Update InvokeInst to work like CallInstDavid Greene2007-08-271-22/+0
| | | | llvm-svn: 41506
* Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.Dale Johannesen2007-08-241-10/+21
| | | | | | This means backing out the preceding change to Constants.cpp, alas. llvm-svn: 41378
* sink clone() down the class hierarchy from CmpInst into ICmpInst/FCmpInst.Chris Lattner2007-08-241-2/+5
| | | | | | | This eliminates a conditional on that path, and ensures ICmpInst/FCmpInst both have an out-of-line virtual method to home the class. llvm-svn: 41371
* Revised per review feedback from previous patch.Dale Johannesen2007-08-241-20/+9
| | | | llvm-svn: 41353
* Change internal representation of ConstantFP to use APFloat.Dale Johannesen2007-08-241-33/+33
| | | | | | Interface to rest of the compiler unchanged, as yet. llvm-svn: 41348
* Fix potentially N^2 behavior handling arrays with many of theChris Lattner2007-08-211-8/+35
| | | | | | | same value which get RAUW'd. This speeds up reading the .bc file in PR1616 from 852s to 0.19s on my G5 with a debug build. llvm-svn: 41209
* simplify code, improve a comment.Chris Lattner2007-08-211-6/+6
| | | | llvm-svn: 41205
* Add Type::isIntOrIntVector, like Type::isFPOrFPVector.Dan Gohman2007-08-201-0/+11
| | | | llvm-svn: 41190
* When Intrinsic::getName is constructing names for overloaded intrinsics,Dan Gohman2007-08-201-1/+2
| | | | | | | | use the ValueType name instead of the llvm type name, to match what the verifier expects. For integers these are the same, but for floating-point values the intrinsics use f32/f64 instead of float/double. llvm-svn: 41189
* simplify code and print visibility for declarations.Chris Lattner2007-08-191-25/+21
| | | | llvm-svn: 41173
* Compute the argument list as lazily as possible. This ensures that clientsChris Lattner2007-08-181-7/+24
| | | | | | | | that don't use it don't have to pay the memory cost for the arguments. This allows us to avoid creating Argument nodes for many prototypes and for clients who lazily deserialize code from a bytecode file. llvm-svn: 41166
* use a nicer accessor.Chris Lattner2007-08-181-1/+1
| | | | llvm-svn: 41165
* Fix the verification for overloaded intrinsic types. Check that they areDan Gohman2007-08-161-6/+19
| | | | | | what they're supposed to be before using them. llvm-svn: 41130
* Add MVT::fAny for overloading intrinsics on floating-point types.Dan Gohman2007-08-161-0/+14
| | | | llvm-svn: 41128
* Assert sooner. Fix wordings.Devang Patel2007-08-141-3/+2
| | | | llvm-svn: 41075
* Add methods to erase basic block entry.Devang Patel2007-08-131-0/+24
| | | | llvm-svn: 41052
* Constant fold: getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1)Chris Lattner2007-08-131-1/+23
| | | | | | | | | | | | | | | | | | | | Into: inttoptr (i64 0 to i8*) -> null This occurs in the example in PR1602. With this fixed, we now compile the example in PR1602 into fully "devirtualized" code: define void @_Z1g1S(%struct.S* noalias %s) { entry: %tmp131415 = getelementptr %struct.S* %s, i32 0, i32 0 ; <i32 (...)***> [#uses=1] %tmp16 = load i32 (...)*** %tmp131415, align 4 ; <i32 (...)**> [#uses=1] %tmp26277 = load i32 (...)** %tmp16 ; <i32 (...)*> [#uses=1] %tmp2829 = bitcast i32 (...)* %tmp26277 to void (%struct.S*)* ; <void (%struct.S*)*> [#uses=1] tail call void %tmp2829( %struct.S* %s ) ret void } This still has the vtable dispatch (as required) but does not have any pointer to method cruft left. llvm-svn: 41046
* Do not overuse std::string. Pass around char * directly.Devang Patel2007-08-101-11/+11
| | | | llvm-svn: 41001
* add Value::getNameStart/getNameLen() accessors.Chris Lattner2007-08-101-0/+15
| | | | llvm-svn: 40989
* minor simplifications.Chris Lattner2007-08-101-10/+8
| | | | llvm-svn: 40981
* avoid copying strings.Chris Lattner2007-08-101-4/+4
| | | | llvm-svn: 40980
* Patch 10 for long double. Doing constants right needs expanding ConstantFPDale Johannesen2007-08-091-4/+15
| | | | | | | | | | | | to handle values bigger than double. If we assume host==target and host long double works correctly, this is not too bad, but we don't want to have that limitation longterm. I could implement accepting double constants as long double or something like that, which would lead to incorrect codegen with no errors; the more I think about that the worse it seems. Rather than do such a hack that would be backed out later, I'm settling for giving reasonable error messages, for now. llvm-svn: 40974
* Speed up updateDFSNumbers with two observations:Chris Lattner2007-08-081-22/+17
| | | | | | | | | | | 1. domtree is a tree, not a graph. There is no need to avoid revisiting nodes with a set. 2. the worklist can contain the child iterator pointers so we don't get N^2 rescanning of children. This speeds up updateDFSNumbers significantly, making it basically free. On the testcase in PR1432, this speeds up loopsimplify by another 3x, dropping it from the 12th most expensive pass to the to the 30th. :) It used to be #1. llvm-svn: 40923
* reimplement dfs number computation to be significantly faster. This speeds upChris Lattner2007-08-081-40/+33
| | | | | | | natural loop canonicalization (which does many cfg xforms) by 4.3x, for example. This also fixes a bug in postdom dfnumber computation. llvm-svn: 40920
* 1. Random tidiness cleanupsChris Lattner2007-08-061-47/+44
| | | | | | | | | | | | 2. Make domtree printing print dfin/dfout #'s 3. Fix the Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll failure from last night (in DominanceFrontier::splitBlock). w.r.t. #3, my patches last night happened to expose the bug, but this has been broken since Owen's r35839 patch to LoopSimplify. The code was subsequently moved over from LoopSimplify into Dominators, carrying the latent bug. Fun stuff. llvm-svn: 40858
* Fix minor doxygen nits.Reid Spencer2007-08-051-0/+10
| | | | llvm-svn: 40854
* Fix a doxygen directive.Reid Spencer2007-08-051-1/+1
| | | | llvm-svn: 40849
* Fix an iterator invalidation bug I induced.Chris Lattner2007-08-051-3/+3
| | | | llvm-svn: 40830
* Switch some std::sets to SmallPtrSet. This speeds upChris Lattner2007-08-051-3/+3
| | | | | | domtree by 10% and postdomtree by 17% llvm-svn: 40829
* Switch DomTreeNode::assignDFSNumber from using a std::set to usingChris Lattner2007-08-051-8/+8
| | | | | | a smallptrset. This speeds up domtree by about 15% and postdomtree by 20%. llvm-svn: 40828
* Switch the internal "Info" map from an std::map to a DenseMap. ThisChris Lattner2007-08-051-7/+5
| | | | | | | | speeds up idom by about 45% and postidom by about 33%. Some extra precautions must be taken not to invalidate densemap iterators. llvm-svn: 40827
* switch the DomTreeNodes and IDoms maps in idom/postidom to a Chris Lattner2007-08-041-16/+13
| | | | | | | | DenseMap instead of an std::map. This speeds up postdomtree by about 25% and domtree by about 23%. It also speeds up clients, for example, domfrontier by 11%, mem2reg by 4% and ADCE by 6%. llvm-svn: 40826
* This is the patch to provide clean intrinsic function overloading support in ↵Chandler Carruth2007-08-042-66/+264
| | | | | | | | LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future. This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported. llvm-svn: 40807
* long double patch 3 of N. Add to MVT.Dale Johannesen2007-08-031-50/+57
| | | | llvm-svn: 40793
* Long double, part 1 of N. Support in IR.Dale Johannesen2007-08-031-9/+26
| | | | llvm-svn: 40774
* Update dominator info for the middle blocks created while splitingDevang Patel2007-08-021-1/+9
| | | | | | | | exit edge to preserve LCSSA. Fix dominance frontier update during loop unswitch. This fixes PR 1589, again llvm-svn: 40737
* Undo previous check-in.Devang Patel2007-08-011-9/+1
| | | | llvm-svn: 40698
* Update dominator info for the middle blocks created while splitingDevang Patel2007-08-011-1/+9
| | | | | | | | exit edge to preserve LCSSA. Fix dominance frontier update during loop unswitch. This fixes PR 1589. llvm-svn: 40695
* New CallInst interface to address GLIBCXX_DEBUG errors caused byDavid Greene2007-08-011-6/+7
| | | | | | | | indexing an empty std::vector. Updates to all clients. llvm-svn: 40660
* After a discussion with Anton, it turns out that the InReg attribute is notReid Spencer2007-07-311-1/+2
| | | | | | permitted on function results. So, revert the last patch to make it illegal. llvm-svn: 40632
* The InReg parameter attribute is valid on function results. The llvm-gcc-4.0Reid Spencer2007-07-311-2/+1
| | | | | | | front end converts regparm attribute on the gcc function into InReg attribute on the llvm function. This fixes test/CFrontend/2002-07-30-SubrefSetAssertion.c llvm-svn: 40618
* Fix pastos in comments for doFinalization functions.Dan Gohman2007-07-301-2/+2
| | | | llvm-svn: 40588
* Add facility to dump pass manager structure Devang Patel2007-07-271-0/+12
| | | | | | to make it easier to understand failure. llvm-svn: 40567
* Fix edge cases in handling basic block split.Devang Patel2007-07-271-3/+12
| | | | llvm-svn: 40564
* It seems logical that InReg should be incompatibleDuncan Sands2007-07-271-3/+2
| | | | | | with StructReturn and ByVal, so make it so. llvm-svn: 40554
* As the number of parameter attributes increases,Duncan Sands2007-07-271-39/+55
| | | | | | | | | | | | | | | | | | | | Verifier::visitFunction is suffering a combinatorial explosion due to the number of mutually incompatible attributes. This patch tidies the whole thing up using attribute masks. While there I fixed some small bugs: (1) the ByVal attribute tests cast a type to a pointer type, which can fail. Yes, the fact it is of a pointer type is checked before, but a failing check does not cause the program to exit, it continues on outputting further errors; (2) Nothing was checking that an sret attribute is on the first parameter; (3) nothing was checking that a function for which isStructReturn() is true has a parameter with the sret attribute and vice-versa (I don't think it is possible for this to go wrong, but it seems right to check it). llvm-svn: 40553
OpenPOWER on IntegriCloud