summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use the SCEVAddRecExpr::getPostIncExpr utility function insteadDan Gohman2010-05-041-4/+2
| | | | | | of doing the same thing manually. llvm-svn: 102997
* Fix a copy+pasto.Dan Gohman2010-05-041-2/+2
| | | | llvm-svn: 102996
* Do not ignore debug loc attached with llvm.dbg.declare while collecting ↵Devang Patel2010-05-041-3/+1
| | | | | | debug info used by a module. llvm-svn: 102995
* Instruction selection optimizations may have moved the def of a function ↵Evan Cheng2010-05-041-1/+2
| | | | | | argument out of the entry block. rdar://7937489 llvm-svn: 102993
* Fix to r102952. The MOV64toSDrm record in X86Instr64bit.td needed the opcodeKevin Enderby2010-05-041-1/+1
| | | | | | changed to 0x7E from 0x6E as well as the previous change of RPDI to S3SI. llvm-svn: 102991
* llvm-mc: Fix case were we would skip a line in the .s file after an instructionDaniel Dunbar2010-05-042-27/+28
| | | | | | | | match failure. Also, fixes a few memory leak FIXMEs. llvm-svn: 102986
* Teach scheduler about REG_SEQUENCE.Evan Cheng2010-05-042-2/+44
| | | | llvm-svn: 102984
* Re-enable isel kill flags, now that the local allocator is ignoring them.Dan Gohman2010-05-041-4/+0
| | | | llvm-svn: 102981
* rdar://7937137 - dbg values not being handled in thumb1 version ofJim Grosbach2010-05-041-0/+7
| | | | | | eliminateFrameIndex(), leading to llvm_unreachable() assertion failure. llvm-svn: 102980
* Remove preexisting kill flags in RegAllocLocal, just like LiveVariables does.Jakob Stoklund Olesen2010-05-031-1/+4
| | | | | | | This should make it possible to start producing kill flags in isel without breaking stuff. llvm-svn: 102976
* Factor out FastISel's code for materializing constants and other valuesDan Gohman2010-05-031-1/+10
| | | | | | | in registers into a separate function to de-couple it from the top-down-specific logic in getRegForValue. llvm-svn: 102975
* Implement builtin_return_address(x) and builtin_frame_address(x) Dale Johannesen2010-05-031-23/+34
| | | | | | on PPC for x!=0. 7624113. llvm-svn: 102972
* Remove the API compatibility layer which converted add, sub, and mulDan Gohman2010-05-033-34/+27
| | | | | | | | to fadd, fsub, and fmul, when used with a floating-point type. LLVM has supported the new instructions since 2.6, so it's time to get on board. llvm-svn: 102971
* Check that subregisters don't have independent values in ↵Jakob Stoklund Olesen2010-05-031-3/+14
| | | | | | | | RemoveCopyByCommutingDef(). This fixes PR6941. llvm-svn: 102970
* Reword a comment slightly.Eric Christopher2010-05-031-1/+1
| | | | llvm-svn: 102966
* Use getConstant instead of getIntegerSCEV. The two are basically theDan Gohman2010-05-034-44/+43
| | | | | | same, now that getConstant has overloads consistent with ConstantInt::get. llvm-svn: 102965
* Print basic block numbers in live interval debug output. Since the rest of theBob Wilson2010-05-031-1/+2
| | | | | | | | debug output is showing machine instructions, the IR-level basic block names aren't very meaningful, and because multiple machine basic blocks may be derived from one IR-level BB, they're also not unique. llvm-svn: 102960
* Fix function prototype mismatch in LLVMUnionType(). Fixes PR7019.Nick Lewycky2010-05-031-2/+1
| | | | llvm-svn: 102959
* Changed llvm-mc to use the same suffixes with floating point compareKevin Enderby2010-05-031-6/+6
| | | | | | | instructions as the Mac OS X darwin assembler. Some of which like 'fcoml' assembled to different opcodes. While some of the suffixes were just different. llvm-svn: 102958
* Fixed the encoding of two of the X86 movq instuctions. The Move quadword fromKevin Enderby2010-05-032-2/+2
| | | | | | | mm to mm/m64 and the Move quadword from xmm2/mem64 to xmm1 had the incorrect encodings. llvm-svn: 102952
* Fixed the encoding of the x86 push instructions. Using a 32-bit immediate valueKevin Enderby2010-05-031-4/+4
| | | | | | | | | | caused the a pushl instruction to be incorrectly encoding using only two bytes of immediate, causing the following 2 instruction bytes to be part of the 32-bit immediate value. Also fixed the one byte form of push to be used when the immediate would fit in a signed extended byte. Lastly changed the names to not include the 32 of PUSH32 since they actually push the size of the stack pointer. llvm-svn: 102951
* Silence warnings about -1 being converted to an unsigned value.Dan Gohman2010-05-031-6/+6
| | | | | | | | Also, pass true for isSigned even when creating constants for unsigned comparisons, because the point is to create an all-ones constant, rather than UINT64_MAX, even for integers wider than 64 bits. llvm-svn: 102946
* Add an option, defaulting to off, to disable the sse domain crossing opts.Eric Christopher2010-05-031-1/+8
| | | | llvm-svn: 102941
* Check for side effects before splitting loop.Devang Patel2010-05-031-0/+19
| | | | | | Patch by Jakub Staszak! llvm-svn: 102928
* Use isTrueWhenEqual and isFalseWhenEqual instead of assuming thatDan Gohman2010-05-031-2/+2
| | | | | | | | SimplifyICmpOperands will simplify such cases to EQ or NE. This makes the correcntess of the code independent on SimplifyICmpOperands doing certain simplifications. llvm-svn: 102927
* In ScalarEvolution::print, don't bother printing out the SCEVs forDan Gohman2010-05-031-1/+1
| | | | | | | comparison instructions, since they aren't interesting, despite having integer result types. llvm-svn: 102925
* In SimplifyICmpOperands, avoid needlessly swapping the operands in theDan Gohman2010-05-031-3/+6
| | | | | | case where both are addrecs in unrelated loops. llvm-svn: 102924
* Factor out the new <= and >= analysis code into SimplifyICmpOperands.Dan Gohman2010-05-031-51/+62
| | | | llvm-svn: 102922
* Fix a bug which prevented tail merging of return instructions inDan Gohman2010-05-031-24/+5
| | | | | | | | | | | | | | | | | | | | beneficial cases. See the changes in test/CodeGen/X86/tail-opts.ll and test/CodeGen/ARM/ifcvt2.ll for details. The fix is to change HashEndOfMBB to hash at most one instruction, instead of trying to apply heuristics about when it will be profitable to consider more than one instruction. The regular tail-merging heuristics are already prepared to handle the same cases, and they're more precise. Also, make test/CodeGen/ARM/ifcvt5.ll and test/CodeGen/Thumb2/thumb2-branch.ll slightly more complex so that they continue to test what they're intended to test. And, this eliminates the problem in test/CodeGen/Thumb2/2009-10-15-ITBlockBranch.ll, the testcase from PR5204. Update it accordingly. llvm-svn: 102907
* Add a README entry.Dan Gohman2010-05-031-0/+13
| | | | llvm-svn: 102906
* Remove the -enable-sjlj-eh option, which doesn't do anything.Duncan Sands2010-05-022-13/+7
| | | | | | | Remove the -enable-eh option which is only used by the JIT, and replace it with -jit-enable-eh. llvm-svn: 102865
* fix some inconsistent line endings, patch by Jakub Staszak!Chris Lattner2010-05-014-28/+28
| | | | llvm-svn: 102852
* revert r102831. We already delete dead readonly calls inChris Lattner2010-05-011-8/+1
| | | | | | | other places, killing a valid transformation is not the right answer. llvm-svn: 102850
* Don't count debug info as instructions. This wasDale Johannesen2010-05-011-1/+2
| | | | | | | | preventing the emission of the NOP on Darwin for a function with no actual code. From timberwolfmc with TEST=optllcdbg. llvm-svn: 102843
* Added a variant of InlineCostAnalyzer::getInlineCost() that takes the called ↵David Chisnall2010-05-011-3/+9
| | | | | | function as an explicit argument, for use when inlining function pointers. llvm-svn: 102841
* 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
OpenPOWER on IntegriCloud