Commit Graph

30690 Commits

Author SHA1 Message Date
Zhou Sheng af4341d441 In APInt version ComputeMaskedBits():
1. Ensure VTy, KnownOne and KnownZero have same bitwidth.
  2. Make code more efficient.

llvm-svn: 35078
2007-03-13 02:23:10 +00:00
Evan Cheng 818242bbaf Implement getTargetLowering() or else LSR won't be using ARM specific hooks.
llvm-svn: 35077
2007-03-13 01:20:42 +00:00
Evan Cheng b7004fd889 More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
llvm-svn: 35076
2007-03-12 23:37:10 +00:00
Evan Cheng 2150b9286f Updated TargetLowering LSR addressing mode hooks for ARM and Thumb.
llvm-svn: 35075
2007-03-12 23:30:29 +00:00
Evan Cheng b9dce9db85 More flexible TargetLowering LSR hooks for testing whether an immediate is a legal target address immediate or scale.
llvm-svn: 35074
2007-03-12 23:29:01 +00:00
Evan Cheng 3ab7ea7965 More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale.

llvm-svn: 35073
2007-03-12 23:28:50 +00:00
Evan Cheng 720acdfb31 Use new TargetLowering addressing modes hooks.
llvm-svn: 35072
2007-03-12 23:27:37 +00:00
Evan Cheng 6486974e8d More flexible TargetLowering LSR hooks for testing whether an immediate is
a legal target address immediate or scale.

llvm-svn: 35071
2007-03-12 23:26:27 +00:00
Evan Cheng 57f261b13a Stupid bug: SSE2 supports v2i64 add / sub.
llvm-svn: 35070
2007-03-12 22:58:52 +00:00
Reid Spencer 6223c05805 Revert the last patch as it violates the conditions of sext/zext.
llvm-svn: 35068
2007-03-12 18:37:25 +00:00
Jeff Cohen 72ac14ed29 Unbreak C++ build.
llvm-svn: 35067
2007-03-12 17:57:00 +00:00
Jeff Cohen 00227417d2 Unbreak VC++ build. Do not use identifiers starting with _ as they are reserved and
can collide with system defined names.  Windows defines _BB, for example.

llvm-svn: 35066
2007-03-12 17:56:27 +00:00
Zhou Sheng 3999ffa0c8 For APInt::z/sext(width), if width == BitWidth, just return *this.
llvm-svn: 35065
2007-03-12 17:47:45 +00:00
Reid Spencer 1791f23803 Add an APInt version of SimplifyDemandedBits.
Patch by Zhou Sheng.

llvm-svn: 35064
2007-03-12 17:25:59 +00:00
Reid Spencer d9281784be Add an APInt version of ShrinkDemandedConstant.
Patch by Zhou Sheng.

llvm-svn: 35063
2007-03-12 17:15:10 +00:00
Zhou Sheng be171ee5cd Avoid to assert on "(KnownZero & KnownOne) == 0".
llvm-svn: 35062
2007-03-12 16:54:56 +00:00
Zhou Sheng b3e00c4656 In function ComputeMaskedBits():
1. Replace getSignedMinValue() with getSignBit() for better code readability.
  2. Replace APIntOps::shl() with operator<<= for convenience.
  3. Make APInt construction more effective.

llvm-svn: 35060
2007-03-12 05:44:52 +00:00
Zhou Sheng e8e618a6ff Add getSignBit() and operator<<= into APInt for convenience.
llvm-svn: 35059
2007-03-11 07:16:10 +00:00
Nick Lewycky d9bd0bc3e2 Add value ranges. Currently inefficient in both execution time and
optimization power.

llvm-svn: 35058
2007-03-10 18:12:48 +00:00
Anton Korobeynikov 8a6dc102d3 Use range tests in LowerSwitch, where possible
llvm-svn: 35057
2007-03-10 16:46:28 +00:00
Nick Lewycky e455937fae Add getter methods for the extremes of a ConstantRange.
llvm-svn: 35056
2007-03-10 15:54:12 +00:00
Bill Wendling e9b81f5366 Adding more arithmetic operators to MMX. This is an almost exact copy of
the addition. Please let me know if you have suggestions.

llvm-svn: 35055
2007-03-10 09:57:05 +00:00
Reid Spencer 9d1c347921 Add required header file.
llvm-svn: 35054
2007-03-10 05:57:57 +00:00
Devang Patel 5f50e61d52 Remove dead comments.
llvm-svn: 35053
2007-03-09 23:41:03 +00:00
Devang Patel bda1250624 Avoid recursion. Use iterative algorithm for RenamePass().
llvm-svn: 35052
2007-03-09 23:39:14 +00:00
Devang Patel 58818c530f Increment iterator now because IVUseShouldUsePostIncValue may remove
User from the list of I users.

llvm-svn: 35051
2007-03-09 21:19:53 +00:00
Reid Spencer ad3618a33d Regenerate.
llvm-svn: 35050
2007-03-09 21:19:09 +00:00
Evan Cheng 09663aeac7 Minor stuff.
llvm-svn: 35049
2007-03-09 19:46:06 +00:00
Evan Cheng 31ef0ab7cf Add comments about LSR / ARM.
llvm-svn: 35048
2007-03-09 19:35:33 +00:00
Evan Cheng 603f3094eb Unfinished work and ideas related to register scavenger.
llvm-svn: 35047
2007-03-09 19:34:51 +00:00
Reid Spencer 3fcf0c24a9 For PR1245:
Account for the sign bit when computing the number of bits required for
a negative integer literal constant.

llvm-svn: 35046
2007-03-09 19:26:52 +00:00
Dale Johannesen 368faf9acd apply comments from review of last patch
llvm-svn: 35045
2007-03-09 19:18:59 +00:00
Dale Johannesen af0cff2671 Add some observations from CoreGraphics benchmark. Remove register
scavenging todo item, since it is now implemented.

llvm-svn: 35044
2007-03-09 17:58:17 +00:00
Anton Korobeynikov 2f4ae5306e Unbreak mingw32 build
llvm-svn: 35042
2007-03-09 11:53:34 +00:00
Evan Cheng df7949a8d0 If a virtual register is already marked alive in this block, that means it is
alive in one of the successor block. Do not add it to the kill list.

llvm-svn: 35041
2007-03-09 09:48:56 +00:00
Evan Cheng 9bc8d4b6f2 Print preds / succs BB numbers.
llvm-svn: 35040
2007-03-09 08:29:08 +00:00
Evan Cheng 91b0790297 Avoid variable shadowing.
llvm-svn: 35039
2007-03-09 06:02:17 +00:00
Bill Wendling 16574a72e1 Don't use std::hex.
llvm-svn: 35038
2007-03-08 23:37:24 +00:00
Bill Wendling 61a2773977 Don't use a cast. It causes an error on some platforms.
llvm-svn: 35037
2007-03-08 23:26:50 +00:00
Evan Cheng fe7b8a7c68 Test inline asm modifier 'c'.
llvm-svn: 35036
2007-03-08 22:45:31 +00:00
Evan Cheng ea28fc5dc4 Implement inline asm modifier c.
llvm-svn: 35035
2007-03-08 22:42:46 +00:00
Chris Lattner 577e8b4ed8 upgrade this testcase, add test for fp immediate to memory operand.
llvm-svn: 35034
2007-03-08 22:33:06 +00:00
Chris Lattner ce8aba03ee implement support for floating point constants used as inline asm memory operands.
llvm-svn: 35033
2007-03-08 22:29:47 +00:00
Bill Wendling c8eb6b1b15 Add MMX arithmetic testcase.
llvm-svn: 35032
2007-03-08 22:14:51 +00:00
Bill Wendling 6092ce25cf Added "padd*" support for MMX. Added MMX move stuff to X86InstrInfo so that
moves, loads, etc. are recognized.

llvm-svn: 35031
2007-03-08 22:09:11 +00:00
Evan Cheng 63170b6959 Fix a typo.
llvm-svn: 35030
2007-03-08 21:59:30 +00:00
Evan Cheng f4d1ee7ff2 Fix test case.
llvm-svn: 35029
2007-03-08 19:27:32 +00:00
Devang Patel 01919d2c0b Speed Up Pass Manager.
- Check Immutableness before searching PreservedSet.
- Avoid unnecessary traversal while setting Last User.

llvm-svn: 35028
2007-03-08 19:05:01 +00:00
Zhou Sheng d1eb3d593e Fix a bug in function ComputeMaskedBits().
llvm-svn: 35027
2007-03-08 15:15:18 +00:00
Evan Cheng ddf082082c Putting more constants which do not contain relocations into .literal{4|8|16}
llvm-svn: 35026
2007-03-08 08:31:54 +00:00