Commit Graph

3611 Commits

Author SHA1 Message Date
Jim Laskey
2bc210d99f Simplify lowering and selection of exception ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34491 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 15:37:19 +00:00
Jim Laskey
b180aa1753 Selection and lowering for exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34481 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:53:45 +00:00
Jim Laskey
bacd304463 Exception handling support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34479 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:48:45 +00:00
Jim Laskey
bda9b0ec7b Add support for changes in DwarfWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:47:38 +00:00
Jim Laskey
02b3f5ec4a Make branch folding behave in the presence of landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:42:20 +00:00
Jim Laskey
9b25b8ca24 Allow for live in registers for eh landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:41:17 +00:00
Jim Laskey
59667fe203 Add structures used for collecting eh information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:38:31 +00:00
Evan Cheng
788fb1c103 Out of bound reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34461 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 02:27:39 +00:00
Evan Cheng
957840b3e1 Use BitVector instead. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34460 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 02:22:03 +00:00
Evan Cheng
667089de04 Dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34435 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 01:29:10 +00:00
Evan Cheng
b371f457b0 Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34428 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 21:49:54 +00:00
Reid Spencer
a284cbf667 For PR1207:
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34399 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 03:20:00 +00:00
Evan Cheng
aa7976199c - Changes how function livein's are handled, they now have a start index of 0.
- When coalescing a copy MI, if its destination is "dead", propagate the
  property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34383 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 11:15:40 +00:00
Evan Cheng
e1fd6828af Do not add livein's to entry MBB twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34382 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 11:11:27 +00:00
Evan Cheng
795d9509d5 Added removeLiveIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34381 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 11:10:48 +00:00
Evan Cheng
094e3e553f Added findRegisterDefOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34380 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 11:10:18 +00:00
Evan Cheng
e15764f28f - Use MRegister::regsOverlap().
- Allow LiveVariables to track liveness of more registers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34379 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 11:09:47 +00:00
Chris Lattner
95ad943ed5 print target nodes nicely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34369 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 06:38:37 +00:00
Chris Lattner
9ff6ee85fe Implement i/n/s constraints correctly. This fixes
test/CodeGen/PowerPC/2007-02-16-InlineAsmNConstraint.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34368 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 06:00:35 +00:00
Dale Johannesen
6b896cec8b Fixes PR 1200
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34359 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-17 00:44:34 +00:00
Evan Cheng
bdf44b929f Print <dead> def operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34343 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 09:49:18 +00:00
Evan Cheng
9fc508fdc4 Add live-ins to every BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34342 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 09:05:02 +00:00
Dale Johannesen
4c3a5f8ccb test commit (blank line)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34337 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 01:54:53 +00:00
Chris Lattner
5d4a9f7731 fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34307 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:19:15 +00:00
Chris Lattner
0152829e89 Apply B Scott Michel's patch for PR1184, which improves diagnostics in an
abort case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34306 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 18:17:56 +00:00
Evan Cheng
61de82d885 Use BitVector instead of vector<bool> which can be extremely slow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34302 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 05:59:24 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
c661d61d82 fix a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34272 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 07:34:56 +00:00
Chris Lattner
21840b1c5c Refix CodeGen/Generic/switch-lower.ll. In contrast to my previous patch,
this doesn't miscompile lots of programs :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 07:18:16 +00:00
Chris Lattner
d2b7cec527 Generalize TargetData strings, to support more interesting forms of data.
Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34266 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-14 05:52:17 +00:00
Chris Lattner
4c948eb373 implement expand of truncate. This allows truncates from i128 to i64 to
be supported on 32-bit hosts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34257 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:55:16 +00:00
Chris Lattner
f839ce7d03 Fix PR1198, by adding initial i128 support. Patch by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34256 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 23:41:38 +00:00
Chris Lattner
ae4f99d843 revert my previous switch lowering change, which miscompiles a few programs.
This will break a dj test until I have time to investigate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34247 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 20:09:07 +00:00
Lauro Ramos Venancio
cf8270a994 Add a space between // and the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34244 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 18:10:13 +00:00
Lauro Ramos Venancio
7aa47b69ca Add "original alignment" to function arguments flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34240 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 13:50:08 +00:00
Chris Lattner
990b849abc eliminate vector-related allocations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34223 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:01:22 +00:00
Evan Cheng
0c9f92e1ff Allow any MachineBasicBlock (not just the entry block) to have live-in physical
registers. Make sure liveinterval analysis is correctly creating live ranges
for them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34217 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:30:55 +00:00
Chris Lattner
818d42f1e8 Fix switch lowering to order cases in zext order, which is how we emit the
comparisons.  This fixes an infinite loop on CodeGen/Generic/switch-lower.ll
and PR1197


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34216 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 01:05:56 +00:00
Chris Lattner
7f6b9d2f1a eliminate temporary vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34161 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 20:31:59 +00:00
Chris Lattner
b0c39a3b4d encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:59:22 +00:00
Chris Lattner
b1919e2f08 Privatize StructLayout::MemberOffsets, adding an accessor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34156 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 19:55:17 +00:00
Evan Cheng
ad2070c667 Add function live-ins to entry block live-in set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34112 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 02:43:39 +00:00
Evan Cheng
13d8285678 Add live-ins to MachineBasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 02:38:19 +00:00
Evan Cheng
15699fc5ed Rename some variables to avoid confusion with SelectionDAGISel::BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 01:08:18 +00:00
Evan Cheng
2e67781ef5 Make use of TLI.SimplifySetCC() in LegalizeSetCCOperands().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34066 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 22:16:19 +00:00
Evan Cheng
fa1eb27b76 Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34065 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 22:13:59 +00:00
Evan Cheng
f50d09ad21 Fixed a long standing spiller bug that's exposed by Thumb:
The code sequence before the spiller is something like:
                 = tMOVrr
        %reg1117 = tMOVrr
        %reg1078 = tLSLri %reg1117, 2

The it starts spilling:
        %r0 = tRestore <fi#5>, 0
        %r1 = tRestore <fi#7>, 0
        %r1 = tMOVrr %r1<kill>
        tSpill %r1, <fi#5>, 0
        %reg1078 = tLSLri %reg1117, 2

It restores the value while processing the first tMOVrr. At this point, the
spiller remembers fi#5 is available in %r0. Next it processes the second move.
It restores the source before the move and spills the result afterwards. The
move becomes a noop and is deleted. However, a spill has been inserted and that
should invalidate reuse of %r0 for fi#5 and add reuse of %r1 for fi#5.
Therefore, %reg1117 (which is also assigned fi#5) should get %r1, not %r0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34039 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 06:04:54 +00:00
Bill Wendling
04523eab6b Split the addPassesToEmitFile method up into two. This is so that we can
do some common stuff, then on our own add an object file writer (by calling
a concrete function), and then do some finishing stuff, if need be.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34032 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:36:53 +00:00
Bill Wendling
8f84f1f301 Add function to create a file writer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34031 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:35:27 +00:00
Bill Wendling
4b2ca1a3c4 Moved from include/llvm/CodeGen to lib/CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34027 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:30:50 +00:00
Nate Begeman
c2b2d6a7c9 Fix a fixme by correctly calculating preferred alignments for functions,
based on the alignment of the symbol and the target data's preferred align
for that type.

Also, rename some arguments for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33984 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 05:47:16 +00:00
Chris Lattner
c67da0cf13 Two fixes:
1. Memset takes an i32 for the value to set, not i8.  This was causing GCC to
   ICE all over the place (PR1183).
2. memcpy/memmove were not properly zext/trunc'ing the size in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33970 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 19:06:38 +00:00
Chris Lattner
7d6f77db28 Fix PR1181 and CodeGen/CBackend/2007-02-05-memset.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33957 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 06:07:51 +00:00
Chris Lattner
4b09252e4b Oops, swap this. This fixes a regression I introduced in the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33946 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-06 01:56:31 +00:00
Chris Lattner
b6a24bfa95 Fix PR1178
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33924 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 21:23:52 +00:00
Anton Korobeynikov
13b7d3d499 Fixing silly "not-implemented" bug in AsmPrinter. This fixes PR1169.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 23:27:42 +00:00
Chris Lattner
831e0374a7 switch the VRBaseMap in the scheduler from an std::map to a DenseMap. This
speeds up the isel pass from 2.5570s to 2.4722s on kc++ (3.4%).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 08:47:20 +00:00
Chris Lattner
3f97eb449b Introduce new UnarySDNode/BinarySDNode/TernarySDNode nodes, which coallocate
their operands with the node itself.  This reduces malloc traffic for operand
lists.  This reduces isel time on kc++ from 2.6164 to 2.5570s, about 2.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33878 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 08:35:21 +00:00
Chris Lattner
ab4ed59538 eliminate the SDNode::setValueTypes method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33876 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 07:37:24 +00:00
Chris Lattner
63e3f14df6 eliminate a bunch of duplicate ctors and helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33875 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 07:28:00 +00:00
Chris Lattner
d429bcd4ac move MorphNode to out of line and merge setNodeOperands into it. There is
no behavior or performance change here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33869 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 02:49:29 +00:00
Chris Lattner
48b8592652 simplify MorphNodeTo to take a VTList operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33868 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 02:41:42 +00:00
Chris Lattner
67612a1188 eliminate some extraneous methods in SDNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33867 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 02:32:44 +00:00
Chris Lattner
c76e3c8602 Give each selectiondag node class a home for it's vtable and rtti info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33866 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 02:23:32 +00:00
Chris Lattner
9f24ad79ce Switch VAlueMap from std::map to DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33863 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 01:35:11 +00:00
Chris Lattner
0da331fe0b Switch NodeMap from std::map to DenseMap, this speeds up isel by 2.3%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33862 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 01:31:47 +00:00
Chris Lattner
0ed4417075 swtich vector-> smallvector, speeding up selectiondag stuff 1%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33861 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 01:20:02 +00:00
Chris Lattner
40030bfa75 Switch promoted/expanded ops over to using a DenseMap. Vector related maps
aren't worth it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33860 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 01:17:38 +00:00
Chris Lattner
718071c476 switch LegalizedNodes from std::map to a DenseMap. This speeds up isel
time as a whole on kc++ by 11%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33857 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 00:50:02 +00:00
Chris Lattner
00755df36c Eliminate some malloc traffic from LegalizeAllNodesNotLeadingTo, speeding
up isel on kimwitu by 0.7%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33853 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 00:27:56 +00:00
Chris Lattner
d48c5e871a Eliminate some std::sets. This speeds up isel of kimwitu by about 0.9%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 00:24:41 +00:00
Chris Lattner
cf5640bd52 Switch SelectionDAG::ReplaceAllUsesOfValueWith to use a SmallSetVector for
the users set (most nodes have 1 or 2 users).  This speeds up the isel pass
3.2% on kimwitu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33849 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 00:14:31 +00:00
Bill Wendling
886b412fb0 Pass in non-Mach-O-specific parameters to the GetTargetRelocation method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33816 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 02:39:40 +00:00
Chris Lattner
2ba528b3a7 switch the sched unit map over to use a DenseMap instead of std::map. This
speeds up isel as a whole time by 2.6%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33810 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 01:34:13 +00:00
Chris Lattner
7971514755 Switch ComputeTopDownOrdering over to using a densemap. This speeds up
isel as a whole by 3.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33809 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 01:12:36 +00:00
Evan Cheng
5efdecc030 Pasto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33806 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 00:43:46 +00:00
Reid Spencer
1b19cd35fe Use short form of BinaryOperator create function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33784 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 14:09:34 +00:00
Reid Spencer
832254e1c2 Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 02:16:23 +00:00
Jim Laskey
b47f32e0e9 Slip up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33758 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 17:48:20 +00:00
Jim Laskey
29bf16a0bd Emit labels as label_n and not as debug_n
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33757 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 17:46:10 +00:00
Jim Laskey
b82313fdc2 Support for non-landing pad exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33755 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 16:31:34 +00:00
Anton Korobeynikov
b25fe82671 Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 08:39:52 +00:00
Chris Lattner
94c002a190 rename DenseMap to IndexedMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33749 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 05:32:05 +00:00
Chris Lattner
fea997aac5 Fit in 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33745 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 04:55:59 +00:00
Chris Lattner
527fae12c3 Emit a better assertion message for PR1133
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33736 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:21:12 +00:00
Evan Cheng
d385fd62cb Allow the target to override the ISD::CondCode that's to be used to test the
result of the comparison libcall against zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33701 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 09:29:11 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Chris Lattner
367f109ba9 add initial support for handling inline asms with multiple constraints.
This doesn't do the "right thing" but will probably work in most cases.

This implements CodeGen/PowerPC/2007-01-29-lbrx-asm.ll.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 23:45:14 +00:00
Jim Laskey
c1c47c3fa4 Out of line function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 23:40:33 +00:00
Jim Laskey
e078d1a14a Only gather frame info if debug or eh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33639 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 23:20:22 +00:00
Nate Begeman
bcc5f36765 Finish off bug 680, allowing targets to custom lower frame and return
address nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33636 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 22:58:52 +00:00
Nate Begeman
1257c855d7 Properly support cstrings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33629 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 21:20:42 +00:00
Jim Laskey
1b340dc8e2 Flag to control exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33628 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 20:48:32 +00:00
Jim Laskey
d683ef6655 Disable zero landing pads for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33625 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 20:01:41 +00:00
Jim Laskey
072200c36d Landing pad-less eh for PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33622 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 18:51:14 +00:00
Reid Spencer
6addf2ceeb Use TargetData to obtain the correct size of the "size_t" argument for
functions like memcpy, memmove and memset. Ensure only one prototype is
used for these functions and that it matches the system definition by
using the appropriate type for the size argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33618 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 17:42:06 +00:00
Reid Spencer
1e9126b3c4 For PR1138:
Force memcpy to be the 32-bit variant. Since this is only used with
CBE and lli which both target 32-bit machines, this should be okay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33608 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 22:28:00 +00:00
Anton Korobeynikov
6aa279dc8b Arguments are counting from 1. not from 0. Maybe we should change
numbering somehow? E.g. make return argument the last?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33606 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 18:01:49 +00:00
Anton Korobeynikov
ac2b2cf88c More cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33605 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 16:04:40 +00:00
Anton Korobeynikov
b10308e440 Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:31:35 +00:00
Bill Wendling
5d73a2a156 Use TargetELFWriterInfo class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33573 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-27 02:55:44 +00:00
Nate Begeman
6635f35cae Handle multiple functions, properly mangle symbols, and fix support for
scattered relocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33555 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 22:39:48 +00:00
Jim Laskey
6da186480b rename files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33552 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 21:38:26 +00:00
Jim Laskey
44c3b9fdd4 Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
for debugging and exception handling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33550 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 21:22:28 +00:00
Jim Laskey
1ee2925742 Make LABEL a builtin opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33537 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 14:34:52 +00:00
Jim Laskey
2b935d55b0 Clarify some constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33536 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 14:19:17 +00:00
Evan Cheng
02a2029141 Added a MRegisterInfo hook that tells PEI the target is responsible for
rounding the stack frame to a multiple of stack alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 22:12:41 +00:00
Jim Laskey
1a4a83ca39 1. Remove dwarf-verbose option (now asm-verbose.)
2. Clean up end of lines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33499 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 15:45:58 +00:00
Jim Laskey
f1cdea1d02 Migrate print routines to asm to be shared by exception handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-25 15:12:02 +00:00
Jim Laskey
5e73d5bd2e 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.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 18:45:13 +00:00
Jim Laskey
f9e56198a3 Use asm printer to emit alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33485 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 13:12:32 +00:00
Bill Wendling
2b7218218f Make ivars private and use getters. Have the MachOWriter return "Mach-O
Writer" for the pass name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 07:13:56 +00:00
Evan Cheng
de268f7dcf Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 07:03:39 +00:00
Bill Wendling
a4b7324fa0 Use the TargetMachOWriterInfo class to get this information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-24 03:38:47 +00:00
Evan Cheng
367372a30c PEI is now responsible for adding MaxCallFrameSize to frame size and align the stack. Each target can further adjust the frame size if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33460 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 09:38:11 +00:00
Chris Lattner
08a4d5a343 Switch this to use SmallSet to avoid mallocs in the common case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33457 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 00:59:48 +00:00
Chris Lattner
fad2912522 Fix a bunch of inline asm failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-23 00:36:17 +00:00
Evan Cheng
f6d039a039 Remove the DoubleTy special case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33449 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-22 23:13:55 +00:00
Reid Spencer
24d6da5fed For PR970:
Clean up handling of isFloatingPoint() and dealing with PackedType.
Patch by Gordon Henriksen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33415 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 00:29:26 +00:00
Chris Lattner
58092e35a3 Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can.  Patch by Scott Michel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33409 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 22:35:55 +00:00
Evan Cheng
597a3bde35 Fix for PR1108: type of insert_vector_elt index operand is PtrVT, not MVT::i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33398 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 10:10:26 +00:00
Evan Cheng
70cfa88944 Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33396 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 09:21:54 +00:00
Evan Cheng
57a2306074 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33387 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-20 02:07:13 +00:00
Evan Cheng
3c82cab9aa 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 ...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33382 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 22:40:14 +00:00
Reid Spencer
c10305743c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33370 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 21:13:56 +00:00
Evan Cheng
42d7ccfd8e 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33361 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 17:51:44 +00:00
Bill Wendling
c904a5b925 Have the OutputBuffer take the is64Bit and isLittleEndian booleans.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:23:11 +00:00
Chris Lattner
393a8eea3c add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-18 01:12:56 +00:00
Bill Wendling
203d3e4386 Changed to use the OutputBuffer instead of the methods in MachO and ELF
writers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 22:22:31 +00:00
Bill Wendling
e911615c47 Revert patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33298 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 09:06:13 +00:00
Bill Wendling
157c4eeb4d Use the methods in the TargetObjInfo object instead of internal methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33289 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-17 03:49:21 +00:00
Chris Lattner
c4e664bb9d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33251 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 05:59:59 +00:00
Chris Lattner
938ab02256 add options to view the dags before the first or second pass of dag combine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 04:55:25 +00:00
Bill Wendling
eb9a42c90b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33246 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-16 03:42:04 +00:00
Chris Lattner
42a7551725 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! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:27:26 +00:00
Chris Lattner
0ee69bbd33 eliminate calls to Type::isInteger, preferring isIntegral instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33222 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:03:16 +00:00
Reid Spencer
e5530da208 Compensate for loss of DerivedTypes.h in TargetLowering.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33159 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:31:12 +00:00
Reid Spencer
02114aa0e5 Move a function out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33158 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 23:30:31 +00:00
Evan Cheng
79cca507fe Minor fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33149 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 22:51:10 +00:00
Chris Lattner
a875df3aaa Simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33123 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 18:15:09 +00:00
Reid Spencer
a54b7cbd45 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Reid Spencer
579dca12c2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 04:24:46 +00:00
Evan Cheng
56966225d1 Store default libgcc routine names and allow them to be redefined by target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 02:11:51 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Evan Cheng
c8edc64188 Naming consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33026 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 23:55:53 +00:00
Evan Cheng
c62d4bb695 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33025 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 23:50:38 +00:00
Chris Lattner
ddae4bd683 Implement some trivial FP foldings when -enable-unsafe-fp-math is specified.
This implements CodeGen/PowerPC/unsafe-math.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33024 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 23:04:05 +00:00
Jim Laskey
6488a078ba Need to handle static declarations properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33022 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 22:15:18 +00:00
Chris Lattner
f01da5939d llvm 2.0 doesn't support llvm.isunordered.*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32994 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:52:43 +00:00
Chris Lattner
a4810b52d0 remove support for llvm.isunordered
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:37:22 +00:00
Chris Lattner
b76efb71d4 Change the interface to Module::getOrInsertFunction to be easier to use,to resolve PR1088, and to help PR411.
This simplifies many clients also


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32989 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:12:01 +00:00
Evan Cheng
636c753b6b Expand fcopysign to the bitwise sequence if select is marked as expensive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32940 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 23:33:44 +00:00
Evan Cheng
068c5f47ea Bug in ExpandFCOPYSIGNToBitwiseOps(). Clear the old sign bit of operand 0
before or'ing in the sign bit of operand 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32930 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 21:31:51 +00:00
Evan Cheng
489a87ca09 CopyToReg source operand can be a register as well. e.g. Copy from GlobalBaseReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32929 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 20:59:06 +00:00
Evan Cheng
0d630d2204 GEP subscript is interpreted as a signed value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 01:46:20 +00:00
Chris Lattner
f8e7a21912 fix PowerPC/2007-01-04-ArgExtension.ll, a bug handling K&R prototypes with
the recent signless changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32884 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 22:22:37 +00:00
Evan Cheng
912095beca Expand fcopysign to a series of bitwise of operations when it's profitable to
do so.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32881 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 21:56:39 +00:00
Reid Spencer
bcca3405bd 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32836 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 16:49:33 +00:00
Jim Laskey
26a3687d53 NULL names should pass validation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32835 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 13:46:20 +00:00
Jim Laskey
1e3a5772d8 Silence warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 13:36:40 +00:00
Reid Spencer
376dd212f9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 05:03:05 +00:00
Reid Spencer
8c57dfb1ae 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 04:25:33 +00:00
Reid Spencer
b47b25cfda Clean up from recent changes. Comment the new parameter to ExpandLibCall.
Consolidate some lines of code and remove duplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32829 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 04:22:32 +00:00
Evan Cheng
ad93d7fda5 - Fixing naming inconsistency: calleesave -> calleesaved.
- Make use of spillCalleeSavedRegisters() and restoreCalleeSavedRegisters().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32822 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 21:31:15 +00:00
Reid Spencer
47857812e2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32788 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:55:36 +00:00
Reid Spencer
e4d87aa2de 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Jim Laskey
ee5f9274b9 Need to walk the derived chain of typedefs to get actual size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32744 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 20:03:42 +00:00
Evan Cheng
d472ad7c7c Debug dump error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32743 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 02:04:05 +00:00
Reid Spencer
246dd65a13 Just print integer constants as signed values. The actual signedness
doesn't matter as it is determined in the way the constant is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32733 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 19:04:23 +00:00
Reid Spencer
eefef64e59 Simplify all the casting business and get rid of isSigned().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32731 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-21 08:28:31 +00:00
Evan Cheng
0b4f80ee89 getLoad() and getStore() calls missed SVOffset operand. Thanks to Dan Gohman
for pointing it out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-20 01:27:29 +00:00
Chris Lattner
cd3245ac45 Eliminate static ctors from Statistics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32698 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 22:41:21 +00:00
Anton Korobeynikov
24287ddb81 Fix for PR1059: http://llvm.org/PR1059
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 21:04:20 +00:00
Evan Cheng
7df28dc9d7 May need to promote the operand (either sign_extend_inreg or and) before
expanding a {s|u}int_to_fp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-19 01:44:04 +00:00
Evan Cheng
722cb36069 LegalizeSetCCOperands() may end up inserting libcalls. They need to be
properly serialized. Do not clear LastCallSEQ_END until that is done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 22:55:34 +00:00
Reid Spencer
8a903db499 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 08:47:13 +00:00
Rafael Espindola
15404d060b move ExtWeakSymbols to AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32648 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 03:37:18 +00:00
Bill Wendling
f2174da713 Fixed so that it dereferences the ostream pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32640 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 11:15:53 +00:00
Bill Wendling
5c7e326585 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-17 05:15:13 +00:00
Chris Lattner
36d439666c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32633 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 21:14:48 +00:00
Evan Cheng
e90460ee9a Cannot combine an indexed load / store any further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 06:25:23 +00:00
Evan Cheng
aa975c1c47 Expand FP undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32623 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:20:50 +00:00
Jeff Cohen
4b607748d8 The best unbreakage yet, addressing Bill's concerns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32622 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:15:42 +00:00
Evan Cheng
0b1b9dcf22 Allow promoted FP_TO_UINT / FP_TO_SINT to expand operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32621 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 02:10:30 +00:00
Evan Cheng
966bf24491 Expand fabs / fneg to and / xor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-16 00:52:40 +00:00
Jeff Cohen
c21c5eeb4f An even better unbreakage...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32617 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 22:57:14 +00:00
Evan Cheng
19103b11ec Fix select_cc, select expansion to soft-fp bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32616 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 22:42:55 +00:00
Jim Laskey
f6c4ccfaab This code was usurping the sextload expand in teh legalizer. Just make
sure the right conditions are checked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 21:38:30 +00:00
Chris Lattner
2d53a320b4 silence a bogus warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 07:36:19 +00:00
Evan Cheng
86facc2828 Minor clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 06:41:01 +00:00
Evan Cheng
2b49c50083 Expand FP compares to soft-fp call(s)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32590 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-15 02:59:56 +00:00
Jim Laskey
acd80ac7bb 1. Tidy up jump table info.
2. Allow the jit to handle PIC relocable jump tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32581 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-14 19:17:33 +00:00
Evan Cheng
7a0d51c8e3 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32576 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-14 07:54:05 +00:00
Evan Cheng
9f87788040 More soft-fp work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32559 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 20:57:08 +00:00
Evan Cheng
548f611bae Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32527 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 03:19:57 +00:00
Evan Cheng
98ff3b979a Expand fsqrt, fsin, and fcos to libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32526 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 02:38:13 +00:00
Evan Cheng
6af00d588c Expand f32 / f64 to i32 / i64 conversion to soft-fp library calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32523 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 01:57:55 +00:00
Reid Spencer
7b06bd532d Replace CastInst::createInferredCast calls with more accurate cast
creation calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32521 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 00:50:17 +00:00
Evan Cheng
279101eb1a Expand FP constant to integers if FP types are not legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32497 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 22:19:28 +00:00
Evan Cheng
5c9ce1893a Soft fp FNEG, SINT_TO_FP, UINT_TO_FP libcall expansion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32495 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 21:51:17 +00:00
Evan Cheng
004952140f Expand ConstantFP to load from CP if float types are being expanded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 21:32:44 +00:00
Evan Cheng
0ca67332fa Expand i32/i64 CopyToReg f32/f64 to BIT_CONVERT + CopyToReg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32493 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 21:21:32 +00:00
Evan Cheng
7b2b5c846c - 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32490 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 19:53:13 +00:00
Evan Cheng
b15974a65c Expand formal arguments and call arguments recursively: e.g. f64 -> i64 -> 2 x i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 07:27:38 +00:00
Chris Lattner
f0094839f0 fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32474 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 05:22:21 +00:00
Chris Lattner
d9e06a5d03 this can only be fptrunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32473 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 05:21:51 +00:00
Chris Lattner
3bb7e3f3ba This case isn't needed with recent changes to ConstantInt::get
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32472 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 05:19:46 +00:00
Chris Lattner
ddc9401991 split up inttoptr from ptrtoint handling, the cases aren't similar at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32471 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 05:18:19 +00:00
Chris Lattner
cb0a681989 the operand of a bitcast is always the right size, just emit it in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32470 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 05:14:13 +00:00
Chris Lattner
d93d46ee7e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 04:18:56 +00:00
Chris Lattner
62be1a71f4 make this code more aggressive about turning store fpimm into store int imm.
This is not sufficient to fix X86/store-fp-constant.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32465 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 04:16:14 +00:00
Reid Spencer
86b89e5529 Tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32462 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 01:32:02 +00:00
Reid Spencer
15f46d6c28 Change inferred cast creation calls to more specific cast creations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32460 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 01:17:41 +00:00
Evan Cheng
13acce3ef0 Re-apply changes that were backed out and fix a naughty typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32442 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 19:27:14 +00:00
John Criswell
2381f6f6c6 It seems the llvm::OStream class does not handle stream manipulators.
For now, just grab the stream and perform the output on it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32441 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 19:15:36 +00:00
Chris Lattner
70a24b3141 Revert changes that broke oggenc on ppc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32440 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 18:53:38 +00:00
Evan Cheng
25ece66ff3 Don't convert store double C, Ptr to store long C, Ptr if i64 is not a legal type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 17:25:19 +00:00
Evan Cheng
bbf1e5e2e9 f32 / f64 node is expanded to one i32 / i64 node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32433 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 06:50:04 +00:00
Evan Cheng
b618230231 Clean up some bad code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 06:25:26 +00:00
Nate Begeman
2cbba89347 Move something that should be in the dag combiner from the legalizer to the
dag combiner.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32431 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:23:46 +00:00
Nate Begeman
bfaaaa6e0f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32430 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-11 02:20:45 +00:00
Anton Korobeynikov
d27a258d2d 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32415 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 23:12:42 +00:00
Evan Cheng
1a8f1fe676 Preliminary soft float support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 02:42:38 +00:00
Evan Cheng
cc22a7a2ad Move findTiedToSrcOperand to TargetInstrDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32366 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 18:45:48 +00:00
Evan Cheng
5c2a46052b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32354 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 08:02:34 +00:00
Evan Cheng
7814ad0bf3 findTiedToSrcOperand() changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32353 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-08 07:59:51 +00:00
Chris Lattner
555d8d6f4b Fix CodeGen/PowerPC/2006-12-07-SelectCrash.ll on PPC64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32336 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 22:36:47 +00:00
Bill Wendling
bcd2498f4f Removed more <iostream> includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32321 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:28:15 +00:00
Bill Wendling
832171cb97 Removing even more <iostream> includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32320 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 20:04:42 +00:00
Reid Spencer
fe46361719 Revision 1.83 causes PR1037.
Reverted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32305 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 16:21:19 +00:00
Evan Cheng
7d3223eef2 Initialize {Min|Max}CSFrameIndex properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 02:25:34 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Evan Cheng
51cdcd1972 MI keeps a ptr of TargetInstrDescriptor, use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32296 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:21:59 +00:00
Evan Cheng
6065f66e7c getOperandConstraint returns -1 if the operand does have the specific constraint. This bug was causing excessive spills.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32295 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 00:46:04 +00:00
Chris Lattner
ac0b6ae358 Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 17:46:33 +00:00
Jim Laskey
2b4e98cb20 Some addresssed should be 64-bit and some shouldn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 17:43:18 +00:00
Evan Cheng
576d123e13 Move copyKillDeadInfo out-of-line. Add findRegisterUseOperand().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32273 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 08:27:42 +00:00
Chris Lattner
4c7e227973 eliminate fp statistic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32251 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 01:48:55 +00:00
Jeff Cohen
97af751deb Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32113 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 02:22:01 +00:00
Evan Cheng
ba59a1e453 Match TargetInstrInfo changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32098 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:52:58 +00:00
Jim Laskey
2bbff6d173 better check for version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32045 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 18:29:23 +00:00
Jim Laskey
2172f966ca Change global descriptor names to provide name, full name and linkage name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32036 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 14:35:45 +00:00
Jim Laskey
749b01d5ff Temp fix to deal gdb issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32035 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 11:09:42 +00:00
Evan Cheng
67f660cb08 - MachineInstr now keeps a ptr to TargetInstrDescriptor instead of Opcode.
- Remove the ugly TargetInstrDescriptors hack.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32032 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 07:08:44 +00:00
Evan Cheng
6a16c5ab2d Avoid inifinite looping if READCYCLECOUNTER isn't custom lowered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32022 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 19:13:47 +00:00
Jim Laskey
36729ddd23 Eliminate unnecessary scopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32020 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 16:55:57 +00:00
Evan Cheng
f0b3ba6752 Allow target to custom lower READCYCLECOUNTER (when it doesn't have to be expanded).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32016 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 08:26:18 +00:00
Evan Cheng
f3e486e069 Fix for PR1023 by Dan Gohman.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32003 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 01:58:12 +00:00