Commit Graph

306 Commits

Author SHA1 Message Date
Vikram S. Adve d50fb11d18 Silly bug fix: Machine code vector could be empty for a no-op cast instruction,
e.g., cast double to double.

llvm-svn: 3633
2002-09-09 14:54:21 +00:00
Vikram S. Adve f5d585d185 Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
llvm-svn: 3581
2002-09-05 18:34:31 +00:00
Vikram S. Adve 549489aa77 Bug fixes in casting between floats and ints smaller than 64 bits.
Add UltraSparcInstrInfo::CreateZeroExtensionInstructions to help with that.

llvm-svn: 3580
2002-09-05 18:33:59 +00:00
Vikram S. Adve 7bc45123d3 -- Use size of pointer element type instead of pointer type in array offsets!
-- A few bug fixes in casting between floats and ints.
-- Use SRL reg, 0 instead of AND reg, 0xffffffff to clear high 32 bits.

llvm-svn: 3579
2002-09-05 18:32:13 +00:00
Vikram S. Adve 93407286ed -- Bug fix: use byte offsets not typed offsets in output assembly!
-- Add support for ConstantExpr constants (only cast and add operators so far)
-- Avoid generating label Bbss.bss, which sometimes came out twice.

llvm-svn: 3578
2002-09-05 18:28:10 +00:00
Chris Lattner b0b412e66e - Renamed Type::isIntegral() to Type::isInteger()
- Added new method Type::isIntegral() that is the same as isInteger, but
    also accepts bool.

llvm-svn: 3574
2002-09-03 01:08:28 +00:00
Anand Shukla bcba516097 moved this file from lib/Reoptimizer/Mapping
llvm-svn: 3519
2002-08-27 22:47:33 +00:00
Anand Shukla f246131208 Added getFunctionInfo and MappingInfoForFunction pass, and fixed the earlier error in compiling
llvm-svn: 3513
2002-08-27 16:45:17 +00:00
Vikram S. Adve bee7297f26 LoadIdx non-terminal no longer needed.
llvm-svn: 3499
2002-08-24 20:58:04 +00:00
Vikram S. Adve 541862fbf3 Sign-extend values used to index arrays (and Simplify
SetOperandsForMemInstr significantly).  Load and Store
no longer have any indices.  Eliminate spurious sign-extension
on a cast to float/double.

llvm-svn: 3498
2002-08-24 20:56:53 +00:00
Vikram S. Adve 9068efdce6 Fix sign-extension: it needs to happen *after* multiplying by type size.
llvm-svn: 3497
2002-08-24 14:44:58 +00:00
Vikram S. Adve b342572667 Simplify previous hack slightly.
llvm-svn: 3490
2002-08-23 03:21:01 +00:00
Vikram S. Adve 1c84243d47 Force sign-extension for uint array indexes from 32-bit to 64-bits
since uint is not normally sign-extended when casting to uint64_t.

llvm-svn: 3489
2002-08-23 02:55:51 +00:00
Chris Lattner 02fe752fbd Eliminated the MemAccessInst class, folding contents into GEP class.
llvm-svn: 3488
2002-08-22 23:37:24 +00:00
Chris Lattner f18177ea01 Change code to not use the copyOperands method added to User. It's now
more efficient to boot.

llvm-svn: 3453
2002-08-22 15:57:58 +00:00
Vikram S. Adve a6100862d3 Fix two resource names.
llvm-svn: 3443
2002-08-22 02:58:57 +00:00
Vikram S. Adve c3a5e4e0f8 Add AsmPrinter::ConstantExprToString, which writes out a ConstantExpr
as an expression.

llvm-svn: 3442
2002-08-22 02:58:36 +00:00
Vikram S. Adve 2d85a9976a Eliminate bool, boolreg and boolconst nonterminals, and just use
reg and Constant instead.

llvm-svn: 3441
2002-08-22 02:56:10 +00:00
Vikram S. Adve e56681c891 Change rules for Not, since it is now implemented as Xor(reg,11..1).
Eliminate bool, boolreg and boolconst nonterminals, and just use
reg and Constant instead.

llvm-svn: 3440
2002-08-22 02:55:21 +00:00
Chris Lattner 74469f858f This case JUST handles constantpointer nulls, not all pointers.
llvm-svn: 3402
2002-08-20 17:02:48 +00:00
Vikram S. Adve caed269085 Revise code generation for unary Not (boolean and bitwise), which is
no longer a separate instruction but is instead implemented with XOR.

llvm-svn: 3342
2002-08-15 14:17:37 +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
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 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 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
Mehwish Nagda 428a0ba612 added Mapping and Function Pass
llvm-svn: 3251
2002-08-05 23:23:19 +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 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
Chris Lattner b430c3f395 Fix compilation problem. IsIndexZero doesn't exist, use IsZero instead.
llvm-svn: 3243
2002-08-03 20:57:38 +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 6d6deba9f9 Bug fix: incorrect SAVE instruction when using register for stack size.
llvm-svn: 3198
2002-08-01 14:26:11 +00:00
Vikram S. Adve c19b1cc168 Just improved comments and assertions.
llvm-svn: 3191
2002-07-31 21:13:31 +00:00
Vikram S. Adve defe6ec939 Add a missing case: converting float/double to unsigned integer types.
llvm-svn: 3188
2002-07-31 21:01:34 +00:00
Chris Lattner 31d05fdd0a * Move InstructionSelection pass to lib/CodeGen/InstrSelection so it is
shared by backends.

llvm-svn: 3146
2002-07-30 03:56:16 +00:00
Mehwish Nagda 26c7e5839e changed implementation of LLVM BYTECODE Length
llvm-svn: 3089
2002-07-25 17:22:48 +00:00
Chris Lattner 10073a9080 *** empty log message ***
llvm-svn: 3075
2002-07-25 06:17:51 +00:00
Chris Lattner 3091e11726 GCC 3.1 changes, finally the burm file builds the FIRST time a clean directory is built.
llvm-svn: 3073
2002-07-25 06:08:32 +00:00
Chris Lattner e98dd5fcac *** empty log message ***
llvm-svn: 3056
2002-07-24 21:21:32 +00:00
Chris Lattner a896b08b5c *** empty log message ***
llvm-svn: 3002
2002-07-23 17:52:38 +00:00
Mehwish Nagda f6f772b1af moved from CodeGen to this dir
llvm-svn: 2992
2002-07-22 22:09:35 +00:00
Anand Shukla 889faf8bc9 Adding code for outputing length in .s
llvm-svn: 2979
2002-07-21 09:35:01 +00:00
Chris Lattner 3e751859ec * Make global variables with external linkage get emitted correctly
* Do NOT add a prefix to global variables that are external
* Add newline after emitting a constpointerref

llvm-svn: 2925
2002-07-16 18:35:16 +00:00
Mehwish Nagda 382f286ae7 Added the Mapping Pass to out put Mapping Info to .s file
llvm-svn: 2913
2002-07-15 23:58:21 +00:00
Anand Shukla cf764680ad added std:: to vector
llvm-svn: 2874
2002-07-11 00:16:28 +00:00