1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

7716 Commits

Author SHA1 Message Date
Reid Spencer
1605d22f77 Give the -time-passes tool option a global storage location so that its
value can be discovered by the various LLVM tools.

llvm-svn: 16032
2004-08-24 17:52:35 +00:00
Chris Lattner
66d61f3a72 Fix a bug in a previous checkin of mine, correcting
Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing.llx and the
code size problem.

This bug prevented us from doing most register coallesces.

llvm-svn: 16031
2004-08-24 17:48:29 +00:00
Chris Lattner
6781bb48eb Add -sse[,2,3] arguments to LLC
llvm-svn: 16018
2004-08-24 08:18:44 +00:00
Chris Lattner
28c7ae5697 Nuke commented out stuff
llvm-svn: 16017
2004-08-24 08:18:27 +00:00
Brian Gaeke
e91606291d This code is dodgy, but the guaranteed assertion failure doesn't help anything.
llvm-svn: 16014
2004-08-24 06:41:40 +00:00
Brian Gaeke
ae3378f354 Fix bug in PhyRegAlloc::setCallInterferences() handling call through a
null pointer.

llvm-svn: 16013
2004-08-24 06:41:39 +00:00
Brian Gaeke
a4eb36282c Revise head-of-file comment.
Eliminate some excess whitespace.
Fix bug in CallArgsDescriptor::get() handling call through a null pointer.

llvm-svn: 16012
2004-08-24 06:41:38 +00:00
Chris Lattner
05d5a44c02 Do not use .xword and friends to emit zeros on V9. Apparently there are issues
with emitting .xwords when not on an 8-byte boundary (.xword 0 is not the
same as 8 .byte 0's).  Because we do not know when or when we are not aligned,
just emit bytes like the old V9 asmprinter did.

llvm-svn: 16006
2004-08-24 00:26:11 +00:00
Nate Begeman
0069f07741 Kill a majority of unnecessary sign extensions for byte loads
llvm-svn: 15991
2004-08-22 08:10:15 +00:00
Nate Begeman
72ec463dc7 Don't hard code the offset of the saved R31 in functions with frame pointers
llvm-svn: 15990
2004-08-22 08:09:17 +00:00
Reid Spencer
7117a132ea Initial checkin of a pass to lower packed operations to scalars operations.
This also registers the pass with opt with a -lower-packed command line
option.

Patch contributed by Brad Jones.

llvm-svn: 15987
2004-08-21 21:39:24 +00:00
Reid Spencer
d7d70bdccb Bytecode Analyzer Cleanup:
- Rearrange output order to make more sense
- Make only the function level output count as "detailed"
- Output dump output directly to stream, don't buffer it.
- Fix counting of block sizes
- Implement new handlers for number of types, dependent libs, target triple
- Compute the size of block headers.

llvm-svn: 15985
2004-08-21 20:58:19 +00:00
Reid Spencer
4c9c991659 Get rid of an extraneous local variable.
llvm-svn: 15984
2004-08-21 20:53:56 +00:00
Reid Spencer
84d4e1b105 Two Changes:
- Pass the output stream to the analyzer so it can write its output there
  directly instead of buffering it.
- Don't pass a boolean to ParseBytecode because its not needed any more.

llvm-svn: 15983
2004-08-21 20:52:03 +00:00
Reid Spencer
c0868628e0 Add boolean file format flags in preparation for version 5 bytecode.
Remove the "processFunctions" boolean from ParseBytecode as it is no
longer needed. This is part of avoiding double reading of functions
when analyzing bytecode.

llvm-svn: 15982
2004-08-21 20:50:49 +00:00
Reid Spencer
09976167c1 Bytecode Reader Cleanup:
- provide the correct conversion for ModuleBlockID in read_block (a potential
  bug but not actually exploited because reading module block ids doesn't
  use read_block).
- install support for handleTypeList handler
- install support for handleDependentLibrary handler
- install support for handleTargetTriple handler
- clean up comments, output strings,
- ensure that processing function arguments doesn't SIGSEGV if one of the
  arguments is a null pointer (yeah, it happened .. weird)
- prepare for version 5 bytecode by documenting what will change.

llvm-svn: 15981
2004-08-21 20:49:23 +00:00
Nate Begeman
e6aace2ecb Back out branchless SetCC code. While it helped a lot in some cases, it
hurt a lot in others.  Instead, improve branching version of SetCC and
Select instructions.  The old code will be in CVS should we ever need to
dig it up again.

llvm-svn: 15979
2004-08-21 20:42:14 +00:00
Chris Lattner
15593f74c1 Switch from bytes to bits for alignment.
Also, change GPRC for PPC32 to align on 32-bit boundary instead of 64-bit

llvm-svn: 15975
2004-08-21 20:14:40 +00:00
Chris Lattner
64d3bc5e85 Switch from bytes to bits for alignment for consistency
llvm-svn: 15974
2004-08-21 20:14:13 +00:00
Chris Lattner
4427fd9a3c Reduce uses of getRegClass
llvm-svn: 15973
2004-08-21 20:13:52 +00:00
Chris Lattner
ac0dba87bd Convert regclass alignment from bytes to bites
llvm-svn: 15972
2004-08-21 20:13:09 +00:00
Chris Lattner
484126d8f8 Convert bytes to bits in alignment
llvm-svn: 15971
2004-08-21 20:09:46 +00:00
Chris Lattner
0df8bcf2fa Register info alignment is in bits, frame object alignment is (currently) in
bytes.

llvm-svn: 15970
2004-08-21 20:04:59 +00:00
Chris Lattner
db3e26f50a Reduce uses of getRegClass
llvm-svn: 15968
2004-08-21 19:51:17 +00:00
Chris Lattner
7ead36e4a4 Now that we have per-register spill size/alignment info, remove more uses
of getRegClass

llvm-svn: 15967
2004-08-21 19:45:10 +00:00
Chris Lattner
23a0219a11 Fix warning
llvm-svn: 15964
2004-08-21 19:11:03 +00:00
Reid Spencer
fdbcdb732f Examine the type code in the setcc class of instructions and if it
is a PackedType, throw an error. Temporary solution.

Patch contributed by Brad Jones.

llvm-svn: 15963
2004-08-21 16:11:02 +00:00
Nate Begeman
dd700ce5e4 Move XForm instructions over to the auto-generated asm writer
llvm-svn: 15962
2004-08-21 05:56:39 +00:00
Chris Lattner
b85cd02a4e Add two values
llvm-svn: 15959
2004-08-21 02:17:39 +00:00
Chris Lattner
aa175129ea Fix a nasty bug that Nate ran into. In particular, instead of emitting a 2+MB
error message, print out:

llvm-link: error linking in 'g.2.rbc': Global Variable Collision on
' %struct.D_Reduction* %d_reduction_10_gram' - External linkage globals have
different initializers

That's a bit more concise, huh?

llvm-svn: 15958
2004-08-21 00:50:59 +00:00
Nate Begeman
6c4bd28dc1 remove some things from the todo list.
llvm-svn: 15956
2004-08-20 18:46:54 +00:00
Chris Lattner
cd2b92c36e Do not register ppc64 yet, as it breaks the SparcV9 backend
llvm-svn: 15955
2004-08-20 18:09:18 +00:00
Chris Lattner
fb6d2225ff quish a warning
llvm-svn: 15954
2004-08-20 18:07:39 +00:00
Reid Spencer
448910c216 Fix a bug found exposed by: Regression/Other/2004-08-20-PackedControlFlow.ll
Packed types need to be allowed in type statements too.

Patch provided by Brad Jones.

llvm-svn: 15953
2004-08-20 15:37:30 +00:00
Nate Begeman
2f68d05d47 Implement code to convert SetCC into straight line code where appropriate. Add necessary instructions for this transformation to the .td file.
llvm-svn: 15952
2004-08-20 09:56:22 +00:00
Brian Gaeke
01636f4e0f Packed types, brought to you by Brad Jones
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner
9f60c755f8 If we are linking two global variables and they have the same size, do not
spew warnings, even if the types don't match.

llvm-svn: 15933
2004-08-20 00:30:39 +00:00
Misha Brukman
8bfcf0d2e9 Fix opcodes being printed in caps (the more general fix may be `AsmWriter')
llvm-svn: 15932
2004-08-19 21:56:12 +00:00
Misha Brukman
1bdac3b68d Stack space for argument passing is 32 regardless of 32- vs. 64-bit arch.
Thanks to Nate Begeman for pointing this out.

llvm-svn: 15930
2004-08-19 21:51:19 +00:00
Misha Brukman
70f027b623 LR needs to be saved at 16-byte offset on a 64-bit arch
llvm-svn: 15929
2004-08-19 21:36:14 +00:00
Misha Brukman
2c3423694a On 64-bit PowerPC, pointers are 8 bytes, so parameter area offset is 48, not 24
llvm-svn: 15928
2004-08-19 21:34:05 +00:00
Misha Brukman
21df6f6757 This PHI has 4 additional operands, not 2.
llvm-svn: 15926
2004-08-19 21:00:12 +00:00
Misha Brukman
e438dc224e Use the appropriate 64-bit register description file.
llvm-svn: 15922
2004-08-19 19:36:57 +00:00
Misha Brukman
ffaa056155 Fix more remaining 32-bit vestiges of PowerPC
llvm-svn: 15919
2004-08-19 18:49:58 +00:00
Misha Brukman
409030d6b4 Fix another vestige of the 32-bit PowerPC backend.
llvm-svn: 15918
2004-08-19 16:50:30 +00:00
Misha Brukman
9ec6a58d15 Correct character prepended to global symbols ('.'), use Mangler consistently
llvm-svn: 15917
2004-08-19 16:33:56 +00:00
Misha Brukman
b2f68d6752 * Eliminate global base register, r2 is used for that on AIX/PowerPC
* Fix bug from 32-bit PowerPC days of 2-register long split

llvm-svn: 15916
2004-08-19 16:29:25 +00:00
Misha Brukman
7a0735b46b Wrap long lines.
llvm-svn: 15915
2004-08-19 16:28:30 +00:00
Nate Begeman
0975cdde75 Convert casts that will have no effect into move instructions.
llvm-svn: 15914
2004-08-19 08:07:50 +00:00
Nate Begeman
81c97654da Clean up floating point instruction selection.
Change int->float cast code to put conversion constants in constant pool.
Shorten code sequence for constant pool fp loads.
Remove LOADLoDirect/LOADLoIndirect psuedo instructions and tweak asmwriter

llvm-svn: 15913
2004-08-19 05:20:54 +00:00
Brian Gaeke
9e089c115d M_DUMMY_PHI_FLAG is no longer used to distinguish V9::PHI. Get rid of it and
its TargetInstrInfo accessor.

llvm-svn: 15907
2004-08-18 20:04:28 +00:00
Brian Gaeke
7364ea9c20 Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
llvm-svn: 15906
2004-08-18 20:04:24 +00:00
Brian Gaeke
bec1f54a8e Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
Also, squash a use of TargetInstrInfo::isNop().

llvm-svn: 15905
2004-08-18 20:04:21 +00:00
Chris Lattner
e05dc155e3 Convert to the new MachineFunctionInfo interface
llvm-svn: 15904
2004-08-18 18:13:37 +00:00
Brian Gaeke
fe9e248fcc The SparcV9 target no longer uses any pseudoinstructions (SETSW, SETUW,
SETX) or M_PSEUDO_FLAG.

llvm-svn: 15901
2004-08-18 17:44:16 +00:00
Brian Gaeke
7d8f0e566d The Create*Const methods don't need to pass around a TargetMachine reference.
Other minor cleanups.

llvm-svn: 15900
2004-08-18 17:44:15 +00:00
Brian Gaeke
280e4daba1 Doxygenify some comments.
Clean up cpReg2MemMI and cpMem2RegMI, and doxygenify comments.
Get rid of their uses of SETSW, which is a pseudoinstruction. We can't
JIT-compile pseudoinstructions at the moment. This was blowing up 252.eon/jit,
which has some HUGE stack frames.
Reduce the uses of constantFitsInImmedField().
Consolidate some assertions.

llvm-svn: 15899
2004-08-18 17:44:14 +00:00
Chris Lattner
478b640308 Switch V9 over to using the AsmPrinter base class to do its constant printing
Massive thanks to the brg miester for doing the testing. :)

llvm-svn: 15898
2004-08-18 05:29:08 +00:00
Chris Lattner
8c5096d223 Rename var
llvm-svn: 15897
2004-08-18 02:22:55 +00:00
Chris Lattner
d8c7f4bf3c Add support for targets without a .zero directive
llvm-svn: 15894
2004-08-17 21:38:40 +00:00
Misha Brukman
631bd1c155 This file is no longer used.
llvm-svn: 15893
2004-08-17 20:23:33 +00:00
Chris Lattner
8b5695de66 Start using alignment output routines from AsmPrinter.
Changes to make this more similar to the X86 asmprinter

Fix overalignment of globals.

llvm-svn: 15891
2004-08-17 19:26:03 +00:00
Chris Lattner
d3d5c1d2a2 Start using alignment output routines from AsmPrinter.
Changes to make this more similar to the ppc asmprinter

llvm-svn: 15890
2004-08-17 19:25:42 +00:00
Chris Lattner
659175521b Add support for alignment
llvm-svn: 15888
2004-08-17 19:14:29 +00:00
Chris Lattner
07fb5b0df4 Add a new helper method to get log2(type alignment)
llvm-svn: 15887
2004-08-17 19:13:00 +00:00
Chris Lattner
5b69d2d1b5 Check constant expression validity more strictly
llvm-svn: 15883
2004-08-17 17:28:46 +00:00
Chris Lattner
54c0c44d38 Work around PR424 for old c/c++ frontends.
llvm-svn: 15882
2004-08-17 17:26:41 +00:00
Chris Lattner
7ab985b9a2 Print comments with ;
llvm-svn: 15881
2004-08-17 16:27:26 +00:00
Chris Lattner
b8703980b4 Use a designated comment character when printing comments.
llvm-svn: 15880
2004-08-17 16:27:05 +00:00
Reid Spencer
90f77c960f Bytecode File Format Changes:
- File format version number bumped to 4
- Writer will now align nothing
- Reader now only expects alignment for version 3 or earlier

llvm-svn: 15875
2004-08-17 07:45:14 +00:00
Nate Begeman
ca0ea7b9ba Re-fix hiding the Frame Pointer from the register allocator in functions
that have a frame pointer.  This change fixes Burg.  In addition, make
the necessary changes to floating point code gen and constant loading after
Chris Lattner's fixes to the asm writer.  These changes fix MallocBench/gs

llvm-svn: 15873
2004-08-17 07:17:44 +00:00
Chris Lattner
052cebe33c Use the AsmPrinter emitGlobalConstant.
llvm-svn: 15872
2004-08-17 06:48:55 +00:00
Chris Lattner
bf03260147 Add support for targets that have .quad, drop extra tab inserted
llvm-svn: 15870
2004-08-17 06:48:16 +00:00
Chris Lattner
2e24f55588 Use the emitGlobalConstant defined in AsmPrinter
llvm-svn: 15869
2004-08-17 06:37:12 +00:00
Chris Lattner
e47c31e25e Implement emitGlobalConstant
llvm-svn: 15868
2004-08-17 06:36:49 +00:00
Chris Lattner
3bc964c8fb New, more general, interface.
llvm-svn: 15866
2004-08-17 06:07:43 +00:00
Chris Lattner
a54012917a Allow an arbitrary prefix
llvm-svn: 15865
2004-08-17 06:06:54 +00:00
Chris Lattner
1362ba130b We now allow targets to use any prefix they want for global symbols. Lets
hear it for ".".

llvm-svn: 15863
2004-08-17 06:06:19 +00:00
Misha Brukman
4434e4ce05 Rewrite targets/rules to generate files for just PowerPC or PPC{32,64}
llvm-svn: 15862
2004-08-17 05:11:54 +00:00
Misha Brukman
35826543f8 Register classes are target-dependent
llvm-svn: 15861
2004-08-17 05:10:31 +00:00
Misha Brukman
47fc7a5955 #include <map> is not necessary here
llvm-svn: 15860
2004-08-17 05:09:39 +00:00
Misha Brukman
c358f5b8ef `PowerPC' is no longer a real target
llvm-svn: 15859
2004-08-17 05:09:10 +00:00
Misha Brukman
a73414f1da Move variables and methods which need PPC{32,64}* distinction to subclasses
llvm-svn: 15858
2004-08-17 05:08:44 +00:00
Misha Brukman
17c41c8bed No need for an `is64bit' flag
llvm-svn: 15857
2004-08-17 05:06:47 +00:00
Misha Brukman
471143bc94 PowerPCInstrInfo and PowerPCRegisterInfo have gone away; they are replaced
by 32- and 64-bit customized files, named appropriately.

llvm-svn: 15856
2004-08-17 05:05:00 +00:00
Misha Brukman
d5acc2ec78 Consistently name passed with 32 or 64 in their name
llvm-svn: 15855
2004-08-17 05:02:58 +00:00
Misha Brukman
52079a6264 PowerPCRegisterInfo no longer takes a bool to differentiate 32 vs 64 bits
llvm-svn: 15854
2004-08-17 05:02:18 +00:00
Misha Brukman
5e14dba4fa The PowerPCInstrInfo class has gone away.
llvm-svn: 15853
2004-08-17 05:00:46 +00:00
Misha Brukman
daf998c35f PowerPCInstrInfo has gone away, PPC32 and PPC64 share opcodes.
llvm-svn: 15852
2004-08-17 04:58:50 +00:00
Misha Brukman
38fe66d9d2 PowerPC 32-/64-bit split: Part II, 64-bit customizations on PowerPC
llvm-svn: 15851
2004-08-17 04:57:37 +00:00
Misha Brukman
6ce030bf87 PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC*
llvm-svn: 15850
2004-08-17 04:55:41 +00:00
Reid Spencer
f0067ed08d Correct the comments in the symbol table writer to reflect reality.
llvm-svn: 15848
2004-08-17 02:59:02 +00:00
Chris Lattner
e4eb00de15 Print float constants as 4 byte values.
Also, fix endianness problems when cross compiling from little-endian host.

llvm-svn: 15847
2004-08-17 02:48:44 +00:00
Chris Lattner
e3af4ad9b9 Make sure to put an _ prefix on all identifiers!
Also, add some (currently disabled) code to print float's as 32-bits.

llvm-svn: 15846
2004-08-17 02:29:00 +00:00
Chris Lattner
460d80e77d Some asmwriters want an _ prefix
llvm-svn: 15845
2004-08-17 02:28:26 +00:00
Chris Lattner
b8bb516d6f More changes to make PPC32 and X86 more similar
llvm-svn: 15842
2004-08-16 23:38:36 +00:00
Chris Lattner
f2c9e87003 Minor changes to make the diff be nothing against the X86 version
llvm-svn: 15841
2004-08-16 23:30:16 +00:00
Chris Lattner
7fbc0c79e7 Finegrainify namespacification
Start using the AsmPrinter base class to factor out a bunch of code

llvm-svn: 15840
2004-08-16 23:25:21 +00:00
Chris Lattner
bf5dba50c5 Start using the AsmPrinter to emit our first class constants. This also
drops our half-assed support for cygwin, which noone uses and doesn't work
anyway.

llvm-svn: 15839
2004-08-16 23:16:06 +00:00
Chris Lattner
aac51aa3d8 Initial implementation of the asmprinter base class
llvm-svn: 15838
2004-08-16 23:15:22 +00:00
Chris Lattner
2d3b6ab513 Moved this file out of lib/CodeGen
llvm-svn: 15837
2004-08-16 22:38:02 +00:00
Chris Lattner
81d69ef38e Hacks to make the MachineFunction class be able to delete the MFI object
without knowing anything about it.

llvm-svn: 15836
2004-08-16 22:37:18 +00:00
Chris Lattner
d655fd4cb0 Code moved out of lib/CodeGen/MachineFunction.cpp
llvm-svn: 15835
2004-08-16 22:36:54 +00:00
Chris Lattner
f3450010d5 Move this code to lib/Target/SparcV9/MachineFunctionInfo.cpp
llvm-svn: 15834
2004-08-16 22:36:34 +00:00
Chris Lattner
ea590216d9 This file is moving to lib/Target/SparcV9
llvm-svn: 15833
2004-08-16 22:36:10 +00:00
Chris Lattner
6d8d39e17b Move MachineCodeForInstruction.h and MachineFunctionInfo.h into lib/Target/SparcV9
llvm-svn: 15830
2004-08-16 21:55:02 +00:00
Chris Lattner
2eaaf7660b Nuke this file
llvm-svn: 15829
2004-08-16 21:36:40 +00:00
Chris Lattner
625e4e8f34 Fold MachineInstrAnnot.cpp into this file
llvm-svn: 15828
2004-08-16 21:36:31 +00:00
Misha Brukman
7c32d35f9e Move these files (which are dependent on VMCore) into VMCore
llvm-svn: 15825
2004-08-16 19:04:36 +00:00
Brian Gaeke
f20757c442 Update and consolidate comments. Remove some excess whitespace.
llvm-svn: 15824
2004-08-16 18:27:25 +00:00
Brian Gaeke
8ca16af75f Add a note that people shouldn't use MachineFunctionInfo.
llvm-svn: 15823
2004-08-16 18:27:24 +00:00
Reid Spencer
b9ab0ef60d Fix PR422.
Ouch! Changes in the lazy initialization code caused each incorporated
function to reprocess the entire function on every lookup of a value's
slot number. This caused a horrible slowdown in all functions. This
fix made llvm-dis go from "longer than I care to wait" (minutes) on a large
test case to 0.53 seconds.

llvm-svn: 15818
2004-08-16 07:46:33 +00:00
Reid Spencer
87e4f4aec5 Remove lib/System contents until a satisfactory solution can be
provided.

llvm-svn: 15816
2004-08-16 07:08:38 +00:00
Chris Lattner
818ac2d5e2 Fix a bug that caused the pass to go into infinite loops on trivial testcases.
This is fallout of the Bug 122 changes.

llvm-svn: 15811
2004-08-16 05:38:02 +00:00
Chris Lattner
8448b91e53 There is no need for a cast here
llvm-svn: 15810
2004-08-16 05:09:58 +00:00
Nate Begeman
fcb98faaad Update the current state of the world
llvm-svn: 15809
2004-08-16 05:06:43 +00:00
Nate Begeman
c7259a2ff0 Fix typo of the word 'implicit' I made resolving a CVS conflict. Whoops!
llvm-svn: 15808
2004-08-16 02:12:49 +00:00
Nate Begeman
00a1951fb1 Fix frame pointer handling:
Reserve R0 in store/load from stack slot for building >32k offsets from SP
or FP.  This also requires we use R11 rather than R0 for holding the LR
value we want to save or restore.  Also, tell the register allocator not
to use R31 (our FP) in functions that have a frame pointer.  These changes
fix Burg.

llvm-svn: 15807
2004-08-16 01:52:12 +00:00
Nate Begeman
8cb25bf089 Fix mismatched adjust down/up of SP in functions that contain variable
sized allocas.

llvm-svn: 15806
2004-08-16 01:50:22 +00:00
Chris Lattner
ffaad65b22 Add a special case for argc,argv
llvm-svn: 15802
2004-08-16 01:07:04 +00:00
Chris Lattner
923c3d3594 Don't pass too many arguments into runFunction
llvm-svn: 15801
2004-08-16 01:05:35 +00:00
Chris Lattner
9cbc5f306a Finally, add support for calling arbitrary non-varargs functions.
llvm-svn: 15799
2004-08-16 00:14:18 +00:00
Chris Lattner
70ddd561fb Handle all nullary functions, of any valid return type.
llvm-svn: 15798
2004-08-15 23:53:06 +00:00
Chris Lattner
ed3a37a9ed Fine, go all of the way and check that the argument types are correct as well.
llvm-svn: 15797
2004-08-15 23:39:59 +00:00
Chris Lattner
9657e92992 These only really work if returning int or void
llvm-svn: 15796
2004-08-15 23:34:48 +00:00
Chris Lattner
557b356131 Handle zero arg function case
llvm-svn: 15794
2004-08-15 23:31:43 +00:00
Chris Lattner
c5f794403e Simplify code a bit, print error message always instead of asserting.
llvm-svn: 15793
2004-08-15 23:29:50 +00:00
Chris Lattner
59e19bf141 V8 never used the instrselectorgenerator
llvm-svn: 15791
2004-08-15 23:07:40 +00:00
Chris Lattner
f4448de9e1 isdummyclass goes away
llvm-svn: 15790
2004-08-15 23:04:35 +00:00
Chris Lattner
60dc932fe9 disable all of the pattern isel stuff
llvm-svn: 15788
2004-08-15 23:02:34 +00:00
Chris Lattner
3383506bcc Disable the pattern isel
llvm-svn: 15787
2004-08-15 23:02:17 +00:00
Chris Lattner
0e350557bf Reduce usage of MRegisterInfo::getRegClass
llvm-svn: 15784
2004-08-15 22:23:09 +00:00
Chris Lattner
b5f94a18e0 Insertion methods now return void instead of #instrs inserted. Also, use
more powerful forms of BuildMI to concisify the code

llvm-svn: 15782
2004-08-15 22:15:56 +00:00
Chris Lattner
6ef2a410df Code insertion methods now return void instead of #instrs inserted
llvm-svn: 15781
2004-08-15 22:15:30 +00:00
Chris Lattner
555a585fd8 Code insertion methods now return void instead of an int.
llvm-svn: 15780
2004-08-15 22:15:11 +00:00
Chris Lattner
a27bbd33e6 The insertion method returns void now
llvm-svn: 15779
2004-08-15 22:14:31 +00:00
Chris Lattner
450d93b2ff Nuke ifdef'd out code
llvm-svn: 15777
2004-08-15 22:03:57 +00:00
Chris Lattner
463d46f17a Stop using CreateStackObject(RegClass*)
llvm-svn: 15775
2004-08-15 22:02:22 +00:00
Chris Lattner
e58190f5f6 These methods no longer take a TargetRegisterClass* operand.
llvm-svn: 15774
2004-08-15 21:56:44 +00:00
Alkis Evlogimenos
dbe432aee7 Make this compile on gc 3.4.1 (static_cast to non-const type was not
allowed).

llvm-svn: 15766
2004-08-15 09:18:55 +00:00
Reid Spencer
5eb7b42ae8 Initial implementations of the ErrorCode and Path concepts for Linux.
llvm-svn: 15763
2004-08-15 08:14:33 +00:00
Nate Begeman
e24434f765 Add future optimization opportunity
llvm-svn: 15760
2004-08-15 06:43:10 +00:00
Nate Begeman
2751f754b5 Fix float to int codepath by always allocating 8 bytes for the target of a double store; optimize cmplwi generation.
llvm-svn: 15759
2004-08-15 06:42:28 +00:00
Chris Lattner
caa4f4a263 Zimm16 is now dead. Its entry is not removed from the enum, to avoid having
to renumber everything.  Similar elimination should be applied to other
operand enum values that are only used to format printing in the .s file.

llvm-svn: 15755
2004-08-15 05:48:47 +00:00
Chris Lattner
6ddb5d6c76 Convert all of the DForm_6* operations, which makes all of the Zimm16 users
dead.

llvm-svn: 15754
2004-08-15 05:46:14 +00:00
Chris Lattner
744cbfc089 Add i1imm
llvm-svn: 15753
2004-08-15 05:37:00 +00:00
Chris Lattner
cf6878b6c9 Reenable the CCRC
llvm-svn: 15752
2004-08-15 05:31:15 +00:00
Chris Lattner
41839ea5cd Convert the DForm_4 over to the asmprintergen
llvm-svn: 15751
2004-08-15 05:20:16 +00:00
Nate Begeman
9705f413b7 Remove dead code
llvm-svn: 15750
2004-08-15 00:31:02 +00:00
Chris Lattner
e19e10e800 Print mflr using the asmwriter generator
llvm-svn: 15749
2004-08-14 23:27:29 +00:00
Chris Lattner
dd041ad575 Update to no longer take MF as an argument
llvm-svn: 15748
2004-08-14 22:57:22 +00:00
Chris Lattner
d7240cdb18 Make the AsmWriter a first-class tblgen object. Allow targets to specify
name of the generated asmwriter class, and the name of the format string.

llvm-svn: 15747
2004-08-14 22:50:53 +00:00
Nate Begeman
224deaa061 Replace PowerPCPEI.cpp with target independant PrologEpilogInserter
llvm-svn: 15746
2004-08-14 22:16:36 +00:00
Nate Begeman
826fbd0de1 Add support for frame pointers, and large offsets from stack and frame pointers. Adopt elimination of MachineFunction& arg from eliminateFrameIndex.
llvm-svn: 15745
2004-08-14 22:13:58 +00:00
Nate Begeman
557f61c4d6 Add indexed forms of load doubleword and load word algebraic for 64 bit targets
llvm-svn: 15743
2004-08-14 22:12:20 +00:00
Nate Begeman
03781a00e8 Fix handling of FP constants with single precision, and loading of internal linkage function addresses
llvm-svn: 15742
2004-08-14 22:11:38 +00:00
Nate Begeman
52fb57411b Add initial support for using the generated asm writer. Also, fix FP constant printing to always print 8 byte intializers. Move printing of LinkOnce stubs.
llvm-svn: 15741
2004-08-14 22:09:10 +00:00
Nate Begeman
56b50cb7e8 Add generation of asm writer from tablegen files to Makefile
llvm-svn: 15740
2004-08-14 22:06:38 +00:00
Nate Begeman
fabece673b Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get MachineFunction from MachineInstruction's parent's parent
llvm-svn: 15739
2004-08-14 22:05:10 +00:00
Nate Begeman
edeb64e748 Eliminate MachineFunction& argument from eliminateFrameIndex in SparcV9 target
llvm-svn: 15738
2004-08-14 22:03:29 +00:00
Nate Begeman
7ca705567e Eliminate MachineFunction& argument from eliminateFrameIndex in Skeleton target
llvm-svn: 15737
2004-08-14 22:01:38 +00:00
Nate Begeman
cbc21460f2 Elminiate MachineFunction& argument from eliminateFrameIndex
llvm-svn: 15736
2004-08-14 22:00:10 +00:00
Chris Lattner
8e2dc1a98a Implement test/Regression/Transforms/GlobalConstifier/phi-select.llx
This allows more globals to be marked constant, particularly global arrays.

llvm-svn: 15735
2004-08-14 20:57:17 +00:00
Reid Spencer
45d12b6601 Allow any cl::opt to use the method getPosition() to retrieve the option's
absolute position on the command line. Similarly allow any cl::list to
use the method getPosition(n) to retrieve the absolute position of the nth
option in the list. This provides support for two things: (a) options like
-l that are actually positional and their order of occurrence matters when
they are intermixed with positional arguments like "a.o"; and (b) options
like -x LANG which affect only the positional arguments that come after
the option. In both cases, knowing the absolute position of a given option
helps.

llvm-svn: 15725
2004-08-13 19:47:30 +00:00
Nate Begeman
7024c8a1a4 Remove an unneeded header and forward declaration
llvm-svn: 15722
2004-08-13 09:33:17 +00:00
Nate Begeman
101112a2f4 Fix siod by switching BoolTy to byte rather than int until CFE changes for
Darwin.  Also, change asm printer to output proper stubs for external
functions whose address is passed as an argument to aid in bugpointing.

llvm-svn: 15721
2004-08-13 09:32:01 +00:00
Nate Begeman
6cf8366e11 Fix 177.mesa compilation, don't use floating point regs for base addresses!
llvm-svn: 15720
2004-08-13 04:45:14 +00:00
Nate Begeman
9f8ad2f245 Fix llc crasher compiling siod by giving BuildMI the correct number of arguments
llvm-svn: 15719
2004-08-13 03:56:49 +00:00
Chris Lattner
84445ee674 If we are extracting a block that has multiple successors that are the same
block (common in a switch), make sure to remove extra edges in successor
blocks.  This fixes CodeExtractor/2004-08-12-BlockExtractPHI.ll and should
be pulled into LLVM 1.3 (though the regression test need not be, as that
would require pulling in the LoopExtract.cpp changes).

llvm-svn: 15717
2004-08-13 03:27:07 +00:00
Chris Lattner
2c3ad7902d When we code extract some stuff, leave the codeRepl block in the place where
the extracted code was, instead of putting it at the end of the function

llvm-svn: 15716
2004-08-13 03:17:39 +00:00
Chris Lattner
8537ae6e2c "extract" the block extractor pass from bugpoint (haha)
llvm-svn: 15714
2004-08-13 03:05:17 +00:00
Chris Lattner
7abc1c2473 Add value mapper support for select constant exprs. This should fix a bug
Nate ran into when bugpointing siod.  This fix should go into LLVM 1.3

llvm-svn: 15712
2004-08-13 02:43:19 +00:00
Nate Begeman
6a9f2fd2c1 Longs are in one register on PowerPC 64; use appropriate instructions to operate on them.
llvm-svn: 15711
2004-08-13 02:20:47 +00:00
Nate Begeman
48359fbcd0 Add some more 64 bit instructions we need for the PowerPC-64 ISel to the tablegen files
llvm-svn: 15710
2004-08-13 02:19:26 +00:00
Chris Lattner
1a0fa932e1 Split saveCallerSavedRegisters into two methods for clarity, and add comments.
Add support for targets that must spill certain physregs at certain locations.

Patch contributed by Nate Begeman, slightly hacked by me.

llvm-svn: 15701
2004-08-12 19:01:14 +00:00
Chris Lattner
837ab8fcf6 Remove dead methods
llvm-svn: 15698
2004-08-12 18:37:15 +00:00
Chris Lattner
f25f80a0b3 Fix warning
llvm-svn: 15697
2004-08-12 18:36:28 +00:00
Chris Lattner
2fb2b0517a Instead of a virtual method call, lets try a direct constant reference
llvm-svn: 15696
2004-08-12 18:29:05 +00:00
Chris Lattner
f5f45868a7 Virtual method calls are overrated
llvm-svn: 15695
2004-08-12 18:20:55 +00:00
Chris Lattner
a2d1e8f290 Virtual method calls are overrated.
llvm-svn: 15694
2004-08-12 18:20:41 +00:00
Chris Lattner
5ba5260225 Forward substitute some constants into their users
llvm-svn: 15693
2004-08-12 18:10:18 +00:00
Chris Lattner
8d142c6f87 The only target that uses this code (v9) always has argsOnStackHaveFixedSize
set to true (obviously)

llvm-svn: 15692
2004-08-12 18:06:35 +00:00
Chris Lattner
8af864daa3 Remove dead methods
llvm-svn: 15691
2004-08-12 17:58:27 +00:00
Chris Lattner
ad0a1f3eee When we want a constant, just use it, instead of calling through layers of
virtual methods and register name mapping functions

llvm-svn: 15690
2004-08-12 17:56:01 +00:00
Misha Brukman
f2c87f4794 Disable PPC64 backend by default because LLC cannot choose automatically between
SparcV9 and PowerPC64 without target triples, since they are both 64-bit
big-endian targets.

llvm-svn: 15688
2004-08-12 17:16:43 +00:00
Chris Lattner
32ad5d0bab This patch makes the inliner refuse to inline functions that have alloca
instructions in the body of the function (not the entry block).  This fixes
test/Programs/SingleSource/Regression/C/2004-08-12-InlinerAndAllocas.c
and test/Programs/External/SPEC/CINT2000/176.gcc on zion.

This should obviously be pulled into 1.3.

llvm-svn: 15684
2004-08-12 05:45:09 +00:00
Misha Brukman
bf93b04c17 * Correct 64-bit version: blr 1 (not 0)
* BuildMI() can build 0-param instructions (e.g., NOP)

llvm-svn: 15681
2004-08-12 03:30:03 +00:00
Misha Brukman
e281f3a2ac * Print out full names for non-GPR or -FPR registers
* BuildMI() really *does* handle 0 params!

llvm-svn: 15680
2004-08-12 03:28:47 +00:00
Chris Lattner
85e2339cfa Fix code extraction of unwind blocks. This fixed bugs that bugpoint can
run into.  This should go into 1.3

llvm-svn: 15679
2004-08-12 03:17:02 +00:00
Misha Brukman
2851d39ec4 * Pointers are 8 bytes, hence cLong type on 64-bit PPC
* Fix loading of GlobalValues

llvm-svn: 15678
2004-08-12 02:53:01 +00:00
Misha Brukman
8bcb04dd35 Eliminate special-casing 14-bit immediate load/store opcodes
llvm-svn: 15677
2004-08-12 02:51:38 +00:00
Chris Lattner
430578a835 Hrm, this pass didn't compile. This bugfix should go into 1.3!
llvm-svn: 15676
2004-08-12 02:44:23 +00:00
Misha Brukman
1149a822a2 Correctly print out ASCII literal strings on AIX
llvm-svn: 15674
2004-08-12 01:01:13 +00:00
Misha Brukman
d9b3a360fc Mark R2 as available for allocation on Darwin/PPC32, but not AIX/PPC64
llvm-svn: 15673
2004-08-12 00:10:01 +00:00
Misha Brukman
14bf47d0d9 * Move AIX into the llvm namespace to be accessed from RegisterInfo
* Mark InstrInfo with 32 vs. 64 bit flag
* Enable the 64-bit isel and asm printer

llvm-svn: 15672
2004-08-11 23:47:08 +00:00
Misha Brukman
c24851b980 Set the is64bit flag and propagate it to PowerPCRegisterInfo
llvm-svn: 15671
2004-08-11 23:45:43 +00:00
Misha Brukman
42e53e4d94 * Set the is64bit boolean flag in PowerPCRegisterInfo
* Doubles are 8 bytes in 64-bit PowerPC, and use the general register class
* Use double-word loads and stores for restoring from/saving to stack
* Do not allocate R2 if compiling for AIX

llvm-svn: 15670
2004-08-11 23:44:55 +00:00
Misha Brukman
fc82624aab 64-bit instruction selector and AIX-specific 64-bit asm printer
llvm-svn: 15669
2004-08-11 23:42:15 +00:00
Misha Brukman
0b67e02e9c Fix names of 64-bit CMP*D* opcodes, add LWA and STD* opcodes
llvm-svn: 15668
2004-08-11 23:33:34 +00:00
Misha Brukman
08b8a09113 Add support for 64-bit CMPDI, CMPLDI, and CMPLD opcodes
llvm-svn: 15667
2004-08-11 20:56:14 +00:00
Misha Brukman
7325a6c790 Add doubleword load/store (64-bit only).
llvm-svn: 15665
2004-08-11 15:54:36 +00:00
Misha Brukman
1f4fb14301 Hyphenate ##-bit and remove first-person from comments.
llvm-svn: 15663
2004-08-11 13:35:44 +00:00
Nate Begeman
6120e8f04f Clean up 32/64bit and Darwin/AIX split. Next steps: 64 bit ISel, AIX asm printer.
llvm-svn: 15662
2004-08-11 07:40:04 +00:00
Chris Lattner
2903154b98 Fix a case where constantexprs could leak into the PPC isel.
llvm-svn: 15661
2004-08-11 07:34:50 +00:00
Chris Lattner
5e7e9b6c26 Remove a bunch of ad-hoc target-specific flags that were only used by the
old asmprinter.

llvm-svn: 15660
2004-08-11 07:12:04 +00:00
Chris Lattner
b09bc9d4e3 Remove a dead method
llvm-svn: 15659
2004-08-11 07:07:14 +00:00
Chris Lattner
3fc9d4490c Finally, the entire instruction asmprinter is now generated from tblgen, woo!
llvm-svn: 15658
2004-08-11 07:02:04 +00:00
Chris Lattner
3cef2f82ff Add asmprintergen support for the last X86 instruction that needs it: pcrelative calls.
llvm-svn: 15657
2004-08-11 06:59:12 +00:00
Chris Lattner
309873fed0 This file is long dead
llvm-svn: 15656
2004-08-11 06:55:12 +00:00
Chris Lattner
9c171be048 Scrunch memoperands, add a few more for floating point memops
Eliminate the FPI*m classes, converting them to use FPI instead.

llvm-svn: 15655
2004-08-11 06:50:10 +00:00
Chris Lattner
f34003128d Move hacks up
llvm-svn: 15654
2004-08-11 06:09:55 +00:00
Chris Lattner
b287047c3f Make FPI take asm string and operand list
llvm-svn: 15653
2004-08-11 05:54:16 +00:00
Chris Lattner
c304bf7e03 Nuke the Im*i* patterns, by asmprintergenifying all users.
llvm-svn: 15652
2004-08-11 05:31:07 +00:00
Chris Lattner
65ab459759 X86 instructions that read-modify-write memory are not LLVM two-address instructions.
llvm-svn: 15651
2004-08-11 05:07:25 +00:00
Chris Lattner
384711a69c Get rid of the Im8, Im16, Im32 classes, converting more instructions over to
asmprintergeneration

llvm-svn: 15650
2004-08-11 04:31:00 +00:00
Nate Begeman
c07b78eaa2 Fix 255.vortex by using getClassB instead of getClass
llvm-svn: 15648
2004-08-11 03:30:55 +00:00
Chris Lattner
24279a8ac8 Remove dead method
llvm-svn: 15647
2004-08-11 02:26:39 +00:00
Chris Lattner
b66b9cd4a9 Convert asmprinter to new style of instruction printer
Start asmprintergen'ifying machine instrs with memory operands.

llvm-svn: 15646
2004-08-11 02:25:00 +00:00
Chris Lattner
27e1f4f412 Fill out immediate operand classes, add a new Operand class
llvm-svn: 15642
2004-08-11 01:53:34 +00:00
Chris Lattner
2f98c58e84 Fix InstCombine/2004-08-10-BoolSetCC.ll, a bug that is miscompiling
176.gcc.  Note that this is apparently not the only bug miscompiling gcc
though. :(

llvm-svn: 15639
2004-08-11 00:50:51 +00:00
Misha Brukman
694c9ff1a6 Breaking up the PowerPC target into 32- and 64-bit subparts, Part III: the rest.
llvm-svn: 15636
2004-08-11 00:11:25 +00:00
Misha Brukman
47c87a8808 Breaking up the PowerPC target into 32- and 64-bit subparts: Part II: 64-bit.
llvm-svn: 15635
2004-08-11 00:10:41 +00:00
Misha Brukman
6713996576 Breaking up the PowerPC target into 32- and 64-bit subparts, Part I: 32-bit.
llvm-svn: 15634
2004-08-11 00:09:42 +00:00
Misha Brukman
9027e32469 Implement new constructor.
llvm-svn: 15633
2004-08-10 23:10:25 +00:00
Misha Brukman
3f79fbe93f Renamed PPC32 (namespace for regs, opcodes) to PPC to include 64-bit targets
llvm-svn: 15631
2004-08-10 22:47:03 +00:00
Misha Brukman
aa0e45b8d8 * Fix file header to use tablegen emacs mode instead of c++
* Wrap long line to 80 cols

llvm-svn: 15630
2004-08-10 21:24:44 +00:00
Chris Lattner
5cf0a20d4f This is purely a formatting patch that gets us closer to the mecca of fitting
X86InstrInfo.td into 80 columns

llvm-svn: 15629
2004-08-10 21:21:30 +00:00
Chris Lattner
f6c4de46e0 Drop the first argument of FPI, and asmprinterify fxch
llvm-svn: 15628
2004-08-10 21:02:13 +00:00
Nate Begeman
b74ee41754 Fix casts of float to unsigned long
Replace STDX (store 64 bit int indexed) with STFDX (store double indexed)
Fix latent bug in indexed load generation
Generate indexed loads and stores in many more cases

llvm-svn: 15626
2004-08-10 20:42:36 +00:00
Misha Brukman
ef8d63fabb Fix file header comment: update filename, set tablegen emacs mode.
llvm-svn: 15625
2004-08-10 20:28:13 +00:00
Chris Lattner
97abe28059 This purely mechanical patch gives the "I" tblgen class operand list and asm
string operands, and adjusts all users to pass them in instead of using II.

llvm-svn: 15624
2004-08-10 20:17:41 +00:00
Chris Lattner
332fa9be1c Convert Ii32 instructions over to use the asmprinter generator
llvm-svn: 15621
2004-08-10 19:06:36 +00:00
Misha Brukman
861d6cdcb1 DForm 5/6 extended mneumonics take 3 arguments.
llvm-svn: 15620
2004-08-10 19:03:31 +00:00
Misha Brukman
07e778b251 * Instruction definitions moved to SparcV9InstrInfo.td for consistency
* Defined PHI instruction and SparcV9 subclass of Target

llvm-svn: 15615
2004-08-10 18:15:31 +00:00
Misha Brukman
04771d9b7b Renamed SparcV9_Reg.td -> SparcV9RegisterInfo.td for consistency.
llvm-svn: 15614
2004-08-10 18:14:04 +00:00
Misha Brukman
fe7a08a933 Fix DForm_4: format is `op r, r, i'
llvm-svn: 15613
2004-08-10 18:07:55 +00:00
Misha Brukman
90c2c03a0d Fix comment header, specify type of file `tablegen'.
llvm-svn: 15612
2004-08-10 17:37:14 +00:00
Chris Lattner
068209661a Convert the Ii16 instructions over
llvm-svn: 15606
2004-08-10 16:22:02 +00:00
Chris Lattner
315782f0ac Convert all Ii8 instructions over to the autogenerated asmprinter.
llvm-svn: 15605
2004-08-10 16:09:54 +00:00
Misha Brukman
84689ebc46 Define the target name so we can use it via TableGen.
llvm-svn: 15604
2004-08-10 15:29:15 +00:00
Chris Lattner
43abe1a0d8 Paper over CBackend/2004-08-09-va-end-null.ll
Note that this indicates a serious problem with the way we are emitting varargs,
but this should not be properly fixed until after 1.3.

This patch SHOULD go into 1.3.

llvm-svn: 15602
2004-08-10 00:19:16 +00:00
Misha Brukman
d345cd9090 Stub definition of the PowerPC CodeEmitter class; this isn't functional (yet).
llvm-svn: 15600
2004-08-09 23:03:59 +00:00
Misha Brukman
3da9167cc4 CodePrinter -> AsmPrinter
llvm-svn: 15599
2004-08-09 22:27:45 +00:00
Chris Lattner
32b5c4960c Fix InstCombine/2004-08-09-RemInfLoop.llx
This should go into the 1.3 branch

llvm-svn: 15593
2004-08-09 21:05:48 +00:00
Misha Brukman
65afbbca70 Remove ClassPrefix variable as it's no longer used.
llvm-svn: 15586
2004-08-09 19:13:29 +00:00
Misha Brukman
4ebd3108a2 The (future) SparcV8 JIT would do well to have a class prefix.
llvm-svn: 15583
2004-08-09 18:13:09 +00:00
Misha Brukman
a78884fc8a Define the ClassPrefix for SparcV9.
llvm-svn: 15581
2004-08-09 17:46:49 +00:00
Misha Brukman
1547d8e8d0 Define a ClassPrefix for PowerPC.
llvm-svn: 15580
2004-08-09 17:46:26 +00:00
Misha Brukman
5f8e406838 Classes need to have a prefix name, so that they can be tacked on to the pieces
that TableGen creates for them, e.g. CodeEmitter, AsmPrinter, etc.

llvm-svn: 15579
2004-08-09 17:46:06 +00:00
Misha Brukman
eb8758cc0c Generate a code emitter for PowerPC as well, this will be used in the JIT.
llvm-svn: 15578
2004-08-09 17:24:32 +00:00