aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Move the N->use_empty() assert from DeleteNode toDan Gohman2009-01-251-3/+2
| | | | | | | | DeleteNodeNotInCSEMaps, since DeleteNode just calls DeleteNodeNotInCSEMaps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62962 91177308-0d34-0410-b5e6-96231b3b80d8
* Reality-check the FAQ entry for "Can I use LLVM to convert C++ to C?"Dan Gohman2009-01-251-12/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62961 91177308-0d34-0410-b5e6-96231b3b80d8
* Start generating arbitrary precision integer SCEVs. This removes the temporaryNick Lewycky2009-01-251-11/+1
| | | | | | | code that rounded up and capped the size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62958 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually run the test in this directory.Nick Lewycky2009-01-251-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62957 91177308-0d34-0410-b5e6-96231b3b80d8
* The function that does nothing but call malloc is noalias return.Nick Lewycky2009-01-252-5/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62956 91177308-0d34-0410-b5e6-96231b3b80d8
* Private linkage support for PPC / Darwin.Evan Cheng2009-01-252-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62955 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach 2addr pass to be do more commuting. If both uses of a two-address ↵Evan Cheng2009-01-255-9/+132
| | | | | | | | | | | | | | | | | | | | | | instruction are killed, but the first operand has a use before and after the def, commute if the second operand does not suffer from the same issue. %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1028 %reg1030<def> = ADD8rr %reg1028<kill>, %reg1029<kill>, %EFLAGS<imp-def,dead> In this case, it might not be possible to coalesce the second MOV8rr instruction if the first one is coalesced. So it would be profitable to commute it: %reg1028<def> = EXTRACT_SUBREG %reg1027<kill>, 1 %reg1029<def> = MOV8rr %reg1028 %reg1029<def> = SHR8ri %reg1029, 7, %EFLAGS<imp-def,dead> insert => %reg1030<def> = MOV8rr %reg1029 %reg1030<def> = ADD8rr %reg1029<kill>, %reg1028<kill>, %EFLAGS<imp-def,dead> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62954 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an indent and a typo.Nate Begeman2009-01-242-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62940 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert previous change; even this mild and clearlyDale Johannesen2009-01-241-7/+4
| | | | | | | | | more accurate change loses more than it gains on benchmarks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62938 91177308-0d34-0410-b5e6-96231b3b80d8
* add note about possible GEP improvement with fields of size 0.Torok Edwin2009-01-241-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62925 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a PR comment to this test.Dan Gohman2009-01-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62921 91177308-0d34-0410-b5e6-96231b3b80d8
* testcase for PR3381.Torok Edwin2009-01-242-1/+19
| | | | | | | Also it was an empty struct, not a void after all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62920 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more documentation mentioning the limitations due to PR2660.Dan Gohman2009-01-241-2/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62919 91177308-0d34-0410-b5e6-96231b3b80d8
* void* is represented as pointer to empty struct {}.Torok Edwin2009-01-241-0/+2
| | | | | | | | Thus we need to check whether the struct is empty before trying to index into it. This fixes PR3381. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62918 91177308-0d34-0410-b5e6-96231b3b80d8
* Some cleanups. No functional changes.Owen Anderson2009-01-241-26/+34
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62917 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the inlining cost function a bit.Dale Johannesen2009-01-241-3/+6
| | | | | | | | Little practical effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62908 91177308-0d34-0410-b5e6-96231b3b80d8
* Make InstCombineStoreToCast handle aggregates more aggressively,Chris Lattner2009-01-242-18/+65
| | | | | | | | | handling the case in Transforms/InstCombine/cast-store-gep.ll, which is a heavily reduced testcase from Clang on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62904 91177308-0d34-0410-b5e6-96231b3b80d8
* Perform optional clang building.Mike Stump2009-01-242-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62895 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor code. No functionality change.Evan Cheng2009-01-231-20/+38
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62893 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, ↵Devang Patel2009-01-235-4/+23
| | | | | | | | | | | | | DW_AT_APPLE_flags. DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way. DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by a project, irrespective of whether the project used makefile, Xcode or something else. llvm-gcc patch is next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62888 91177308-0d34-0410-b5e6-96231b3b80d8
* hopefully address PR3379 by making the P modifier work in x86 inline asm.Chris Lattner2009-01-231-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62887 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix test case. Use valid file name and directory in global variable's debug ↵Devang Patel2009-01-231-1/+1
| | | | | | info entry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62883 91177308-0d34-0410-b5e6-96231b3b80d8
* use CallSite::isCalle instead of slow getOperandNoGabor Greif2009-01-231-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62877 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the logic of getting hold of a PHI predecessor block.Gabor Greif2009-01-236-12/+14
| | | | | | | | | There is now a direct way from value-use-iterator to incoming block in PHINode's API. This way we avoid the iterator->index->iterator trip, and especially the costly getOperandNo() invocation. Additionally there is now an assertion that the iterator really refers to one of the PHI's Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62869 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for deleting a module provider from a JIT in such a way that it ↵Nate Begeman2009-01-234-2/+48
| | | | | | does not cause the owned module to be fully materialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62864 91177308-0d34-0410-b5e6-96231b3b80d8
* Empty DIType represents void. In this case no need to construct any type DIE.Devang Patel2009-01-231-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62861 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold x-0 to x in unsafe-fp-math mode. This comes up in theDan Gohman2009-01-232-9/+19
| | | | | | | | | | | | | | | testcase from PR3376, and in fact is sufficient to completely avoid the problem in that testcase. There's an underlying problem though; TLI.isOperationLegal considers Custom to be Legal, which might be ok in some cases, but that's what DAGCombiner is using in many places to test if something is legal when LegalOperations is true. When DAGCombiner is running after legalize, this isn't sufficient. I'll address this in a separate commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62860 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to build llvm with srcdir != objdir fromDuncan Sands2009-01-232-6/+16
| | | | | | | | | llvm-top. By Michael Schuerig, with some small tweaks to make the "don't configure if already configured" logic work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62842 91177308-0d34-0410-b5e6-96231b3b80d8
* fix two more cases where we could let the NLPDI cache get unsorted.Chris Lattner2009-01-232-5/+114
| | | | | | | With this, sqlite3 now passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62839 91177308-0d34-0410-b5e6-96231b3b80d8
* Unconditionally reset 'cache' to zero, even if we don't need to resort it.Chris Lattner2009-01-231-5/+4
| | | | | | | | | | This avoids using a dangling pointer. Reset NumSortedEntries after restoring Cache to avoid extraneous sorts. This fixes the reduced sqlite3 testcase, but apparently not the whole app. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62838 91177308-0d34-0410-b5e6-96231b3b80d8
* Only check if coalescing is worthwhile when the result is targeting a more ↵Evan Cheng2009-01-231-1/+6
| | | | | | restrictive register class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62837 91177308-0d34-0410-b5e6-96231b3b80d8
* Update test to reflect command line option name change.Evan Cheng2009-01-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62836 91177308-0d34-0410-b5e6-96231b3b80d8
* Stage two of fixing pre-alloc-splitting's code size issues: filter out ↵Owen Anderson2009-01-231-9/+37
| | | | | | | | | | | restores that are just going to be re-spilled again. This also helps performance. Pre-alloc-splitting now seems to be an overall win on SPEC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62834 91177308-0d34-0410-b5e6-96231b3b80d8
* Cross register class coalescing. Not yet enabled.Evan Cheng2009-01-233-109/+129
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62832 91177308-0d34-0410-b5e6-96231b3b80d8
* Code did not follow associated comment. not a good idea.Devang Patel2009-01-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62828 91177308-0d34-0410-b5e6-96231b3b80d8
* Set appropriate tag for the composite type.Devang Patel2009-01-231-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62827 91177308-0d34-0410-b5e6-96231b3b80d8
* a minor tweak to my previous patch, handle the invalidation caseChris Lattner2009-01-231-3/+4
| | | | | | | when there are multiple iterations of the loop. This fixes PR3375. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62822 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an initial pass at dead spill/restore removal for pre alloc splitting.Owen Anderson2009-01-231-4/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62821 91177308-0d34-0410-b5e6-96231b3b80d8
* do not sign extend characters input to isprint. This improvesChris Lattner2009-01-221-1/+1
| | | | | | | compatibility with VC++. Patch by Max Burke! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62813 91177308-0d34-0410-b5e6-96231b3b80d8
* Handful of fixes to the VC project files.Steve Naroff2009-01-222-16/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62807 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bug in DAGCombiner's folding of SELECT. Folding "select C, 0, 1"Bob Wilson2009-01-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | to "C ^ 1" is only valid when C is known to be either 0 or 1. Most of the similar foldings in this function only handle "i1" types, but this one appears intentionally written to handle larger integer types. If C has an integer type larger than "i1", this needs to check if the high bits of a boolean are known to be zero. I also changed the comment to describe this folding as "C ^ 1" instead of "~C", since that is what the code does and since the latter would only be valid for "i1" types. The good news is that most LLVM targets use TargetLowering::ZeroOrOneBooleanContent so this change will not disable the optimization; the bad news is that I've been unable to come up with a testcase to demonstrate the problem. I have also removed a "FIXME" comment for folding "select C, X, 0" to "C & X", since the code looks correct to me. It could be made more aggressive by not limiting the type to "i1", but that would then require checking for TargetLowering::ZeroOrNegativeOneBooleanContent. Similar changes could be done for the other SELECT foldings, but it was decided to be not worth the trouble and complexity (see e.g., r44663). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62790 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't create ISD::FNEG nodes after legalize if they aren't legal.Dan Gohman2009-01-223-8/+1175
| | | | | | | | | | | | | | | Simplify x+0 to x in unsafe-fp-math mode. This avoids a bunch of redundant work in many cases, because in unsafe-fp-math mode, ISD::FADD with a constant is considered free to negate, so the DAGCombiner often negates x+0 to -0-x thinking it's free, when in reality the end result is -x, which is more expensive than x. Also, combine x*0 to 0. This fixes PR3374. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62789 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce a useful abstraction to find out if a Use is in the call position ↵Gabor Greif2009-01-225-9/+12
| | | | | | of an instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62788 91177308-0d34-0410-b5e6-96231b3b80d8
* Regenerated configure after backing out 62553 and r62616.Tanya Lattner2009-01-222-440/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62778 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r62553 and r62616 due to issues with portability.Tanya Lattner2009-01-222-215/+496
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62777 91177308-0d34-0410-b5e6-96231b3b80d8
* rename methods in System/Host to be more consistent.Chris Lattner2009-01-224-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62776 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use buggy llvm-gcc to generate testcases.Devang Patel2009-01-222-12/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62770 91177308-0d34-0410-b5e6-96231b3b80d8
* Add SelectionDAG::getNOT method to construct bitwise NOT operations,Bob Wilson2009-01-226-34/+44
| | | | | | | | | corresponding to the "not" and "vnot" PatFrags. Use the new method in some places where it seems appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62768 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove no-longer relevant comment. Pointed outDuncan Sands2009-01-221-1/+0
| | | | | | | by Gabor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62765 91177308-0d34-0410-b5e6-96231b3b80d8
* This passes on linux.Duncan Sands2009-01-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62764 91177308-0d34-0410-b5e6-96231b3b80d8