Commit Graph

30585 Commits

Author SHA1 Message Date
Chris Lattner 1e04147240 fix typo
llvm-svn: 34906
2007-03-04 06:36:24 +00:00
Chris Lattner d647f92a14 add missing braces
llvm-svn: 34905
2007-03-04 06:13:52 +00:00
Chris Lattner c33fd469ef minor cleanups
llvm-svn: 34904
2007-03-04 04:50:21 +00:00
Reid Spencer b8825b8c04 Remove unneeded header file.
llvm-svn: 34903
2007-03-04 04:41:04 +00:00
Chris Lattner 8258b44b22 Speed up -instcombine by 20% by avoiding a particularly expensive passmgr call.
llvm-svn: 34902
2007-03-04 04:27:24 +00:00
Chris Lattner a5403a587c switch MarkAliveBlocks over to using SmallPtrSet instead of std::set, speeding
up simplifycfg by 20%

llvm-svn: 34901
2007-03-04 04:20:48 +00:00
Chris Lattner 16cf9a7686 Speed up Loop::isLCSSAForm by using a hash table instead of a sorted vector.
llvm-svn: 34900
2007-03-04 04:06:39 +00:00
Chris Lattner f083768df3 add iterator range version of ctor.
llvm-svn: 34899
2007-03-04 04:04:43 +00:00
Chris Lattner d7b4c92cd0 make better use of LCSSA information in RewriteLoopExitValues. Before, we
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.

llvm-svn: 34898
2007-03-04 03:43:23 +00:00
Reid Spencer 69904f939a Guard further against APInt operations with operands of unequal bit width.
llvm-svn: 34897
2007-03-04 01:25:35 +00:00
Chris Lattner 1f7648efba Implement PR1179/PR1232 and test/Transforms/IndVarsSimplify/loop_evaluate_[234].ll
This makes -indvars require and use LCSSA, updating it as appropriate.

llvm-svn: 34896
2007-03-04 01:00:28 +00:00
Chris Lattner dd3f9f8c3b New testcases for PR1179/PR1232.
llvm-svn: 34895
2007-03-04 00:54:06 +00:00
Reid Spencer ed2ce58244 Get the version number for the LLVM from the autoconf/configure.ac file
when building the documentation for the web site.

llvm-svn: 34894
2007-03-04 00:45:50 +00:00
Chris Lattner ca401aac31 Fix CodeGen/Generic/fpowi-promote.ll and PR1239
llvm-svn: 34893
2007-03-03 23:43:21 +00:00
Chris Lattner 6053ad4252 New testcase for PR1239
llvm-svn: 34892
2007-03-03 23:42:50 +00:00
Chris Lattner ed30abf0cb Make RewriteLoopExitValues far less nested by using continue in the loop
llvm-svn: 34891
2007-03-03 22:48:48 +00:00
Chris Lattner 567b9254cd Add an expand action for ISD label which just deletes the label.
This "fixes" PR1238.

llvm-svn: 34890
2007-03-03 19:21:38 +00:00
Reid Spencer 04a1829559 Remove unnecessary #include.
llvm-svn: 34889
2007-03-03 18:29:16 +00:00
Reid Spencer e586f2e7f7 1. Handle errors around the ModuleProvider. This is necessary since it is
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.

llvm-svn: 34888
2007-03-03 18:21:44 +00:00
Reid Spencer 603682ad1d Deal with error handling better.
llvm-svn: 34887
2007-03-03 18:19:18 +00:00
Reid Spencer 30ed3bdaf2 Make the creation functions take an error string. This will help the
ExecutionEngine report errors on creation (like bytecode stuff) and also
help to get rid of exception handling.

llvm-svn: 34886
2007-03-03 18:18:11 +00:00
Reid Spencer 1f87660d29 Make sure that when we store a value it is masked to its correct bit
width. This helps CBE work with non-standard integer bit widths.

llvm-svn: 34885
2007-03-03 16:33:33 +00:00
Reid Spencer ec8c51c1b1 Complete the APIntification of the interpreter. All asserts for > 64 bits
have been removed and dealt with. The interpreter should now be able to
execute any LLVM program using any bit width.

llvm-svn: 34884
2007-03-03 08:38:04 +00:00
Reid Spencer 00919f5769 Avoid memory leakage by having caller construct the APInt for the
destination value of LoadValueFromMemory.

llvm-svn: 34883
2007-03-03 08:36:29 +00:00
Reid Spencer c3bfe13ed5 Require the destination GlobalValue for LoadValueFromMemory to be passed
in as a parameter instead of returned.

llvm-svn: 34882
2007-03-03 08:35:14 +00:00
Reid Spencer 94a48f06e5 Regularize the interface for conversion functions to/from float/double.
llvm-svn: 34881
2007-03-03 08:34:02 +00:00
Reid Spencer 50d7ad9183 Fix constant folding of fp->int bitcast for vectors.
llvm-svn: 34880
2007-03-03 08:32:46 +00:00
Reid Spencer cfe415c4e1 Add APIntVal as a possible GenericeValue.
llvm-svn: 34879
2007-03-03 07:36:44 +00:00
Evan Cheng d74cb0e194 Only propagate IsKill if the last use is a kill.
llvm-svn: 34878
2007-03-03 06:32:37 +00:00
Reid Spencer 54c6e84c83 Implement APInt support for the binary operators.
Move the getConstantExpr function towards the end of the file so we don't
need a dozen forward declarations.

llvm-svn: 34877
2007-03-03 06:22:22 +00:00
Reid Spencer 72aafa1d49 1. Have the ExecutionContext keep track of the APInt's allocated and
ensure they are cleaned up when the stack frame exits.
2. Move a function to the Execution.cpp file where it belongs.

llvm-svn: 34876
2007-03-03 06:19:55 +00:00
Nate Begeman 323cf8f602 http://llvm.org/bugs/show_bug.cgi?id=1237
llvm-svn: 34875
2007-03-03 06:18:18 +00:00
Reid Spencer 815f8dd225 Implement loading and storing of APInt values from memory.
llvm-svn: 34874
2007-03-03 06:18:03 +00:00
Reid Spencer 1a7d446963 Make getNumWords public so that those using getRawData stand a chance of
not reading beyond the end of the buffer returned.

llvm-svn: 34873
2007-03-03 06:17:23 +00:00
Reid Spencer 22c4fedabf Add names for some of the operators. This is needed for the macros in
the Interpreter.

llvm-svn: 34872
2007-03-03 05:37:23 +00:00
Nick Lewycky e6049c2f08 Emit low/high immediate loads properly for Linux/PPC.
llvm-svn: 34871
2007-03-03 05:29:51 +00:00
Chris Lattner da1d04a057 my recent change caused a failure in a bswap testcase, because it changed
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.

llvm-svn: 34870
2007-03-03 05:27:34 +00:00
Chris Lattner 05e93d7f05 new testcase: instcombine should remove all the casts.
llvm-svn: 34869
2007-03-03 05:24:06 +00:00
Nick Lewycky db42295ff2 Translate bit operations to English.
llvm-svn: 34868
2007-03-03 03:14:40 +00:00
Chris Lattner c1991789c5 instcombine doesn't do CSE, simplify unrelated detail
llvm-svn: 34867
2007-03-03 02:27:02 +00:00
Evan Cheng 3fd728596e Watch out for cases like this:
entry (0x8b056f0, LLVM BB @0x8b01b30, ID#0):
Live Ins: %r0 %r1 %r2 %r3
        %reg1032 = tMOVrr %r3<kill>
        %reg1033 = tMOVri8 1
        %reg1034 = tMOVri8 0
        tCMPi8 %reg1029<kill>, 0
        tBcc mbb<entry,0x8b06a10>, 0
    Successors according to CFG: 0x8b06980 0x8b06a10

entry (0x8b06980, LLVM BB @0x8b01b30, ID#12):
    Predecessors according to CFG: 0x8b056f0
        %reg1036 = tMOVrr %reg1034<kill>
    Successors according to CFG: 0x8b06a10

entry (0x8b06a10, LLVM BB @0x8b01b30, ID#13):
    Predecessors according to CFG: 0x8b056f0 0x8b06980
        %reg1024<dead> = tMOVrr %reg1030<kill>
        ...

reg1030 and r1 have already been joined. When reg1024 and reg1030 are joined,
r1 live range from function entry to the tMOVrr instruction are dead. Eliminate
r1 from the livein set of the entry BB, not the BB where the copy is.

llvm-svn: 34866
2007-03-03 02:18:00 +00:00
Chris Lattner 960a543037 add a top-level iteration loop to instcombine. This means that it will never
finish without combining something it is capable of.

llvm-svn: 34865
2007-03-03 02:04:50 +00:00
Reid Spencer c34dedf686 APIntify this pass.
llvm-svn: 34863
2007-03-03 00:48:31 +00:00
Reid Spencer 3588ab15d1 Add isPositive for symmetry with isNegative.
llvm-svn: 34862
2007-03-03 00:24:39 +00:00
Reid Spencer 53a3739c80 Finally get this patch right :)
Replace expensive getZExtValue() == 0 calls with isZero() calls.

llvm-svn: 34861
2007-03-02 23:51:25 +00:00
Reid Spencer ba547cbb2a Dang, I've done that twice now! Undo previous commit.
llvm-svn: 34860
2007-03-02 23:37:53 +00:00
Reid Spencer 558990e189 Use more efficient test for one value in a ConstantInt.
llvm-svn: 34859
2007-03-02 23:35:28 +00:00
Reid Spencer 29fe20a98b Guard against huge loop trip counts in an APInt safe way.
llvm-svn: 34858
2007-03-02 23:31:34 +00:00
Evan Cheng deaea25eb9 X86-64 VACOPY needs custom expansion. va_list is a struct { i32, i32, i8*, i8* }.
llvm-svn: 34857
2007-03-02 23:16:35 +00:00
Reid Spencer dec03a08d6 Make sure debug code is not evaluated in non-debug case.
llvm-svn: 34856
2007-03-02 23:15:21 +00:00
Reid Spencer 1e102971d2 1. Sort switch cases using APInt safe comparison.
2. Make sure debug output of APInt values is safe for all bit widths.

llvm-svn: 34855
2007-03-02 23:05:28 +00:00
Reid Spencer 43376a74af Use APInt safe isOne() method on ConstantInt instead of getZExtValue()==1
llvm-svn: 34854
2007-03-02 23:03:17 +00:00
Reid Spencer bb38d79ad6 Make sorting of ConstantInt be APInt clean through use of ult function.
llvm-svn: 34853
2007-03-02 23:01:14 +00:00
Reid Spencer 1825dd0d7c Fix ashr for bitwidths > 64. This is now validated up to 1024 bits.
llvm-svn: 34852
2007-03-02 22:39:11 +00:00
Anton Korobeynikov e41e3fc74e Fix uninitialized use of variable. Remove tabs and fix identation.
llvm-svn: 34850
2007-03-02 22:19:41 +00:00
Anton Korobeynikov 57af2a4f3b Simplify things
llvm-svn: 34849
2007-03-02 21:50:27 +00:00
Chris Lattner b15e2b182f Fix a significant algorithm problem with the instcombine worklist. removing
a value from the worklist required scanning the entire worklist to remove all
entries.  We now use a combination map+vector to prevent duplicates from
happening and prevent the scan.  This speeds up instcombine on a large file
from the llvm-gcc bootstrap from 189.7s to 4.84s in a debug build and from
5.04s to 1.37s in a release build.

llvm-svn: 34848
2007-03-02 21:28:56 +00:00
Chris Lattner 51f5457ad4 minor cleanup
llvm-svn: 34846
2007-03-02 19:59:19 +00:00
Chris Lattner c3b68788bb Fix PR1234 by working around a compiler bug.
llvm-svn: 34845
2007-03-02 18:16:29 +00:00
Evan Cheng 155ede21e0 Mark dead def as unused.
llvm-svn: 34844
2007-03-02 10:43:16 +00:00
Evan Cheng 9d615d1e70 Dead live-in detection bug.
llvm-svn: 34843
2007-03-02 10:41:15 +00:00
Evan Cheng b7bef1bc74 Add a new test case.
llvm-svn: 34842
2007-03-02 10:37:19 +00:00
Evan Cheng 6605c5dbee - Keep track all def and uses of stack slot available in register.
- Available value use may be deleted (e.g. noop move).

llvm-svn: 34841
2007-03-02 08:52:00 +00:00
Chris Lattner 870055ef79 testcase for PR1233
llvm-svn: 34840
2007-03-02 07:29:59 +00:00
Evan Cheng 08f2f0d145 Invalidate last use of a reused register if the use is a deleted noop copy.
llvm-svn: 34839
2007-03-02 05:41:42 +00:00
Chris Lattner 9c7e5e365d argument lowering should copy from the vreg shadows of live-in arguments
passed in registers, not directly from the pregs themselves.

llvm-svn: 34838
2007-03-02 05:12:29 +00:00
Chris Lattner fc2f52128a add a note
llvm-svn: 34837
2007-03-02 05:04:52 +00:00
Owen Anderson a0d8da67c1 Fix a typo.
llvm-svn: 34836
2007-03-02 05:03:07 +00:00
Reid Spencer cf8175617d Use a better algorithm for rounding sqrt results. Change the FIXME about
this to a NOTE: because pari/gp results start to get rounded incorrectly
after 192 bits of precision. APInt and pari/gp never differ by more than
1, but APInt is more accurate because it does not lose precision after 192
bits as does pari/gp.

llvm-svn: 34834
2007-03-02 04:21:55 +00:00
Nick Lewycky cf87f9eef5 Implement unionWith.
llvm-svn: 34833
2007-03-02 03:33:05 +00:00
Chris Lattner 4bd8cda3f0 switch the inliner from being recursive to being iterative.
llvm-svn: 34832
2007-03-02 03:11:20 +00:00
Reid Spencer e1336b4086 Fix an unequal bitwidth issue.
llvm-svn: 34831
2007-03-02 02:59:25 +00:00
Chris Lattner 73f2825957 grammaro
llvm-svn: 34830
2007-03-02 02:57:34 +00:00
Evan Cheng 934405cf03 Make it 64-bit safe.
llvm-svn: 34829
2007-03-02 02:31:37 +00:00
Reid Spencer c44bdae16b Add a FIXME
llvm-svn: 34828
2007-03-02 02:01:34 +00:00
Reid Spencer 91643aa96f Fix a typo.
llvm-svn: 34826
2007-03-02 01:31:31 +00:00
Reid Spencer c442c84c8f Fix a problem where shifting by 64-bits leads to incorrect results on PPC
but not on X86 becuase shift by word size is "undefined".

llvm-svn: 34825
2007-03-02 01:19:42 +00:00
Dale Johannesen 32bc81341b eliminate unnecessary reset of SP in epilog on darwin
llvm-svn: 34824
2007-03-02 01:17:17 +00:00
Reid Spencer 197adfaa0a Reverse a premature commital.
llvm-svn: 34822
2007-03-02 00:31:39 +00:00
Reid Spencer 2e54a15943 Prefer non-virtual calls to ConstantInt::isZero over virtual calls to
Constant::isNullValue() in situations where it is possible.

llvm-svn: 34821
2007-03-02 00:28:52 +00:00
Reid Spencer 3f770e4afd Add a non-virtual test for zero, isZero, and rename isUnitValue isOne.
These will be used in upcoming patches to avoid virtual function call when
the client knows it is a ConstantInt.

llvm-svn: 34820
2007-03-02 00:27:06 +00:00
Reid Spencer 76b2ce19fc Add an abs() function to get the absolute value.
llvm-svn: 34819
2007-03-01 23:37:09 +00:00
Reid Spencer 1b8dfcbaaa Combine two lines that can be.
llvm-svn: 34818
2007-03-01 23:30:25 +00:00
Reid Spencer 1700b52b8b Remove virtual keyword from method that doesn't need to be virtual.
llvm-svn: 34817
2007-03-01 23:20:52 +00:00
Reid Spencer caace8cffd Make it possible to create an SCEVUnknown from an APInt as well as an int.
llvm-svn: 34816
2007-03-01 22:28:51 +00:00
Reid Spencer fa63226751 Although probably not necessary, guard against a potential assertion by
using isNullValue() instead of getZExtValue() == 0.

llvm-svn: 34815
2007-03-01 21:54:37 +00:00
Reid Spencer 17797076ef Use isUnitValue() instead of getZExtValue() == 1 which will prevent an
assert if the ConstantInt's value is large.

llvm-svn: 34814
2007-03-01 21:51:23 +00:00
Reid Spencer 9c61acc450 Add an isUnitValue method for comparison against 1. This just follows a
common pattern with isNullValue, isAllOnesValue, etc. It also helps to
prevent things like getZExtValue() == 1, which could assert for large
bitwidths.

llvm-svn: 34813
2007-03-01 21:50:41 +00:00
Owen Anderson 90db545350 Use GCC intrinsics when available, and use smarter fallbacks when not.
llvm-svn: 34812
2007-03-01 21:16:30 +00:00
Reid Spencer bbd97b1edb Clarify the use of getValue/getSExtValue/getZExtValue and add the new
APInt constructor.

llvm-svn: 34811
2007-03-01 21:05:33 +00:00
Reid Spencer 5b0548de77 Use APInt conversion to string so the result is correct regardless of the
bit width of the ConstantInt being converted.

llvm-svn: 34810
2007-03-01 21:00:32 +00:00
Reid Spencer 07761199e0 Make output for ConstantInt construction correct for any bitwidth.
llvm-svn: 34809
2007-03-01 20:55:43 +00:00
Reid Spencer 4326cf5c51 Use the APInt versions of the bit-wise conversions of float/double to int
and back. While this is not strictly necessary, it does pave the way for
future changes in casting. It should now be possible to improve vector
casting to deal with un-equal fp/int sizes.

llvm-svn: 34808
2007-03-01 20:44:23 +00:00
Reid Spencer 022e05fdab Add doubleToBits and floatToBits methods.
llvm-svn: 34807
2007-03-01 20:39:01 +00:00
Reid Spencer a9e6e31db6 Use modern variable name. ConstantUnsignedInt is long since dead. No
functional change with this patch.

llvm-svn: 34806
2007-03-01 20:27:41 +00:00
Jim Laskey 82af5943d1 Emit eh filter info.
llvm-svn: 34805
2007-03-01 20:26:43 +00:00
Jim Laskey 6458e6acb9 Collect eh filter info.
llvm-svn: 34804
2007-03-01 20:25:32 +00:00
Reid Spencer fa80a0e8a2 Use a simpler constructor for ConstantInt.
llvm-svn: 34803
2007-03-01 20:25:31 +00:00
Jim Laskey d5453d7b56 Lower eh filter intrinsic.
llvm-svn: 34802
2007-03-01 20:24:30 +00:00
Jim Laskey 14c5842a91 Add eh filter intrinsic.
llvm-svn: 34801
2007-03-01 20:23:39 +00:00
Reid Spencer f762893b9b Add bitsToDouble and bitsToFloat methods for re-interpretation of bits as FP.
llvm-svn: 34800
2007-03-01 20:06:51 +00:00
Reid Spencer df30e2a68b Wrap a long line.
llvm-svn: 34799
2007-03-01 19:48:16 +00:00
Reid Spencer b973047147 Avoid a potential assert out if the loop increment is > 64 bits.
llvm-svn: 34798
2007-03-01 19:45:00 +00:00
Reid Spencer 8ad254df8c Regenerate.
llvm-svn: 34797
2007-03-01 19:41:47 +00:00
Reid Spencer 24f1a0e78f The 64-bit constructor for ConstantInt changes from int64_t to uint64_t.
This caused a warning for construction with -1. Avoid the warning by using
-1ULL instead.

llvm-svn: 34796
2007-03-01 19:33:52 +00:00
Reid Spencer fad3f247e4 Construct ConstantInt with simpler constructor.
llvm-svn: 34795
2007-03-01 19:32:33 +00:00
Reid Spencer 666ea0d046 Use a simpler constructor when constructing ConstantInt. Also, replace
verbose code to sext/trunc or zext/trunc and APInt with new methods on
that class.

llvm-svn: 34794
2007-03-01 19:32:01 +00:00
Reid Spencer a127633716 Use a simpler constructor when constructing ConstantInst.
llvm-svn: 34793
2007-03-01 19:31:12 +00:00
Reid Spencer d1bbfa5aa6 Drop the ConstantInt(const Type&, const APInt&) constructor. It is
redundant and more verbose than the ConstantInt(const APInt&) constructor.

llvm-svn: 34792
2007-03-01 19:30:34 +00:00
Reid Spencer 2f6ad4d3c3 Make the static table of results in sqrt const.
llvm-svn: 34791
2007-03-01 17:47:31 +00:00
Reid Spencer 6ba8edc789 Fix last night's 445.gobmk breakage which was caused by comparison of
APInt's of unequal bitwidth.

llvm-svn: 34790
2007-03-01 17:17:21 +00:00
Reid Spencer 742d1704e1 Add methods for bit width modification: sextOrTrunc, zextOrTrunc.
llvm-svn: 34789
2007-03-01 17:15:32 +00:00
Anton Korobeynikov af8be4458f Ensure that fastcall'ed function is correctly mangled & stack is
properly aligned

llvm-svn: 34788
2007-03-01 16:29:22 +00:00
Nicolas Geoffray 75ab9799df Implemented the frameaddress intrinsic for PPC.
llvm-svn: 34787
2007-03-01 13:11:38 +00:00
Evan Cheng 105fb1e0dd Delete register scavenger when done with it.
llvm-svn: 34786
2007-03-01 10:23:33 +00:00
Evan Cheng 2c0fd3ee4c Use a spilled free callee-saved register as scratch register.
llvm-svn: 34785
2007-03-01 08:57:52 +00:00
Evan Cheng 27bc565497 Add a version of FindUnusedReg that restrict search to a specific set of registers.
llvm-svn: 34784
2007-03-01 08:56:24 +00:00
Evan Cheng 6f059e3e0a - Track which callee-saved registers are spilled.
- Some code clean up.

llvm-svn: 34783
2007-03-01 08:26:31 +00:00
Reid Spencer 6a44033465 Remove the "isSigned" parameters from ConstantRange. It turns out they
are not needed as the results are the same with or without it.

Patch by Nicholas Lewycky.

llvm-svn: 34782
2007-03-01 07:54:15 +00:00
Evan Cheng 677bb3b460 Switch from std::vector<bool> to BitVector.
llvm-svn: 34781
2007-03-01 07:52:44 +00:00
Reid Spencer 983e3b37de APIntify various computations in ScalarEvolution
llvm-svn: 34780
2007-03-01 07:25:48 +00:00
Reid Spencer c8841d2ea2 Use a real table in sqrt to shorten and quicken the code.
Thanks for the idea Chris.

llvm-svn: 34779
2007-03-01 06:23:32 +00:00
Bill Wendling 65c75b57d4 Get rid of verboten <iostream> include.
llvm-svn: 34777
2007-03-01 06:05:39 +00:00
Owen Anderson 3062625451 Use the GCC built-in for PopulationCount when it's available, and use a faster
algorithm when it's not.  This should be particularly noticeable in the
64-bit case.

llvm-svn: 34776
2007-03-01 05:41:28 +00:00
Reid Spencer d99feafd5f Add a square root function.
llvm-svn: 34775
2007-03-01 05:39:56 +00:00
Reid Spencer 5a642a7991 Reduce #includage by taking a method out of line.
llvm-svn: 34774
2007-03-01 04:02:06 +00:00
Evan Cheng d6450ba1dc A restore is promoted to copy (or deleted entirely), remove the kill from the last use of the targetted register.
llvm-svn: 34773
2007-03-01 02:27:30 +00:00
Evan Cheng 31215d1395 Interface clean up.
llvm-svn: 34772
2007-03-01 02:25:51 +00:00
Reid Spencer 0f49976928 Add an IntegerType::getMask() method to get an APInt mask for the type.
llvm-svn: 34771
2007-03-01 02:25:03 +00:00
Evan Cheng 428eaa0059 Interface clean up.
llvm-svn: 34770
2007-03-01 02:19:39 +00:00
Evan Cheng 71c2d65e74 Clean up interface.
llvm-svn: 34769
2007-03-01 02:18:06 +00:00
Evan Cheng 9be123c568 Oops.
llvm-svn: 34768
2007-03-01 02:05:35 +00:00
Evan Cheng 8a703ad4b6 Track all joined registers and eliminate unneeded kills after all joining are done.
llvm-svn: 34767
2007-03-01 02:03:03 +00:00
Evan Cheng d97ccab64d MachineBasicBlock fields should not be public.
llvm-svn: 34766
2007-03-01 02:00:40 +00:00
Reid Spencer b0170c4259 For PR1205:
Make GetConstantFactor compute its result using an APInt.

llvm-svn: 34765
2007-02-28 23:31:17 +00:00
Dale Johannesen 962fa8eb9a Changes requested in review of last pass. Also pulled isThumb into a
member, instead of resetting in every function that uses it.

llvm-svn: 34764
2007-02-28 23:20:38 +00:00
Evan Cheng f6ca943638 Doh. ARM::PC is obvious a reserved register.
llvm-svn: 34763
2007-02-28 23:12:34 +00:00
Reid Spencer d373b9dc59 For PR1205:
Adjust to changes in ConstantRange interface.

llvm-svn: 34762
2007-02-28 22:03:51 +00:00
Reid Spencer 9b3d6ec983 Move ConstantRange class to lib/Support from lib/Analysis and make its
interface not depend on Type or ICmpInst.

llvm-svn: 34761
2007-02-28 22:02:48 +00:00
Reid Spencer 0286bc1af5 Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.

llvm-svn: 34760
2007-02-28 22:00:54 +00:00
Jim Laskey 644af6b68f Chain is on second operand.
llvm-svn: 34759
2007-02-28 20:43:58 +00:00
Reid Spencer 3a7e9d8e75 For PR1205:
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.

llvm-svn: 34758
2007-02-28 19:57:34 +00:00
Reid Spencer 8774fe816a Implement a convenience method to construct a ConstantInt directly from an
APInt. The implied type is the integer type that corresponds to the bit
width of the APInt.

llvm-svn: 34757
2007-02-28 19:50:21 +00:00
Reid Spencer 56f784d12d For PR1205:
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.

llvm-svn: 34756
2007-02-28 18:57:32 +00:00
Dale Johannesen 440995bd9a Add intelligence about where to break large blocks.
llvm-svn: 34755
2007-02-28 18:41:23 +00:00
Chris Lattner 7373f3a351 remove dead option
llvm-svn: 34754
2007-02-28 18:39:53 +00:00
Chris Lattner debe91c78a Eliminate enable-x86-fastcc
llvm-svn: 34753
2007-02-28 18:38:58 +00:00
Jim Laskey c46bf3577d Handle mix of personalities.
llvm-svn: 34752
2007-02-28 18:38:31 +00:00
Jim Laskey c114990526 Provide a more meaningful name.
llvm-svn: 34751
2007-02-28 18:37:50 +00:00
Jim Laskey cf465fcebc MERGE_VALUES unnecessary.
llvm-svn: 34750
2007-02-28 18:37:04 +00:00