Chris Lattner [Mon, 14 Jul 2008 00:46:56 +0000 (00:46 +0000)]
If a function calls setjmp, never inline it into other functions. This is
a hack around the fact that we don't represent the CFG correctly for sj/lj.
It fixes PR2486.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53540
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 00:32:20 +0000 (00:32 +0000)]
simplify some code, shuffle and insertelt always return a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53538
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 00:28:45 +0000 (00:28 +0000)]
whitespace fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53537
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 00:27:31 +0000 (00:27 +0000)]
doxygenate comments and wrap to 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53536
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 00:19:59 +0000 (00:19 +0000)]
Add a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53535
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 00:15:52 +0000 (00:15 +0000)]
Fix PR2506 by being a bit more careful about reverse fact propagation when
disproving a condition. This actually compiles the existing testcase
(udiv_select_to_select_shift) to:
define i64 @test(i64 %X, i1 %Cond) {
entry:
%divisor1.t = lshr i64 %X, 3 ; <i64> [#uses=1]
%quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1]
%sum = add i64 %divisor1.t, %quotient2 ; <i64> [#uses=1]
ret i64 %sum
}
instead of:
define i64 @test(i64 %X, i1 %Cond) {
entry:
%quotient1.v = select i1 %Cond, i64 3, i64 4 ; <i64> [#uses=1]
%quotient1 = lshr i64 %X, %quotient1.v ; <i64> [#uses=1]
%quotient2 = lshr i64 %X, 3 ; <i64> [#uses=1]
%sum = add i64 %quotient1, %quotient2 ; <i64> [#uses=1]
ret i64 %sum
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53534
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 22:23:11 +0000 (22:23 +0000)]
Fix mishandling of the infinite loop case when merging two blocks. This
fixes PR2540.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53533
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 22:04:41 +0000 (22:04 +0000)]
more refactoring. Use early exits instead of really complex logic.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53532
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 21:55:46 +0000 (21:55 +0000)]
improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53531
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 21:53:26 +0000 (21:53 +0000)]
factor another large hunk of code out into its own function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53530
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 21:27:36 +0000 (21:27 +0000)]
add a description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53529
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 21:20:19 +0000 (21:20 +0000)]
Final bit of simplification for FoldBranchToCommonDest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53528
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 21:15:11 +0000 (21:15 +0000)]
simplify logic a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53527
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 21:12:01 +0000 (21:12 +0000)]
Refactor some code out into its own helper function, getting rid of crazy multiline
conditionals and commenting the code better.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53526
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 13 Jul 2008 20:14:38 +0000 (20:14 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53525
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 13 Jul 2008 19:35:21 +0000 (19:35 +0000)]
Fix PR2231 - opt -internalize -std-compile-opts should run internalize first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53523
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Sun, 13 Jul 2008 11:12:36 +0000 (11:12 +0000)]
Remove deleted files from VC++ project.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53521
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 12 Jul 2008 18:28:46 +0000 (18:28 +0000)]
Inline typedef for alist_iterator::pointer to work with MSVC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53517
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 12 Jul 2008 07:41:32 +0000 (07:41 +0000)]
Stop creating extraneous smax/umax in SCEV. This removes a regression where we
started complicating many loops ('for' loops, in fact).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53508
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 12 Jul 2008 07:00:52 +0000 (07:00 +0000)]
operator[] is not defined for list::iterator. Overload it in ilist::iterator
to prevent silly things from happening accidentally. PR2171
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53507
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 12 Jul 2008 05:04:38 +0000 (05:04 +0000)]
Enhance analysis of srem.
Remove dead code analyzing urem. 'urem' of power-of-2 is canonicalized to an
'and' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53506
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Jul 2008 02:23:19 +0000 (02:23 +0000)]
Implement llvm.atomic.cmp.swap.i32 on PPC. Patch by Gary Benson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53505
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Jul 2008 02:22:07 +0000 (02:22 +0000)]
Typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53504
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Jul 2008 01:56:02 +0000 (01:56 +0000)]
Fix PR2536: a nasty spiller bug. If a two-address instruction uses a register but the use portion of its live range is not part of its liveinterval, it must be defined by an implicit_def. In that case, do not spill the use. e.g.
8 %reg1024<def> = IMPLICIT_DEF
12 %reg1024<def> = INSERT_SUBREG %reg1024<kill>, %reg1025, 2
The live range [12, 14) are not part of the r1024 live interval since it's defined by an implicit def. It will not conflicts with live interval of r1025. Now suppose both registers are spilled, you can easily see a situation where both registers are reloaded before the INSERT_SUBREG and both target registers that would overlap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53503
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Jul 2008 01:38:51 +0000 (01:38 +0000)]
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53502
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 12 Jul 2008 00:10:52 +0000 (00:10 +0000)]
Add a utility function to MachineInstr for testing whether an instruction
has exactly one MachineMemOperand, and change some X86 lowering code to
make use of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53498
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 22:51:32 +0000 (22:51 +0000)]
Fix spelling of "hierarchy" in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53489
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 22:48:20 +0000 (22:48 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53487
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 22:44:52 +0000 (22:44 +0000)]
Include a frame index in the "fixed stack" pseudo source value
instead of using the frame index for the SVOffset, which was
inconsistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53486
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 11 Jul 2008 22:43:07 +0000 (22:43 +0000)]
Minor tweaks to the ImmutableList iterator interface.
Added partial specialization of DenseMapInfo<T> for ImmutableList.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53485
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 11 Jul 2008 22:42:10 +0000 (22:42 +0000)]
Porting r53478 into mainline:
Update to build_llvm. Don't output a floating point number for the version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53484
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 22:39:58 +0000 (22:39 +0000)]
Fix an obsolete top-level comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53481
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 22:36:22 +0000 (22:36 +0000)]
Factor out debugging code into the common base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53480
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 21:54:34 +0000 (21:54 +0000)]
Add support for putting NamedRegionTimers in TimerGroups, and
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53476
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 20:58:19 +0000 (20:58 +0000)]
Use find instead of lower_bound.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53474
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 20:53:00 +0000 (20:53 +0000)]
add support for returning i128, PR2532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53472
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Jul 2008 20:38:31 +0000 (20:38 +0000)]
Trim unnecessary #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53471
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 11 Jul 2008 20:05:13 +0000 (20:05 +0000)]
Don't call lookupNumber more than we have to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53470
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Jul 2008 17:02:09 +0000 (17:02 +0000)]
Remove an apparently useless routine: there should
be no need to split the result of a vector RET node,
since they are always already legal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53462
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Jul 2008 17:00:14 +0000 (17:00 +0000)]
It is pointless to turn a UINT_TO_FP into an
SINT_TO_FP libcall plus additional operations:
it might as well be a direct UINT_TO_FP libcall.
So only turn it into an SINT_TO_FP if the target
has special handling for SINT_TO_FP.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53461
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Jul 2008 16:57:02 +0000 (16:57 +0000)]
Add two missing SINT_TO_FP libcalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53460
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Jul 2008 16:54:57 +0000 (16:54 +0000)]
Port a shift-by-1 optimization from LegalizeDAG: it
was presumably added after the rest of the code was
copied to LegalizeTypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53459
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Jul 2008 16:52:29 +0000 (16:52 +0000)]
Add support for 128 bit shifts and 32 bit shifts
on 16 bit machines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53458
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 11 Jul 2008 08:16:26 +0000 (08:16 +0000)]
Document 'mask' in this calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53454
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Jul 2008 07:37:30 +0000 (07:37 +0000)]
Align comments, colons and cases. Remove trailing
whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53453
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 11 Jul 2008 07:36:19 +0000 (07:36 +0000)]
Remove misleading constant from comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53452
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 11 Jul 2008 07:20:53 +0000 (07:20 +0000)]
Add another optimization from PR2330. Also catch some missing cases that are
similar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53451
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 11 Jul 2008 07:18:52 +0000 (07:18 +0000)]
The frame address on an x86-64 box needs to be offset by -8, not -4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 06:40:29 +0000 (06:40 +0000)]
a missed optimization that Eli spotted
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 06:38:16 +0000 (06:38 +0000)]
another bug in the same line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 06:36:01 +0000 (06:36 +0000)]
fix a bug spotted by Eli's eagle eyes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 05:40:05 +0000 (05:40 +0000)]
simplify and merge a bunch of code. Instead of comparing against
the min/max values for an integer type, compare against the min/max
values we can prove contain the input. This might be a tighter bound,
so this is general goodness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 05:08:55 +0000 (05:08 +0000)]
fold away (x <= cst) earlier, allowing us to not have to
handle them in some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 04:20:58 +0000 (04:20 +0000)]
Fix folding of icmp's of i1 where the comparison is signed. The code
was using the algorithm for folding unsigned comparisons which is
completely wrong. This has been broken since the signless types change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 04:09:09 +0000 (04:09 +0000)]
Fix a bogus optimization: folding (slt (zext i1 A to i32), 1) -> (slt i1 A, true)
This cause a regression in InstCombine/JavaCompare, which was doing the right
thing on accident. To handle the missed case, generalize the comparisons based
on masked bits a little bit to handle comparisons against the max value. For
example, we can now xform (slt i32 (and X, 4), 4) -> (setne i32 (and X, 4), 4)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53443
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 03:54:57 +0000 (03:54 +0000)]
make this condition more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53442
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 00:30:39 +0000 (00:30 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53440
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jul 2008 00:30:06 +0000 (00:30 +0000)]
Implement PR2538
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53438
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 23:46:13 +0000 (23:46 +0000)]
Fix a bug in the soft-float handling of FCOPYSIGN that Duncan noticed
when working on legalizetypes. Both legalizetypes and legalizeops now
produce hte same code for CodeGen/ARM/fcopysign.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53435
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 23:37:50 +0000 (23:37 +0000)]
make legalize types be a command line option: -enable-legalize-types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53434
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Jul 2008 23:24:20 +0000 (23:24 +0000)]
Make typedef public to make MSVC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53433
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Jul 2008 23:09:45 +0000 (23:09 +0000)]
Make some typedefs public to make MSVC++ happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53432
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Jul 2008 22:58:10 +0000 (22:58 +0000)]
Make typedefs in ilist public (Visual C++ errors out when they are private).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53431
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 10 Jul 2008 22:57:49 +0000 (22:57 +0000)]
Pull r53428 from Gaz into mainline:
Remove warnings about unused/shadowed variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53430
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 10 Jul 2008 22:57:10 +0000 (22:57 +0000)]
Added ImmutableMap constructor that accepts a const TreeTy*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53429
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 10 Jul 2008 22:35:32 +0000 (22:35 +0000)]
Put CPPBackend tests into their own directory and run them only if they're
supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53427
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 22:26:19 +0000 (22:26 +0000)]
Tidy up #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53426
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 21:44:59 +0000 (21:44 +0000)]
Add a SubclassData field to SDNode, similar to what's done
in Value, to make use of some otherwise unused space. Use this
field to shrink LoadSDNode and StoreSDNode by moving the
addressing mode and ext/trunc fields there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53422
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 19:58:23 +0000 (19:58 +0000)]
Fix a copy+pasto in an assertion string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53419
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 19:57:25 +0000 (19:57 +0000)]
Stack objects have nonnegative indices, not just positive indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53418
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 19:55:54 +0000 (19:55 +0000)]
Escape the graph name. This unbreaks -view-cfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53417
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 19:55:04 +0000 (19:55 +0000)]
Remove this file; the code that it went with is no longer
in the repository.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53416
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 10 Jul 2008 19:49:32 +0000 (19:49 +0000)]
Make stack slot coloring's debug output more consistent with
other passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53415
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 10 Jul 2008 18:23:23 +0000 (18:23 +0000)]
Change StackSlotForVirtReg (which maps vregs to frame indices) from std::map to IndexedMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53414
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 16:49:53 +0000 (16:49 +0000)]
Remove extraneous vertical whitespace before Eric gets the wrong idea ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53411
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 16:33:38 +0000 (16:33 +0000)]
Fix an altivec constant miscompilation that Duncan found through
his work on legalizetypes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53410
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 15:35:05 +0000 (15:35 +0000)]
Add support for 128 bit multiplicative operations.
Lack of these caused a bootstrap failure with Fortran
on x86-64 with LegalizeTypes turned on. While there,
be nice to 16 bit machines and support expansion of
i32 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53408
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 15:33:02 +0000 (15:33 +0000)]
Add a mysteriously missing libcall, FPTOSINT_F80_I32.
Be nice to 16 bit machines by supporting FP_TO_XINT
expansion for these.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53407
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 15:30:54 +0000 (15:30 +0000)]
Fix a FIXME: use an apint in CTTZ legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53406
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 15:29:55 +0000 (15:29 +0000)]
Remove PromoteIntRes_FP_ROUND - not sure what it
was doing there: FP_ROUND returns a float, not an
integer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53405
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 15:26:17 +0000 (15:26 +0000)]
Make sure the alignment of the temporary created
in CreateStackStoreLoad is good enough for both
the source and destination types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53404
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 15:25:04 +0000 (15:25 +0000)]
Make the LegalizeType method naming scheme more regular.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53403
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 11:23:14 +0000 (11:23 +0000)]
Don't barf when dumping a constant that contains
a ginormous value (eg: i128 -1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53402
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 10 Jul 2008 11:21:59 +0000 (11:21 +0000)]
Correct a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53401
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Thu, 10 Jul 2008 10:24:08 +0000 (10:24 +0000)]
Restructure dead argument elimination, try #3 :-)
Rewrite the DeadArgumentElimination pass, to use a more explicit tracking of
dependencies between return values and/or arguments. Also make the handling of
arguments and return values the same.
The pass now looks properly inside returned structs, but only at the first
level (ie, not inside nested structs).
This version fixed a few more bugs and was cleaned up a bit. It now passes all
of LLVM's testing, and should still pass SPEC2006. There is still a minor bug
with regard to returning nested structs. Since there is currently nothing that
emits such IR, I will fix that in a seperate commit (partly because it requires
a non-trivial fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53400
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 10 Jul 2008 07:35:43 +0000 (07:35 +0000)]
- Change the horrible N^2 isRegReDefinedByTwoAddr. Now callers must supply the operand index of def machineoperand and at most one full scan of non-implicit operands is needed.
- Change local register allocator to use the new isRegReDefinedByTwoAddr instead of reinventing the wheel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53394
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 10 Jul 2008 05:51:40 +0000 (05:51 +0000)]
Fix overzealous optimization. Thanks to Duncan Sands for pointing out my error!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53393
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 10 Jul 2008 01:56:35 +0000 (01:56 +0000)]
Use DenseMap instead of std::map in local register allocation. This improves the time on instcombine from .31s to .22s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53390
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 10 Jul 2008 01:53:01 +0000 (01:53 +0000)]
Fix 403.gcc. Finally got the check for two-address-ness correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53389
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 10 Jul 2008 01:44:27 +0000 (01:44 +0000)]
Fix the build by adding a #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53388
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 01:09:33 +0000 (01:09 +0000)]
The source and dest of an alias are *not* required to have the same type,
though that would be nice and make sense :). Patch by Nathan Keynes!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53387
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 10 Jul 2008 01:08:23 +0000 (01:08 +0000)]
Fix for PR2472. Use movss to set lower 32-bits of a zero XMM vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53386
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 00:52:20 +0000 (00:52 +0000)]
open plugins with RTLD_GLOBAL, pointed out by Bram Adams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53385
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 00:44:03 +0000 (00:44 +0000)]
SImplify ConstantVector::get a bit and make it turn a vector
of all undefs into a single undef value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53384
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 00:29:28 +0000 (00:29 +0000)]
Fix a case where vector comparison constant folding would cause an
infinite recursion. part of PR2529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53383
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 00:28:34 +0000 (00:28 +0000)]
add a helper method for code that wants to handle vector
constants by element without caring how they are formed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53382
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 00:28:11 +0000 (00:28 +0000)]
add a helper method for code that wants to handle vector
constants by element without caring how they are formed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53381
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Jul 2008 00:08:17 +0000 (00:08 +0000)]
elementwise comparison of vector constants was completely wrong. Fix
it for PR2529
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53380
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 10 Jul 2008 00:04:23 +0000 (00:04 +0000)]
- Replace use of std::map<std::string, ..> with StringMap. Replace use of std::map with DenseMap, std::set with SmallPtrSet. This results in minor speed up.
- Some code clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53379
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 9 Jul 2008 23:09:10 +0000 (23:09 +0000)]
Revert r53367, which was breaking things.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53378
91177308-0d34-0410-b5e6-
96231b3b80d8