1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

3238 Commits

Author SHA1 Message Date
Jim Laskey
3df3e04941 Clarify some constants.
llvm-svn: 33536
2007-01-26 14:19:17 +00:00
Evan Cheng
b64363a085 Added a MRegisterInfo hook that tells PEI the target is responsible for
rounding the stack frame to a multiple of stack alignment.

llvm-svn: 33504
2007-01-25 22:12:41 +00:00
Jim Laskey
56316d12bb 1. Remove dwarf-verbose option (now asm-verbose.)
2. Clean up end of lines.

llvm-svn: 33499
2007-01-25 15:45:58 +00:00
Jim Laskey
0e387f9cf0 Migrate print routines to asm to be shared by exception handling.
llvm-svn: 33498
2007-01-25 15:12:02 +00:00
Jim Laskey
a67f14502d Repair debug frames as a prelude to eh_frames. Switched to using MachineMoves
by value so that clean up is less confusing (these vectors tend to be small.)

llvm-svn: 33488
2007-01-24 18:45:13 +00:00
Jim Laskey
dabb50be28 Use asm printer to emit alignment
llvm-svn: 33485
2007-01-24 13:12:32 +00:00
Bill Wendling
c0ecd3ff91 Make ivars private and use getters. Have the MachOWriter return "Mach-O
Writer" for the pass name.

llvm-svn: 33483
2007-01-24 07:13:56 +00:00
Evan Cheng
bfd7e70770 Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
llvm-svn: 33482
2007-01-24 07:03:39 +00:00
Bill Wendling
d6f818e2fa Use the TargetMachOWriterInfo class to get this information.
llvm-svn: 33478
2007-01-24 03:38:47 +00:00
Evan Cheng
b6a4a7f72a PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
llvm-svn: 33460
2007-01-23 09:38:11 +00:00
Chris Lattner
c2b21d2900 Switch this to use SmallSet to avoid mallocs in the common case.
llvm-svn: 33457
2007-01-23 00:59:48 +00:00
Chris Lattner
f830aab43a Fix a bunch of inline asm failures
llvm-svn: 33454
2007-01-23 00:36:17 +00:00
Evan Cheng
cea1d1c5f8 Remove the DoubleTy special case.
llvm-svn: 33449
2007-01-22 23:13:55 +00:00
Reid Spencer
e33c18f4d2 For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!

llvm-svn: 33415
2007-01-21 00:29:26 +00:00
Chris Lattner
9df9e3e57b Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!

llvm-svn: 33409
2007-01-20 22:35:55 +00:00
Evan Cheng
ae02dfb090 Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.
llvm-svn: 33398
2007-01-20 10:10:26 +00:00
Evan Cheng
4e647ad333 Remove an unused variable.
llvm-svn: 33396
2007-01-20 09:21:54 +00:00
Evan Cheng
7e02b3a690 We not align the final stack slot but instead let the target do so in emitPrologue(). Each target can make adjustments to the stack frame and re-align the stack as it deem appropriate. Do not align it twice which can end up wasting stack space.
llvm-svn: 33387
2007-01-20 02:07:13 +00:00
Evan Cheng
60dd79e443 GetRegForReload() now keeps track which registers have been considered and rejected during its quest to find a suitable reload register. This avoids an infinite loop in case like this:
t1 := op t2, t3
  t2 <- assigned r0 for use by the reload but ended up reuse r1
  t3 <- assigned r1 for use by the reload but ended up reuse r0
  t1 <- desires r1
        sees r1 is taken by t2, tries t2's reload register r0
        sees r0 is taken by t3, tries t3's reload register r1
        sees r1 is taken by t2, tries t2's reload register r0 ...

llvm-svn: 33382
2007-01-19 22:40:14 +00:00
Reid Spencer
14b42c0040 For PR1043:
This is the final patch for this PR. It implements some minor cleanup
in the use of IntegerType, to wit:
1. Type::getIntegerTypeMask -> IntegerType::getBitMask
2. Type::Int*Ty changed to IntegerType* from Type*
3. ConstantInt::getType() returns IntegerType* now, not Type*

This also fixes PR1120.

Patch by Sheng Zhou.

llvm-svn: 33370
2007-01-19 21:13:56 +00:00
Evan Cheng
ced4fcb608 Remove this xform:
(shl (add x, c1), c2) -> (add (shl x, c2), c1<<c2)
Replace it with:
(add (shl (add x, c1), c2), ) -> (add (add (shl x, c2), c1<<c2), )

This fixes test/CodeGen/ARM/smul.ll

llvm-svn: 33361
2007-01-19 17:51:44 +00:00
Bill Wendling
af4f1b8791 Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
llvm-svn: 33316
2007-01-18 01:23:11 +00:00
Chris Lattner
e0c1ba6269 add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
llvm-svn: 33314
2007-01-18 01:12:56 +00:00
Bill Wendling
9306626c66 Changed to use the OutputBuffer instead of the methods in MachO and ELF
writers.

llvm-svn: 33311
2007-01-17 22:22:31 +00:00
Bill Wendling
6cf6bb2d24 Revert patch.
llvm-svn: 33298
2007-01-17 09:06:13 +00:00
Bill Wendling
ad6ddaa316 Use the methods in the TargetObjInfo object instead of internal methods.
llvm-svn: 33289
2007-01-17 03:49:21 +00:00
Chris Lattner
3af776359d Fix PR1114 and CodeGen/Generic/2007-01-15-LoadSelectCycle.ll by being
careful when folding "c ? load p : load q" that C doesn't reach either load.
If so, folding this into load (c ? p : q) will induce a cycle in the graph.

llvm-svn: 33251
2007-01-16 05:59:59 +00:00
Chris Lattner
7560c5f913 add options to view the dags before the first or second pass of dag combine.
llvm-svn: 33249
2007-01-16 04:55:25 +00:00
Bill Wendling
cfdd717db5 Fix for PR1095:
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.

llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Chris Lattner
c5e1611848 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)

llvm-svn: 33225
2007-01-15 02:27:26 +00:00
Chris Lattner
f48900e322 eliminate calls to Type::isInteger, preferring isIntegral instead.
llvm-svn: 33222
2007-01-15 02:03:16 +00:00
Reid Spencer
6d0992dc3d Compensate for loss of DerivedTypes.h in TargetLowering.h
llvm-svn: 33159
2007-01-12 23:31:12 +00:00
Reid Spencer
6468d49755 Move a function out of line.
llvm-svn: 33158
2007-01-12 23:30:31 +00:00
Evan Cheng
e2a6d79cad Minor fix.
llvm-svn: 33149
2007-01-12 22:51:10 +00:00
Chris Lattner
e0b9a74157 Simplify code
llvm-svn: 33123
2007-01-12 18:15:09 +00:00
Reid Spencer
373d2bccea For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.

llvm-svn: 33113
2007-01-12 07:05:14 +00:00
Reid Spencer
3d986f6487 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.

llvm-svn: 33110
2007-01-12 04:24:46 +00:00
Evan Cheng
032a597692 Store default libgcc routine names and allow them to be redefined by target.
llvm-svn: 33105
2007-01-12 02:11:51 +00:00
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
23d24526b2 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.

llvm-svn: 33073
2007-01-11 12:24:14 +00:00
Evan Cheng
6829d12846 Naming consistency.
llvm-svn: 33026
2007-01-08 23:55:53 +00:00
Evan Cheng
6cba4e114e Fix for PR1075: bottom-up register-reduction scheduling actually increases register pressure.
- Fixed bugs in sethi-ullman number computation and priority queue comparison
functions.
- Separate code that handles priority computation special cases from SU number computation.

llvm-svn: 33025
2007-01-08 23:50:38 +00:00
Chris Lattner
0f765fae89 Implement some trivial FP foldings when -enable-unsafe-fp-math is specified.
This implements CodeGen/PowerPC/unsafe-math.ll

llvm-svn: 33024
2007-01-08 23:04:05 +00:00
Jim Laskey
8cc5a0d2fe Need to handle static declarations properly.
llvm-svn: 33022
2007-01-08 22:15:18 +00:00
Chris Lattner
3e42a4147a llvm 2.0 doesn't support llvm.isunordered.*
llvm-svn: 32994
2007-01-07 08:52:43 +00:00
Chris Lattner
b6f6d3a00c remove support for llvm.isunordered
llvm-svn: 32992
2007-01-07 08:37:22 +00:00
Chris Lattner
aa5051ae7f Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.
This simplifies many clients also

llvm-svn: 32989
2007-01-07 08:12:01 +00:00
Evan Cheng
d378a229c5 Expand fcopysign to the bitwise sequence if select is marked as expensive.
llvm-svn: 32940
2007-01-05 23:33:44 +00:00
Evan Cheng
cb71f273ff Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0
before or'ing in the sign bit of operand 1.

llvm-svn: 32930
2007-01-05 21:31:51 +00:00
Evan Cheng
237ec557ae CopyToReg source operand can be a register as well. e.g. Copy from GlobalBaseReg.
llvm-svn: 32929
2007-01-05 20:59:06 +00:00