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

3195 Commits

Author SHA1 Message Date
Reid Spencer
50702907eb Replace CastInst::createInferredCast calls with more accurate cast
creation calls.

llvm-svn: 32521
2006-12-13 00:50:17 +00:00
Evan Cheng
3e6cc1641c Expand FP constant to integers if FP types are not legal.
llvm-svn: 32497
2006-12-12 22:19:28 +00:00
Evan Cheng
aefab1a7c1 Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
llvm-svn: 32495
2006-12-12 21:51:17 +00:00
Evan Cheng
8a830bc4a1 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
061d636b7a Expand i32/i64 CopyToReg f32/f64 to BIT_CONVERT + CopyToReg.
llvm-svn: 32493
2006-12-12 21:21:32 +00:00
Evan Cheng
75b41e03f6 - 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
df11bd2186 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
ddb1fa5291 fit in 80 cols
llvm-svn: 32474
2006-12-12 05:22:21 +00:00
Chris Lattner
0405309282 this can only be fptrunc.
llvm-svn: 32473
2006-12-12 05:21:51 +00:00
Chris Lattner
0b46ffb643 This case isn't needed with recent changes to ConstantInt::get
llvm-svn: 32472
2006-12-12 05:19:46 +00:00
Chris Lattner
0ecfce975c 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
4c064bcc3e 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
0fd9c58f6a 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
df2345fcbe 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
5af6b6baf1 Tidy up a bit.
llvm-svn: 32462
2006-12-12 01:32:02 +00:00
Reid Spencer
5bc563a190 Change inferred cast creation calls to more specific cast creations.
llvm-svn: 32460
2006-12-12 01:17:41 +00:00
Evan Cheng
e182862c91 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
d5817b08f5 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
7124b0d561 Revert changes that broke oggenc on ppc
llvm-svn: 32440
2006-12-11 18:53:38 +00:00
Evan Cheng
93c75d4cfb 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
4eebfee858 f32 / f64 node is expanded to one i32 / i64 node.
llvm-svn: 32433
2006-12-11 06:50:04 +00:00
Evan Cheng
44f9ec68ab Clean up some bad code.
llvm-svn: 32432
2006-12-11 06:25:26 +00:00
Nate Begeman
2566f75e7a 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
b1b1aaa4e5 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
e76b69846d 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
a366d082b5 Preliminary soft float support.
llvm-svn: 32394
2006-12-09 02:42:38 +00:00
Evan Cheng
88a55bdd64 Move findTiedToSrcOperand to TargetInstrDescriptor.
llvm-svn: 32366
2006-12-08 18:45:48 +00:00
Evan Cheng
6f02378443 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
79bcfb0e11 findTiedToSrcOperand() changed.
llvm-svn: 32353
2006-12-08 07:59:51 +00:00
Chris Lattner
db346e68a9 Fix CodeGen/PowerPC/2006-12-07-SelectCrash.ll on PPC64
llvm-svn: 32336
2006-12-07 22:36:47 +00:00
Bill Wendling
4d1444725b Removed more <iostream> includes
llvm-svn: 32321
2006-12-07 20:28:15 +00:00
Bill Wendling
23b8b13c9d Removing even more <iostream> includes.
llvm-svn: 32320
2006-12-07 20:04:42 +00:00
Reid Spencer
cfce6d2ee4 Revision 1.83 causes PR1037.
Reverted.

llvm-svn: 32305
2006-12-07 16:21:19 +00:00
Evan Cheng
b5a57532b0 Initialize {Min|Max}CSFrameIndex properly.
llvm-svn: 32299
2006-12-07 02:25:34 +00:00
Bill Wendling
a3246c4272 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
f4788fe306 MI keeps a ptr of TargetInstrDescriptor, use it.
llvm-svn: 32296
2006-12-07 01:21:59 +00:00
Evan Cheng
7a6220ddda 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
a531ce882e 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
0284aadc80 Some addresssed should be 64-bit and some shouldn't.
llvm-svn: 32278
2006-12-06 17:43:18 +00:00
Evan Cheng
59494f9e3d Move copyKillDeadInfo out-of-line. Add findRegisterUseOperand().
llvm-svn: 32273
2006-12-06 08:27:42 +00:00
Chris Lattner
a7baddddcc eliminate fp statistic
llvm-svn: 32251
2006-12-06 01:48:55 +00:00
Jeff Cohen
f99052befb Unbreak VC++ build.
llvm-svn: 32113
2006-12-02 02:22:01 +00:00
Evan Cheng
bf13611e84 Match TargetInstrInfo changes.
llvm-svn: 32098
2006-12-01 21:52:58 +00:00
Jim Laskey
32137fffa5 better check for version
llvm-svn: 32045
2006-11-30 18:29:23 +00:00
Jim Laskey
0369cab61e 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
831e2376f2 Temp fix to deal gdb issue.
llvm-svn: 32035
2006-11-30 11:09:42 +00:00
Evan Cheng
cb65ba1821 - 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
c9710a3e29 Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
llvm-svn: 32022
2006-11-29 19:13:47 +00:00
Jim Laskey
d7db5b4a9c Eliminate unnecessary scopes.
llvm-svn: 32020
2006-11-29 16:55:57 +00:00
Evan Cheng
2acb6345d8 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
0be56fab68 Fix for PR1023 by Dan Gohman.
llvm-svn: 32003
2006-11-29 01:58:12 +00:00
Evan Cheng
f38588a1cd Fix for PR1022 (folding loads of static initializers) by Dan Gohman.
llvm-svn: 32000
2006-11-29 01:38:07 +00:00
Chris Lattner
d00734a230 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
a29e6c5ec9 Converted to using llvm streams instead of <iostream>s
llvm-svn: 31992
2006-11-29 00:39:47 +00:00
Bill Wendling
d8c0883f20 Use llvm streams instead of <iostream>
llvm-svn: 31985
2006-11-28 22:48:48 +00:00
Bill Wendling
a80e3dc0c0 Put the #include for a module first.
llvm-svn: 31958
2006-11-28 03:31:29 +00:00
Evan Cheng
e176869ec0 Clean up.
llvm-svn: 31957
2006-11-28 02:25:34 +00:00
Bill Wendling
7e9cea955c Changed to using llvm streams.
llvm-svn: 31954
2006-11-28 02:08:17 +00:00
Chris Lattner
37a3db4c3f Fix PR1016
llvm-svn: 31950
2006-11-28 01:03:30 +00:00
Evan Cheng
98fa7ab4d7 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
71a7a2d781 Fix the dag combiner bug corresponding to PR1014.
llvm-svn: 31943
2006-11-27 21:50:02 +00:00
Chris Lattner
aa8f67c2b5 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
c0bdf03e26 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
992d9788b3 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
cd74ba8ae1 Global label not handled correctly.
llvm-svn: 31883
2006-11-20 20:29:06 +00:00
Chris Lattner
a2bbd246e0 Fix PR1011 and CodeGen/Generic/2006-11-20-DAGCombineCrash.ll
llvm-svn: 31878
2006-11-20 18:05:46 +00:00
Chris Lattner
31f45746ad 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
6e34ef887b 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
4946ae54df 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
b101c06bce Fix another case we *don't* want to do this xform.
llvm-svn: 31861
2006-11-18 21:56:39 +00:00
Chris Lattner
3a34164b82 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
514fc3de5c 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
bddc114cfb 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
a87c9d8905 Fixing the ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1 build.
llvm-svn: 31822
2006-11-17 13:07:55 +00:00
Bill Wendling
dbea653b5d More removal of std::cerr and DEBUG, replacing with DOUT instead.
llvm-svn: 31806
2006-11-17 02:09:07 +00:00
Bill Wendling
0ae0a45ebe 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
49d6a1169f *** empty log message ***
llvm-svn: 31789
2006-11-16 20:11:33 +00:00
Evan Cheng
263c558c13 Match MachineCodeEmitter changes.
llvm-svn: 31787
2006-11-16 20:04:04 +00:00
Bill Wendling
bcd11344e9 Don't recompute getNumOperands for each iteration.
llvm-svn: 31783
2006-11-16 07:35:18 +00:00
Bill Wendling
985d7e09ec 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
0d40275b0e enable the branch folding pass for the JIT.
llvm-svn: 31777
2006-11-16 01:00:07 +00:00
Evan Cheng
43ba439abd Fix an incorrectly inverted condition.
llvm-svn: 31773
2006-11-16 00:08:20 +00:00
Evan Cheng
3ba3e10448 Match live variable changes.
llvm-svn: 31762
2006-11-15 20:55:15 +00:00
Evan Cheng
cf45b9fa95 Minor updates.
llvm-svn: 31761
2006-11-15 20:54:29 +00:00
Evan Cheng
7b19d271c4 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
d79427b22c 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
ccbbe940eb 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
286bb6e482 remove dead #include
llvm-svn: 31753
2006-11-15 17:51:15 +00:00
Evan Cheng
0e82270ff2 Matches MachineInstr changes.
llvm-svn: 31712
2006-11-13 23:36:35 +00:00
Evan Cheng
7cabf9d02c - 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
60a8a2e025 Make an assert comment match the tested assertion.
llvm-svn: 31686
2006-11-11 20:07:59 +00:00
Evan Cheng
7dab9abfb8 Add methods to add implicit def use operands to a MI.
llvm-svn: 31675
2006-11-11 10:20:02 +00:00
Chris Lattner
edfc824673 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
bf0c3e3a02 reduce indentation by using early exits. No functionality change.
llvm-svn: 31660
2006-11-11 00:56:29 +00:00
Chris Lattner
671ea7a93b move big chunks of code out-of-line, no functionality change.
llvm-svn: 31658
2006-11-11 00:39:41 +00:00
Chris Lattner
1f61c6c84d 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
013597778d Add implicit def / use operands to MachineInstr.
llvm-svn: 31633
2006-11-10 08:43:01 +00:00
Evan Cheng
78ba99caa5 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
efb62464b9 commentate
llvm-svn: 31627
2006-11-10 04:41:34 +00:00
Evan Cheng
17dd6dd46c 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