summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
Commit message (Collapse)AuthorAgeFilesLines
* Put FN_NOTE_AlwaysInline and others in FnAttr namespace.Devang Patel2008-09-241-1/+1
| | | | llvm-svn: 56527
* Move FN_NOTE_AlwaysInline and other out of ParamAttrs namespace.Devang Patel2008-09-231-1/+1
| | | | | | Do not check isDeclaration() in hasNote(). It is clients' responsibility. llvm-svn: 56524
* s/ParameterAttributes/Attributes/gDevang Patel2008-09-231-1/+1
| | | | llvm-svn: 56513
* Use parameter attribute store (soon to be renamed) forDevang Patel2008-09-231-1/+1
| | | | | | Function Notes also. Function notes are stored at index ~0. llvm-svn: 56511
* Add hasNote() to check note associated with a function.Devang Patel2008-09-221-1/+1
| | | | llvm-svn: 56477
* Initial support for the CMake build system.Oscar Fuentes2008-09-221-0/+26
| | | | llvm-svn: 56419
* Try to place hoisted instructions befoe icmp instruction.Devang Patel2008-09-181-2/+23
| | | | llvm-svn: 56315
* Do not hoist instruction above branch condition. The instruction may use ↵Devang Patel2008-09-171-9/+2
| | | | | | branch condition. llvm-svn: 56286
* Fix simplifycfg crash in handing block merge.Devang Patel2008-09-091-1/+11
| | | | llvm-svn: 55971
* Reapply 55859. This doesn't change anything asDuncan Sands2008-09-081-6/+7
| | | | | | | long as the callgraph is correct. It checks for wrong callgraphs more strictly. llvm-svn: 55894
* Revert r55859. This is breaking the build in the abscence of its companion ↵Owen Anderson2008-09-051-7/+6
| | | | | | commit. llvm-svn: 55865
* Delete the removeCallEdgeTo callgraph method,Duncan Sands2008-09-051-6/+7
| | | | | | | | | | | | | | | because it does not maintain a correct list of callsites. I discovered (see following commit) that the inliner will create a wrong callgraph if it is fed a callgraph with correct edges but incorrect callsites. These were created by Prune-EH, and while it wasn't done via removeCallEdgeTo, it could have been done via removeCallEdgeTo, which is an accident waiting to happen. Use removeCallEdgeFor instead. llvm-svn: 55859
* Remove trailing whitespace.Duncan Sands2008-09-051-36/+36
| | | | llvm-svn: 55835
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-047-7/+7
| | | | llvm-svn: 55779
* Handle "always inline" note during inline cost analysis.Devang Patel2008-09-031-0/+3
| | | | llvm-svn: 55712
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. llvm-svn: 55263
* Add a new trivial -inst-namer pass which makes it possible to diff theChris Lattner2008-08-231-0/+49
| | | | | | before/after effects of a pass, crazy! llvm-svn: 55230
* Rename some GC classes so that their roll will hopefully be clearer.Gordon Henriksen2008-08-171-4/+4
| | | | | | | | | | | | | | | | | | In particular, Collector was confusing to implementors. Several thought that this compile-time class was the place to implement their runtime GC heap. Of course, it doesn't even exist at runtime. Specifically, the renames are: Collector -> GCStrategy CollectorMetadata -> GCFunctionInfo CollectorModuleMetadata -> GCModuleInfo CollectorRegistry -> GCRegistry Function::getCollector -> getGC (setGC, hasGC, clearGC) Several accessors and nested types have also been renamed to be consistent. These changes should be obvious. llvm-svn: 54899
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-171-5/+3
| | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. llvm-svn: 54873
* Use empty() instead of begin() == end().Dan Gohman2008-08-141-1/+1
| | | | llvm-svn: 54780
* Enable first-class aggregates support.Dan Gohman2008-07-234-152/+55
| | | | | | | | | | | | Remove the GetResultInst instruction. It is still accepted in LLVM assembly and bitcode, where it is now auto-upgraded to ExtractValueInst. Also, remove support for return instructions with multiple values. These are auto-upgraded to use InsertValueInst instructions. The IRBuilder still accepts multiple-value returns, and auto-upgrades them to InsertValueInst instructions. llvm-svn: 53941
* Reapply r53735. My last patch fixed the failures Dan observed.Owen Anderson2008-07-181-52/+9
| | | | llvm-svn: 53761
* Add some checks that got lost in the shuffle. This fixes 464.h264ref.Owen Anderson2008-07-181-0/+4
| | | | llvm-svn: 53760
* Revert r53735. It broke SPEC 464.h264ref.Dan Gohman2008-07-181-9/+52
| | | | llvm-svn: 53757
* Use MergeBlockIntoPredecessor to simplify some code.Owen Anderson2008-07-171-52/+9
| | | | llvm-svn: 53735
* Make MergeBlockIntoPredecessor more aggressive when the same successor appearsOwen Anderson2008-07-171-5/+24
| | | | | | more than once. llvm-svn: 53731
* Inliner tweak. Function calls should cost more than one instruction!Evan Cheng2008-07-171-0/+5
| | | | llvm-svn: 53712
* Factor MergeBlockIntoPredecessor out into BasicBlockUtils.Owen Anderson2008-07-171-0/+52
| | | | llvm-svn: 53705
* Reapply r53540, now with the matching header!Chris Lattner2008-07-141-1/+23
| | | | llvm-svn: 53557
* Revert r53540 - it does not compile.Duncan Sands2008-07-141-23/+1
| | | | llvm-svn: 53549
* If a function calls setjmp, never inline it into other functions. This isChris Lattner2008-07-141-1/+23
| | | | | | | a hack around the fact that we don't represent the CFG correctly for sj/lj. It fixes PR2486. llvm-svn: 53540
* simplify some code, shuffle and insertelt always return a vector.Chris Lattner2008-07-141-2/+1
| | | | llvm-svn: 53538
* Fix mishandling of the infinite loop case when merging two blocks. ThisChris Lattner2008-07-131-17/+26
| | | | | | fixes PR2540. llvm-svn: 53533
* more refactoring. Use early exits instead of really complex logic.Chris Lattner2008-07-131-109/+98
| | | | | | No functionality change. llvm-svn: 53532
* improve comments.Chris Lattner2008-07-131-2/+4
| | | | llvm-svn: 53531
* factor another large hunk of code out into its own function. Chris Lattner2008-07-131-155/+172
| | | | | | No functionality change. llvm-svn: 53530
* Final bit of simplification for FoldBranchToCommonDest.Chris Lattner2008-07-131-32/+34
| | | | llvm-svn: 53528
* simplify logic a bitChris Lattner2008-07-131-9/+10
| | | | llvm-svn: 53527
* Refactor some code out into its own helper function, getting rid of crazy ↵Chris Lattner2008-07-131-54/+84
| | | | | | | | | | multiline conditionals and commenting the code better. No functionality change. llvm-svn: 53526
* - Use O(1) check of basic block size limit.Evan Cheng2008-06-251-4/+8
| | | | | | - Avoid speculatively execute vector ops. llvm-svn: 52703
* Revert 52645, the loop unroller changes. It caused a regression in 252.eon.Dan Gohman2008-06-241-120/+103
| | | | llvm-svn: 52688
* Revamp the loop unroller, extending it to correctly update PHI nodesDan Gohman2008-06-231-103/+120
| | | | | | | | in the presence of out-of-loop users of in-loop values and the trip count is not a known multiple of the unroll count, and to be a bit simpler overall. This fixes PR2253. llvm-svn: 52645
* Use Loop::block_iterator.Dan Gohman2008-06-221-2/+3
| | | | llvm-svn: 52616
* Use Instruction::eraseFromParent().Dan Gohman2008-06-213-7/+7
| | | | llvm-svn: 52606
* Fix warning when assertions disabled.Chris Lattner2008-06-211-1/+1
| | | | llvm-svn: 52590
* Clean up a use of std::distance.Dan Gohman2008-06-201-2/+1
| | | | llvm-svn: 52544
* Teach InlineFunction how to differentiate between multiple-valueDan Gohman2008-06-201-2/+10
| | | | | | | return statements and aggregate returns so that it handles both correctly. llvm-svn: 52519
* Delete dead code.Dan Gohman2008-06-191-4/+0
| | | | llvm-svn: 52494
* Do not speculatively execute an instruction by hoisting it to its ↵Evan Cheng2008-06-121-2/+16
| | | | | | predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block. llvm-svn: 52244
* For now, avoid generating FP select instructions in order to speculatively ↵Evan Cheng2008-06-111-4/+9
| | | | | | | | execute integer arithmetic instructions. FP selects are more likely to be expensive (even compared to branch on fcmp). This is not a wonderful solution but I rather err on the side of conservative. This fixes the heapsort performance regressions. llvm-svn: 52224
OpenPOWER on IntegriCloud