summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Insert ANY_EXTEND node instead of invalid truncate during DAG Combining (X & 1),Anton Korobeynikov2010-05-011-1/+6
| | | | | | when needed. This fixes PR7001 llvm-svn: 102838
* Do folding for indirect branches, where possibleAnton Korobeynikov2010-05-012-7/+4
| | | | llvm-svn: 102836
* Implement indirect branches on MSP430Anton Korobeynikov2010-05-016-8/+50
| | | | llvm-svn: 102835
* Long branch target oparands are not pc-rel.Anton Korobeynikov2010-05-011-4/+6
| | | | | | This should fix PR6603. llvm-svn: 102834
* Disable the call-deletion transformation introduced in r86975. WithoutOwen Anderson2010-05-011-1/+8
| | | | | | | | | | halting analysis, it is illegal to delete a call to a read-only function. The correct solution is almost certainly to add a "must halt" attribute and only allow deletions in its presence. XFAIL the relevant testcase for now. llvm-svn: 102831
* fix PR5009 by making CGSCCPM realize that a call was devirtualizedChris Lattner2010-05-011-5/+36
| | | | | | | if an indirect call site was removed and a direct one was added, not just if an indirect call site was modified to be direct. llvm-svn: 102830
* Remove the code for special-casing byval for fast-isel. SelectionDAGDan Gohman2010-05-012-21/+3
| | | | | | | handles argument lowering anyway, so there's no need for special casing here. llvm-svn: 102828
* Fix an ancient FIXME.Dan Gohman2010-05-011-3/+1
| | | | llvm-svn: 102827
* Re-disable kill flags, as there is more trouble.Dan Gohman2010-05-011-0/+4
| | | | llvm-svn: 102826
* rename InlineInfo.DevirtualizedCalls -> InlinedCalls toChris Lattner2010-05-012-9/+9
| | | | | | | reflect that it includes all inlined calls now, not just devirtualized ones. llvm-svn: 102824
* Implement rdar://6295824 and PR6724 with two tiny changesChris Lattner2010-05-012-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that can have a big effect :). The first is to enable the iterative SCC passmanager juice that kicks in when the scc passmgr detects that a function pass has devirtualized a call. In this case, it will rerun all the passes it manages on the SCC, up to the iteration count limit (4). This is useful because a function pass may devirualize a call, and we want the inliner to inline it, or pruneeh to infer stuff about it, etc. The second patch is to add *all* call sites to the DevirtualizedCalls list the inliner uses. This list is about to get renamed, but the jist of this is that the inliner now reconsiders *all* inlined call sites as candidates for further inlining. The intuition is this that in cases like this: f() { g(1); } g(int x) { h(x); } We analyze this bottom up, and may decide that it isn't profitable to inline H into G. Next step, we decide that it is profitable to inline G into F, and do so, which means that F now calls H. Even though the call from G -> H may not have been profitable to inline, the call from F -> H may be (in this case because a constant allows folding etc). In my spot checks, this doesn't have a big impact on code. For example, the LLC output for 252.eon grew from 0.02% (from 317252 to 317308) and 176.gcc actually shrunk by .3% (from 1525612 to 1520964 bytes). 252.eon never iterated in the SCC Passmgr, 176.gcc iterated at most 1 time. llvm-svn: 102823
* The inliner has traditionally not considered call sitesChris Lattner2010-05-011-9/+48
| | | | | | | | | | | | | | | | | that appear due to inlining a callee as candidates for futher inlining, but a recent patch made it do this if those call sites were indirect and became direct. Unfortunately, in bizarre cases (see testcase) doing this can cause us to infinitely inline mutually recursive functions into callers not in the cycle. Fix this by keeping track of the inline history from which callsite inline candidates got inlined from. This shouldn't affect any "real world" code, but is required for a follow on patch that is coming up next. llvm-svn: 102822
* Re-enable kill flags from SelectionDAGISel, with a fix: don'tDan Gohman2010-05-011-5/+1
| | | | | | try to put a kill flag on a DBG_INFO instruction. llvm-svn: 102820
* Fix a bug where debug info affected stack slot coloring.Dale Johannesen2010-05-011-1/+2
| | | | | | | Seen in SingleSrc/Benchmarks/Misc/flops with TEST=optllcdbg. 7929951. llvm-svn: 102819
* Fix whitespace.Dan Gohman2010-05-011-1/+1
| | | | llvm-svn: 102817
* Don't pass SDValues by non-const reference unless they may beDan Gohman2010-05-012-2/+3
| | | | | | modified. llvm-svn: 102816
* Reorgnaize more switch code lowering to clean up some trickyDan Gohman2010-05-012-22/+22
| | | | | | | | | | | code, and to eliminate the need for the SelectionDAGBuilder state to be live during CodeGenAndEmitDAG calls. Call SDB->clear() before CodeGenAndEmitDAG calls instead of before it, and move the CurDAG->clear() out of SelectionDAGBuilder, which doesn't own the DAG, and into CodeGenAndEmitDAG. llvm-svn: 102814
* Delete the EdgeMapping variable itself.Dan Gohman2010-05-012-5/+0
| | | | llvm-svn: 102810
* Get rid of the EdgeMapping map. Instead, just check for BasicBlockDan Gohman2010-05-0130-160/+79
| | | | | | changes before doing phi lowering for switches. llvm-svn: 102809
* Fix a typo.Dan Gohman2010-04-301-1/+1
| | | | llvm-svn: 102799
* Dan recently disabled recursive inlining within a function, but weChris Lattner2010-04-301-1/+9
| | | | | | | | | | | | | | | | | | were still inlining self-recursive functions into other functions. Inlining a recursive function into itself has the potential to reduce recursion depth by a factor of 2, inlining a recursive function into something else reduces recursion depth by exactly 1. Since inlining a recursive function into something else is a weird form of loop peeling, turn this off. The deleted testcase was added by Dale in r62107, since then we're leaning towards not inlining recursive stuff ever. In any case, if we like inlining recursive stuff, it should be done within the recursive function itself to get the algorithm recursion depth win. llvm-svn: 102798
* EXTRACT_VECTOR_ELT of an INSERT_VECTOR_ELT may have the same index, but theBill Wendling2010-04-301-8/+13
| | | | | | | | indexes could be of a different value type. Or not even using the same SDNode for the constant (weird, I know). Compare the actual values instead of the pointers. llvm-svn: 102791
* Remove this debug output. The MachineFunction will be printed once all ofDan Gohman2010-04-301-3/+0
| | | | | | | instruction selection is done; it's confusing to see parts of it printed, while other parts are omitted, along the way. llvm-svn: 102771
* The local register allocator has to spill dirty callee saved registers before aJakob Stoklund Olesen2010-04-301-6/+33
| | | | | | | | | | call that might throw. The landing pad assumes that all registers are in stack slots. We used to spill those dirty CSRs after the call, and the stack slots would be wrong when arriving at the landing pad. llvm-svn: 102770
* Preserve debug info attached with call instruction while eliminating dead ↵Devang Patel2010-04-301-0/+6
| | | | | | | | argument. Radar 7927803 llvm-svn: 102760
* Make this code less confusing. Instead of reassigning BB, just operateDan Gohman2010-04-301-7/+3
| | | | | | | on the original variables, so it's easier to see what is being done to which blocks. llvm-svn: 102759
* Attach AT_APPLE_optimized attribute to optimized function's debug info.Devang Patel2010-04-302-10/+23
| | | | llvm-svn: 102743
* EmitDbgValue doesn't need its EdgeMapping argument.Dan Gohman2010-04-303-12/+10
| | | | llvm-svn: 102742
* Set isSigned to true when creating an all-ones integer constant, evenDan Gohman2010-04-301-4/+4
| | | | | | | for unsigned purposes, so >64-bit integer values get a full all-ones value. llvm-svn: 102739
* Silence compiler warnings.Dan Gohman2010-04-301-4/+4
| | | | llvm-svn: 102734
* Add lint checks for invalid uses of memory.Dan Gohman2010-04-301-19/+59
| | | | llvm-svn: 102733
* Remove the -disable-16bit command-line option, which is now obsolete.Dan Gohman2010-04-303-53/+7
| | | | llvm-svn: 102730
* Don't use floating point in SimpleRegisterCoalescing.Jakob Stoklund Olesen2010-04-301-15/+10
| | | | | | Rounding differences causes tests to fail on Linux. llvm-svn: 102729
* Apply a patch from Jan Sjodin to fix a compiler abort on vectorDan Gohman2010-04-301-9/+24
| | | | | | | comparisons sign-extended to a different bitwidth than the comparison operands. llvm-svn: 102721
* Another sibcall bug. If caller and callee calling conventions differ, then ↵Evan Cheng2010-04-301-3/+35
| | | | | | it's only safe to do a tail call if the results are returned in the same way. llvm-svn: 102683
* Temporarily disable SelectionDAG kill flags, which are causing trouble.Dan Gohman2010-04-301-0/+4
| | | | llvm-svn: 102680
* Fix the OProfileJITEventListener build after r101844 removedJeffrey Yasskin2010-04-301-19/+36
| | | | | | | | MachineFunction::DefaultDebugLoc. We now use the same technique as DwarfDebug::beginFunction to find the starting line number for a function. llvm-svn: 102679
* Set register kill flags on the SelectionDAG path, at least in theDan Gohman2010-04-301-1/+12
| | | | | | easy cases. llvm-svn: 102678
* Reject really weird coalescer case when trying to merge identical subregistersJakob Stoklund Olesen2010-04-291-0/+7
| | | | | | | | | | | | | of different register classes. e.g. %reg1048:3<def> = EXTRACT_SUBREG %RAX<kill>, 3 Where %reg1048 is a GR32 register. This is not impossible to handle, but it is pretty hard and very rare. This should unbreak the dragonegg builder. llvm-svn: 102672
* Don't leave Base.FrameIndex uninitialized, so that it doesn'tDan Gohman2010-04-291-34/+33
| | | | | | print randomly in debug output. llvm-svn: 102668
* Fix typos in assertion strings.Dan Gohman2010-04-291-2/+2
| | | | llvm-svn: 102666
* Slightly verboser debug spew from coalescerJakob Stoklund Olesen2010-04-292-26/+25
| | | | llvm-svn: 102663
* Refactor.Devang Patel2010-04-292-4/+13
| | | | llvm-svn: 102661
* Make naked functions work on PPC.Dale Johannesen2010-04-292-1/+11
| | | | llvm-svn: 102657
* Print variable scope name in DEBUG_VALUE comment. Useful in some cases. e.g.Devang Patel2010-04-292-0/+4
| | | | | | | | | | ##DEBUG_VALUE: runOnMachineFunction:this <- RDI+0 ##DEBUG_VALUE: runOnMachineFunction:fn <- RSI+0 ##DEBUG_VALUE: DeadDefs <- undef ## SimpleRegisterCoalescing.cpp:2706 ##DEBUG_VALUE: getRegInfo:this <- [%rsp+$56]+$0 ##DEBUG_VALUE: getTarget:this <- [%rsp+$56]+$0 llvm-svn: 102655
* Remove DBG_VALUE which reference dead stack slots.Evan Cheng2010-04-291-2/+19
| | | | llvm-svn: 102654
* DO not push DBG_VALUE machine instructions for inlined fuction arguments in ↵Devang Patel2010-04-291-0/+7
| | | | | | entry block. llvm-svn: 102653
* Verify metadata harder. In particular, check that moduleDuncan Sands2010-04-291-39/+60
| | | | | | | level metadata does not have any function local operands. This would have caught the problem found in PR6112. llvm-svn: 102620
* Add comment.Evan Cheng2010-04-291-0/+2
| | | | llvm-svn: 102606
* Re-enable 102565 with fixes.Evan Cheng2010-04-292-14/+8
| | | | llvm-svn: 102602
OpenPOWER on IntegriCloud