Commit Graph

3216 Commits

Author SHA1 Message Date
Chris Lattner 07a5218b6e Fix testcases that used to now dead 'not' instruction
llvm-svn: 3330
2002-08-14 19:28:09 +00:00
Chris Lattner 94126ed044 Change not's to xors
llvm-svn: 3329
2002-08-14 19:26:34 +00:00
Chris Lattner 330b7ac76c Remove support for Not ConstantExpr. This simplifies the unary case to only
have to support the cast instruction, so the function is renamed to getCast.

llvm-svn: 3328
2002-08-14 18:24:09 +00:00
Chris Lattner b80b69cc3e Fix bug introduced in last checkin due to CastInst not being visible
llvm-svn: 3327
2002-08-14 18:22:19 +00:00
Chris Lattner 8fd96fcdaf Remove support for unary operators.
llvm-svn: 3326
2002-08-14 18:19:46 +00:00
Chris Lattner 9c968aaa5a Remove reference to GenericUnaryInst class
llvm-svn: 3325
2002-08-14 18:18:50 +00:00
Chris Lattner 875d512b49 Remove support for unary instructions
llvm-svn: 3324
2002-08-14 18:18:28 +00:00
Chris Lattner b193ff8f70 Remove support for NOT instruction
llvm-svn: 3323
2002-08-14 18:18:02 +00:00
Chris Lattner 0f4093938a Remove extra #includes
llvm-svn: 3322
2002-08-14 18:17:32 +00:00
Chris Lattner 725b9e5033 Remove constant propogation support for NOT instruction
llvm-svn: 3321
2002-08-14 18:17:07 +00:00
Chris Lattner 7a74051566 Remove support for NOT instruction
llvm-svn: 3320
2002-08-14 18:00:52 +00:00
Chris Lattner cd09f750bf Remove information about dead 'not' instruction
llvm-svn: 3319
2002-08-14 17:55:59 +00:00
Chris Lattner 6e1a1b1289 Remove support for unary operators
llvm-svn: 3318
2002-08-14 17:53:45 +00:00
Chris Lattner 3733c7374e Implement two constructor functions for "unary" instructions
llvm-svn: 3317
2002-08-14 17:52:27 +00:00
Chris Lattner 4ec79c3e6f Remove support forNOT instruction
llvm-svn: 3316
2002-08-14 17:52:06 +00:00
Chris Lattner 31ae863284 - Fix InstCombine pass to not generate or process NOT instructions
- Fixed testcases to not use them either.

llvm-svn: 3315
2002-08-14 17:51:49 +00:00
Chris Lattner b7a74232bc Expose two new static methods from BinaryOperator: createNeg, createNot
llvm-svn: 3314
2002-08-14 17:51:29 +00:00
Chris Lattner b3c2af69fe Remove support for NOT instruction
llvm-svn: 3313
2002-08-14 17:45:39 +00:00
Chris Lattner 0764967cd7 Remove illegal test now that not instruction does not exist.
llvm-svn: 3312
2002-08-14 17:44:00 +00:00
Chris Lattner c59703b1fa Make sure there is SOME output always so the test is not rerun when unneccesary.
llvm-svn: 3311
2002-08-14 17:38:15 +00:00
Chris Lattner f9b9af0887 The not instruction is just a specialized form of XOR
llvm-svn: 3310
2002-08-14 17:37:04 +00:00
Chris Lattner db3b202be8 AsmParser turns 'not' instructions into 'xor' instructions now.
llvm-svn: 3309
2002-08-14 17:12:33 +00:00
Chris Lattner 31408f7a80 Return null on failure, instead of aborting.
llvm-svn: 3308
2002-08-14 17:12:13 +00:00
Vikram S. Adve 2d01206a37 Add method MachineInstr::substituteValue() which substitutes
one Value with another one in all operands and implicit references
of the machine instruction.

Also add method MachineOperand::getVRegValueOrNull().

llvm-svn: 3307
2002-08-14 16:54:11 +00:00
Vikram S. Adve fa99db77a8 Add method MachineInstr::substituteValue() which substitutes
one Value with another one in all operands and implicit references
of the machine instruction.

llvm-svn: 3306
2002-08-14 16:52:58 +00:00
Chris Lattner 4a2ca022f5 Updated GettingStarted guide to be accurate now that binaries are in /shared
llvm-svn: 3305
2002-08-13 21:10:30 +00:00
Chris Lattner 1330428256 Add a note that specifies that the whether or not sign extension is done by
a cast is determined by the source operand.

llvm-svn: 3304
2002-08-13 20:52:09 +00:00
Chris Lattner 42f596feda Minor change to make lli print out characters numerically as well as symbolically
llvm-svn: 3303
2002-08-13 20:45:11 +00:00
Vikram S. Adve a3efa260ea Bug fix in TargetData::getIndexedOffset: We were using the pointer
type instead of the element type for the element size for arrays.

llvm-svn: 3302
2002-08-13 18:17:56 +00:00
Vikram S. Adve 4f729affe6 Several bug fixes in casting to signed int values.
llvm-svn: 3301
2002-08-13 18:04:08 +00:00
Chris Lattner 8328263606 - Rename ConstantGenericIntegral -> ConstantIntegral
llvm-svn: 3300
2002-08-13 17:50:24 +00:00
Chris Lattner b1585a90d9 - Rename ConstantGenericIntegral -> ConstantIntegral
- Add new methods to ConstantIntegral: getMaxValue, getMinValue,
   getAllOnesValue

llvm-svn: 3299
2002-08-13 17:50:20 +00:00
Chris Lattner 1f25c93ac0 - Rename ConstantGenericIntegral -> ConstantIntegral
- Add new methods to ConstantIntegral: getMaxValue, getMinValue,
   getAllOnesValue

llvm-svn: 3298
2002-08-13 17:50:18 +00:00
Vikram S. Adve 3a5a29faf4 Handle small unsigned results correctly by clearing high bits.
Bug fixes in casting to signed int values.

llvm-svn: 3297
2002-08-13 17:40:54 +00:00
Brian Ensink 9c9e548596 Build correctly in the face of /shared.
-Chris

llvm-svn: 3296
2002-08-12 22:09:44 +00:00
Chris Lattner 56e9166b84 - Clean up interface to Sparc register handling a bit:
- Eliminate Sparc*Order classes, moving contents to Sparc*Class classes
   - get register name methods now return const char * const pointers instead
     of std::string's.
   - Added file header comments to SparcRegClassInfo.(cpp|h)
   - Moved BIG constant arrays out of SparcRegClassInfo.h, into
     SparcRegInfo.cpp.  This should allow a LOT of std::string constructors to
     not have to be called.

llvm-svn: 3295
2002-08-12 21:25:05 +00:00
Chris Lattner f43b003aba Return const char * const instead of std::string from get register name method
llvm-svn: 3294
2002-08-12 21:24:55 +00:00
Chris Lattner 41e99a07f1 - Added a new superclass of ConstantBool/ConstantInt: ConstantGenericIntegral
- Moved InstCombine: isMaxValue, isMinValue, isAllOnesValue to Constants.h

llvm-svn: 3293
2002-08-12 21:21:21 +00:00
Chris Lattner 83a024ab12 Tools are now moved into /shared
llvm-svn: 3292
2002-08-12 21:20:59 +00:00
Chris Lattner 01f68c6d78 - Makefile changes:
- Now build executables into /shared
   - New BUILD_ROOT_TOP variable which is basically = $(BUILD_ROOT)/$(LEVEL) but
     cleaner and works for llvm/test/*
   - Use := more in Makefile.common

llvm-svn: 3291
2002-08-12 21:19:28 +00:00
Chris Lattner e6794490ec * Factor a bunch of code by using ReplaceInstUsesWith
* Move isMaxValue, isMinValue, isAllOnesValue to Constants.h

llvm-svn: 3290
2002-08-12 21:17:25 +00:00
Chris Lattner 68fe621771 Remove some extraneous #includes
llvm-svn: 3289
2002-08-12 20:24:46 +00:00
Chris Lattner 7d9a14d5d9 Changes to make GlobalValueRefMap not derive from std::map.
llvm-svn: 3288
2002-08-12 20:23:29 +00:00
Chris Lattner 593a74adc5 Add comment
llvm-svn: 3287
2002-08-12 19:18:49 +00:00
Chris Lattner 6d14f2a7ae New functionality for instcombine:
* New ReplaceInstUsesWith function to factor out tons of common code
     This needs to be used more in the future still, but it's a good start
   * New InsertNewInstBefore to allow multi-instruction replacements
   * Change getMaxValue functions to isAllOnesValue function, which doesn't
     have to CREATE/lookup a new constant.  Also the name is accurate
   * Add new isMaxValue, isMinValue, isMaxValueMinusOne, isMinValuePlusOne
     functions:  This should be moved to Constant* classes eventually
   * Implement xor X, ALLONES -> not X
   * Fold ALL setcc's of booleans away
   * Handle various SetCC's for integers against values at the end of their
     ranges, possibly off by one.  This implements the setcc-strength-reduce.ll
     testcase.

llvm-svn: 3286
2002-08-09 23:47:40 +00:00
Chris Lattner 169f7b299c xor x, ALLONES should -> not x
llvm-svn: 3285
2002-08-09 23:34:39 +00:00
Chris Lattner b86ab650f6 setcc of booleans should always be eliminated
llvm-svn: 3284
2002-08-09 23:34:18 +00:00
Chris Lattner 840d4699e4 Add more strength reduction testcases
llvm-svn: 3283
2002-08-09 23:33:58 +00:00
Chris Lattner 0d92ff0488 *** empty log message ***
llvm-svn: 3282
2002-08-09 22:52:08 +00:00
Chris Lattner e836b583e0 * IntervalPartition no longer derives from vector
llvm-svn: 3281
2002-08-09 22:52:06 +00:00