Commit Graph

3123 Commits

Author SHA1 Message Date
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
Chris Lattner 3147fd226a Reorder #includes to be right
llvm-svn: 3260
2002-08-07 21:41:03 +00:00
Chris Lattner c93df6bf22 Merge three loops into one.
llvm-svn: 3259
2002-08-07 21:39:48 +00:00
Chris Lattner e64e62eff9 Fix breakage in the build
llvm-svn: 3258
2002-08-07 21:39:39 +00:00
Chris Lattner 24c550cd2d Only include the sparc.o file once!
llvm-svn: 3257
2002-08-07 19:42:34 +00:00
Chris Lattner b4101b1373 Simplify writing custom parsers.
llvm-svn: 3256
2002-08-07 18:36:37 +00:00
Chris Lattner 5b13472129 Simplify interface to parsers.
llvm-svn: 3255
2002-08-07 18:36:27 +00:00
Chris Lattner 74ea5a67ce * Write the "Custom parser" section
* Boldify stuff that changes in the help output.

llvm-svn: 3254
2002-08-07 18:27:04 +00:00
Chris Lattner 507612981a Write the reference section, make other minor editing changes elsewhere.
llvm-svn: 3253
2002-08-06 19:36:06 +00:00
Mehwish Nagda 428a0ba612 added Mapping and Function Pass
llvm-svn: 3251
2002-08-05 23:23:19 +00:00
Vikram S. Adve e93d33cc24 Add function GetConstantValueAsUnsignedInt.
llvm-svn: 3249
2002-08-04 20:55:59 +00:00
Vikram S. Adve 482ab44175 Bug fix in CreateCodeToLoadConst(): use sign of dest, not operand,
in choosing how to create int-set instructions.

llvm-svn: 3248
2002-08-04 20:55:37 +00:00
Vikram S. Adve 89f992bf2c Add a sequence of GEPs with constant indices, for folding.
llvm-svn: 3247
2002-08-04 20:53:14 +00:00
Vikram S. Adve 71895b28cc Bug fix in TargetData::getIndexedOffset(): handle struct offset
after array offset correctly.  The type was not being updated for
array offsets!

llvm-svn: 3246
2002-08-04 20:52:39 +00:00
Vikram S. Adve b4a9685872 Bug fix in SetOperandsForMemInstr: handle leading zeros correctly
when folding or not folding GEPs.

llvm-svn: 3245
2002-08-04 20:51:05 +00:00
Vikram S. Adve 1a1c3ed56d Add function GetConstantValueAsUnsignedInt.
Fix 2 bugs in FoldGetElemChain so index vector is not modified
when no GEPs are folded in, and so a hasLeadingZero is computed
only for the last folded GEP, not the one after that if any.

llvm-svn: 3244
2002-08-04 20:49:49 +00:00
Chris Lattner b430c3f395 Fix compilation problem. IsIndexZero doesn't exist, use IsZero instead.
llvm-svn: 3243
2002-08-03 20:57:38 +00:00
Chris Lattner 419bda15f5 Testcase for stuff instcombine should do eventually
llvm-svn: 3240
2002-08-03 20:30:26 +00:00
Chris Lattner ff61e352ae Add some more features that we could instcombine away
llvm-svn: 3239
2002-08-03 20:24:58 +00:00
Chris Lattner 4b03304600 *** empty log message ***
llvm-svn: 3238
2002-08-03 20:24:45 +00:00
Chris Lattner ead864f089 Comment options that may be enabled
llvm-svn: 3237
2002-08-03 20:19:30 +00:00
Vikram S. Adve 1944064801 Simplified handling of array indexes in SetMemOperands_Internal.
llvm-svn: 3236
2002-08-03 13:48:21 +00:00
Vikram S. Adve a173017d7b Add MemAccessInst::getNumIndices().
llvm-svn: 3234
2002-08-03 13:22:36 +00:00
Vikram S. Adve 4737dd7268 Eliminate cast instructions: use only GEPs in decomposed sequence.
Don't decompose if there are 2 indices with 0 as first index.
Compute Changed flag correctly in runOnBasicBlock().

llvm-svn: 3233
2002-08-03 13:21:15 +00:00
Vikram S. Adve eaf18e16fe Run both *.ll and *.c tests.
llvm-svn: 3232
2002-08-03 13:17:03 +00:00