Commit Graph

33705 Commits

Author SHA1 Message Date
Chris Lattner
9dbb42944c rename SimplifyCompare -> SimplifyCmpInst and split it into
Simplify[IF]Cmp pieces.  Add some predicates to CmpInst to 
determine whether a predicate is fp or int.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86624 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 23:28:39 +00:00
Jim Grosbach
803b48a155 Now that the default is 'enabled,' a separate command line option for ARM is
not necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86621 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 23:11:45 +00:00
Chris Lattner
8f73deaa87 fix ConstantFoldCompareInstOperands to take the LHS/RHS as
individual operands instead of taking a temporary array


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86619 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 23:06:58 +00:00
Chris Lattner
9819ef7742 use instructionsimplify instead of a weak clone of ad-hoc folding stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 23:00:14 +00:00
Chris Lattner
9f3c25aeb3 stub out a new libanalysis "instruction simplify" interface that
takes decimated instructions and applies identities to them.  This
is pretty minimal at this point, but I plan to pull some instcombine
logic out into these and similar routines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:57:59 +00:00
Jeffrey Yasskin
6f348e4586 Remove dlsym stubs, with Nate Begeman's permission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:34:19 +00:00
Jim Grosbach
92eb919e80 Enable dynamic stack realignment by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:32:40 +00:00
Chris Lattner
c2c23d03df stub out a new form of BasicBlock::RemovePredecessorAndSimplify which
simplifies instruction users of PHIs when the phi is eliminated.  This
will be moved to transforms/utils after some other refactoring.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86603 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:32:36 +00:00
Jim Grosbach
ad353c74ad Set dynamic stack realignment to real values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:32:03 +00:00
Dan Gohman
ba565bfc21 Remove an unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:28:30 +00:00
Mike Stump
70e5e6834c Fix for 64-bit builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 22:28:21 +00:00
Bill Wendling
2718e43d6a Similar to r86588, but for Darwin this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86592 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 21:45:26 +00:00
Bill Wendling
b1ec31d711 The jump table was being generated before the end label for exception handling
was generated. This caused code like this:

## The asm code for the function
        .section        __TEXT,__const
        .align  2
lJTI11_0:
LJTI11_0:
        .long    LBB11_16
        .long    LBB11_4
        .long    LBB11_5
        .long    LBB11_6
        .long    LBB11_7
        .long    LBB11_8
        .long    LBB11_9
        .long    LBB11_10
        .long    LBB11_11
        .long    LBB11_12
        .long    LBB11_13
        .long    LBB11_14
Leh_func_end11:   ## <---now in the wrong section!

The `Leh_func_end11' would then end up in the wrong section, causing the
resulting EH frame information to be wrong:

__ZL11CheckRightsjPKcbRbRP6NSData.eh:
    .set    Lset500eh,Leh_frame_end11-Leh_frame_begin11
    .long   Lset500eh  ; Length of Frame Information Entry                                                                                                                   
Leh_frame_begin11:
    .long   Leh_frame_begin11-Leh_frame_common
    .long   Leh_func_begin11-.
    .set    Lset501eh,Leh_func_end11-Leh_func_begin11
    .long   Lset501eh                                   ; FDE address range                                                                                                                                   
`Lset501eh' is now something huge instead of the real value.

The X86 back-end generates the jump table after the EH information is
emitted. Do the same here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86588 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 21:20:14 +00:00
Dan Gohman
80f6c58981 Print "..." instead of all the uninteresting register clobbers on call
instructions. This makes CodeGen dumps significantly less noisy.

Example before:
  BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def,dead>, %D1<imp-def,dead>, %D2<imp-def,dead>, %D3<imp-def,dead>, %D4<imp-def,dead>, %D5<imp-def,dead>, %D6<imp-def,dead>, %D7<imp-def,dead>, %D16<imp-def,dead>, %D17<imp-def,dead>, %D18<imp-def,dead>, %D19<imp-def,dead>, %D20<imp-def,dead>, %D21<imp-def,dead>, %D22<imp-def,dead>, %D23<imp-def,dead>, %D24<imp-def,dead>, %D25<imp-def,dead>, %D26<imp-def,dead>, %D27<imp-def,dead>, %D28<imp-def,dead>, %D29<imp-def,dead>, %D30<imp-def,dead>, %D31<imp-def,dead>, %CPSR<imp-def,dead>, %FPSCR<imp-def,dead>

Same example after:
  BL <ga:@bar>, %R0<imp-def>, %R1<imp-def,dead>, %LR<imp-def,dead>, %CPSR<imp-def,dead>, ...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 19:38:45 +00:00
Dan Gohman
f75ef668a7 Default-addressspace null pointers don't alias anything. This allows
GVN to be more aggressive. Patch by Hans Wennborg! (with a comment added by me)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86582 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 19:29:11 +00:00
David Goodwin
980d494ab6 Fix dependencies added to model memory aliasing for post-RA scheduling. The dependencies were overly conservative for memory access that are known not to alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86580 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 19:22:17 +00:00
Dan Gohman
eaa181c83a Fix a comment in a typo that Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 18:59:22 +00:00
Dan Gohman
f6572d0aa2 Generalize LCSSA to handle loops with exits with predecessors outside
the loop. This is needed because with indirectbr it may not be possible
for LoopSimplify to guarantee that all loop exit predecessors are
inside the loop. This fixes PR5437.

LCCSA no longer actually requires LoopSimplify form, but for now it
must still have the dependency because the PassManager doesn't know
how to schedule LoopSimplify otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86569 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 18:28:24 +00:00
Dan Gohman
81d893ccf2 Minor tidiness fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86565 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 18:19:43 +00:00
Dan Gohman
28a4c78621 Constify MachineFunctionAnalysis' TargetMachine reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86564 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 18:18:49 +00:00
Nuno Lopes
95a3be0ba4 add zextOrTrunc and sextOrTrunc methods, that are similar to the ones in APInt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86549 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 15:36:28 +00:00
Jim Grosbach
43cca695a8 Work around assembler not recognizing #0.0 form immediate for vmcp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86548 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 15:27:51 +00:00
Xerxes Ranby
5aa638d8f7 Make lib/Support/Debug.cpp SetCurrentDebugType implementation part of llvm namespace to match function declaration in Debug.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86544 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 14:50:34 +00:00
Bruno Cardoso Lopes
b8e0ebf034 Fix PR5149.
http://llvm.org/bugs/show_bug.cgi?id=5149



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 14:27:49 +00:00
Chris Lattner
47fc9d3366 make this handle redefinition of malloc with different prototype correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 07:12:01 +00:00
Chris Lattner
7e606e2e98 if a 'with overflow' intrinsic just has the normal result used, simplify
it to a normal binop.  Patch by Alastair Lynn, testcase by me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 07:07:56 +00:00
Evan Cheng
df8ed02473 Hide a couple of options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 06:49:37 +00:00
Evan Cheng
63040ce858 80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 06:49:22 +00:00
Chris Lattner
74965f2279 fix PR5104: when printing a single character, return the result of
putchar in case there is an error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 04:57:04 +00:00
Chris Lattner
570a0b8d74 random tidy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 04:18:23 +00:00
Chris Lattner
49e27a5375 remove a redundant printout, LinkInArchive prints this as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 04:15:28 +00:00
Chris Lattner
dd21a1cba4 enhance PHI slicing to handle the case when a slicable PHI is begin
used by a chain of other PHIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 01:38:00 +00:00
Owen Anderson
b0acf66bf9 Small cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 00:48:15 +00:00
Owen Anderson
b05a1d116f Revert my previous patch to ABCD and fix things the right way. There are two problems addressed
here:

1) We need to avoid processing sigma nodes as phi nodes for constraint generation.
2) We need to generate constraints for comparisons against constants properly.

This includes our first working ABCD test!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86498 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 00:44:44 +00:00
Chris Lattner
e7e63fe965 comment typos pointed out by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 00:41:49 +00:00
Jim Grosbach
e5165490b7 Use Unified Assembly Syntax for the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09 00:11:35 +00:00
Owen Anderson
9feeeaf9ed Fix an issue where the ordering of blocks within a function could lead to different constraint
graphs being produced.  The cause was that we were incorrectly marking sigma instructions as
processed after handling the sigma-specific constraints for them, potentially neglecting to
process them as normal instructions as well.

Unfortunately, the testcase that inspired this still doesn't work because of a bug in the solver,
which is next on the list to debug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 22:36:55 +00:00
Chris Lattner
bf382b5f74 Teach an instcombine to not pull trunc instructions through PHI nodes
when both the source and dest are illegal types, since it would cause
the phi to grow (for example, we shouldn't transform test14b's phi to
a phi on i320).  This fixes an infinite loop on i686 bootstrap with
phi slicing turned on, so turn it back on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 21:20:06 +00:00
Duncan Sands
68d29d09c6 Revert commit 81144, and add a comment. It caused bugpoint timeouts
not to work any more on linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 20:55:48 +00:00
Chris Lattner
9956c056c1 reapply r8644[3-5] with only the scary part
(SliceUpIllegalIntegerPHI) disabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 19:23:30 +00:00
Daniel Dunbar
d11a7c3b03 Speculatively revert r8644[3-5], they seem to be leading to infinite loops in
llvm-gcc bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 17:52:47 +00:00
Anton Korobeynikov
f0b47b7f6d Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86471 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 15:33:12 +00:00
Anton Korobeynikov
830fe7bc2d Move OR patterns upper to all logical stuff. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 15:32:44 +00:00
Anton Korobeynikov
ff2c186d59 Some nice peephole patterns. Based on patch by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86469 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 15:32:28 +00:00
Anton Korobeynikov
764cfaabd2 Print tab before operand of jcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86468 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 15:32:11 +00:00
Anton Korobeynikov
52f28e9b63 Fix invalid operand updates & implement post-inc memory operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 14:27:38 +00:00
Anton Korobeynikov
773943ac5c Throw an error when stack realignment stuff fails instead of silent
code miscompilation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 12:58:40 +00:00
Daniel Dunbar
d702c8c980 Remove ByteswapSCANFResults, it is dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 09:46:57 +00:00
Lang Hames
16dcaf5996 Moved some ManagedStatics out of the SlotIndexes header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 08:49:59 +00:00
Chris Lattner
91114966b1 teach a couple of instcombine transformations involving PHIs to
not turn a PHI in a legal type into a PHI of an illegal type, and
add a new optimization that breaks up insane integer PHI nodes into
small pieces (PR3451).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 08:21:13 +00:00
Nick Lewycky
327127909e We don't need to byteswap, the interpreter assumes the program is running
native anyways. This fixes a crash using %d and similar in a scanf statement.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 05:45:04 +00:00
Chris Lattner
7e89738f98 Make TargetData::getStringRepresentation spit out native integer types,
this gives llvm-gcc generated modules the right data.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86435 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 02:32:01 +00:00
Nick Lewycky
dbf6f518e9 Fix the interpreter to not crash due to zeroext/signext
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 00:45:29 +00:00
Jim Grosbach
31bc849123 Use aligned load/store instructions for spilling Q registers when we know the stack slot is 128 bit aligned
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86425 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 00:27:19 +00:00
Evan Cheng
fdc834046e Refactor code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-08 00:15:23 +00:00
Daniel Dunbar
f0bb41c078 Fix MSVC warning ( | with bool and unsigned int).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:51:55 +00:00
Nate Begeman
0b10b91465 x86 vector shuffle cleanup/fixes:
1. rename the movhp patfrag to movlhps, since thats what it actually matches
2. eliminate the bogus movhps load and store patterns, they were incorrect.  The load transforms are already handled (correctly) by shufps/unpack.
3. revert a recent test change to its correct form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86415 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 23:17:15 +00:00
Jim Grosbach
31c24bf5b3 80-column cleanup of file header comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86408 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 22:00:39 +00:00
Jim Grosbach
8a5ec86a3d Support alignment specifier for NEON vld/vst instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 21:25:39 +00:00
Nick Lewycky
f80fcd00b3 Improve tail call elimination to handle the switch statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 21:10:15 +00:00
Evan Cheng
bf992817f2 t2ldrpci_pic can be used for blockaddress as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86400 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 19:40:04 +00:00
Chris Lattner
918871ee01 make instcombine only rewrite a chain of computation
(eliminating some extends) if the new type of the
computation is legal or if both the source and dest
are illegal.  This prevents instcombine from changing big
chains of computation into i64 on 32-bit targets for 
example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86398 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 19:11:46 +00:00
Chris Lattner
59a9178fbe indicate what the native integer types for the target are.
Please verify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86397 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 19:07:32 +00:00
Chris Lattner
1d95725d60 Revert r86359, it is breaking the self host on the
llvm-gcc-i386-darwin9 build bot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86391 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:59:32 +00:00
Anton Korobeynikov
06ac0820a6 First try of the post-inc operands handling... Not fully worked, though :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:15:25 +00:00
Anton Korobeynikov
6534f83ae8 Add some dummy support for post-incremented loads
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:15:06 +00:00
Anton Korobeynikov
8983da729a Add 8 bit libcalls and make use of them for msp430
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:14:39 +00:00
Anton Korobeynikov
8046ef4379 Add few pseudo-source-values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:13:57 +00:00
Anton Korobeynikov
123ed8f099 Initial support for addrmode handling. Tests by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86382 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:13:35 +00:00
Anton Korobeynikov
603fce9ebb Some preliminary variable asmprinting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86381 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:12:58 +00:00
Anton Korobeynikov
5c192fbe45 Use '.L' for global private prefix (as mspgcc)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86380 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:12:38 +00:00
Anton Korobeynikov
b7790e11c4 Drop old asmprinter stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 17:12:21 +00:00
Anton Korobeynikov
e8ea011cc7 It turns out that the testcase in question uncovered subreg-handling bug.
Add assert in asmprinter to catch such cases and xfail the tests.
PR is to be filled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86375 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 15:20:32 +00:00
Chris Lattner
e82bdc4809 add the ability for TargetData to return information about legal integer
datatypes on a given CPU.  This is intended to allow instcombine and other
transformations to avoid converting big sequences of operations to an
inconvenient width, and will help clean up after SRoA.  See also "Adding 
legal integer sizes to TargetData" on Feb 1, 2009 on llvmdev, and PR3451.

Comments welcome.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86370 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 09:35:34 +00:00
Chris Lattner
2e07494170 more cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 09:23:04 +00:00
Chris Lattner
8f9b0f6e88 add some missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86367 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 09:20:54 +00:00
Chris Lattner
b7aadfac5e rewrite TargetData to use StringRef/raw_ostream instead of thrashing std::strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 09:13:23 +00:00
Chris Lattner
d6e5763e12 prune #include / layering violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86365 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 09:07:01 +00:00
Jeffrey Yasskin
2d274412ed Make the need-stub variables accurate and consistent. In the case of
MachineRelocations, "stub" always refers to a far-call stub or a
load-a-faraway-global stub, so this patch adds "Far" to the term. (Other stubs
are used for lazy compilation and dlsym address replacement.) The variable was
also inconsistent between the positive and negative sense, and the positive
sense ("NeedStub") was more demanding than is accurate (since a nearby-enough
function can be called directly even if the platform often requires a stub).
Since the negative sense causes double-negatives, I switched to
"MayNeedFarStub" globally.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:51:52 +00:00
Eric Christopher
761411c21b Fix a couple of shuffle patterns to use movhlps instead
of movhps as the constraint.  Changes optimizations so
update testcases as appropriate as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86360 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:45:53 +00:00
Nick Lewycky
4de9b7f51f Teach dead store elimination that certain intrinsics write to memory just like
a store.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86359 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:34:40 +00:00
Chris Lattner
5729d38c81 reapply 86289, 86278, 86270, 86267, 86266 & 86264 plus a fix
(making pred factoring only happen if threading is guaranteed
to be successful).

This now survives an X86-64 bootstrap of llvm-gcc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86355 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 08:05:03 +00:00
Chris Lattner
e880efe446 Fix PR5421 by APInt'izing switch lowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86354 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 07:50:34 +00:00
Nick Lewycky
cb19438f63 Oops, FunctionContainsEscapingAllocas is really used to mean two different
things. Back out part of r86349 for a moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 07:42:38 +00:00
Nick Lewycky
0cade26132 Dust off tail recursion elimination. Fix a fixme by applying CaptureTracking
and add a .ll to demo the new capability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86349 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 07:10:01 +00:00
Mikhail Glushenkov
6533afe349 llvmc: Add a '-time' option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 06:33:58 +00:00
Mikhail Glushenkov
c11e84d3e7 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 06:33:12 +00:00
Lang Hames
d6ef7fac1a Update some globals to use ManagedStatic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86342 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 05:50:28 +00:00
Mon P Wang
bdea34807a Fix memoizing of CvtRndSatSDNode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86340 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 04:46:25 +00:00
Mon P Wang
0ace1a9f30 Fixed Overload table bug noticed by Jakob
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86332 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 04:07:33 +00:00
Evan Cheng
d457e6e9a5 Refactor code. Fix a potential missing check. Teach isIdentical() about tLDRpci_pic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86330 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 04:04:34 +00:00
Evan Cheng
78e5c1140a - Add TargetInstrInfo::isIdentical(). It's similar to MachineInstr::isIdentical
except it doesn't care if the definitions' virtual registers differ. This is
  used by machine LICM and other MI passes to perform CSE.
- Teach Thumb2InstrInfo::isIdentical() to check two t2LDRpci_pic are identical.
  Since pc relative constantpool entries are always different, this requires it
  it check if the values can actually the same.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86328 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 03:52:02 +00:00
Ted Kremenek
b6aae88ac0 Update CMake file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 03:26:59 +00:00
Kenneth Uildriks
b4997aeab7 Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 02:11:54 +00:00
Jakob Stoklund Olesen
3de23e6f6c Fix inverted conflict test in -early-coalesce.
A non-identity copy cannot be coalesced when the phi join destination register
is live at the copy site.

Also verify the condition that the PHI join source register is only used in
the PHI join. Otherwise the coalescing is invalid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 01:58:40 +00:00
Devang Patel
12d53dba36 Revert following patches to fix llvmgcc bootstrap.
86289, 86278, 86270, 86267, 86266 & 86264
Chris, please take a look.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 01:32:59 +00:00
Johnny Chen
0430152a11 My previous patch (r84124) for setting the encoding bits 4 and 7 of DPSoRegFrm
was wrong and too aggressive in the sense that DPSoRegFrm includes both constant
shifts (with Inst{4} = 0) and register controlled shifts (with Inst{4} = 1 and
Inst{7} = 0).  The 'rr' fragment of the multiclass definitions actually means
register/register with no shift, see A8-11.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86319 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 00:54:36 +00:00
Victor Hernandez
631f3c0dfd - new SROA mallocs should have the mallocs running-or'ed, not the malloc's bitcast
- fix ProcessInternalGlobal() debug output



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86317 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 00:41:19 +00:00
Victor Hernandez
4d81d97a06 Fit in 80 columns
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86316 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 00:36:50 +00:00
Jeffrey Yasskin
9beab3fe6f Avoid "ambiguous 'else'" warning from gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86314 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-07 00:26:47 +00:00