aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update unittest for allocator laziness.Benjamin Kramer2010-04-131-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101131 91177308-0d34-0410-b5e6-96231b3b80d8
* Let BumpPtrAllocator lazily allocate the first slab.Benjamin Kramer2010-04-131-3/+6
| | | | | | | | We have some code in llvm and clang where a BumpPtrAllocator is declared in a class but never used in the common case. Stop wasting memory there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101130 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove SCCVN from the CMake build system.Owen Anderson2010-04-131-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101125 91177308-0d34-0410-b5e6-96231b3b80d8
* checkpoint.Chris Lattner2010-04-131-6/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101118 91177308-0d34-0410-b5e6-96231b3b80d8
* SCCVN, we hardly knew ye!Owen Anderson2010-04-133-723/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101117 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR6826: GraphWriter delete the generated file before "dotty" load it,Chris Lattner2010-04-131-1/+2
| | | | | | | patch by 'ether'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101116 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace r101053 with a fix for getSOImmValRotate() so that it will correctlyBob Wilson2010-04-132-53/+7
| | | | | | | | recognize all the valid rotated immediates. This fixes the disassembler issue and will also help codegen for some unusual constant values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101114 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach IndVarSimplify how to eliminate remainder operators where theDan Gohman2010-04-132-0/+192
| | | | | | | | | | | | | numerator is an induction variable. For example, with code like this: for (i=0;i<n;++i) x[i%n] = 0; IndVarSimplify will now recognize that i is always less than n inside the loop, and eliminate the remainder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101113 91177308-0d34-0410-b5e6-96231b3b80d8
* VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms ofDaniel Dunbar2010-04-132-0/+11
| | | | | | | Type::getInt{1,8,...}[Ptr]Ty, so code can consistently use the methods on Type without occasionally needed to call IntegerType::get. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101111 91177308-0d34-0410-b5e6-96231b3b80d8
* IRBuilder: Add Create{Shl,LShr,And,Or,Xor} methods from uin64_t and APInt ↵Daniel Dunbar2010-04-131-2/+59
| | | | | | constants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101110 91177308-0d34-0410-b5e6-96231b3b80d8
* add llvm codegen support for -ffunction-sections and -fdata-sections,Chris Lattner2010-04-134-3/+85
| | | | | | | patch by Sylvere Teissier! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101106 91177308-0d34-0410-b5e6-96231b3b80d8
* Build system fix to make llvm-mc properly buildSean Callanan2010-04-121-2/+2
| | | | | | | | | after edis. Really, there ought to be some mechanism to ensure that PARALLEL_DIRS get built after DIRS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101095 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-optimize a few hot spots.Dan Gohman2010-04-121-10/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101086 91177308-0d34-0410-b5e6-96231b3b80d8
* Use .set expression for x86 pic jump table reference to reduce assembly ↵Evan Cheng2010-04-122-2/+16
| | | | | | relocation. rdar://7738756 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101085 91177308-0d34-0410-b5e6-96231b3b80d8
* Add fast paths to ScalarEvolution::getSizeOf and getOffsetOf, asDan Gohman2010-04-121-0/+14
| | | | | | | | they're used a lot by getNodeForGEP, which can be called a lot. This speeds up -iv-users by around 15% on several testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101083 91177308-0d34-0410-b5e6-96231b3b80d8
* Third time's a charm...Bill Wendling2010-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101081 91177308-0d34-0410-b5e6-96231b3b80d8
* Genericize the label test.Bill Wendling2010-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101079 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct test to test what I mean it to test.Bill Wendling2010-04-121-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101077 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-optimization:Bill Wendling2010-04-122-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have this situation: jCC L1 jmp L2 L1: ... L2: ... We can get a small performance boost by emitting this instead: jnCC L2 L1: ... L2: ... This testcase shows an example of this: float func(float x, float y) { double product = (double)x * y; if (product == 0.0) return product; return product - 1.0; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101075 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify this code.Dan Gohman2010-04-121-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101074 91177308-0d34-0410-b5e6-96231b3b80d8
* Build system fixes. llvm-mc depends onSean Callanan2010-04-122-14/+11
| | | | | | | | | | | | libEnhancedDisassembly, so we now build the static library in all cases (although the shared library is only built when requested/possible). Also, fixed a bug where edis wasn't properly initializing the targets it uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101072 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress LinearFunctionTestReplace when the computed backedge-takenDan Gohman2010-04-122-0/+180
| | | | | | | | | | | | | expression is a UDiv and it doesn't appear that the UDiv came from the user's source. ScalarEvolution has recently figured out how to compute a tripcount expression for the inner loop in SingleSource/Benchmarks/Shootout/sieve.c, using a udiv. Emitting a udiv instruction dramatically slows down the enclosing loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101068 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fix: made the enhanced disassembler's linkSean Callanan2010-04-121-1/+1
| | | | | | | flags work properly when EDIS_VERSION is defined git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101063 91177308-0d34-0410-b5e6-96231b3b80d8
* Bug fix: included System/Types.h instead ofSean Callanan2010-04-121-1/+1
| | | | | | | inttypes.h to allow building on Windows. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101062 91177308-0d34-0410-b5e6-96231b3b80d8
* Second try at integrating the edis tester. ThisSean Callanan2010-04-125-41/+252
| | | | | | | | | | | | time I use the LIBS variable, which is not subject to a %.a -> -l% transformation, to link llvm-mc against libEnhancedDisassembly. llvm-mc -edis works the same as llvm-mc -disassemble, but outputs tokens and operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101058 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a crasher in arm disassembler within ARMInstPrinter.cpp after callingJohnny Chen2010-04-123-1/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM_AM::getSoImmVal(V) with a legitimate so_imm value: #245 rotate right by 2. Introduce ARM_AM::getSOImmValOneOrNoRotate(unsigned Arg) which is called from ARMInstPrinter.cpp's printSOImm() function, replacing ARM_AM::getSOImmVal(V). [12:44:43] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ gdb Debug/bin/llvm-mc GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done (gdb) set args -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble (gdb) r Starting program: /Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc -triple=arm-apple-darwin9 -debug-only=arm-disassembler --disassemble Reading symbols for shared libraries ++. done 0xf5 0x71 0xf0 0x53 Opcode=201 Name=MVNi Format=ARM_FORMAT_DPFRM(4) 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 ------------------------------------------------------------------------------------------------- | 0: 1: 0: 1| 0: 0: 1: 1| 1: 1: 1: 1| 0: 0: 0: 0| 0: 1: 1: 1| 0: 0: 0: 1| 1: 1: 1: 1| 0: 1: 0: 1| ------------------------------------------------------------------------------------------------- mvnpls r7, Assertion failed: (V != -1 && "Not a valid so_imm value!"), function printSOImm, file ARMInstPrinter.cpp, line 229. Program received signal SIGABRT, Aborted. 0x00007fff88c65886 in __kill () (gdb) bt #0 0x00007fff88c65886 in __kill () #1 0x00007fff88d05eae in abort () #2 0x00007fff88cf2ef0 in __assert_rtn () #3 0x000000010020e422 in printSOImm (O=@0x1010bdf80, V=-1, VerboseAsm=false, MAI=0x1020106d0) at ARMInstPrinter.cpp:229 #4 0x000000010020e5fe in llvm::ARMInstPrinter::printSOImmOperand (this=0x1020107e0, MI=0x7fff5fbfee70, OpNum=1, O=@0x1010bdf80) at ARMInstPrinter.cpp:254 #5 0x00000001001ffbc0 in llvm::ARMInstPrinter::printInstruction (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMGenAsmWriter.inc:3236 #6 0x000000010020c27c in llvm::ARMInstPrinter::printInst (this=0x1020107e0, MI=0x7fff5fbfee70, O=@0x1010bdf80) at ARMInstPrinter.cpp:182 #7 0x000000010003cbff in PrintInsts (DisAsm=@0x10200f4e0, Printer=@0x1020107e0, Bytes=@0x7fff5fbff060, SM=@0x7fff5fbff078) at Disassembler.cpp:65 #8 0x000000010003c8b4 in llvm::Disassembler::disassemble (T=@0x1010c13c0, Triple=@0x1010b6798, Buffer=@0x102010690) at Disassembler.cpp:153 #9 0x000000010004095c in DisassembleInput (ProgName=0x7fff5fbff3f0 "/Volumes/data/llvm/git/trunk/Debug/bin/llvm-mc") at llvm-mc.cpp:347 #10 0x000000010003eefb in main (argc=4, argv=0x7fff5fbff298) at llvm-mc.cpp:374 (gdb) q The program is running. Exit anyway? (y or n) y [13:36:26] johnny:/Volumes/data/llvm/git/trunk (local-trunk) $ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101053 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a #include.Dan Gohman2010-04-121-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101043 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded debug in PostDominator runOnFunction()Tobias Grosser2010-04-121-1/+0
| | | | | | | | The information is already available with "opt -analyze". The DominatorTree does also not have this in its runOnFunction. So they behave now more consistent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101038 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead code in the dotty dominance tree printer.Tobias Grosser2010-04-121-25/+0
| | | | | | | This template is not needed anymore as it was replaced by the DOTGraphTraitsViewer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101036 91177308-0d34-0410-b5e6-96231b3b80d8
* Boolify.Benjamin Kramer2010-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101035 91177308-0d34-0410-b5e6-96231b3b80d8
* Plug trivial leak.Benjamin Kramer2010-04-121-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101034 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete this code, which is no longer needed.Dan Gohman2010-04-121-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101033 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the EliminateIVUsers call back out to its original location. Now thatDan Gohman2010-04-121-10/+4
| | | | | | | | | a ScalarEvolution bug with overflow handling is fixed, the normal analysis code will automatically decline to operate on the icmp instructions which are responsible for the loop exit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101032 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize ScalarEvolution's PHI analysis to handle loops that don'tDan Gohman2010-04-122-14/+55
| | | | | | | | have preheaders or dedicated exit blocks, as clients may not otherwise need to run LoopSimplify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101030 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the overflow checking in the get{Signed,Unsigned}Range code forDan Gohman2010-04-121-10/+34
| | | | | | | | | | AddRecs so that it checks for overflow in the computation that it is performing, rather than just checking hasNo{Signed,Unsigned}Wrap, since those flags are for a different computation. This fixes a bug that impacts an upcoming change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101028 91177308-0d34-0410-b5e6-96231b3b80d8
* Use RecursivelyDeleteTriviallyDeadInstructions in EliminateIVComparisons,Dan Gohman2010-04-121-3/+12
| | | | | | | | | instead of deleting just the user. This makes it more consistent with other code in IndVarSimplify, and theoretically can eliminate more users earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101027 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable post regalloc machine licm by default.Evan Cheng2010-04-122-5/+141
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101023 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove use of exceptions from bugpoint. No deliberate functionality change!Nick Lewycky2010-04-1210-341/+463
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify function prototypes before trying to optimize functions. We alsoEric Christopher2010-04-123-8/+53
| | | | | | | | | | | need TargetData, just return false if we don't have it. Update testcases accordingly. Fixes PR6807. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101011 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary parens.Dan Gohman2010-04-122-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101010 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code simplification.Dan Gohman2010-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101009 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r101000, with a fix: Don't eliminate an icmp which is part ofDan Gohman2010-04-122-1/+129
| | | | | | | | | the loop exit test. This usually doesn't come up for a variety of reasons, but it isn't impossible, so make IndVarSimplify handle it conservatively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101008 91177308-0d34-0410-b5e6-96231b3b80d8
* whether we enable dylibs or not depends on the host, not the target.Chris Lattner2010-04-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101007 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 101000, which is breaking self-host builds.Dan Gohman2010-04-122-78/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101002 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation.Dan Gohman2010-04-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101001 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach IndVarSimplify how to eliminate comparisons involving inductionDan Gohman2010-04-112-0/+78
| | | | | | | | | | | | | | variables. For example, with code like this: for (i=0;i<n;++i) if (i<n) x[i] = 0; IndVarSimplify will now recognize that i is always less than n inside the loop, and eliminate the if. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101000 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance ScalarEvolution::isKnownPredicate with support forDan Gohman2010-04-112-8/+40
| | | | | | | loop conditions which are invariants. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100995 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code simplification.Dan Gohman2010-04-111-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100994 91177308-0d34-0410-b5e6-96231b3b80d8
* When creating a ConstantRange for [n,UINT_MAX], special case n == 0, becauseDan Gohman2010-04-111-3/+4
| | | | | | | ConstantRange(0, 0) creates an empty range rather than a full one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100993 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment.Dan Gohman2010-04-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100992 91177308-0d34-0410-b5e6-96231b3b80d8