summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove alloca tracking from nocapture analysis. Not onlyDuncan Sands2009-01-071-69/+16
| | | | | | | | | | was it not very helpful, it was also wrong! The problem is shown in the testcase: the alloca might be passed to a nocapture callee which dereferences it and returns the original pointer. But because it was a nocapture call we think we don't need to track its uses, but we do. llvm-svn: 61876
* Reorder these.Duncan Sands2009-01-071-24/+24
| | | | llvm-svn: 61873
* Use a switch rather than a sequence of "isa" tests.Duncan Sands2009-01-071-16/+32
| | | | llvm-svn: 61872
* The verifier checks that the aliasee is not null.Duncan Sands2009-01-071-2/+1
| | | | llvm-svn: 61870
* Implement the first half of PR3290: if there is a store of an Chris Lattner2009-01-071-5/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | integer to a (transitive) bitcast the alloca and if that integer has the full size of the alloca, then it clobbers the whole thing. Handle this by extracting pieces out of the stored integer and filing them away in the SROA'd elements. This triggers fairly frequently because the CFE uses integers to pass small structs by value and the inliner exposes these. For example, in kimwitu++, I see a bunch of these with i64 stores to "%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>" In 176.gcc I see a few i32 stores to "%struct..0anon". In the testcase, this is a difference between compiling test1 to: _test1: subl $12, %esp movl 20(%esp), %eax movl %eax, 4(%esp) movl 16(%esp), %eax movl %eax, (%esp) movl (%esp), %eax addl 4(%esp), %eax addl $12, %esp ret vs: _test1: movl 8(%esp), %eax addl 4(%esp), %eax ret The second half of this will be to handle loads of the same form. llvm-svn: 61853
* Factor a bunch of code out into a helper method.Chris Lattner2009-01-071-148/+156
| | | | llvm-svn: 61852
* use continue to simplify code and reduce nesting, no functionalityChris Lattner2009-01-071-38/+58
| | | | | | change. llvm-svn: 61851
* Get TargetData once up front and cache as an ivar instead ofChris Lattner2009-01-071-45/+38
| | | | | | requerying it all over the place. llvm-svn: 61850
* Use the hasAllZeroIndices predicate to simplify some Chris Lattner2009-01-071-28/+6
| | | | | | code, no functionality change. llvm-svn: 61849
* The coalescer does not coalesce a virtual register to a physical register if ↵Evan Cheng2009-01-072-20/+84
| | | | | | | | | | | | | | any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away: v1024 = EDI // not killed = = EDI One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead. This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions. llvm-svn: 61847
* Add patterns to match conditional moves with loads foldedDan Gohman2009-01-072-1/+101
| | | | | | | into their left operand, rather than their right. Do this by commuting the operands and inverting the condition. llvm-svn: 61842
* Add load-folding table entries for cmovno too.Dan Gohman2009-01-071-0/+3
| | | | llvm-svn: 61841
* Define instructions for cmovo and cmovno.Dan Gohman2009-01-073-9/+90
| | | | llvm-svn: 61836
* X86_COND_C and X86_COND_NC are alternate mnemonics forDan Gohman2009-01-075-66/+29
| | | | | | X86_COND_B and X86_COND_AE, respectively. llvm-svn: 61835
* Improve support for type-generic vector intrinsics by teaching TableGen howBob Wilson2009-01-071-1/+27
| | | | | | | | to handle LLVMMatchType intrinsic parameters, and by adding new subclasses of LLVMMatchType to match vector types with integral elements that are either twice as wide or half as wide as the elements of the matched type. llvm-svn: 61834
* Revert r42653 and forward-port the code that lets INC64_32r beDan Gohman2009-01-061-2/+4
| | | | | | | | | | | | converted to LEA64_32r in x86's convertToThreeAddress. This replaces code like this: movl %esi, %edi inc %edi with this: lea 1(%rsi), %edi which appears to be beneficial. llvm-svn: 61830
* CellSPU:Scott Michel2009-01-067-61/+38
| | | | | | | - Add preliminary support for v2i32; load/store generates the right code but there's a lot work to be done to make this vector type operational. llvm-svn: 61829
* Fix a bug in ComputeLinearIndex computation handling multi-levelDan Gohman2009-01-061-1/+3
| | | | | | | | aggregate types. Don't increment the current index after reaching the end of a struct, as it will already be pointing at one-past-the end. This fixes PR3288. llvm-svn: 61828
* Set up DwarfDebug using DebugInfo API.Devang Patel2009-01-061-0/+33
| | | | llvm-svn: 61822
* Forgot that this was needed for Linux. This should fix the builds.Bill Wendling2009-01-061-2/+2
| | | | llvm-svn: 61819
* The phi construction algorithm used for interval reconstruction is ↵Owen Anderson2009-01-061-13/+27
| | | | | | | | | | | complicated by two address instructions. We need to keep track of things we've processed AS USES independetly of whether we've processed them as defs. This fixes all known miscompilations when reconstruction is turned on. llvm-svn: 61802
* CellSPU: Update the READMEScott Michel2009-01-061-7/+18
| | | | llvm-svn: 61785
* CellSPU:Scott Michel2009-01-066-57/+213
| | | | | | | | | | | | - Fix bugs 3194, 3195: i128 load/stores produce correct code (although, we need to ensure that i128 is 16-byte aligned in real life), and 128 zero- extends are supported. - New td file: SPU128InstrInfo.td: this is where all new i128 support should be put in the future. - Continue to hammer on i64 operations and test cases; ensure that the only remaining problem will be i64 mul. llvm-svn: 61784
* Update these argument lists for the isNormalMemoryDan Gohman2009-01-061-3/+6
| | | | | | argument. This doesn't affect current functionality. llvm-svn: 61779
* Use a latency value of 0 for the artificial edges inserted byDan Gohman2009-01-061-1/+1
| | | | | | | | | | | | AddPseudoTwoAddrDeps. This lets the scheduling infrastructure avoid recalculating node heights. In very large testcases this was a major bottleneck. Thanks to Roman Levenstein for finding this! As a side effect, fold-pcmpeqd-0.ll is now scheduled better and it no longer requires spilling on x86-32. llvm-svn: 61778
* Change m_ConstantInt and m_SelectCst to take their constant integersChris Lattner2009-01-051-9/+9
| | | | | | | as template arguments instead of as instance variables, exposing more optimization opportunities to the compiler earlier. llvm-svn: 61776
* Construct subprogram DIEs using DebugInfo.Devang Patel2009-01-051-0/+39
| | | | llvm-svn: 61772
* Construct global variable DIEs using DebugInfo.Devang Patel2009-01-051-1/+48
| | | | llvm-svn: 61771
* Construct compile unit dies using DebugInfo.Devang Patel2009-01-051-1/+70
| | | | llvm-svn: 61768
* Revert r61415 and r61484. Duncan was correct that these weren't needed.Bill Wendling2009-01-053-22/+6
| | | | llvm-svn: 61765
* Don't call setDepthDirty/setHeightDirty when adding an edgeDan Gohman2009-01-051-4/+8
| | | | | | with latency 0, since it doesn't affect the depth or height. llvm-svn: 61762
* Extract source location info from DebugInfo.Devang Patel2009-01-051-0/+78
| | | | | | Add methods to add source location info in a DIE. llvm-svn: 61761
* Add type DIEs using DebugInfo.Devang Patel2009-01-051-9/+79
| | | | llvm-svn: 61757
* Teach the internalize pass to also internalizeDuncan Sands2009-01-051-0/+12
| | | | | | global aliases. llvm-svn: 61754
* When checking if an Argument escapes, check ifDuncan Sands2009-01-051-7/+13
| | | | | | | | the argument is marked nocapture - no need to analyze the argument if the answer is already known! llvm-svn: 61753
* Find loop back edges only after empty blocks are eliminated.Evan Cheng2009-01-051-2/+3
| | | | llvm-svn: 61752
* Not having an aliasee is a theoretical possibility.Duncan Sands2009-01-051-1/+2
| | | | llvm-svn: 61745
* Format more neatly.Duncan Sands2009-01-051-1/+1
| | | | llvm-svn: 61744
* Remove trailing spaces.Duncan Sands2009-01-051-10/+10
| | | | llvm-svn: 61743
* Delete unused global aliases with internal linkage.Duncan Sands2009-01-051-8/+23
| | | | | | | | In fact this also deletes those with linkonce linkage, however this is currently dead because for the moment aliases aren't allowed to have this linkage type. llvm-svn: 61742
* Construct composite type DIE using DebugInfo.Devang Patel2009-01-051-4/+83
| | | | llvm-svn: 61741
* Add classof() methods so that dwarf writer can decide what DIDescriptor is ↵Devang Patel2009-01-051-0/+5
| | | | | | in its hand. llvm-svn: 61740
* TargetLowering.h #includes SelectionDAGNodes.h, so it doesn't need itsDan Gohman2009-01-051-2/+0
| | | | | | | own OpActionsCapacity magic number; it can just use ISD::BUILTIN_OP_END, as long as it takes care to round up when needed. llvm-svn: 61733
* s/ConstructType/ConstructTypeDIE/gDevang Patel2009-01-051-6/+6
| | | | llvm-svn: 61731
* Construct stuct field DIEs.Devang Patel2009-01-051-0/+78
| | | | llvm-svn: 61729
* fix wordoChris Lattner2009-01-051-1/+1
| | | | llvm-svn: 61728
* Remove redundant ValID::ValID:: scoping (doesn't compile on Windows).Steve Naroff2009-01-051-1/+1
| | | | llvm-svn: 61727
* Construct enumerator DIE using DebugInfo.Devang Patel2009-01-051-0/+11
| | | | llvm-svn: 61726
* Reject PR3281:accepted03.ll with:Chris Lattner2009-01-052-6/+11
| | | | | | | | llvm-as: accepted03.ll:1:35: invalid unresolved type up reference declare void @r({ \7, opaque, \10 } %su) ^ llvm-svn: 61725
* Construct array/vector type DIEs using DebugInfo.Devang Patel2009-01-052-1/+46
| | | | llvm-svn: 61724
OpenPOWER on IntegriCloud