1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

324 Commits

Author SHA1 Message Date
Chris Lattner
b8c6acfbc0 Rename MachineCodeForBasicBlock to MachineBasicBlock
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Chris Lattner
33b00d8186 Move machine code generation/destruction passes out of Sparc.cpp because
they are generic

llvm-svn: 4310
2002-10-28 01:12:41 +00:00
Chris Lattner
e15e3807a1 Move addPassesToEmitAssembly from TargetMachine to UltraSparc because it
really is sparc specific.

llvm-svn: 4308
2002-10-28 01:03:43 +00:00
Misha Brukman
142795fd17 Changed MachineCodeForMethod' to MachineFunction'.
llvm-svn: 4301
2002-10-28 00:28:31 +00:00
Chris Lattner
cf9b4b2971 change ++ to +1 when using random access iterators
llvm-svn: 4292
2002-10-27 19:09:51 +00:00
Chris Lattner
25173c1b4d Prune #includes
llvm-svn: 4277
2002-10-25 02:01:33 +00:00
Chris Lattner
877a38f48e Fix misspelling
llvm-svn: 4276
2002-10-25 01:43:26 +00:00
Chris Lattner
b43b03614e Minor cleanups
Make sure to have a pass name

llvm-svn: 4268
2002-10-23 01:12:01 +00:00
Chris Lattner
dfc8fbf16b - Two minor improvements to the MachineInstr class to reduce footprint and
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
    bitvector.  Sped up LLC a little less than 10% in a debug build!

llvm-svn: 4261
2002-10-22 23:16:21 +00:00
Chris Lattner
6515ec02aa Make sure to escape \'s when they are output
llvm-svn: 4179
2002-10-15 19:56:24 +00:00
Vikram S. Adve
e4413c5804 Print "circular" warning message only in debug mode.
llvm-svn: 4170
2002-10-14 16:32:49 +00:00
Vikram S. Adve
3cb2d3379d Removed misleading const keyword.
llvm-svn: 4169
2002-10-14 16:32:24 +00:00
Chris Lattner
b16f596ab4 Allow emission of names that start with an underscore. This is needed to
interface with code that uses symbols in the ansi-c protected namespace.  In
most cases this comes from system header files, such as stdio.h.  In particular,
without this change, a reference to the __iob symbol is mangled into ll_iob,
which is not resolved by libc.

llvm-svn: 4165
2002-10-14 06:14:18 +00:00
Chris Lattner
fdf2ca9468 - Rename Instruction::First*Op to *OpsBegin, and Num*Ops to *OpsEnd to
reflect the fact that it's a range being defined.

llvm-svn: 4147
2002-10-13 19:39:16 +00:00
Vikram S. Adve
7436df838d Several major fixes, particularly in emitting constant aggregates:
(1) Padding bytes between structure fields (for alignment) were never
    being emitted into the constant pool so the layout did not match!
(2) In printing constants, structures containing structures or arrays
    were never handled.
(3) Support new model for external/uninitialized/initialized globals.
    Uninitialized globals are no longer emitted since they are external.
    Initialized globals may go either in .bss or in .data.

llvm-svn: 4134
2002-10-13 00:32:18 +00:00
Vikram S. Adve
032dee9564 Don't use %l0 for large operands to a SAVE since it is needed *before* SAVE!
We now use %g1 instead since that is shared and volatile.

llvm-svn: 4133
2002-10-13 00:24:06 +00:00
Vikram S. Adve
84fa49d0e5 Don't mark JMPLCALL and JMPLRET as branches.
llvm-svn: 4132
2002-10-13 00:22:32 +00:00
Vikram S. Adve
c78e160ede (1) Try to evaluate constant when multiplying 2 constants.
(2) Use intelligent multiply selection code for array allocas.
(3) Don't use cache padding for alloca'd stack slots!
(4) Bug fix in handling call arguments: was not copying sixth FP arg
    to int reg. when calling a function with no prototype.

llvm-svn: 4130
2002-10-13 00:18:57 +00:00
Vikram S. Adve
df4ed78bc9 Eliminate duplicate target pointer in SparcRegInfo.
llvm-svn: 4129
2002-10-13 00:06:04 +00:00
Vikram S. Adve
6b459791f7 Eliminate duplicate target pointer. Also add a few assertions.
llvm-svn: 4128
2002-10-13 00:05:30 +00:00
Vikram S. Adve
dc9d94262d Make sure to handle small negative values hiding as large unsigned longs --
this is a common case created by the front-end.

llvm-svn: 4127
2002-10-13 00:04:26 +00:00
Vikram S. Adve
29dd99d98b Major fix: extract ConstantExpr nodes and decompose them into symbolic
instructions so that (a) constant folding is done automatically before
code generation, and (b) selection does not have to deal with them.
Also, check for ConstantPointerRefs in additional to GlobalValues
when creating a GEP to load a global address.

llvm-svn: 4126
2002-10-13 00:01:57 +00:00
Vikram S. Adve
eb6d37c32b 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
06742cc0e0 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
1aed35b2e5 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
33b21ec523 Simplify Call translation slightly.
llvm-svn: 3963
2002-09-28 16:55:41 +00:00
Vikram S. Adve
940f3fa91b 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
ae0af2a164 Modify operand order for Create{Sign,Zero}ExtensionInstructions.
llvm-svn: 3960
2002-09-27 14:29:45 +00:00
Vikram S. Adve
2a87b4496f 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
6cff79b3e1 Decompose FP-to-UInt casts into FP-to-ULong-toUInt.
llvm-svn: 3957
2002-09-27 14:24:45 +00:00
Vikram S. Adve
a7e73bb0a0 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
508121e5d9 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
ed466a713a 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
82b15d7253 Peephole optimization pass on final machine code.
llvm-svn: 3840
2002-09-20 00:42:11 +00:00
Vikram S. Adve
6f0ad9998b 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
4a62f43843 Removed debug info printing
llvm-svn: 3778
2002-09-17 20:24:46 +00:00
Vikram S. Adve
d43591bbc5 Use ulong instead of uint for size expressions.
llvm-svn: 3744
2002-09-16 15:56:45 +00:00
Vikram S. Adve
59b3b6c07b 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
571ad069cc 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
58678cc06e 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
9e054e1d17 Again, including Module makes Function unnecessary.
llvm-svn: 3714
2002-09-14 02:07:43 +00:00
Chris Lattner
cb973bf5ee - 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
1b1f2b2f5e 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
58e8292647 Add new function UltraSparcInstrInfo::CreateZeroExtensionInstructions.
llvm-svn: 3581
2002-09-05 18:34:31 +00:00
Vikram S. Adve
e9990478f0 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
94b41af2f3 -- 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
e7aa2bf095 -- 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
3ce5b343c5 - 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
9a0d43e242 moved this file from lib/Reoptimizer/Mapping
llvm-svn: 3519
2002-08-27 22:47:33 +00:00
Anand Shukla
b18da43529 Added getFunctionInfo and MappingInfoForFunction pass, and fixed the earlier error in compiling
llvm-svn: 3513
2002-08-27 16:45:17 +00:00