Owen Anderson [Tue, 15 Jul 2008 17:59:02 +0000 (17:59 +0000)]
Revert this, as it seems to still be broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53627
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 15 Jul 2008 16:28:23 +0000 (16:28 +0000)]
Enable local PRE by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53616
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 15 Jul 2008 16:28:06 +0000 (16:28 +0000)]
Have GVN do a pre-pass over the CFG that folds away unconditional branches where possible. This allows local PRE to be more aggressive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53615
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 16:05:09 +0000 (16:05 +0000)]
XFAIL the multdeadretval test for now, I will be fixing instcombine to make it work again tomorrow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53614
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 15:02:44 +0000 (15:02 +0000)]
LegalizeTypes support for fabs on ppc long double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53613
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:57:01 +0000 (14:57 +0000)]
Remove a few tests which no longer hold for deadargelim (since it is now
allowed to canonicalize return values).
Add a test that checks if return value and function attributes are not removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53612
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:42:58 +0000 (14:42 +0000)]
Add a testcase for the canonicalizations now performed by deadargelim.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53611
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:42:31 +0000 (14:42 +0000)]
Allow deadargelim to change return types even though now values were dead. This
again canonicalizes {i32} into i32 and {} into void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53610
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:39:36 +0000 (14:39 +0000)]
Revert r53606. It turns out that explicitely tracking the liveness of the
return value as a whole in deadargelim is really not needed now that we simply
rebuild the old return value and actually prevents some canonicalization from
taking place.
This revert stops deadargelim from changing {i32} into i32 for now, but I'll
fix that next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53609
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 14:03:10 +0000 (14:03 +0000)]
Make deadargelim a bit less smart, so it doesn't choke on nested structs as
return values that are still (partially) live. Instead of updating all uses of
a call instruction after removing some elements, it now just rebuilds the
original struct (With undef gaps where the unused values were) and leaves it to
instcombine to clean this up.
The added testcase still fails currently, but this is due to instcombine which
isn't good enough yet. I will fix that part next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53608
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 13:39:08 +0000 (13:39 +0000)]
Don't use isa when we can reuse a previous dyn_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53607
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 13:36:06 +0000 (13:36 +0000)]
Make DeadArgElim keep liveness of the return value as a whole in addition to
only the liveness of partial return values (for functions returning a struct).
This is more explicit to prevent unwanted changes in the return value.
In particular, deadargelim now canonicalizes a function returning {i32} to
returning i32 and {} to void, if the struct returned is not used in its
entirety, but only the single element is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53606
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 13:15:10 +0000 (13:15 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53605
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 10:18:22 +0000 (10:18 +0000)]
LegalizeTypes support for promotion of bswap.
In LegalizeDAG the value is zero-extended to
the new type before byte swapping. It doesn't
matter how the extension is done since the new
bits are shifted off anyway after the swap, so
extend by any old rubbish bits. This results
in the final assembler for the testcase being
one line shorter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53604
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 10:14:24 +0000 (10:14 +0000)]
LegalizeTypes support for promotion of SIGN_EXTEND_INREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53603
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 15 Jul 2008 10:12:34 +0000 (10:12 +0000)]
Reorder the integer promotion methods alphabetically.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53602
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 09:11:16 +0000 (09:11 +0000)]
Let DAE keep a list of live functions, instead of simply marking all arguments
and return values live for those functions. This doesn't change anything yet,
but prepares for the coming commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53601
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 09:00:17 +0000 (09:00 +0000)]
Split DAE::MarkLive into MarkLive and PropagateLiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53600
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 08:56:49 +0000 (08:56 +0000)]
Pass around const RetOrArg references instead of copying values. Also, mark
RetOrArg::getDescription() as const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53599
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 08:53:36 +0000 (08:53 +0000)]
Simplify debug code by using RetOrArg::getDescription().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53598
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 08:47:32 +0000 (08:47 +0000)]
Fix indentation (intentionally left out of the previous commit).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53592
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthijs Kooijman [Tue, 15 Jul 2008 08:45:12 +0000 (08:45 +0000)]
Move the deadargelim code for intrinsically alive functions into its own
method, to slightly simplify control flow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53591
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Tue, 15 Jul 2008 05:28:34 +0000 (05:28 +0000)]
Fixed potential bug if the source and target of a bit convert have different alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53590
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Jul 2008 03:47:44 +0000 (03:47 +0000)]
Correct this inversion!
I swear that didn't show up in svn diff...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53587
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 15 Jul 2008 03:40:27 +0000 (03:40 +0000)]
Fix up comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53586
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 15 Jul 2008 02:03:36 +0000 (02:03 +0000)]
Fixed call stack alignment. Improved AsmPrinter alignment issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53585
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 15 Jul 2008 00:00:11 +0000 (00:00 +0000)]
LinkOnce definitions have default scope, like weak definitions. Otherwise, the linker may not be able to match LinkOnce definition from one module with an exteranl reference from other module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53580
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 14 Jul 2008 22:29:15 +0000 (22:29 +0000)]
Goodbye tail duplication (for good this time).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53574
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 18:46:16 +0000 (18:46 +0000)]
This replaces all $(SolutionDir) macros with $(ProjectDir)..\
Patch by Nicolas Capens!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53571
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 14 Jul 2008 18:19:29 +0000 (18:19 +0000)]
Reapply 53476 and 53480, with a fix so that it properly updates
the BB member to the current basic block after emitting
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53567
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 14 Jul 2008 17:55:01 +0000 (17:55 +0000)]
Fix uninitialized use of the Changed variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53564
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 14 Jul 2008 17:51:24 +0000 (17:51 +0000)]
Improve debug output for MemOperandSDNode. PseudoSourceValue nodes
don't have value names, so use print instead of getName() to get a
useful string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53563
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 14 Jul 2008 17:45:47 +0000 (17:45 +0000)]
Fix edito in the PseudoSourceValue name list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53562
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 14 Jul 2008 17:43:27 +0000 (17:43 +0000)]
Reformat this message to fit in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53561
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 17:34:19 +0000 (17:34 +0000)]
I don't think BUILD_PAIR can have a vector result.
Remove support for this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53559
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 17:33:37 +0000 (17:33 +0000)]
Tighten up some checks. Fix FPOWI splitting for
non-power-of-two vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53558
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 17:32:59 +0000 (17:32 +0000)]
Reapply r53540, now with the matching header!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53557
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 17:32:02 +0000 (17:32 +0000)]
An INSERT_VECTOR_ELT can insert a larger value
than the vector element type. Don't forget to
handle this when the insertion index is not a
constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53556
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 17:27:46 +0000 (17:27 +0000)]
According to the docs, it is possible to have an
extending load of a vector. Handle this case when
splitting vector loads. I'm not completely sure
what is supposed to happen, but I think it means
hi should be set to undef. LegalizeDAG does not
consider this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53555
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 17:22:31 +0000 (17:22 +0000)]
There should be no extending loads or truncating
stores of one-element vectors. Also, neaten the
handling of INSERT_VECTOR_ELT when the inserted
type is larger than the vector element type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53554
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 17:15:45 +0000 (17:15 +0000)]
Ignore TargetConstant with an illegal type. These
are used for passing huge immediates in inline ASM
from the front-end straight down to the ASM writer.
Of course this is a hack, but it is simple, limited
in scope, works in practice, and is what LegalizeDAG
does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53553
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 14 Jul 2008 14:42:54 +0000 (14:42 +0000)]
Added Subtarget support into RegisterInfo
Added HasABICall and HasAbsoluteCall (equivalent to gcc -mabicall and
-mno-shared). HasAbsoluteCall is not implemented but HasABICall is the
default for o32 ABI. Now, both should help into a more accurate
relocation types implementation.
Added IsLinux is needed to choose between asm directives.
Instruction name strings cleanup.
AsmPrinter improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53551
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 14 Jul 2008 07:59:28 +0000 (07:59 +0000)]
Revert r53540 - it does not compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53549
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 07:23:24 +0000 (07:23 +0000)]
Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixes
the second half of link-global-to-func.ll and causes some minor changes in
messages.
There are two TODOs here. First, this causes a regression in
2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it). Anton,
I would really appreciate it if you could take a look at this. It should be
a matter of adding proper alias support to GetLinkageResult, and was probably
already a latent bug that would manifest with globals.
The second todo is to reimplement LinkAlias in the same pattern as
function and global linking. This should be pretty straight-forward for
someone who knows aliases, but isn't a requirement for correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53548
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 06:52:19 +0000 (06:52 +0000)]
don't do any linkage, not even type resolution, of symbols that have
internal linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53547
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 06:49:45 +0000 (06:49 +0000)]
implement linking of globals to functions, in one direction
(replacing a function with a global). This is needed when building
llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack
in lib/system/DynamicLibrary.cpp.
Implementation of linking the other way will need to wait for a
cleanup of LinkFunctionProtos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53546
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 05:52:33 +0000 (05:52 +0000)]
wrap long lines, remove some code from a non-assert build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53545
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 05:17:31 +0000 (05:17 +0000)]
Fix a bunch of bugs handling vector compare constant expressions, fixing
PR2317.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53544
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jul 2008 05:10:41 +0000 (05:10 +0000)]
Document and fix Constant::getVectorElements to return an empty vector
when presented with a constant expr.
If ConstantExpr::getV[IF]Cmp to work when ConstantFoldCompareInstruction
returns an undef or constant expr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53541
91177308-0d34-0410-b5e6-
96231b3b80d8
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