Evan Cheng
fc74e2de26
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
a94d394ad2
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
9201100b29
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
e750f61ac5
Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
...
llvm-svn: 33316
2007-01-18 01:23:11 +00:00
Chris Lattner
0ee2d46cfe
add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
...
llvm-svn: 33314
2007-01-18 01:12:56 +00:00
Bill Wendling
cd9c1f035a
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
38ee6519b7
Revert patch.
...
llvm-svn: 33298
2007-01-17 09:06:13 +00:00
Bill Wendling
dcc324b15b
Use the methods in the TargetObjInfo object instead of internal methods.
...
llvm-svn: 33289
2007-01-17 03:49:21 +00:00
Chris Lattner
4dc4489286
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
f70c5cd5db
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
e21237e59a
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
03c4953cdd
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
c69c6c4db2
eliminate calls to Type::isInteger, preferring isIntegral instead.
...
llvm-svn: 33222
2007-01-15 02:03:16 +00:00
Reid Spencer
a8a0f2cf68
Compensate for loss of DerivedTypes.h in TargetLowering.h
...
llvm-svn: 33159
2007-01-12 23:31:12 +00:00
Reid Spencer
ddf1421b8e
Move a function out of line.
...
llvm-svn: 33158
2007-01-12 23:30:31 +00:00
Evan Cheng
61a4be88b4
Minor fix.
...
llvm-svn: 33149
2007-01-12 22:51:10 +00:00
Chris Lattner
7f6fac4bb5
Simplify code
...
llvm-svn: 33123
2007-01-12 18:15:09 +00:00
Reid Spencer
7a9c62baa6
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
cddc9dfe97
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
31cbddf28a
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
542964f55b
Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
...
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Zhou Sheng
75b871fb1e
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
6730f03370
Naming consistency.
...
llvm-svn: 33026
2007-01-08 23:55:53 +00:00
Evan Cheng
961bbd393b
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
0199fd6d59
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
3106724a03
Need to handle static declarations properly.
...
llvm-svn: 33022
2007-01-08 22:15:18 +00:00
Chris Lattner
2a116abf3a
llvm 2.0 doesn't support llvm.isunordered.*
...
llvm-svn: 32994
2007-01-07 08:52:43 +00:00
Chris Lattner
10cae15d8e
remove support for llvm.isunordered
...
llvm-svn: 32992
2007-01-07 08:37:22 +00:00
Chris Lattner
34acba48cc
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
5f80c450f3
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
3b841ddbe0
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
376c9c4c97
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
Evan Cheng
8ec5283dc4
GEP subscript is interpreted as a signed value.
...
llvm-svn: 32888
2007-01-05 01:46:20 +00:00
Chris Lattner
96035bed51
fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
...
the recent signless changes.
llvm-svn: 32884
2007-01-04 22:22:37 +00:00
Evan Cheng
003feb03d5
Expand fcopysign to a series of bitwise of operations when it's profitable to
...
do so.
llvm-svn: 32881
2007-01-04 21:56:39 +00:00
Reid Spencer
e6f81876eb
Legalizer doesn't do an ANY_EXTEND if we don't ask for one so make sure
...
that we default to an ANY_EXTEND if no parameter attribute is set on the
result value of a function.
llvm-svn: 32836
2007-01-03 16:49:33 +00:00
Jim Laskey
7601f2f36e
NULL names should pass validation.
...
llvm-svn: 32835
2007-01-03 13:46:20 +00:00
Jim Laskey
751314fab9
Silence warning.
...
llvm-svn: 32834
2007-01-03 13:36:40 +00:00
Reid Spencer
2a34b91666
Restore previous behavior of defaulting to ZEXT. This works around two
...
things: (1) preventing PR1071 and (2) working around missing parameter
attributes for bool type. (2) will be fixed shortly. When PR1071 is fixed,
this patch should be undone.
llvm-svn: 32831
2007-01-03 05:03:05 +00:00
Reid Spencer
0917adf614
Two changes:
...
1. Switch expression and cases are compared signed and are sign extended.
2. For function results needing extended, do SIGN_EXTEND if the SExtAttribute
is set and ZERO_EXTEND if the ZExtAttribute is set, otherwise just let
the Legalizer do ANY_EXTEND.
This fixes the recent regression in kimwitu++ and probably the llvm-gcc
bootstrap issue we had today.
llvm-svn: 32830
2007-01-03 04:25:33 +00:00
Reid Spencer
791864c6a5
Clean up from recent changes. Comment the new parameter to ExpandLibCall.
...
Consolidate some lines of code and remove duplication.
llvm-svn: 32829
2007-01-03 04:22:32 +00:00
Evan Cheng
92484c2aa4
- Fixing naming inconsistency: calleesave -> calleesaved.
...
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().
llvm-svn: 32822
2007-01-02 21:31:15 +00:00
Reid Spencer
e63b6518fa
For PR950:
...
Three changes:
1. Convert signed integer types to signless versions.
2. Implement the @sext and @zext parameter attributes. Previously the
type of an function parameter was used to determine whether it should
be sign extended or zero extended before the call. This information is
now communicated via the function type's parameter attributes.
3. The interface to LowerCallTo had to be changed in order to accommodate
the parameter attribute information. Although it would have been
convenient to pass in the FunctionType itself, there isn't always one
present in the caller. Consequently, a signedness indication for the
result type and for each parameter was provided for in the interface
to this method. All implementations were changed to make the adjustment
necessary.
llvm-svn: 32788
2006-12-31 05:55:36 +00:00
Reid Spencer
266e42b312
For PR950:
...
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.
llvm-svn: 32751
2006-12-23 06:05:41 +00:00
Jim Laskey
d7a090ffc4
Need to walk the derived chain of typedefs to get actual size.
...
llvm-svn: 32744
2006-12-22 20:03:42 +00:00
Evan Cheng
763550323d
Debug dump error.
...
llvm-svn: 32743
2006-12-22 02:04:05 +00:00
Reid Spencer
4e0c2a0e41
Just print integer constants as signed values. The actual signedness
...
doesn't matter as it is determined in the way the constant is used.
llvm-svn: 32733
2006-12-21 19:04:23 +00:00
Reid Spencer
6156b02dd3
Simplify all the casting business and get rid of isSigned().
...
llvm-svn: 32731
2006-12-21 08:28:31 +00:00
Evan Cheng
258657e64e
getLoad() and getStore() calls missed SVOffset operand. Thanks to Dan Gohman
...
for pointing it out!
llvm-svn: 32712
2006-12-20 01:27:29 +00:00
Chris Lattner
aee775a6b7
Eliminate static ctors from Statistics
...
llvm-svn: 32698
2006-12-19 22:41:21 +00:00
Anton Korobeynikov
44ef93449a
Fix for PR1059: http://llvm.org/PR1059
...
llvm-svn: 32685
2006-12-19 21:04:20 +00:00
Evan Cheng
9ad6edf2ec
May need to promote the operand (either sign_extend_inreg or and) before
...
expanding a {s|u}int_to_fp.
llvm-svn: 32665
2006-12-19 01:44:04 +00:00
Evan Cheng
adc80f98cf
LegalizeSetCCOperands() may end up inserting libcalls. They need to be
...
properly serialized. Do not clear LastCallSEQ_END until that is done.
llvm-svn: 32659
2006-12-18 22:55:34 +00:00
Reid Spencer
668d90f289
Convert the last uses of CastInst::createInferredCast to a normal cast
...
creation. These changes are still temporary but at least this pushes
knowledge of signedness out closer to where it can be determined properly
and allows signedness to be removed from VMCore.
llvm-svn: 32654
2006-12-18 08:47:13 +00:00
Rafael Espindola
d7998d0e6d
move ExtWeakSymbols to AsmPrinter
...
llvm-svn: 32648
2006-12-18 03:37:18 +00:00
Bill Wendling
e33ce528da
Fixed so that it dereferences the ostream pointer.
...
llvm-svn: 32640
2006-12-17 11:15:53 +00:00
Bill Wendling
a77f14265b
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
...
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
llvm-svn: 32636
2006-12-17 05:15:13 +00:00
Chris Lattner
9bd5ed636c
Fix PR1049 and CodeGen/Generic/2006-12-16-InlineAsmCrash.ll
...
by producing target constants instead of constants. Constants can get
selected to li/movri instructions, which causes the scheduler to explode.
llvm-svn: 32633
2006-12-16 21:14:48 +00:00
Evan Cheng
28cf4277bb
Cannot combine an indexed load / store any further.
...
llvm-svn: 32629
2006-12-16 06:25:23 +00:00
Evan Cheng
851e589eda
Expand FP undef
...
llvm-svn: 32623
2006-12-16 02:20:50 +00:00
Jeff Cohen
29192e6274
The best unbreakage yet, addressing Bill's concerns.
...
llvm-svn: 32622
2006-12-16 02:15:42 +00:00
Evan Cheng
860004688a
Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
...
llvm-svn: 32621
2006-12-16 02:10:30 +00:00
Evan Cheng
388cbbf000
Expand fabs / fneg to and / xor.
...
llvm-svn: 32619
2006-12-16 00:52:40 +00:00
Jeff Cohen
b82309f1ab
An even better unbreakage...
...
llvm-svn: 32617
2006-12-15 22:57:14 +00:00
Evan Cheng
884bc09d10
Fix select_cc, select expansion to soft-fp bugs.
...
llvm-svn: 32616
2006-12-15 22:42:55 +00:00
Jim Laskey
26df19ace6
This code was usurping the sextload expand in teh legalizer. Just make
...
sure the right conditions are checked.
llvm-svn: 32611
2006-12-15 21:38:30 +00:00
Chris Lattner
b1a9492ed7
silence a bogus warning
...
llvm-svn: 32597
2006-12-15 07:36:19 +00:00
Evan Cheng
54c4ab8524
Minor clean up.
...
llvm-svn: 32593
2006-12-15 06:41:01 +00:00
Evan Cheng
35fdd5ffe1
Expand FP compares to soft-fp call(s)
...
llvm-svn: 32590
2006-12-15 02:59:56 +00:00
Jim Laskey
70323a8146
1. Tidy up jump table info.
...
2. Allow the jit to handle PIC relocable jump tables.
llvm-svn: 32581
2006-12-14 19:17:33 +00:00
Evan Cheng
4c306ae0c2
Fix a long-standing spiller bug:
...
If a spillslot value is available in a register, and there is a noop copy that
targets that register, the spiller correctly decide not to invalidate the
spillslot register.
However, even though the noop copy does not clobbers the value. It does start a
new intersecting live range. That means the spillslot register is available for
use but should not be reused for a two-address instruction modref operand which
would clobber the new live range.
When we remove the noop copy, update the available information by clearing the
canClobber bit.
llvm-svn: 32576
2006-12-14 07:54:05 +00:00
Evan Cheng
22cf89967b
More soft-fp work.
...
llvm-svn: 32559
2006-12-13 20:57:08 +00:00
Evan Cheng
e370e0eb09
Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
...
llvm-svn: 32527
2006-12-13 03:19:57 +00:00
Evan Cheng
f3a80c6235
Expand fsqrt, fsin, and fcos to libcalls.
...
llvm-svn: 32526
2006-12-13 02:38:13 +00:00
Evan Cheng
0a5b805f6d
Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.
...
llvm-svn: 32523
2006-12-13 01:57:55 +00:00
Reid Spencer
bfe26ffcfc
Replace CastInst::createInferredCast calls with more accurate cast
...
creation calls.
llvm-svn: 32521
2006-12-13 00:50:17 +00:00
Evan Cheng
3766fc60da
Expand FP constant to integers if FP types are not legal.
...
llvm-svn: 32497
2006-12-12 22:19:28 +00:00
Evan Cheng
97a750fc47
Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
...
llvm-svn: 32495
2006-12-12 21:51:17 +00:00
Evan Cheng
47833a1d28
Expand ConstantFP to load from CP if float types are being expanded.
...
llvm-svn: 32494
2006-12-12 21:32:44 +00:00
Evan Cheng
634885f71e
Expand i32/i64 CopyToReg f32/f64 to BIT_CONVERT + CopyToReg.
...
llvm-svn: 32493
2006-12-12 21:21:32 +00:00
Evan Cheng
0076ca0da9
- When expanding a bit_convert whose src operand is also to be expanded and
...
its expansion result type is equal to the result type of the bit_convert,
e.g. (i64 bit_convert (f64 op)) if FP is not legal
returns the result of the expanded source operand.
- Store f32 / f64 may be expanded to a single store i32/i64.
llvm-svn: 32490
2006-12-12 19:53:13 +00:00
Evan Cheng
0c0b78c18e
Expand formal arguments and call arguments recursively: e.g. f64 -> i64 -> 2 x i32.
...
llvm-svn: 32476
2006-12-12 07:27:38 +00:00
Chris Lattner
2f96e7d241
fit in 80 cols
...
llvm-svn: 32474
2006-12-12 05:22:21 +00:00
Chris Lattner
080881614d
this can only be fptrunc.
...
llvm-svn: 32473
2006-12-12 05:21:51 +00:00
Chris Lattner
6801f02557
This case isn't needed with recent changes to ConstantInt::get
...
llvm-svn: 32472
2006-12-12 05:19:46 +00:00
Chris Lattner
0c537dae55
split up inttoptr from ptrtoint handling, the cases aren't similar at all.
...
llvm-svn: 32471
2006-12-12 05:18:19 +00:00
Chris Lattner
b9e41f5559
the operand of a bitcast is always the right size, just emit it in place.
...
llvm-svn: 32470
2006-12-12 05:14:13 +00:00
Chris Lattner
6ba11fbd75
Revert Nate's patch to fix X86/store-fp-constant.ll. With the dag combiner
...
and legalizer separated like they currently are, I don't see a way to handle
this xform.
llvm-svn: 32466
2006-12-12 04:18:56 +00:00
Chris Lattner
b7524b6d0e
make this code more aggressive about turning store fpimm into store int imm.
...
This is not sufficient to fix X86/store-fp-constant.ll
llvm-svn: 32465
2006-12-12 04:16:14 +00:00
Reid Spencer
38dbe1ca14
Tidy up a bit.
...
llvm-svn: 32462
2006-12-12 01:32:02 +00:00
Reid Spencer
3c49edcaa1
Change inferred cast creation calls to more specific cast creations.
...
llvm-svn: 32460
2006-12-12 01:17:41 +00:00
Evan Cheng
3432ab97c1
Re-apply changes that were backed out and fix a naughty typo.
...
llvm-svn: 32442
2006-12-11 19:27:14 +00:00
John Criswell
b3b285185f
It seems the llvm::OStream class does not handle stream manipulators.
...
For now, just grab the stream and perform the output on it directly.
llvm-svn: 32441
2006-12-11 19:15:36 +00:00
Chris Lattner
e9a203c4e5
Revert changes that broke oggenc on ppc
...
llvm-svn: 32440
2006-12-11 18:53:38 +00:00
Evan Cheng
218369881f
Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal type.
...
llvm-svn: 32434
2006-12-11 17:25:19 +00:00
Evan Cheng
f4bec95b58
f32 / f64 node is expanded to one i32 / i64 node.
...
llvm-svn: 32433
2006-12-11 06:50:04 +00:00
Evan Cheng
f6b01fdb48
Clean up some bad code.
...
llvm-svn: 32432
2006-12-11 06:25:26 +00:00
Nate Begeman
8e20c760fa
Move something that should be in the dag combiner from the legalizer to the
...
dag combiner.
llvm-svn: 32431
2006-12-11 02:23:46 +00:00
Nate Begeman
e8da58b3f9
Properly mangles symbol table names
...
Supports constant pools
Supports relocations to jump tables
Supports relocations within the data segment (global = address of global)
Allocates memory in a non-hacky for all non-code objects.
llvm-svn: 32430
2006-12-11 02:20:45 +00:00
Anton Korobeynikov
3b7c257cae
Cleaned setjmp/longjmp lowering interfaces. Now we're producing right
...
code (both asm & cbe) for Mingw32 target.
Removed autoconf checks for underscored versions of setjmp/longjmp.
llvm-svn: 32415
2006-12-10 23:12:42 +00:00
Evan Cheng
4eee72471c
Preliminary soft float support.
...
llvm-svn: 32394
2006-12-09 02:42:38 +00:00
Evan Cheng
78cb08d082
Move findTiedToSrcOperand to TargetInstrDescriptor.
...
llvm-svn: 32366
2006-12-08 18:45:48 +00:00
Evan Cheng
bb4e6d4d12
Proper fix for PR1037: to determine is a VR is a modref, check 1) whether it is
...
tied to another oeprand, 2) whether is is being tied to by another operand. So
the destination operand of a two-address MI can be correctly identified.
llvm-svn: 32354
2006-12-08 08:02:34 +00:00
Evan Cheng
4539418a7b
findTiedToSrcOperand() changed.
...
llvm-svn: 32353
2006-12-08 07:59:51 +00:00
Chris Lattner
d9f04e4875
Fix CodeGen/PowerPC/2006-12-07-SelectCrash.ll on PPC64
...
llvm-svn: 32336
2006-12-07 22:36:47 +00:00
Bill Wendling
355fc5ad50
Removed more <iostream> includes
...
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
22e978a736
Removing even more <iostream> includes.
...
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Reid Spencer
e44aa812b4
Revision 1.83 causes PR1037.
...
Reverted.
llvm-svn: 32305
2006-12-07 16:21:19 +00:00
Evan Cheng
c41ed4e0e1
Initialize {Min|Max}CSFrameIndex properly.
...
llvm-svn: 32299
2006-12-07 02:25:34 +00:00
Bill Wendling
f3baad3ee1
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
...
now cerr, cout, and NullStream resp.
llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Evan Cheng
e312c152d2
MI keeps a ptr of TargetInstrDescriptor, use it.
...
llvm-svn: 32296
2006-12-07 01:21:59 +00:00
Evan Cheng
7074cbd449
getOperandConstraint returns -1 if the operand does have the specific constraint. This bug was causing excessive spills.
...
llvm-svn: 32295
2006-12-07 00:46:04 +00:00
Chris Lattner
700b873130
Detemplatize the Statistic class. The only type it is instantiated with
...
is 'unsigned'.
llvm-svn: 32279
2006-12-06 17:46:33 +00:00
Jim Laskey
acbb456dde
Some addresssed should be 64-bit and some shouldn't.
...
llvm-svn: 32278
2006-12-06 17:43:18 +00:00
Evan Cheng
75c2194b1a
Move copyKillDeadInfo out-of-line. Add findRegisterUseOperand().
...
llvm-svn: 32273
2006-12-06 08:27:42 +00:00
Chris Lattner
979804d800
eliminate fp statistic
...
llvm-svn: 32251
2006-12-06 01:48:55 +00:00
Jeff Cohen
cc08c83186
Unbreak VC++ build.
...
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Evan Cheng
67fc141db5
Match TargetInstrInfo changes.
...
llvm-svn: 32098
2006-12-01 21:52:58 +00:00
Jim Laskey
f52337299a
better check for version
...
llvm-svn: 32045
2006-11-30 18:29:23 +00:00
Jim Laskey
b5b14060a8
Change global descriptor names to provide name, full name and linkage name.
...
llvm-svn: 32036
2006-11-30 14:35:45 +00:00
Jim Laskey
aa2843ad4a
Temp fix to deal gdb issue.
...
llvm-svn: 32035
2006-11-30 11:09:42 +00:00
Evan Cheng
3c3ce98530
- MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
...
- Remove the ugly TargetInstrDescriptors hack.
llvm-svn: 32032
2006-11-30 07:08:44 +00:00
Evan Cheng
a743fada65
Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
...
llvm-svn: 32022
2006-11-29 19:13:47 +00:00
Jim Laskey
01b74b6f7b
Eliminate unnecessary scopes.
...
llvm-svn: 32020
2006-11-29 16:55:57 +00:00
Evan Cheng
6973993e9c
Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
...
llvm-svn: 32016
2006-11-29 08:26:18 +00:00
Evan Cheng
feba507a97
Fix for PR1023 by Dan Gohman.
...
llvm-svn: 32003
2006-11-29 01:58:12 +00:00
Evan Cheng
6e12a052ff
Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
...
llvm-svn: 32000
2006-11-29 01:38:07 +00:00
Chris Lattner
90f4238c38
add a hook to allow targets to hack on inline asms to lower them to llvm
...
when they want to.
llvm-svn: 31997
2006-11-29 01:12:32 +00:00
Bill Wendling
5c3966aa68
Converted to using llvm streams instead of <iostream>s
...
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
787b77320f
Use llvm streams instead of <iostream>
...
llvm-svn: 31985
2006-11-28 22:48:48 +00:00
Bill Wendling
bc0d5f8bcb
Put the #include for a module first.
...
llvm-svn: 31958
2006-11-28 03:31:29 +00:00
Evan Cheng
b2a6b0dbad
Clean up.
...
llvm-svn: 31957
2006-11-28 02:25:34 +00:00
Bill Wendling
3f6f0fd028
Changed to using llvm streams.
...
llvm-svn: 31954
2006-11-28 02:08:17 +00:00
Chris Lattner
3abb63651b
Fix PR1016
...
llvm-svn: 31950
2006-11-28 01:03:30 +00:00
Evan Cheng
20350c4025
Change MachineInstr ctor's to take a TargetInstrDescriptor reference instead
...
of opcode and number of operands.
llvm-svn: 31947
2006-11-27 23:37:22 +00:00
Chris Lattner
5d5916b4d1
Fix the dag combiner bug corresponding to PR1014.
...
llvm-svn: 31943
2006-11-27 21:50:02 +00:00
Chris Lattner
3da631f29a
For better or worse, load from i1 is assumed to be zero extended. Do not
...
form a load from i1 from larger loads that may not be zext'd.
llvm-svn: 31933
2006-11-27 04:40:53 +00:00
Chris Lattner
db18938355
If a brcond condition is promoted, make sure to zero extend it, even if not
...
expanded into BR_CC.
llvm-svn: 31932
2006-11-27 04:39:56 +00:00
Reid Spencer
6c38f0bb07
For PR950:
...
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.
llvm-svn: 31931
2006-11-27 01:05:10 +00:00
Jim Laskey
d7f53cdaec
Global label not handled correctly.
...
llvm-svn: 31883
2006-11-20 20:29:06 +00:00
Chris Lattner
3676a994ca
Fix PR1011 and CodeGen/Generic/2006-11-20-DAGCombineCrash.ll
...
llvm-svn: 31878
2006-11-20 18:05:46 +00:00
Chris Lattner
539df43e4b
setOperand should not zap the operand list or add implicit operands to an
...
instruction. Doing so breaks the FP stackifier, the alpha branch selector
the sparc fpmover.
This fixes PR1012 and CodeGen/X86/fp-stack-compare.ll
llvm-svn: 31876
2006-11-20 17:57:22 +00:00
Reid Spencer
d9436b6837
For PR950:
...
First in a series of patches to convert SetCondInst into ICmpInst and
FCmpInst using only two opcodes and having the instructions contain their
predicate value. Nothing uses these classes yet. More patches to follow.
llvm-svn: 31867
2006-11-20 01:22:35 +00:00
Chris Lattner
ea017f66f7
Don't transform in another bad case: if the block is empty, it should be
...
simplified before we do this xform so that our cost model is accurate.
llvm-svn: 31864
2006-11-18 22:25:39 +00:00
Chris Lattner
56ec81ff73
Fix another case we *don't* want to do this xform.
...
llvm-svn: 31861
2006-11-18 21:56:39 +00:00
Chris Lattner
ace542fa6c
Implement operator<< for machine basic blocks to make it easier to dump them.
...
llvm-svn: 31857
2006-11-18 21:47:36 +00:00
Chris Lattner
7acdc17fe4
make the previous change more aggressive, moving any block with no fallthrough.
...
This speeds up yacr2 by 7% on a core2.
llvm-svn: 31856
2006-11-18 21:30:35 +00:00
Chris Lattner
47ce26158f
Minor code layout tweak: if we have something like this:
...
if (cond) goto BB2
BB1:
...
return;
BB2:
...
Move BB1 to the end of the function so that the code falls through in the
non-return case. This has the effect of moving assert (and other no-return
call) bodies and return blocks out of loops.
llvm-svn: 31855
2006-11-18 20:47:54 +00:00
Jim Laskey
da0add3fd0
Fixing the ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 build.
...
llvm-svn: 31822
2006-11-17 13:07:55 +00:00
Bill Wendling
9d46fcd59c
More removal of std::cerr and DEBUG, replacing with DOUT instead.
...
llvm-svn: 31806
2006-11-17 02:09:07 +00:00
Bill Wendling
d108b9a60d
Replace std::cerr uses of the "DEBUG" macro with "DOUT" instead. Removes
...
a #include of iostream.
llvm-svn: 31800
2006-11-17 00:50:36 +00:00
Bill Wendling
8969ebca44
*** empty log message ***
...
llvm-svn: 31789
2006-11-16 20:11:33 +00:00
Evan Cheng
9fd73b8a7f
Match MachineCodeEmitter changes.
...
llvm-svn: 31787
2006-11-16 20:04:04 +00:00
Bill Wendling
d811cc6818
Don't recompute getNumOperands for each iteration.
...
llvm-svn: 31783
2006-11-16 07:35:18 +00:00
Bill Wendling
c7969fd1e7
Added a new method "CreateNewLiveInterval" which, given a list of
...
LiveRanges, creates a new LiveInterval from them. The LiveRanges should
have existed already in another LiveInterval, but removed.
llvm-svn: 31780
2006-11-16 02:41:50 +00:00
Chris Lattner
e0a70388c2
enable the branch folding pass for the JIT.
...
llvm-svn: 31777
2006-11-16 01:00:07 +00:00
Evan Cheng
f64da389f8
Fix an incorrectly inverted condition.
...
llvm-svn: 31773
2006-11-16 00:08:20 +00:00
Evan Cheng
0ffff1c629
Match live variable changes.
...
llvm-svn: 31762
2006-11-15 20:55:15 +00:00
Evan Cheng
ebb0357b4c
Minor updates.
...
llvm-svn: 31761
2006-11-15 20:54:29 +00:00
Evan Cheng
12ea213de9
A register def can be partially dead when the whole register has use(s) but a subreg does not.
...
llvm-svn: 31760
2006-11-15 20:54:11 +00:00
Evan Cheng
70ec52896e
Do away with kill / dead maps. Move kill / dead info onto MI's.
...
llvm-svn: 31759
2006-11-15 20:51:59 +00:00
Chris Lattner
2775aba51d
Simplify IntrinsicLowering and clarify that it is only for use by the
...
CBE and interpreter.
llvm-svn: 31755
2006-11-15 18:00:10 +00:00
Chris Lattner
30d08801ef
remove dead #include
...
llvm-svn: 31753
2006-11-15 17:51:15 +00:00
Evan Cheng
dbd3d294e6
Matches MachineInstr changes.
...
llvm-svn: 31712
2006-11-13 23:36:35 +00:00
Evan Cheng
77af6ac5e8
- Let MachineInstr ctors add implicit def and use operands. Other operands
...
will be inserted before these operands. If the opcode changes (by
setOpcode), the implicit operands are updated as well.
- Added IsKill, IsDead fields to MachineOperand in preparation for changes
that move kill / dead info to MachineInstr's.
llvm-svn: 31711
2006-11-13 23:34:06 +00:00
Reid Spencer
2230144a75
Make an assert comment match the tested assertion.
...
llvm-svn: 31686
2006-11-11 20:07:59 +00:00
Evan Cheng
979bbf48d5
Add methods to add implicit def use operands to a MI.
...
llvm-svn: 31675
2006-11-11 10:20:02 +00:00
Chris Lattner
a0a8003f59
disallow preinc of a frameindex. This is not profitable and causes 2-addr
...
pass to explode. This fixes a bunch of llc-beta failures on ppc last night.
llvm-svn: 31661
2006-11-11 01:00:15 +00:00
Chris Lattner
eabc15c1d8
reduce indentation by using early exits. No functionality change.
...
llvm-svn: 31660
2006-11-11 00:56:29 +00:00
Chris Lattner
ffad2166e1
move big chunks of code out-of-line, no functionality change.
...
llvm-svn: 31658
2006-11-11 00:39:41 +00:00
Chris Lattner
4eac5f59e6
Fix a dag combiner bug exposed by my recent instcombine patch. This fixes
...
CodeGen/Generic/2006-11-10-DAGCombineMiscompile.ll and PPC gsm/toast
llvm-svn: 31644
2006-11-10 21:37:15 +00:00
Evan Cheng
8c9c6d71ed
Add implicit def / use operands to MachineInstr.
...
llvm-svn: 31633
2006-11-10 08:43:01 +00:00
Evan Cheng
13440b025c
When forming a pre-indexed store, make sure ptr isn't the same or is a pred of value being stored. It would cause a cycle.
...
llvm-svn: 31631
2006-11-10 08:28:11 +00:00
Chris Lattner
d5e604dbb2
commentate
...
llvm-svn: 31627
2006-11-10 04:41:34 +00:00
Evan Cheng
6878378390
Don't attempt expensive pre-/post- indexed dag combine if target does not support them.
...
llvm-svn: 31598
2006-11-09 19:10:46 +00:00
Evan Cheng
d550248f2c
Add a mechanism to specify whether a target supports a particular indexed load / store.
...
llvm-svn: 31597
2006-11-09 18:56:43 +00:00
Evan Cheng
c034f14fbe
Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
...
llvm-svn: 31596
2006-11-09 18:44:21 +00:00
Evan Cheng
b15000736c
Rename ISD::MemOpAddrMode to ISD::MemIndexedMode
...
llvm-svn: 31595
2006-11-09 17:55:04 +00:00
Jim Laskey
f1606b80f1
Allows debugging llc self hosted.
...
llvm-svn: 31594
2006-11-09 16:32:26 +00:00
Jim Laskey
97f89b11b3
Merging dwarf info to a single compile unit.
...
llvm-svn: 31593
2006-11-09 14:52:14 +00:00
Evan Cheng
b58e06bc9e
getPostIndexedAddressParts change: passes in load/store instead of its loaded / stored VT.
...
llvm-svn: 31584
2006-11-09 04:29:46 +00:00
Evan Cheng
1698c2999c
Remove M_2_ADDR_FLAG.
...
llvm-svn: 31583
2006-11-09 02:22:54 +00:00
Evan Cheng
85e54223cd
Match more post-indexed ops.
...
llvm-svn: 31569
2006-11-08 20:27:27 +00:00
Jim Laskey
61feeb90f9
Remove redundant <cmath>.
...
llvm-svn: 31561
2006-11-08 19:16:44 +00:00
Jim Laskey
62bbc9ef58
Now can re-enable debug label folding.
...
llvm-svn: 31549
2006-11-08 14:17:45 +00:00
Evan Cheng
0303cb9b33
- When performing pre-/post- indexed load/store transformation, do not worry
...
about whether the new base ptr would be live below the load/store. Let two
address pass split it back to non-indexed ops.
- Minor tweaks / fixes.
llvm-svn: 31544
2006-11-08 08:30:28 +00:00
Evan Cheng
6072435756
Fixed a minor bug preventing some pre-indexed load / store transformation.
...
llvm-svn: 31543
2006-11-08 06:56:05 +00:00
Reid Spencer
fdff938a7e
For PR950:
...
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.
llvm-svn: 31542
2006-11-08 06:47:33 +00:00
Evan Cheng
d48f7dd250
Fix a obscure post-indexed load / store dag combine bug.
...
llvm-svn: 31537
2006-11-08 02:38:55 +00:00
Chris Lattner
bf3b57f221
optimize single MBB loops better. In particular, produce:
...
LBB1_57: #bb207.i
movl 72(%esp), %ecx
movb (%ecx,%eax), %cl
movl 80(%esp), %edx
movb %cl, 1(%edx,%eax)
incl %eax
cmpl $143, %eax
jne LBB1_57 #bb207.i
jmp LBB1_64 #cond_next255.i
intead of:
LBB1_57: #bb207.i
movl 72(%esp), %ecx
movb (%ecx,%eax), %cl
movl 80(%esp), %edx
movb %cl, 1(%edx,%eax)
incl %eax
cmpl $143, %eax
je LBB1_64 #cond_next255.i
jmp LBB1_57 #bb207.i
This eliminates a branch per iteration of the loop. This hurted PPC
particularly, because the extra branch meant another dispatch group for each
iteration of the loop.
llvm-svn: 31530
2006-11-08 01:03:21 +00:00
Jim Laskey
21d4d895ca
Accidently reran commit.
...
llvm-svn: 31516
2006-11-07 21:58:55 +00:00
Jim Laskey
a919ba9abd
Missed a label map, reverting till covered.
...
llvm-svn: 31514
2006-11-07 21:37:31 +00:00
Jim Laskey
21ce53b94e
Missed a label map, reverting till covered.
...
llvm-svn: 31512
2006-11-07 20:53:05 +00:00
Jim Laskey
6ea4fae838
1. Add a pass to fold debug label instructions so a debug info client can detect
...
empty ranges.
2. Reorg how MachineDebugInfo maintains changes to debug labels.
3. Have dwarf writer use debug label info to simplify scopes and source line
coorespondence.
4. Revert the merging of compile units until I can get the bugs ironed out.
llvm-svn: 31507
2006-11-07 19:33:46 +00:00
Chris Lattner
b18177bfab
Enable improved spilling costs by default. This speeds up viterbi on x86
...
by 40%, FreeBench/fourinarow by 20%, and many other programs 10-25%.
On PPC, this speeds up fourinarow by 18%, and probably other things as well.
llvm-svn: 31504
2006-11-07 18:04:58 +00:00
Jim Laskey
6a9342166b
Use correct value for float HUGH_VAL.
...
llvm-svn: 31500
2006-11-07 12:25:45 +00:00
Evan Cheng
60c6846d21
Add post-indexed load / store transformations.
...
llvm-svn: 31498
2006-11-07 09:03:05 +00:00
Chris Lattner
01d039cc44
Add a new llcbeta option. This speeds up viterbi from 12.34 to 8.76s on
...
X86. If happy, I'll enable this by default.
llvm-svn: 31493
2006-11-07 07:18:40 +00:00
Reid Spencer
78c84a0328
Unbreak X86/ELF Debugging. Somehow this line got lost in Jim's cleanup.
...
llvm-svn: 31492
2006-11-07 06:36:36 +00:00
Chris Lattner
94c231f453
Fix PR988 and CodeGen/Generic/2006-11-06-MemIntrinsicExpand.ll.
...
The low part goes in the first operand of expandop, not the second one.
llvm-svn: 31487
2006-11-07 04:11:44 +00:00
Evan Cheng
f24d15f969
Remove dead code; added a missing null ptr check.
...
llvm-svn: 31478
2006-11-06 21:33:46 +00:00
Jim Laskey
235aeef9e1
Tab interferes with uniqueness.
...
NOTE: There doesn't seem to be consistency for whether a leading tab
is present in a section heading.
llvm-svn: 31475
2006-11-06 16:23:59 +00:00
Jim Laskey
f39064c2de
D'oh - reversed logic.
...
llvm-svn: 31474
2006-11-06 13:20:29 +00:00
Evan Cheng
eb99bd736a
Add comment.
...
llvm-svn: 31473
2006-11-06 08:14:30 +00:00
Jeff Cohen
7d6f3db3e2
Unbreak VC++ build.
...
llvm-svn: 31464
2006-11-05 19:31:28 +00:00
Evan Cheng
33157700d9
Added pre-indexed store support.
...
llvm-svn: 31459
2006-11-05 09:31:14 +00:00
Evan Cheng
1a1e23eff7
Added getIndexedStore.
...
llvm-svn: 31458
2006-11-05 09:30:09 +00:00
Jim Laskey
01c55a50b1
Live local variables are being dropped because the begin or end labels marking
...
their scope are being deleted. Workaround is to widen scope to full function.
llvm-svn: 31454
2006-11-04 10:48:07 +00:00
Evan Cheng
fd2c5dd806
Changes to use operand constraints to process two-address instructions.
...
llvm-svn: 31453
2006-11-04 09:44:31 +00:00
Evan Cheng
51733ed4a3
Fixed some spiller bugs exposed by the recent two-address code changes. Now
...
there may be other def(s) apart from the use&def two-address operand. We need
to check if the register reuse for a use&def operand may conflicts with another
def. Provide a mean to recover from the conflict if it is detected when the
defs are processed later.
llvm-svn: 31439
2006-11-04 00:21:55 +00:00
Chris Lattner
bb3ea2a437
this will work better
...
llvm-svn: 31419
2006-11-03 19:15:55 +00:00
Chris Lattner
a35f8c16c4
Fix the build on xcode < 2.4
...
llvm-svn: 31417
2006-11-03 19:13:59 +00:00
Evan Cheng
9456dd8b81
Fix comments.
...
llvm-svn: 31414
2006-11-03 07:31:32 +00:00
Evan Cheng
1dfd26a151
Rename
...
llvm-svn: 31413
2006-11-03 07:21:16 +00:00
Reid Spencer
52f958741a
Remove dead variable. Fix 80 column violations.
...
llvm-svn: 31412
2006-11-03 03:30:34 +00:00
Evan Cheng
357017f4a9
Added DAG combiner transformation to generate pre-indexed loads.
...
llvm-svn: 31410
2006-11-03 03:06:21 +00:00
Evan Cheng
c176f038b9
Added isPredecessor.
...
llvm-svn: 31409
2006-11-03 03:05:24 +00:00
Evan Cheng
299022d514
Proper check for two-addressness.
...
llvm-svn: 31408
2006-11-03 03:04:46 +00:00
Chris Lattner
cd7b92251d
silence warning
...
llvm-svn: 31397
2006-11-03 01:28:29 +00:00
Reid Spencer
cb67d99001
Make CodeGen libs -pedantic clean.
...
llvm-svn: 31387
2006-11-02 23:56:21 +00:00
Jim Laskey
15d166ba8f
1. Hash not quite right for DIEValues.
...
2. Not going to use Usage (no significant benefit.)
llvm-svn: 31384
2006-11-02 21:48:18 +00:00
Reid Spencer
9ec8a7555b
Remove unused variable.
...
llvm-svn: 31382
2006-11-02 20:55:40 +00:00
Reid Spencer
de46e48420
For PR786:
...
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.
llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Jim Laskey
936d546eca
General clean up of teh dwarf writer.
...
1. Most significant is the folding of debug information entries. This
reduced self hosted -g SelectionDAGISel.s from 120M to 13M and pretty
close to matching .o file sizes with gcc.
2. Debug information entry printing for debugging the dwarf code.
3. Bring all the code closer to llvm standards.
4. Misc. fixes and doc clean ups.
llvm-svn: 31379
2006-11-02 20:12:39 +00:00
Reid Spencer
7eb55b395f
For PR950:
...
Replace the REM instruction with UREM, SREM and FREM.
llvm-svn: 31369
2006-11-02 01:53:59 +00:00
Chris Lattner
55402d4403
Allow the getRegForInlineAsmConstraint method to return a register class with
...
no fixes physreg. Treat this as permission to use any register in the register
class. When this happens and it is safe, allow the llvm register allcoator to
allocate the register instead of doing it at isel time. This eliminates a ton
of copies around common inline asms. For example:
int test2(int Y, int X) {
asm("foo %0, %1" : "=r"(X): "r"(X));
return X;
}
now compiles to:
_test2:
foo r3, r4
blr
instead of:
_test2:
mr r2, r4
foo r2, r2
mr r3, r2
blr
GCC produces:
_test2:
foo r4, r4
mr r3,r4
blr
llvm-svn: 31366
2006-11-02 01:41:49 +00:00
Evan Cheng
93cdd149f7
Rename
...
llvm-svn: 31364
2006-11-01 23:18:32 +00:00
Evan Cheng
d8697deca3
Two-address instructions no longer have to be A := A op C. Now any pair of dest / src operands can be tied together.
...
llvm-svn: 31363
2006-11-01 23:06:55 +00:00
Evan Cheng
1359196c4e
Clean up.
...
llvm-svn: 31359
2006-11-01 22:39:30 +00:00
Evan Cheng
47218fab42
CopyFromReg starts a live range so its use should not be considered a floater.
...
llvm-svn: 31356
2006-11-01 22:17:06 +00:00
Chris Lattner
7cee6ddcd8
give branch folding a simple heuristic to decide which block to split so that
...
it inserts an uncond branch where it is less likely to cause a problem. This
fixes some perf issues on ppc.
llvm-svn: 31354
2006-11-01 19:36:29 +00:00
Evan Cheng
91f120f4fa
Add a printSetLabel that takes two id's.
...
llvm-svn: 31347
2006-11-01 09:23:08 +00:00
Evan Cheng
415f365e5c
Print jumptable index.
...
llvm-svn: 31340
2006-11-01 04:48:30 +00:00
Chris Lattner
f505a5a063
make tail merging more aggressive. If two blocks share a common tail, but the
...
tail is not an entire block for either of them, pick one, split it, then
merge the common part.
llvm-svn: 31336
2006-11-01 01:16:12 +00:00
Chris Lattner
3ac71b31f0
enable branch folding with an option
...
llvm-svn: 31335
2006-11-01 00:38:31 +00:00
Chris Lattner
fe43befeda
Compile CodeGen/PowerPC/fp-branch.ll to:
...
_intcoord_cond_next55:
LBB1_3: ;cond_next55
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr0, f1, f0
blt cr0, LBB1_2 ;cond_next62.exitStub
LBB1_1: ;bb72.exitStub
li r3, 1
blr
LBB1_2: ;cond_next62.exitStub
li r3, 0
blr
instead of:
_intcoord_cond_next55:
LBB1_3: ;cond_next55
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr0, f1, f0
bge cr0, LBB1_1 ;bb72.exitStub
LBB1_4: ;cond_next55
lis r2, ha16(LCPI1_0)
lfs f0, lo16(LCPI1_0)(r2)
fcmpu cr0, f1, f0
bnu cr0, LBB1_2 ;cond_next62.exitStub
LBB1_1: ;bb72.exitStub
li r3, 1
blr
LBB1_2: ;cond_next62.exitStub
li r3, 0
blr
llvm-svn: 31330
2006-10-31 23:06:00 +00:00
Chris Lattner
427301fdae
look through isunordered to inline it into branch blocks.
...
llvm-svn: 31328
2006-10-31 22:37:42 +00:00
Chris Lattner
1fd360e13a
handle global address constant sdnodes
...
llvm-svn: 31323
2006-10-31 20:01:56 +00:00
Chris Lattner
6f043b90ea
TargetLowering::isOperandValidForConstraint
...
llvm-svn: 31319
2006-10-31 19:41:18 +00:00
Chris Lattner
8c6949e5b2
Change the prototype for TargetLowering::isOperandValidForConstraint
...
llvm-svn: 31318
2006-10-31 19:40:43 +00:00
Anton Korobeynikov
aa4c0f9374
1. Clean up code due to changes in SwitchTo*Section(2)
...
2. Added partial debug support for mingw\cygwin targets (the same as
Linux\ELF). Please note, that currently mingw\cygwin uses 'stabs' format
for storing debug info by default, thus many (runtime) libraries has
this information included. These formats shouldn't be mixed in one binary
('stabs' & 'DWARF'), otherwise binutils tools will be confused.
llvm-svn: 31311
2006-10-31 08:31:24 +00:00
Chris Lattner
968f803928
Turn an assert into an error message. This is commonly triggered when
...
we don't support a specific constraint yet. When this happens, print the
unsupported constraint.
llvm-svn: 31310
2006-10-31 07:33:13 +00:00
Evan Cheng
e6d584765f
Fix a typo which can break jumptables.
...
llvm-svn: 31305
2006-10-31 02:31:00 +00:00
Reid Spencer
7eda51d4cf
Fix a problem introduced by a last-minute change (logic negation).
...
llvm-svn: 31302
2006-10-30 23:34:32 +00:00
Reid Spencer
b51b5c0b1f
Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
...
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.
llvm-svn: 31299
2006-10-30 22:32:30 +00:00
Jim Laskey
ad2f5b7d18
Switch abbreviations to use the folding set.a.
...
llvm-svn: 31296
2006-10-30 15:59:54 +00:00
Jim Laskey
43c19124bb
Simplify DwarfWriter header.
...
llvm-svn: 31295
2006-10-30 13:35:07 +00:00
Evan Cheng
84a28d4e76
Lower jumptable to BR_JT. The legalizer can lower it to a BRIND or let the target custom lower it.
...
llvm-svn: 31293
2006-10-30 08:00:44 +00:00
Evan Cheng
c3e695137d
Added a new SDNode type: BR_JT for jumptable branch.
...
llvm-svn: 31292
2006-10-30 07:59:36 +00:00
Chris Lattner
504eeda365
Make CanFallThrough more intelligent (so it can handle blocks with (e.g.) no
...
successors), and make island block movement more general.
This compiles CodeGen/X86/2006-04-27-ISelFoldingBug.ll to:
_loadAndRLEsource_no_exit_2E_1_label_2E_0:
subl $8, %esp
movl %esi, 4(%esp)
movl %ebx, (%esp)
movl 16(%esp), %eax
movl 12(%esp), %ecx
LBB1_3: #label.0
movl _last, %edx
movl %edx, %esi
incl %esi
movl %esi, _last
movl %ecx, %ebx
# TRUNCATE movb %bl, %bl
movl _block, %esi
movb %bl, 1(%esi,%edx)
cmpl %eax, _last
jge LBB1_2 #codeRepl5.exitStub
LBB1_4: #label.0
cmpl $257, %ecx
je LBB1_2 #codeRepl5.exitStub
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
movl $1, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
LBB1_2: #codeRepl5.exitStub
xorl %eax, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
instead of:
_loadAndRLEsource_no_exit_2E_1_label_2E_0:
subl $8, %esp
movl %esi, 4(%esp)
movl %ebx, (%esp)
movl 16(%esp), %eax
movl 12(%esp), %ecx
jmp LBB1_3 #label.0
LBB1_1: #label.0.no_exit.1_crit_edge.exitStub
movl $1, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
LBB1_2: #codeRepl5.exitStub
xorl %eax, %eax
movl (%esp), %ebx
movl 4(%esp), %esi
addl $8, %esp
ret
LBB1_3: #label.0
movl _last, %edx
movl %edx, %esi
incl %esi
movl %esi, _last
movl %ecx, %ebx
# TRUNCATE movb %bl, %bl
movl _block, %esi
movb %bl, 1(%esi,%edx)
cmpl %eax, _last
jge LBB1_2 #codeRepl5.exitStub
LBB1_4: #label.0
cmpl $257, %ecx
jne LBB1_1 #label.0.no_exit.1_crit_edge.exitStub
jmp LBB1_2 #codeRepl5.exitStub
... which is much better layout :)
llvm-svn: 31282
2006-10-29 21:05:41 +00:00