Commit Graph

302 Commits

Author SHA1 Message Date
Vikram S. Adve d76d82b40f Return address register should be marked as "result" for the JMPL instruction
since it is defined by the instruction.

llvm-svn: 3966
2002-09-28 17:00:15 +00:00
Vikram S. Adve 6d1036d41b Live ranges for Return value and return address of a Call are no longer
created here.  Instead they are created in LiveRangeInfo.cpp.  This
simplifies the code here quite a bit.

llvm-svn: 3965
2002-09-28 16:59:05 +00:00
Vikram S. Adve cce628aeaf Simplified code that handles call args and rets, so it no longer
needs the RegClass list to be passed in.

llvm-svn: 3964
2002-09-28 16:56:59 +00:00
Vikram S. Adve 4bb9866dc5 Simplify Call translation slightly.
llvm-svn: 3963
2002-09-28 16:55:41 +00:00
Vikram S. Adve 34d16d64b0 Overhaul integer conversions to match C++ ISO standard.
Don't allow direct FP-to-uint conversion (must be eliminated by preselection).
Address arithmetic for arrays is now entirely 64-bit so no sign-ext needed.

llvm-svn: 3961
2002-09-27 14:33:08 +00:00
Vikram S. Adve 40e2347b90 Modify operand order for Create{Sign,Zero}ExtensionInstructions.
llvm-svn: 3960
2002-09-27 14:29:45 +00:00
Vikram S. Adve d238de02c7 Bug fix: some redundant copies were not being deleted after detection :-|.
llvm-svn: 3959
2002-09-27 14:27:37 +00:00
Vikram S. Adve 46aeb8c7c2 Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
llvm-svn: 3957
2002-09-27 14:24:45 +00:00
Vikram S. Adve 8e6e1816c0 Put intermediate source files in a subdirectory here instead of with
object files.  Also,

llvm-svn: 3884
2002-09-23 13:12:28 +00:00
Anand Shukla ca15c99c4d Initial version: it adds 2 empty slots at the top of stack
llvm-svn: 3872
2002-09-21 04:58:26 +00:00
Vikram S. Adve bbf45f6960 Added class MachineOptInfo as interface to target-specific
routines supporting machine code optimization.
Also added method MachineInstrInfo::getNOPOpCode().

llvm-svn: 3845
2002-09-20 00:52:09 +00:00
Vikram S. Adve 5e1c434572 Peephole optimization pass on final machine code.
llvm-svn: 3840
2002-09-20 00:42:11 +00:00
Vikram S. Adve e9ac29b475 Moving these files from Code/PreSelection to here.
Original logs for PreSelection.cpp:

  revision 1.2
  date: 2002/09/17 23:50:32;  author: lattner;  state: Exp;  lines: +1 -3
  Don't put default parameter values into .cpp files, it breaks 3.x compilers

  revision 1.1
  date: 2002/09/16 15:31:13;  author: vadve;  state: Exp;
  New preselection pass that specializes LLVM code for a target machine,
  while remaining in legal portable LLVM form and preserving type
  information and type safety.

llvm-svn: 3838
2002-09-20 00:29:28 +00:00
Anand Shukla ff0248c47c Removed debug info printing
llvm-svn: 3778
2002-09-17 20:24:46 +00:00
Vikram S. Adve b048d6633d Use ulong instead of uint for size expressions.
llvm-svn: 3744
2002-09-16 15:56:45 +00:00
Vikram S. Adve fff5ffde27 Add methods to query about the representation of LLVM quantities (e.g.,
constants).  Useful for target-dependent LLVM transformations like
Preselection.

llvm-svn: 3743
2002-09-16 15:56:01 +00:00
Vikram S. Adve 8cbdbd8e2e Don't print out global names unnecesssarily. Also, expose pass
constructors so passes can be inserted by TargetMachine.cpp.

llvm-svn: 3742
2002-09-16 15:54:02 +00:00
Vikram S. Adve 36d3e03fa0 Move all the code that creates code generation passes from Sparc.cpp to
TargetMachine.cpp, since it is entirely machine-independent.
Also, add options to disable optional back-end passes (preselection and
instr. scheduling).

llvm-svn: 3740
2002-09-16 15:39:26 +00:00
Misha Brukman 834885fb82 Again, including Module makes Function unnecessary.
llvm-svn: 3714
2002-09-14 02:07:43 +00:00
Chris Lattner e314bf5264 - Change getelementptr instruction to use long indexes instead of uint
indexes for sequential types.

llvm-svn: 3683
2002-09-11 01:21:35 +00:00
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
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 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 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 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