1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

360 Commits

Author SHA1 Message Date
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
28d6f5bc40 Remove dead fixme
llvm-svn: 4300
2002-10-27 21:23:43 +00:00
Chris Lattner
e4e731b30c Instruction select constant arguments correctly
llvm-svn: 4297
2002-10-27 21:16:59 +00:00
Chris Lattner
046cb65220 Add instruction definitions for mov r, imm instructions
llvm-svn: 4296
2002-10-27 21:16:44 +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
d25a097994 Initial checkin of X86 backend.
We can instruction select exactly one instruction 'ret void'.  Wow.

llvm-svn: 4284
2002-10-25 22:55:53 +00:00
Chris Lattner
cfa05a3de9 Build the X86 target as well
llvm-svn: 4283
2002-10-25 22:55:05 +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
Chris Lattner
294eae6735 - Add an endianness field to the TargetData datastructure
llvm-svn: 4174
2002-10-14 22:41:13 +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
Vikram S. Adve
c6fe6822ca Don't try to compute the size of an "array" element if the index is 0:
the size may be unknown, and is not needed.

llvm-svn: 4153
2002-10-13 21:47:44 +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
7387d96d6a Use vectors instead of hash_maps for issueGaps and conflictLists.
These hash lookups were a major sink of time because they happen so often!

llvm-svn: 4136
2002-10-13 00:37:46 +00:00
Vikram S. Adve
7b920c5768 Run LICM before GCSE!
llvm-svn: 4135
2002-10-13 00:34:10 +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
Chris Lattner
0f9d9214ab Convert TargetData to be an ImmutablePass
llvm-svn: 3927
2002-09-25 23:46:55 +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
Vikram S. Adve
20fc3f0ffd Disable reassociation pass in LLC until it is fixed.
llvm-svn: 3883
2002-09-23 12:55:50 +00:00
Anand Shukla
a34898d9ac Changed codegen to add 2 empty slots at the top of stack using StackSlots pass
llvm-svn: 3873
2002-09-21 05:01:21 +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
bcab1ae6c9 Add peephole optimization pass at the end of code generation.
llvm-svn: 3846
2002-09-20 00:52:43 +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