aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak VC++ build.Jeff Cohen2007-03-0526-60/+173
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
* add a getSignBit method, elimiante virtual method from getBitMask()Chris Lattner2007-03-041-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34916 91177308-0d34-0410-b5e6-96231b3b80d8
* fix 80 col violations, mark arrays staticChris Lattner2007-03-041-8/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34915 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some codeChris Lattner2007-03-041-18/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34914 91177308-0d34-0410-b5e6-96231b3b80d8
* fold away addc nodes when we know there cannot be a carry-out.Chris Lattner2007-03-042-8/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34913 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new nodeChris Lattner2007-03-041-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34912 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcase, corresponds to:Chris Lattner2007-03-041-0/+11
| | | | | | | | | long long test(long long A, unsigned B) { return (A + ((long long)B << 32)); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34911 91177308-0d34-0410-b5e6-96231b3b80d8
* generalizeChris Lattner2007-03-041-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34910 91177308-0d34-0410-b5e6-96231b3b80d8
* canonicalize constants to the RHS of addc/adde. If nothing uses the carry ↵Chris Lattner2007-03-041-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | out of addc, turn it into add. This allows us to compile: long long test(long long A, unsigned B) { return (A + ((long long)B << 32)) & 123; } into: _test: movl $123, %eax andl 4(%esp), %eax xorl %edx, %edx ret instead of: _test: xorl %edx, %edx movl %edx, %eax addl 4(%esp), %eax ;; add of zero andl $123, %eax ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34909 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate some ops if they have an undef RHSChris Lattner2007-03-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34908 91177308-0d34-0410-b5e6-96231b3b80d8
* fix typoChris Lattner2007-03-041-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34906 91177308-0d34-0410-b5e6-96231b3b80d8
* add missing bracesChris Lattner2007-03-041-25/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34905 91177308-0d34-0410-b5e6-96231b3b80d8
* minor cleanupsChris Lattner2007-03-041-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34904 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded header file.Reid Spencer2007-03-041-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34903 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed up -instcombine by 20% by avoiding a particularly expensive passmgr call.Chris Lattner2007-03-041-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34902 91177308-0d34-0410-b5e6-96231b3b80d8
* switch MarkAliveBlocks over to using SmallPtrSet instead of std::set, speedingChris Lattner2007-03-041-5/+5
| | | | | | | up simplifycfg by 20% git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34901 91177308-0d34-0410-b5e6-96231b3b80d8
* Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.Chris Lattner2007-03-041-9/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34900 91177308-0d34-0410-b5e6-96231b3b80d8
* add iterator range version of ctor.Chris Lattner2007-03-041-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34899 91177308-0d34-0410-b5e6-96231b3b80d8
* make better use of LCSSA information in RewriteLoopExitValues. Before, weChris Lattner2007-03-041-67/+76
| | | | | | | | | | | | would scan the entire loop body, then scan all users of instructions in the loop, looking for users outside the loop. Now, since we know that the loop is in LCSSA form, we know that any users outside the loop will be LCSSA phi nodes. Just scan them. This speeds up indvars significantly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34898 91177308-0d34-0410-b5e6-96231b3b80d8
* Guard further against APInt operations with operands of unequal bit width.Reid Spencer2007-03-041-4/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34897 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement PR1179/PR1232 and ↵Chris Lattner2007-03-041-46/+26
| | | | | | | | | test/Transforms/IndVarsSimplify/loop_evaluate_[234].ll This makes -indvars require and use LCSSA, updating it as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34896 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcases for PR1179/PR1232.Chris Lattner2007-03-043-0/+67
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34895 91177308-0d34-0410-b5e6-96231b3b80d8
* Get the version number for the LLVM from the autoconf/configure.ac fileReid Spencer2007-03-041-2/+9
| | | | | | | when building the documentation for the web site. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34894 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix CodeGen/Generic/fpowi-promote.ll and PR1239Chris Lattner2007-03-031-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34893 91177308-0d34-0410-b5e6-96231b3b80d8
* New testcase for PR1239Chris Lattner2007-03-031-0/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34892 91177308-0d34-0410-b5e6-96231b3b80d8
* Make RewriteLoopExitValues far less nested by using continue in the loopChris Lattner2007-03-031-91/+94
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34891 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an expand action for ISD label which just deletes the label.Chris Lattner2007-03-031-0/+3
| | | | | | | This "fixes" PR1238. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34890 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unnecessary #include.Reid Spencer2007-03-031-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34889 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Handle errors around the ModuleProvider. This is necessary since it isReid Spencer2007-03-031-11/+23
| | | | | | | | | | | | reading bytecode. 2. The interpreter can delete the ModuleProvider and replace it with another so don't depend on it being around after the EE is created. 3. Don't just run llvm_shutdown on exit but actually delete the EE as well. This cleans up a vast amount of memory (but not all) that EE retained through exit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34888 91177308-0d34-0410-b5e6-96231b3b80d8
* Deal with error handling better.Reid Spencer2007-03-035-14/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34887 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the creation functions take an error string. This will help theReid Spencer2007-03-031-2/+3
| | | | | | | | ExecutionEngine report errors on creation (like bytecode stuff) and also help to get rid of exception handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34886 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that when we store a value it is masked to its correct bitReid Spencer2007-03-031-1/+15
| | | | | | | width. This helps CBE work with non-standard integer bit widths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34885 91177308-0d34-0410-b5e6-96231b3b80d8
* Complete the APIntification of the interpreter. All asserts for > 64 bitsReid Spencer2007-03-031-118/+209
| | | | | | | | have been removed and dealt with. The interpreter should now be able to execute any LLVM program using any bit width. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34884 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid memory leakage by having caller construct the APInt for theReid Spencer2007-03-031-5/+4
| | | | | | | destination value of LoadValueFromMemory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34883 91177308-0d34-0410-b5e6-96231b3b80d8
* Require the destination GlobalValue for LoadValueFromMemory to be passedReid Spencer2007-03-031-1/+2
| | | | | | | in as a parameter instead of returned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34882 91177308-0d34-0410-b5e6-96231b3b80d8
* Regularize the interface for conversion functions to/from float/double.Reid Spencer2007-03-031-3/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34881 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix constant folding of fp->int bitcast for vectors.Reid Spencer2007-03-031-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34880 91177308-0d34-0410-b5e6-96231b3b80d8
* Add APIntVal as a possible GenericeValue.Reid Spencer2007-03-031-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34879 91177308-0d34-0410-b5e6-96231b3b80d8
* Only propagate IsKill if the last use is a kill.Evan Cheng2007-03-031-8/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34878 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement APInt support for the binary operators.Reid Spencer2007-03-031-254/+240
| | | | | | | | Move the getConstantExpr function towards the end of the file so we don't need a dozen forward declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34877 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Have the ExecutionContext keep track of the APInt's allocated andReid Spencer2007-03-031-11/+13
| | | | | | | | ensure they are cleaned up when the stack frame exits. 2. Move a function to the Execution.cpp file where it belongs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34876 91177308-0d34-0410-b5e6-96231b3b80d8
* http://llvm.org/bugs/show_bug.cgi?id=1237Nate Begeman2007-03-031-5/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34875 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement loading and storing of APInt values from memory.Reid Spencer2007-03-031-8/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34874 91177308-0d34-0410-b5e6-96231b3b80d8
* Make getNumWords public so that those using getRawData stand a chance ofReid Spencer2007-03-031-7/+7
| | | | | | | not reading beyond the end of the buffer returned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34873 91177308-0d34-0410-b5e6-96231b3b80d8
* Add names for some of the operators. This is needed for the macros inReid Spencer2007-03-031-0/+9
| | | | | | | the Interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34872 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit low/high immediate loads properly for Linux/PPC.Nick Lewycky2007-03-031-6/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34871 91177308-0d34-0410-b5e6-96231b3b80d8
* my recent change caused a failure in a bswap testcase, because it changedChris Lattner2007-03-031-48/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the order that instcombine processed instructions in the testcase. The end result is that instcombine finished with: define i16 @test1(i16 %a) { %tmp = zext i16 %a to i32 ; <i32> [#uses=2] %tmp21 = lshr i32 %tmp, 8 ; <i32> [#uses=1] %tmp5 = shl i32 %tmp, 8 ; <i32> [#uses=1] %tmp.upgrd.32 = or i32 %tmp21, %tmp5 ; <i32> [#uses=1] %tmp.upgrd.3 = trunc i32 %tmp.upgrd.32 to i16 ; <i16> [#uses=1] ret i16 %tmp.upgrd.3 } which can't get matched as a bswap. This patch makes instcombine more sophisticated about removing truncating casts, allowing it to turn this into: define i16 @test2(i16 %a) { %tmp211 = lshr i16 %a, 8 %tmp52 = shl i16 %a, 8 %tmp.upgrd.323 = or i16 %tmp211, %tmp52 ret i16 %tmp.upgrd.323 } which then matches as bswap. This fixes bswap.ll and implements InstCombine/cast2.ll:test[12]. This also implements cast elimination of add/sub. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34870 91177308-0d34-0410-b5e6-96231b3b80d8
* new testcase: instcombine should remove all the casts.Chris Lattner2007-03-031-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34869 91177308-0d34-0410-b5e6-96231b3b80d8
* Translate bit operations to English.Nick Lewycky2007-03-031-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34868 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine doesn't do CSE, simplify unrelated detailChris Lattner2007-03-031-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34867 91177308-0d34-0410-b5e6-96231b3b80d8