Commit Graph

3147 Commits

Author SHA1 Message Date
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
Chris Lattner 2253a154d7 Do not add an extra vtable to EVERY machineinstr created.
llvm-svn: 3280
2002-08-09 21:49:21 +00:00
Chris Lattner a09b01b2c1 UnaryOperator::create should take a name just like BinaryOperator::create
llvm-svn: 3279
2002-08-09 21:39:38 +00:00
Chris Lattner 959a5fbf8e * Removed extraneous #includes
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes

llvm-svn: 3278
2002-08-09 20:08:06 +00:00
Chris Lattner 02e7a86fec * Removed extraneous #includes
* Fixed file headers to be consistent with the rest of LLVM
* Other minor fixes

llvm-svn: 3277
2002-08-09 20:08:03 +00:00
Chris Lattner 3c3457ccea We are using std::vector, so remove extraneous namespace prefixes
llvm-svn: 3275
2002-08-09 20:05:34 +00:00
Chris Lattner 107914c2ac Change machinecode for instruction to not inherit from vector.
llvm-svn: 3274
2002-08-09 20:04:28 +00:00
Chris Lattner 06524e2f07 The second parameter of hash_set is the default, remove it.
llvm-svn: 3273
2002-08-09 19:40:42 +00:00
Chris Lattner e5b0f6574b Oops, I accidentally broke the .d files. Fixed thusly
llvm-svn: 3272
2002-08-09 19:18:12 +00:00
Chris Lattner e08000ac9f Very minor cleanups
llvm-svn: 3271
2002-08-09 18:55:18 +00:00
Chris Lattner a6540a7b9f * Document the BUILD_ROOT changes and option
* Convert directories to <tt> like they should be

llvm-svn: 3270
2002-08-09 16:14:56 +00:00
Chris Lattner 77330fa15c * Remove some bogus dependencies on Depend/.dir
* Build into the machine local /shared directory instead of using local
  Debug/Depend/Release directories

llvm-svn: 3269
2002-08-09 15:41:55 +00:00
Chris Lattner 56d9e2202f Oh yeah, I wrote it.
llvm-svn: 3268
2002-08-08 20:23:41 +00:00
Chris Lattner 34ceebe344 Initial checkin of the "Writting an LLVM Pass" document
llvm-svn: 3267
2002-08-08 20:11:18 +00:00
Chris Lattner ed7ac42c6a Initial checkin of the "Hello World" Pass.
llvm-svn: 3266
2002-08-08 20:10:38 +00:00
Chris Lattner f0ed55d1ee - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument

llvm-svn: 3265
2002-08-08 19:01:30 +00:00
Chris Lattner 40eb9dafed - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument

llvm-svn: 3264
2002-08-08 19:01:28 +00:00
Chris Lattner 4b2ee2e848 - Cleaned up the interface to AnalysisUsage to take analysis class names
instead of ::ID's.
 - Pass::getAnalysis<> now no longer takes an optional argument

llvm-svn: 3263
2002-08-08 19:01:11 +00:00
Chris Lattner 650449a1df Remove extraneous #includes
llvm-svn: 3262
2002-08-08 19:00:34 +00:00
Chris Lattner b3ce9fc449 Minor changes to DEBUG()'s
llvm-svn: 3261
2002-08-07 21:41:11 +00:00