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

83 Commits

Author SHA1 Message Date
Chris Lattner
6ad460b336 Simplify code by using ConstantInt::getRawValue instead of checking to see
whether the constant is signed or unsigned, then casting

llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman
5de3e14206 The word separate' only has one e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Vikram S. Adve
8d30b76da6 Several fixes to handling of int CC register:
(1) An int CC live range must be spilled if there are any interferences,
    even if no other "neighbour" in the interf. graph has been allocated
    that reg. yet.  This is actually true of any class with only one reg!

(2) SparcIntCCRegClass::colorIGNode sets the color even if the LR must
    be spilled so that the machine-independent spill code doesn't have to
    make the machine-dependent decision of which CC name to use based on
    operand type: %xcc or %icc.  (These are two halves of the same register.)

(3) LR->isMarkedForSpill() is no longer the same as LR->hasColor().
    These should never have been the same, and this is necessary now for #2.

(4) All RDCCR and WRCCR instructions are directly generated with the
    phony number for %ccr so that EmitAssembly/EmitBinary doesn't have to
    deal with this.

llvm-svn: 7151
2003-07-10 19:42:11 +00:00
Vikram S. Adve
1ddf684f4c Major bug fix though it happened rarely (only on a compare after an
integer overflow):
We need to use %icc and not %xcc for comparisons on 32-bit or smaller
integer values.

llvm-svn: 7111
2003-07-06 20:13:59 +00:00
Vikram S. Adve
884f4c7a97 Reverting previous beautification changes.
llvm-svn: 6464
2003-05-31 07:27:17 +00:00
Misha Brukman
3fc07ad7b8 Code beautification, no functional changes.
llvm-svn: 6459
2003-05-31 06:22:37 +00:00
Misha Brukman
4a16c0cab3 Added 'r' or 'i' annotations to instructions, as SparcInstr.def has changed.
llvm-svn: 6373
2003-05-27 22:35:43 +00:00
Vikram S. Adve
66969014b2 Added special register class containing (for now) %fsr.
Fixed spilling of %fcc[0-3] which are part of %fsr.
Moved some machine-independent reg-class code to class TargetRegInfo
from SparcReg{Class,}Info.

llvm-svn: 6339
2003-05-27 00:02:22 +00:00
Vikram S. Adve
f8bb6381df Bug fix: padding bytes within a structure should go after each field!
llvm-svn: 6333
2003-05-25 21:59:09 +00:00
Misha Brukman
80e11dcb30 Sparc instruction opcodes now all live under the `V9' namespace.
llvm-svn: 6249
2003-05-20 20:32:24 +00:00
Chris Lattner
e82edfba8e * Don't access TargetData directly
* Changes because frame info is not in MachineFunction directly anymore

llvm-svn: 5171
2002-12-28 20:15:01 +00:00
Chris Lattner
0bf125c617 Fix misleading indentation
llvm-svn: 4730
2002-11-17 22:57:23 +00:00
Vikram S. Adve
51aa205bd1 Remove a nasty little semi-colon someone introduced which
prevented any machine instrs from being printed!

llvm-svn: 4557
2002-11-06 00:34:26 +00:00
Vikram S. Adve
913883dd6e In getID(), don't call getValidSymbolName to mangle external names!
llvm-svn: 4451
2002-10-30 20:16:38 +00:00
Chris Lattner
1a53fc24c7 *** empty log message ***
llvm-svn: 4390
2002-10-29 17:35:41 +00:00
Misha Brukman
6f3b1a31a1 Rewrote uses of deprecated `MachineFunction::get(BasicBlock *BB)'.
llvm-svn: 4352
2002-10-28 20:01:13 +00:00
Chris Lattner
e309cdbc95 Rename the redundant MachineOperand::getOperandType() to MachineOperand::getType()
llvm-svn: 4331
2002-10-28 04:45:29 +00:00
Chris Lattner
df1d87f5f3 *** empty log message ***
llvm-svn: 4323
2002-10-28 02:01:37 +00:00
Chris Lattner
b8c6acfbc0 Rename MachineCodeForBasicBlock to MachineBasicBlock
llvm-svn: 4318
2002-10-28 01:41:47 +00:00
Misha Brukman
142795fd17 Changed MachineCodeForMethod' to MachineFunction'.
llvm-svn: 4301
2002-10-28 00:28:31 +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
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
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
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
Misha Brukman
9e054e1d17 Again, including Module makes Function unnecessary.
llvm-svn: 3714
2002-09-14 02:07:43 +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
821de50a04 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
098c5d67ba Add AsmPrinter::ConstantExprToString, which writes out a ConstantExpr
as an expression.

llvm-svn: 3442
2002-08-22 02:58:36 +00:00
Chris Lattner
a477df934f This case JUST handles constantpointer nulls, not all pointers.
llvm-svn: 3402
2002-08-20 17:02:48 +00:00
Chris Lattner
811987ce5c Merge three loops into one.
llvm-svn: 3259
2002-08-07 21:39:48 +00:00
Chris Lattner
9860e64083 *** empty log message ***
llvm-svn: 3056
2002-07-24 21:21:32 +00:00
Chris Lattner
a01e139a76 * 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
Vikram S. Adve
268137274b Add support to print %hh, %hm, %lm, or %lo in an operand field.
llvm-svn: 2857
2002-07-10 21:41:21 +00:00
Vikram S. Adve
f5760a424d Added support for printing constant global references to
assembly.

llvm-svn: 2842
2002-07-09 12:30:29 +00:00
Vikram S. Adve
8b06b38495 BA no longer has the unused CC operand.
llvm-svn: 2837
2002-07-08 23:30:59 +00:00
Chris Lattner
d7cbd7d5d2 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2778
2002-06-25 16:13:21 +00:00
Chris Lattner
1a37bd9d7e Fix Constness problems
llvm-svn: 2761
2002-06-05 18:08:26 +00:00
Vikram S. Adve
fa6c24db76 Numerous bug fixes:
-- correct sign extensions for integer casts and for shift-by-constant
   instructions generated for integer multiply
-- passing FP arguments to functions with more than 6 arguments
-- passing FP arguments to varargs functions
-- passing FP arguments to functions with no prototypes
-- incorrect stack frame size when padding a section
-- folding getelementptr operations with mixed array and struct indexes
-- use uint64_t instead of uint for constant offsets in mem operands
-- incorrect coloring for CC registers (both int and FP): interferences
   were being completely ignored for int CC and were considered but no
   spills were marked for fp CC!

Also some code improvements:
-- better interface to generating machine instr for common cases
   (many places still need to be updated to use this interface)
-- annotations on MachineInstr to communicate information from
   one codegen phase to another (now used to pass information about
   CALL/JMPLCALL operands from selection to register allocation)
-- all sizes and offests in class TargetData are uint64_t instead of uint

llvm-svn: 2640
2002-05-19 15:25:51 +00:00
Chris Lattner
96e0c48175 Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
589debc4ba Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.

llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner
ec70d92221 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
llvm-svn: 2386
2002-04-28 21:27:06 +00:00
Chris Lattner
7102c8f2c9 Add #include that was removed from TargetMachine.h
llvm-svn: 2381
2002-04-28 20:40:59 +00:00
Chris Lattner
321a8cf4ba Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
7b48239cc1 Simplify code
Remove unneccesary getID variant for module's

llvm-svn: 2353
2002-04-28 04:50:54 +00:00
Chris Lattner
536cf1b13f * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner
2789c27277 * getAsString requires that the input array is string compatible, so
assert it.
* Use WriteAsOperand instead of getStringValue for constants

llvm-svn: 2296
2002-04-18 18:15:38 +00:00
Chris Lattner
c9d79fd15f Handle the FP format problem, where outputed FP constants were not precise
enough.  This fixes compilation of the health benchmark.

llvm-svn: 2228
2002-04-11 21:44:02 +00:00
Chris Lattner
5db83c9e2e Use new higher level isFloatingPoint() function
llvm-svn: 2191
2002-04-09 05:16:08 +00:00
Chris Lattner
137fa92dce * Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function

llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
bc15ae64dd Change references to the Method class to be references to the Function
class.  The Method class is obsolete (renamed) and all references to it
are being converted over to Function.

llvm-svn: 2144
2002-04-07 20:49:59 +00:00