Chris Lattner [Tue, 10 Nov 2009 01:08:51 +0000 (01:08 +0000)]
add a new SimplifyInstruction API, which is like ConstantFoldInstruction,
except that the result may not be a constant. Switch jump threading to
use it so that it gets things like (X & 0) -> 0, which occur when phi preds
are deleted and the remaining phi pred was a zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86637
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 10 Nov 2009 01:02:17 +0000 (01:02 +0000)]
Fix DenseMap iterator constness.
This patch forbids implicit conversion of DenseMap::const_iterator to
DenseMap::iterator which was possible because DenseMapIterator inherited
(publicly) from DenseMapConstIterator. Conversion the other way around is now
allowed as one may expect.
The template DenseMapConstIterator is removed and the template parameter
IsConst which specifies whether the iterator is constant is added to
DenseMapIterator.
Actually IsConst parameter is not necessary since the constness can be
determined from KeyT but this is not relevant to the fix and can be addressed
later.
Patch by Victor Zverovich!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86636
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 10 Nov 2009 00:55:12 +0000 (00:55 +0000)]
factor simplification logic for AND and OR out to InstSimplify from instcombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86635
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Tue, 10 Nov 2009 00:48:55 +0000 (00:48 +0000)]
Fixed to address code review. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86634
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 10 Nov 2009 00:43:58 +0000 (00:43 +0000)]
Fix MemoryBuffer::getSTDIN to *not* return null if stdin is empty, this is a lame API.
Also, Stringrefify some more MemoryBuffer functions, and add two performance FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86630
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Tue, 10 Nov 2009 00:15:47 +0000 (00:15 +0000)]
Allow targets to specify register classes whose member registers should not be renamed to break anti-dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:55:12 +0000 (23:55 +0000)]
pull a bunch of logic out of instcombine into instsimplify for compare
simplification, this handles the foldable fcmp x,x cases among many others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86627
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 23:34:17 +0000 (23:34 +0000)]
Pass the (optional) TargetData object to ConstantFoldInstOperands
and ConstantFoldCompareInstOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:31:49 +0000 (23:31 +0000)]
inline a simple function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86625
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:28:39 +0000 (23:28 +0000)]
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
Jim Grosbach [Mon, 9 Nov 2009 23:11:45 +0000 (23:11 +0000)]
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
Mike Stump [Mon, 9 Nov 2009 23:10:49 +0000 (23:10 +0000)]
Add testcase for recent checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86620
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:06:58 +0000 (23:06 +0000)]
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
Daniel Dunbar [Mon, 9 Nov 2009 23:05:44 +0000 (23:05 +0000)]
Add StringSwitch::Cases overloads, for matching multiple strings to a single
value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86618
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 23:00:14 +0000 (23:00 +0000)]
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
Jim Grosbach [Mon, 9 Nov 2009 22:59:01 +0000 (22:59 +0000)]
Update test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86614
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 22:57:59 +0000 (22:57 +0000)]
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
Jeffrey Yasskin [Mon, 9 Nov 2009 22:34:19 +0000 (22:34 +0000)]
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
Jim Grosbach [Mon, 9 Nov 2009 22:32:40 +0000 (22:32 +0000)]
Enable dynamic stack realignment by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86604
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 22:32:36 +0000 (22:32 +0000)]
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
Jim Grosbach [Mon, 9 Nov 2009 22:32:03 +0000 (22:32 +0000)]
Set dynamic stack realignment to real values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86602
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 22:28:30 +0000 (22:28 +0000)]
Remove an unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86601
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 9 Nov 2009 22:28:21 +0000 (22:28 +0000)]
Fix for 64-bit builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86600
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 9 Nov 2009 21:45:26 +0000 (21:45 +0000)]
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
Bill Wendling [Mon, 9 Nov 2009 21:20:14 +0000 (21:20 +0000)]
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
Dan Gohman [Mon, 9 Nov 2009 19:38:45 +0000 (19:38 +0000)]
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
Dan Gohman [Mon, 9 Nov 2009 19:29:11 +0000 (19:29 +0000)]
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
David Goodwin [Mon, 9 Nov 2009 19:22:17 +0000 (19:22 +0000)]
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
Dan Gohman [Mon, 9 Nov 2009 19:01:53 +0000 (19:01 +0000)]
The inbounds keyword isn't relevant to overindexing of
static array types. Thanks to Duncan for pointing this out!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86576
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:59:22 +0000 (18:59 +0000)]
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
Dan Gohman [Mon, 9 Nov 2009 18:40:39 +0000 (18:40 +0000)]
Remove the "special case" for zero-length arrays, and rephrase this
paragraph to be more precise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86572
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:28:24 +0000 (18:28 +0000)]
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
Dan Gohman [Mon, 9 Nov 2009 18:20:38 +0000 (18:20 +0000)]
Fix an 80-column violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86567
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:19:43 +0000 (18:19 +0000)]
Minor tidiness fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86565
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 18:18:49 +0000 (18:18 +0000)]
Constify MachineFunctionAnalysis' TargetMachine reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86564
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 17:06:51 +0000 (17:06 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86558
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Nov 2009 17:06:23 +0000 (17:06 +0000)]
Suppress implicit copy ctor and copy assignment for MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86557
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 9 Nov 2009 16:38:15 +0000 (16:38 +0000)]
Use ',' separation in XFAILs, lit doesn't evaluate them as regexs (easy to add,
but might as well use the more standard syntax).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86553
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 9 Nov 2009 15:36:28 +0000 (15:36 +0000)]
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
Jim Grosbach [Mon, 9 Nov 2009 15:27:51 +0000 (15:27 +0000)]
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
Oscar Fuentes [Mon, 9 Nov 2009 15:26:40 +0000 (15:26 +0000)]
CMake: Detect gv, circo, twopi, neato, fdo, dot and dotty.
Patch by Arnaud Allard de Grandmaison!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86547
91177308-0d34-0410-b5e6-
96231b3b80d8
Xerxes Ranby [Mon, 9 Nov 2009 14:50:34 +0000 (14:50 +0000)]
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
Bruno Cardoso Lopes [Mon, 9 Nov 2009 14:27:49 +0000 (14:27 +0000)]
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
Chris Lattner [Mon, 9 Nov 2009 07:12:01 +0000 (07:12 +0000)]
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
Chris Lattner [Mon, 9 Nov 2009 07:07:56 +0000 (07:07 +0000)]
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
Evan Cheng [Mon, 9 Nov 2009 06:49:37 +0000 (06:49 +0000)]
Hide a couple of options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86522
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 9 Nov 2009 06:49:22 +0000 (06:49 +0000)]
80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86521
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 04:57:04 +0000 (04:57 +0000)]
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
Chris Lattner [Mon, 9 Nov 2009 04:47:27 +0000 (04:47 +0000)]
fix some bogus asserts, PR5049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86514
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 04:18:23 +0000 (04:18 +0000)]
random tidy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86511
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 9 Nov 2009 04:15:28 +0000 (04:15 +0000)]
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
Chris Lattner [Mon, 9 Nov 2009 01:38:00 +0000 (01:38 +0000)]
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
Owen Anderson [Mon, 9 Nov 2009 00:48:15 +0000 (00:48 +0000)]
Small cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86499
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Nov 2009 00:44:44 +0000 (00:44 +0000)]
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
Chris Lattner [Mon, 9 Nov 2009 00:41:49 +0000 (00:41 +0000)]
comment typos pointed out by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86497
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 9 Nov 2009 00:11:35 +0000 (00:11 +0000)]
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
Owen Anderson [Sun, 8 Nov 2009 22:36:55 +0000 (22:36 +0000)]
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
Daniel Dunbar [Sun, 8 Nov 2009 21:51:53 +0000 (21:51 +0000)]
Add a 'zkill' script, which is more-or-less a fancy (although not necessarily
very robust) version of killall. Because I like making shiny new wheels out of
spare parts.
For use by buildbots when people insist on making cc1 infinite loop. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86484
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Nov 2009 21:20:06 +0000 (21:20 +0000)]
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
Duncan Sands [Sun, 8 Nov 2009 20:55:48 +0000 (20:55 +0000)]
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
Chris Lattner [Sun, 8 Nov 2009 19:23:30 +0000 (19:23 +0000)]
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
Daniel Dunbar [Sun, 8 Nov 2009 17:52:47 +0000 (17:52 +0000)]
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
Anton Korobeynikov [Sun, 8 Nov 2009 15:33:12 +0000 (15:33 +0000)]
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
Anton Korobeynikov [Sun, 8 Nov 2009 15:32:44 +0000 (15:32 +0000)]
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
Anton Korobeynikov [Sun, 8 Nov 2009 15:32:28 +0000 (15:32 +0000)]
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
Anton Korobeynikov [Sun, 8 Nov 2009 15:32:11 +0000 (15:32 +0000)]
Print tab before operand of jcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86468
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 8 Nov 2009 14:27:38 +0000 (14:27 +0000)]
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
Anton Korobeynikov [Sun, 8 Nov 2009 12:58:40 +0000 (12:58 +0000)]
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
Anton Korobeynikov [Sun, 8 Nov 2009 12:14:54 +0000 (12:14 +0000)]
It is invalid to infer the value type from the result #0 of the node
since the instruction might use the other result of different type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86462
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:46:57 +0000 (09:46 +0000)]
Remove ByteswapSCANFResults, it is dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86458
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:34:14 +0000 (09:34 +0000)]
NNT: Remove DejaGNU test from NewNightlyTest reports, this aspect of testing is
handled by buildbots now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86454
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:29:52 +0000 (09:29 +0000)]
Two small fixes for site.exp for cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86453
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:08:00 +0000 (09:08 +0000)]
Derive the right paths to use during testing instead of passing it in via make.
Also, fix a few other details of the cmake test target and rename it to
'check'. CMake tests now work for the most part, but there are a handful of
failures left due to missing site.exp bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86452
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:07:51 +0000 (09:07 +0000)]
Switch to using 'lit.site.cfg.in' for the site config template for Unit tests,
and generate it for CMake builds as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86451
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:07:42 +0000 (09:07 +0000)]
Cleanup some unused RUN lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86450
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:07:33 +0000 (09:07 +0000)]
lit: Hardcode whence seek value, os.SEEK_END isn't always available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86449
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:07:26 +0000 (09:07 +0000)]
lit: Warn when a test suite contains no tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86448
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 09:07:13 +0000 (09:07 +0000)]
lit: Drop require_and_and support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86447
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 8 Nov 2009 08:49:59 +0000 (08:49 +0000)]
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
Chris Lattner [Sun, 8 Nov 2009 08:36:40 +0000 (08:36 +0000)]
another more interesting test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Nov 2009 08:30:58 +0000 (08:30 +0000)]
feature test for the new transformation in r86443
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86444
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Nov 2009 08:21:13 +0000 (08:21 +0000)]
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
Nick Lewycky [Sun, 8 Nov 2009 05:45:04 +0000 (05:45 +0000)]
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
Daniel Dunbar [Sun, 8 Nov 2009 03:43:06 +0000 (03:43 +0000)]
lit: Workaround a Win32/subprocess bug when appending.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86437
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 8 Nov 2009 03:35:19 +0000 (03:35 +0000)]
lit: Preserve the PATHEXT variable when running subcommands, this is important on Win32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86436
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 8 Nov 2009 02:32:01 +0000 (02:32 +0000)]
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
Nick Lewycky [Sun, 8 Nov 2009 02:23:15 +0000 (02:23 +0000)]
Remove test. Execution tests are slow and generally not worth it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86434
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 8 Nov 2009 01:04:45 +0000 (01:04 +0000)]
Fix run line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86429
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 8 Nov 2009 00:45:29 +0000 (00:45 +0000)]
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
Daniel Dunbar [Sun, 8 Nov 2009 00:34:22 +0000 (00:34 +0000)]
Prevent warning spew about -fPIC when using CMake generated Xcode project files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86427
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sun, 8 Nov 2009 00:27:19 +0000 (00:27 +0000)]
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
Evan Cheng [Sun, 8 Nov 2009 00:15:23 +0000 (00:15 +0000)]
Refactor code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86423
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 23:52:27 +0000 (23:52 +0000)]
Fix CMake reporting of target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86419
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 23:52:20 +0000 (23:52 +0000)]
Stop running get_target_triple more than we need to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86418
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 7 Nov 2009 23:51:55 +0000 (23:51 +0000)]
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
Daniel Dunbar [Sat, 7 Nov 2009 23:21:30 +0000 (23:21 +0000)]
Fix class -> struct tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86416
91177308-0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Sat, 7 Nov 2009 23:17:15 +0000 (23:17 +0000)]
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
Jim Grosbach [Sat, 7 Nov 2009 22:00:39 +0000 (22:00 +0000)]
80-column cleanup of file header comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86408
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 7 Nov 2009 21:25:39 +0000 (21:25 +0000)]
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
Nick Lewycky [Sat, 7 Nov 2009 21:10:15 +0000 (21:10 +0000)]
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