Dan Gohman [Tue, 31 Aug 2010 20:58:44 +0000 (20:58 +0000)]
Revert r112432. It appears to be exposing a problem in the emacs build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112638
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 20:27:17 +0000 (20:27 +0000)]
Merge 2010-08-31-InfiniteRecursion.ll into crash.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112635
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 20:26:04 +0000 (20:26 +0000)]
More cleanups of my JumpThreading transforms, including extracting some duplicated code into a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112634
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Aug 2010 19:54:25 +0000 (19:54 +0000)]
Ignore unallocatable registers in RegAllocFast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112632
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 Aug 2010 19:41:03 +0000 (19:41 +0000)]
Revert r112623. It is causing self host build failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112631
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 31 Aug 2010 19:40:21 +0000 (19:40 +0000)]
Update the Ada instructions to LLVM 2.7 (from LLVM 2.5).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112630
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 19:24:27 +0000 (19:24 +0000)]
Add an RAII helper to make cleanup of the RecursionSet more fool-proof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112628
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 18:55:52 +0000 (18:55 +0000)]
Only try to clean up the current block if we changed that block already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112625
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Aug 2010 18:52:31 +0000 (18:52 +0000)]
SP relative offsets need to be adjusted by the local allocation size when
determining if they're likely to be in range of the SP when resolving
frame references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112624
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 Aug 2010 18:50:09 +0000 (18:50 +0000)]
Remember byval argument's frame index during argument lowering and use this info to emit debug info.
Fixes Radar
8367011.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112623
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Aug 2010 18:49:31 +0000 (18:49 +0000)]
this assert should just be a condition, since this function is just asking if
the offset is legally encodable, not actually trying to do the encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112622
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 18:49:12 +0000 (18:49 +0000)]
Add a test for the duplicated-conditional situation illutrated by PR5652.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112621
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 18:48:48 +0000 (18:48 +0000)]
Refactor my fix for PR5652 to terminate the predecessor lookups after the first failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112620
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Aug 2010 18:44:03 +0000 (18:44 +0000)]
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112617
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 18:16:29 +0000 (18:16 +0000)]
Manually reduce this testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112615
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Aug 2010 18:05:08 +0000 (18:05 +0000)]
merge two tests and convert to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112613
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 17:59:07 +0000 (17:59 +0000)]
Add a micro-test for the transforms I added to JumpThreading.
I have not been able to find a way to test each in isolation, for a few reasons:
1) The ability to look-through non-i1 BinaryOperator's requires the ability to look through non-constant
ICmps in order for it to ever trigger.
2) The ability to do LVI-powered PHI value determination only matters in cases that ProcessBranchOnPHI
can't handle. Since it already handles all the cases without other instructions in the def-use chain
between the PHI and the branch, it requires the ability to look through ICmps and/or BinaryOperators
as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112611
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Aug 2010 17:58:47 +0000 (17:58 +0000)]
Update test for 112609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112610
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 31 Aug 2010 17:58:19 +0000 (17:58 +0000)]
Improve virtual frame base register allocation heuristics.
1. Allocate them in the entry block of the function to enable function-wide
re-use. The instructions to create them should be re-materializable, so
there shouldn't be additional cost compared to creating them local
to the basic blocks where they are used.
2. Collect all of the frame index references for the function and sort them
by the local offset referenced. Iterate over the sorted list to
allocate the virtual base registers. This enables creation of base
registers optimized for positive-offset access of frame references.
(Note: This may be appropriate to later be a target hook to do the
sorting in a target appropriate manner. For now it's done here for
simplicity.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112609
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Aug 2010 17:56:47 +0000 (17:56 +0000)]
Speculatively revert r112433.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112608
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 31 Aug 2010 17:03:33 +0000 (17:03 +0000)]
Allow creation of SHT_NULL sections, from Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112605
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 31 Aug 2010 09:05:06 +0000 (09:05 +0000)]
Stop using the dom frontier in DwarfEHPrepare by not promoting alloca's
any more. I plan to reimplement alloca promotion using SSAUpdater later.
It looks like Bill's URoR logic really always needs domtree, so the pass
now always asks for domtree info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112597
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 31 Aug 2010 08:29:37 +0000 (08:29 +0000)]
Fix an infinite loop; merging two functions will create a new function (if the
two are weak, we make them thunks to a new strong function) so don't iterate
through the function list as we're modifying it.
Also add back the outermost loop which got removed during the cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112595
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 07:55:56 +0000 (07:55 +0000)]
Don't perform an extra traversal of the function just to do cleanup. We can safely simplify instructions after each block has been processed without worrying about iterator invalidation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112594
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Aug 2010 07:50:46 +0000 (07:50 +0000)]
- Cleanup some whitespaces.
- Convert {0,1} and friends into 0b01, which is identical and more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112593
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 07:50:31 +0000 (07:50 +0000)]
Rename test directory to reflect new pass name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112592
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 07:48:34 +0000 (07:48 +0000)]
Rename ValuePropagation to a more descriptive CorrelatedValuePropagation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112591
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 07:41:39 +0000 (07:41 +0000)]
Rename file to something more descriptive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112590
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 07:36:34 +0000 (07:36 +0000)]
More Chris-inspired JumpThreading fixes: use ConstantExpr to correctly constant-fold undef, and be more careful with its return value.
This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's
handling of and/or of i1's), but never manifested before. This patch adds a tracking set to prevent this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112589
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 31 Aug 2010 06:36:46 +0000 (06:36 +0000)]
Cleanup Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112587
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 31 Aug 2010 06:36:33 +0000 (06:36 +0000)]
System: Fix getMagicNumber on windows.
getMagicNumber was treating the _binary_ data it read in as a
null terminated string. This resulted in the std::string
calculating the length, and causing an assert in other code that
assumed that the length it passed was the same as the length of
the string it would get back.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112586
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 31 Aug 2010 06:36:22 +0000 (06:36 +0000)]
Fix spelling/typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112585
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 Aug 2010 06:12:08 +0000 (06:12 +0000)]
Offset is not always unsigned number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112584
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 Aug 2010 06:11:28 +0000 (06:11 +0000)]
Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112583
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 31 Aug 2010 05:53:05 +0000 (05:53 +0000)]
Switch to DenseSet, simplifying much more code. We now have a single iteration
where we hash, compare and fold, instead of one iteration where we build up
the hash buckets and a second one to fold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112582
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Aug 2010 04:41:06 +0000 (04:41 +0000)]
Remove r111665, which implemented store-narrowing in InstCombine. Chris discovered a miscompilation in it, and it's not easily
fixable at the optimizer level. I'll investigate reimplementing it in DAGCombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112575
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 31 Aug 2010 02:36:20 +0000 (02:36 +0000)]
zap unused method. x86 is the only user and already has a more powerfull version
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112571
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Tue, 31 Aug 2010 02:26:40 +0000 (02:26 +0000)]
Use X86ISD::MOVSS and MOVSD to represent the movl mask pattern, also fix the handling of those nodes when seeking for scalars inside vector shuffles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112570
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 31 Aug 2010 01:28:42 +0000 (01:28 +0000)]
Rewrite slightly so we can expand for floating point types easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112568
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Aug 2010 01:27:49 +0000 (01:27 +0000)]
Add experimental -disable-physical-join command line option.
Eventually, we want to disable physreg coalescing completely, and let the
register allocator do its job using hints.
This option makes it possible to measure the impact of disabling physreg
coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112567
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 23:59:30 +0000 (23:59 +0000)]
Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112560
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Aug 2010 23:48:26 +0000 (23:48 +0000)]
If we have an unhandled type then assert, we shouldn't get here for
things we can't handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112559
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Aug 2010 23:47:24 +0000 (23:47 +0000)]
Update the descriptions of NoModRef and ModRef to be consistent
with the descriptions of Mod and Ref.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112557
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Aug 2010 23:41:49 +0000 (23:41 +0000)]
Fix borken test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112555
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 23:37:41 +0000 (23:37 +0000)]
Combine these two tests, and make sure there's a newline at the end of the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112554
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 23:34:17 +0000 (23:34 +0000)]
Cleanups suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112553
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 23:22:36 +0000 (23:22 +0000)]
Re-apply r112539, being more careful to respect the return values of the constant folding methods. Additionally,
use the ConstantExpr::get*() methods to simplify some constant folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112550
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Aug 2010 22:50:36 +0000 (22:50 +0000)]
Expand MOVi32imm in ARM mode after regalloc. This provides
scheduling opportunities (extra instruction can go in between
MOVT / MOVW pair removing the stall).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112546
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 22:45:55 +0000 (22:45 +0000)]
Add statistics to evaluate this pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112545
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 22:33:41 +0000 (22:33 +0000)]
Revert r112539. It accidentally introduced a miscompilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112543
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 22:07:52 +0000 (22:07 +0000)]
Fixes and cleanups pointed out by Chris. In general, be careful to handle 0 results from ComputeValueKnownInPredecessors
(indicating undef), and re-use existing constant folding APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112539
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Aug 2010 22:05:23 +0000 (22:05 +0000)]
Use the existing T2I_bin_s_irs pattern instead of creating T2I_bin_sw_irs, which
is meant to do exactly the same thing. Thanks to Jim Grosbach for pointing this
out! :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112538
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 30 Aug 2010 21:54:03 +0000 (21:54 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112535
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Aug 2010 21:52:40 +0000 (21:52 +0000)]
Remember to clear the shadow kill flag at the same time as clearing the real
kill flag.
This could cause duplicate kill flags when the same register was used twice in a
continuous sequence of STRs.
There is no small test case. <rdar://problem/
8218046>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112534
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Aug 2010 21:41:20 +0000 (21:41 +0000)]
Fix llc to run the verifier once, not twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112532
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 21:34:26 +0000 (21:34 +0000)]
Remove this from the main tree. I'll host it out of tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112529
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Aug 2010 21:18:41 +0000 (21:18 +0000)]
Add comments explaining why it's not necessary to include the
is-function-local flag in metadata uniquing bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112528
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 30 Aug 2010 20:02:30 +0000 (20:02 +0000)]
Remove NEON vmovn intrinsic, replacing it with vector truncate operations.
Auto-upgrade the old intrinsic and update tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112507
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 30 Aug 2010 19:49:58 +0000 (19:49 +0000)]
Make ARM add rN, sp, #imm instructions rematerializable. That's how the address of locals is calculated, so this should
help relieve register pressure a bit. Recalculating the local address is
almost always going to be better than spilling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112503
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Aug 2010 18:34:48 +0000 (18:34 +0000)]
Fix LLVM target initialization to deal with sociopathic outside projects
that like to randomly define things like "X86", regenerate autoconf bits
and update cmake.
Fixes PR7852.
Patch by Xerxes RĂ„nby!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112499
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Aug 2010 18:31:44 +0000 (18:31 +0000)]
Kill a couple of unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112498
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Aug 2010 18:16:27 +0000 (18:16 +0000)]
nuke dead ivar which was supposed to be committed with r112496
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112497
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Aug 2010 18:12:35 +0000 (18:12 +0000)]
two changes:
1) nuke ConstDataCoalSection, which is dead.
2) revise my previous patch for rdar://
8018335,
which was completely wrong. Specifically, it doesn't
make sense to mark __TEXT,__const_coal as PURE_INSTRUCTIONS,
because it is for readonly data. templates (it turns out)
go to const_coal_nt. The real fix for rdar://
8018335 was
to give ConstTextCoalSection a section kind of ReadOnly
instead of Text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112496
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 30 Aug 2010 18:10:48 +0000 (18:10 +0000)]
When expanding NEON VST pseudo instructions, if the original super-register
operand is killed, add it to the expanded instruction as an implicit kill
operand instead of marking the individual subregs with kill flags. This
should work better in general and also handles the case for VST3 where one
of the subregs was not referenced in the expanded instruction and so was
not marked killed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112494
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Aug 2010 17:20:17 +0000 (17:20 +0000)]
MCELF: The value of all common symbols is the offset from the start of the section. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112492
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 17:03:45 +0000 (17:03 +0000)]
It is possible to try to merge a not-constant with a constantrage, when dealing with ptrtoint ConstantExpr's.
Unfortunately, the only testcase I have for this is huge and doesn't reduce well because the error is
sensitive to iteration-order issues, since the problem only occurs when merging values in a particular order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112489
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 30 Aug 2010 15:34:08 +0000 (15:34 +0000)]
Partially revert r112480. Caused test failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112486
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 30 Aug 2010 15:19:56 +0000 (15:19 +0000)]
coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112485
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 30 Aug 2010 15:08:02 +0000 (15:08 +0000)]
Fix constant-over-index.ll test on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112483
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 30 Aug 2010 14:49:00 +0000 (14:49 +0000)]
Test: Fix LLVMC tests on CMake.
The CMake build didn't define TEST_COMPILE_CXX_CMD. The tests assumed gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112480
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Aug 2010 14:46:53 +0000 (14:46 +0000)]
Don't print two "0x" prefixes. Use a raw_ostream overload instead of llvm::format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112479
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 30 Aug 2010 14:00:29 +0000 (14:00 +0000)]
EE/JIT: Do not invoke parent's ctors/dtors from main()! (PR3897)
On Mingw and Cygwin, the symbol __main is resolved to
callee's(eg. tools/lli) one, to invoke wrong duplicated ctors
(and register wrong callee's dtors with atexit(3)).
We expect, by callee, ExecutionEngine::runStaticConstructorsDestructors()
is called before ExecutionEngine::runFunctionAsMain() is called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112474
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Aug 2010 12:00:16 +0000 (12:00 +0000)]
The value is offset from the start of the section for non-common symbols, submitted by Jordan Gordeev.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112473
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Aug 2010 11:59:29 +0000 (11:59 +0000)]
Index external symbols by symbol table instead of parent section, by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112472
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 30 Aug 2010 11:56:55 +0000 (11:56 +0000)]
Mark all common symbols external. This is not exactly correct but it lets apps
link for now and can be adjusted later. Patch by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112471
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 30 Aug 2010 10:57:54 +0000 (10:57 +0000)]
Remove a hack that tries to understand incorrect triples from the
Triple class constructor. Only valid triples should now be used
inside LLVM - front-ends are now responsable for rejecting or
correcting invalid target triples. The Triple::normalize method
can be used to straighten out funky triples provided by users.
Give this a whirl through the buildbots to see if I caught all
places where triples enter LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112470
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 30 Aug 2010 10:48:29 +0000 (10:48 +0000)]
Correct bogus module triple specifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112469
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 30 Aug 2010 07:33:39 +0000 (07:33 +0000)]
Add a new example to the LLVM distribution: a trace-based Brainfuck compiler that uses LLVM as its code generator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 30 Aug 2010 07:25:54 +0000 (07:25 +0000)]
Attempt to remove the MSIL backend from CMake as well based on Chris's r112375.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112464
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Aug 2010 04:36:50 +0000 (04:36 +0000)]
Revert r112461. It was failing on PPC...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112463
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Aug 2010 01:47:35 +0000 (01:47 +0000)]
Create Thumb2sI_cpsr and T2sI_cpsr. These new classes indicate that CPSR is the
optional modified register (instead of reg0). Along with r112461 it will make
sure that the optional define of CPSR is marked as "def" and will thus mark the
instructions using these classes (t2ANDS*) as setting the 's' flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112462
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Aug 2010 01:36:05 +0000 (01:36 +0000)]
When adding a register, we should mark it as "def" if it can optionally define
said (physical) register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112461
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 22:28:18 +0000 (22:28 +0000)]
revert 112457, it looks like it broke selfhost.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112459
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 19:54:28 +0000 (19:54 +0000)]
rewrite DwarfEHPrepare to use SSAUpdater to promote its allocas
instead of PromoteMemToReg. This allows it to stop using DF and DT,
eliminating a computation of DT and DF from clang -O3. Clang is now
down to 2 runs of DomFrontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112457
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 19:28:28 +0000 (19:28 +0000)]
inline function into its only caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112455
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 18:42:23 +0000 (18:42 +0000)]
two changes: 1) make AliasSet hold the list of call sites with an
assertingvh so we get a violent explosion if the pointer dangles.
2) Fix AliasSetTracker::deleteValue to remove call sites with
by-pointer comparisons instead of by-alias queries. Using
findAliasSetForCallSite can cause alias sets to get merged
when they shouldn't, and can also miss alias sets when the
call is readonly.
#2 fixes PR6889, which only repros with a .c file :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112452
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 18:22:25 +0000 (18:22 +0000)]
LICM does get dead instructions input to it. Instead of sinking them
out of loops, just delete them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112451
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 18:18:40 +0000 (18:18 +0000)]
use moveBefore instead of remove+insert, it avoids some
symtab manipulation, so its faster (in addition to being
more elegant)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112450
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 18:11:16 +0000 (18:11 +0000)]
revert 112448 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 18:03:33 +0000 (18:03 +0000)]
optimize LICM::hoist to use moveBefore. Correct its updating
of AST to remove the hoisted instruction from the AST, since it
is no longer in the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112448
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 18:00:00 +0000 (18:00 +0000)]
fix some bugs (found by inspection) where LICM would not update
LICM correctly. When sinking an instruction, it should not add
entries for the sunk instruction to the AST, it should remove
the entry for the sunk instruction. The blocks being sunk to
are not in the loop, so their instructions shouldn't be in the
AST (yet)!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112447
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 17:46:00 +0000 (17:46 +0000)]
rework the ownership of subloop alias information: instead of
keeping them around until the pass is destroyed, keep them
around a) just when useful (not for outer loops) and b) destroy
them right after we use them. This should reduce memory use
and fixes potential bugs where a loop is deleted and another
loop gets allocated to the same address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112446
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 17:23:19 +0000 (17:23 +0000)]
apparently unswitch had the same "Feature". Stop its
claims that it preserves domfrontier if it doesn't really.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112445
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Aug 2010 17:21:35 +0000 (17:21 +0000)]
now that loop passes don't use DomFrontier, there is no reason
for the unroller to pretend it supports updating it. It still
has a horrible hack for DomTree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112444
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 29 Aug 2010 16:40:03 +0000 (16:40 +0000)]
Make IVUsers iterative instead of recursive.
This has the side effect of reversing the order of most of
IVUser's results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112442
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 29 Aug 2010 16:39:22 +0000 (16:39 +0000)]
Optionally rerun dedicated-register filtering after applying
other filtering techniques, as those may allow it to filter
out more obviously unprofitable candidates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112441
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 29 Aug 2010 16:32:54 +0000 (16:32 +0000)]
Fix several areas in LSR to do a better job keeping the main
LSRInstance data structures up to date. This fixes some
pessimizations caused by stale data which will be exposed
in an upcoming change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112440
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 29 Aug 2010 16:09:42 +0000 (16:09 +0000)]
Refactor the three main groups of code out of
NarrowSearchSpaceUsingHeuristics into separate functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112439
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 29 Aug 2010 15:30:29 +0000 (15:30 +0000)]
Delete a bogus check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112438
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 29 Aug 2010 15:27:08 +0000 (15:27 +0000)]
Add some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112437
91177308-0d34-0410-b5e6-
96231b3b80d8