Chris Lattner [Tue, 9 Dec 2008 06:32:32 +0000 (06:32 +0000)]
newline at end of phile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60744
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Dec 2008 06:28:49 +0000 (06:28 +0000)]
use hte new pred cache to speed up the new non-local memdep
queries. This speeds up GVN using the new queries (not yet
checked in) by just over 10%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60743
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Dec 2008 06:27:07 +0000 (06:27 +0000)]
pred_iterator got a lot slower since use-diet landed. This is a
really simple cache class for these queries. Hopefully this can
be removed if pred_iterator speeds back up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60742
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 9 Dec 2008 06:12:03 +0000 (06:12 +0000)]
CellSPU:
- Fix call.ll and call_indirect.ll expected results, now that it's using a
different pre-register allocation scheduler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60741
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Tue, 9 Dec 2008 05:46:39 +0000 (05:46 +0000)]
Fix getNode to allow a vector for the shift amount for shifts of vectors.
Fix the shift amount when unrolling a vector shift into scalar shifts.
Fix problem in getShuffleScalarElt where it assumes that the input of
a bit convert must be a vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60740
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Dec 2008 04:47:21 +0000 (04:47 +0000)]
Fix a really subtle off-by-one bug that Duncan noticed with valgrind
on test/CodeGen/Generic/2007-06-06-CriticalEdgeLandingPad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60739
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 9 Dec 2008 03:37:19 +0000 (03:37 +0000)]
CellSPU:
- Change default scheduling preference to list-burr, which produces somewhat
better code than the default. Could also use list-tdrr, but need to ask
dev list about the appropriate handy mnemonic before commiting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60738
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 9 Dec 2008 02:42:50 +0000 (02:42 +0000)]
Add initial support for fast-isel of the [SU]ADDO intrinsics. It isn't
complete. For instance, it lowers the common case into this less-than-optimal
code:
addl %ecx, %eax
seto %cl
testb %cl, %cl
jne LBB1_2 ## overflow
instead of:
addl %ecx, %eax
jo LBB1_2 ## overflow
That will come in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60737
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 9 Dec 2008 02:18:52 +0000 (02:18 +0000)]
Fix the name of ISD::TokenFactor in a comment. Thanks Gabor!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60736
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 9 Dec 2008 02:10:10 +0000 (02:10 +0000)]
remove two unneeded forward declarations, pointed out by Gabor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60735
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 9 Dec 2008 00:26:46 +0000 (00:26 +0000)]
Don't charge full latency for an anti-dependence, in this simplistic
pipeline model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60733
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 23:50:06 +0000 (23:50 +0000)]
Fix a couple of mistaken switch case fall-throughs. Thanks to Bill
for spotting these!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60728
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 8 Dec 2008 23:44:46 +0000 (23:44 +0000)]
Actually test something. Use PR3170 test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60727
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 8 Dec 2008 22:44:07 +0000 (22:44 +0000)]
remove DebugIterations option. Despite the accusations,
jump threading has been shown to only expose problems not
have bugs itself. I'm sure it's completely bug free! ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60725
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 8 Dec 2008 19:29:03 +0000 (19:29 +0000)]
Re-apply 60689 now my head is screwed on right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60711
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 17:50:35 +0000 (17:50 +0000)]
Fix the top-level comments, and fix some 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60707
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 17:41:24 +0000 (17:41 +0000)]
Move the conversion to intptr_t to a separate statement. This
avoids GCC's warning even on 64-bit hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60706
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 17:38:02 +0000 (17:38 +0000)]
Revert 60689. It caused many regressions on Darwin targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60705
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 8 Dec 2008 17:28:11 +0000 (17:28 +0000)]
Use 'delete []' instead of 'delete' in OwningArray::reset().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60703
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 8 Dec 2008 17:07:24 +0000 (17:07 +0000)]
Fix spelling.
Thanks Duncan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60702
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 8 Dec 2008 17:02:37 +0000 (17:02 +0000)]
Undo previous patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60701
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 8 Dec 2008 14:10:36 +0000 (14:10 +0000)]
Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60698
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 8 Dec 2008 14:01:59 +0000 (14:01 +0000)]
Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60697
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 07:57:47 +0000 (07:57 +0000)]
Factor out the code for sign-extending/truncating gep indices
and use it in x86 address mode folding. Also, make
getRegForValue return 0 for illegal types even if it has a
ValueMap for them, because Argument values are put in the
ValueMap. This fixes PR3181.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60696
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 8 Dec 2008 07:31:50 +0000 (07:31 +0000)]
add another level of caching for non-local pointer queries, keeping
track of whether the CachedNonLocalPointerInfo for a block is specific
to a block. If so, just return it without any pred scanning. This is
good for a 6% speedup on GVN (when it uses this lookup method, which
it doesn't right now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60695
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 8 Dec 2008 07:21:39 +0000 (07:21 +0000)]
consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60694
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 8 Dec 2008 07:11:56 +0000 (07:11 +0000)]
introduce a new RoundUpAlignment helper function, use it to
remove some more 64-bit divs and rems from the StructLayout
ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60692
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 07:10:54 +0000 (07:10 +0000)]
Make ConstantAggregateZero::get return a ConstantAggregateZero*,
as suggested in PR3182.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60691
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 07:07:24 +0000 (07:07 +0000)]
Update CPP backend for PrintModulePass API changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60690
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 8 Dec 2008 06:52:43 +0000 (06:52 +0000)]
Perform cheap checks first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60689
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 8 Dec 2008 06:50:51 +0000 (06:50 +0000)]
Speed up getABITypeSize by turning a i64 mul and div into an
AND. This is speedup on any reasonable target, but particularly
on 32-bit targets where this often turns into a libcall like udivdi3.
We know that alignments are a power of two but the compiler doesn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60688
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 8 Dec 2008 06:28:54 +0000 (06:28 +0000)]
Some minor optimizations for isObjectSmallerThan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60687
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 04:54:58 +0000 (04:54 +0000)]
Clarify a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60685
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 04:54:11 +0000 (04:54 +0000)]
Move createVirtualRegister out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60684
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 04:53:23 +0000 (04:53 +0000)]
Clarify some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60683
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 04:11:50 +0000 (04:11 +0000)]
Add svn:ignore property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60682
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 8 Dec 2008 04:02:47 +0000 (04:02 +0000)]
Generalize bugpoint's concept of a "safe" backend, and add options
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.
This enables the following use cases:
- bugpoint llc against an llc command from a different build
- bugpoint llc against the same llc with different command-line options
- and more...
Also, document the existing "custom" interpreter options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60681
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 8 Dec 2008 00:45:02 +0000 (00:45 +0000)]
Fixes for Visual Studio users. Patch by OvermindDL1 on llvm-dev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60679
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 7 Dec 2008 21:33:27 +0000 (21:33 +0000)]
Use bool instead of int, now that it no longer evokes a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60678
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 7 Dec 2008 21:28:00 +0000 (21:28 +0000)]
Use intptr_t instead of unsigned here, which is more appropriate
in a really obscure way, but more importantly has the side effect
of avoiding a GCC warning in the case that IntType is bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60677
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 18:45:15 +0000 (18:45 +0000)]
add an assert. the cast<> below would catch this but a message is more
useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60674
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 18:42:51 +0000 (18:42 +0000)]
factor some code better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60673
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 18:39:13 +0000 (18:39 +0000)]
factor some code, fixing some fixme's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60672
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 18:21:37 +0000 (18:21 +0000)]
fix a typo duncan noticed!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60671
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 7 Dec 2008 17:01:16 +0000 (17:01 +0000)]
CMake: Added Tool.cpp to tools/llvmc/driver.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60670
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:48:07 +0000 (16:48 +0000)]
Man page update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60669
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:47:42 +0000 (16:47 +0000)]
Describe recent changes in the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60668
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:47:12 +0000 (16:47 +0000)]
Make 'extern' an option property.
Makes (forward) work better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60667
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:46:23 +0000 (16:46 +0000)]
Plugin updates: support more options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60666
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:45:37 +0000 (16:45 +0000)]
Join tools couldn't be used in the middle of the toolchain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60665
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:45:12 +0000 (16:45 +0000)]
Better error message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60664
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:44:47 +0000 (16:44 +0000)]
Re-apply Cedric's changes.
Use B instead of Beg (for consistency), but NodeA and NodeB instead of A
and B.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60663
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:44:15 +0000 (16:44 +0000)]
Add some clarifying comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60662
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:43:42 +0000 (16:43 +0000)]
Enable the Clang plugin by default.
This will eventually replace `ccc`. The command `llvmc -clang` now uses
the Clang toolchain instead of `llvm-gcc`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60661
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:43:17 +0000 (16:43 +0000)]
Update plugins to use (actions).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60660
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:42:47 +0000 (16:42 +0000)]
Try to guess when the auto-generated cl::Sink option should be marked 'extern'.
This would be much easier to do if the CommandLine library didn't use
global state. Global state is evil.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60659
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:42:22 +0000 (16:42 +0000)]
Add a (progn)-like construct for (actions). Implemented as a DAG list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60658
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:41:50 +0000 (16:41 +0000)]
Add tests for tblgen's LLVMC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60657
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sun, 7 Dec 2008 16:41:11 +0000 (16:41 +0000)]
Use (actions) instead of option properties, support external options.
Also includes a major refactoring. See documentation for more
information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60656
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 08:50:20 +0000 (08:50 +0000)]
add support for caching pointer dependence queries. Nothing uses this yet
so it "can't" break anything. That said, it does appear to work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60654
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 07:22:45 +0000 (07:22 +0000)]
fix a bug I introduced in simplifycfg handling single entry phi
nodes. FoldSingleEntryPHINodes deletes the PHI, so there is no
need to delete it afterward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60653
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Sun, 7 Dec 2008 05:33:18 +0000 (05:33 +0000)]
Switch to top-down mode and fix a crasher this exposed caused by an error in the
live interval updating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60652
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 7 Dec 2008 03:49:52 +0000 (03:49 +0000)]
Fix typo, psuedo -> pseudo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60651
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 02:56:57 +0000 (02:56 +0000)]
Some internal refactoring to make it easier to cache results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60650
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 02:15:47 +0000 (02:15 +0000)]
Introduce a new MemDep::getNonLocalPointerDependency
method. This will eventually take over load/store dep
queries from getNonLocalDependency. For now it works
fine, but is incredibly slow because it does no caching.
Lets not switch GVN to use it until that is fixed :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60649
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 01:50:16 +0000 (01:50 +0000)]
push the "pointer case" up the analysis stack a bit. This causes
duplication of logic (in 2 places) to determine what pointer a
load/store touches. This will be addressed in a future commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60648
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 01:21:14 +0000 (01:21 +0000)]
make clients have to know how to call getCallSiteDependencyFrom
instead of making getDependencyFrom do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60647
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:39:19 +0000 (00:39 +0000)]
rename some variables for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60644
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:38:27 +0000 (00:38 +0000)]
I love how using out of scope variables is not an error with GCC, no really I do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60643
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:35:51 +0000 (00:35 +0000)]
Rename getCallSiteDependency -> getCallSiteDependencyFrom to
emphasize the scanning and make it more similar to
getDependencyFrom
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60642
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:28:02 +0000 (00:28 +0000)]
a memdep query on a volatile load/store will always return
clobber with the current implementation. Instead of returning
a "precise clobber" just return a fuzzy one. This doesn't
matter to any clients anyway and should speed up analysis time
very very slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60641
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:25:15 +0000 (00:25 +0000)]
don't bother touching volatile stores, they will just return clobber on
everything interesting anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:21:18 +0000 (00:21 +0000)]
remove the ability to get memdep info for vaarg. I don't think the
original impl was correct and noone actually makes the query anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60639
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:16:50 +0000 (00:16 +0000)]
make getDependencyFrom private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60637
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 7 Dec 2008 00:15:10 +0000 (00:15 +0000)]
improve a note.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60636
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 6 Dec 2008 22:52:12 +0000 (22:52 +0000)]
some more PRE/GVN/DSE related notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60633
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 6 Dec 2008 22:49:05 +0000 (22:49 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60632
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 6 Dec 2008 19:28:22 +0000 (19:28 +0000)]
some random notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60624
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 6 Dec 2008 17:57:05 +0000 (17:57 +0000)]
Minor cleanup. Use dyn_cast, not isa/cast pairs. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60623
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 6 Dec 2008 02:00:55 +0000 (02:00 +0000)]
Clean up some ARM GV asm printing out; minor fixes to match what gcc does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60621
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 6 Dec 2008 00:53:22 +0000 (00:53 +0000)]
Reimplement the inner loop of DSE. It now uniformly uses getDependence(),
doesn't do its own local caching, and is slightly more aggressive about
free/store dse (see testcase). This eliminates the last external client
of MemDep::getDependenceFrom().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60619
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 23:39:24 +0000 (23:39 +0000)]
Don't use plain %x to print pointer values. I had changed it from %p
since %p isn't formatted consistently, but obviously plain %x is wrong.
PRIxPTR with a cast to uintptr_t would work here, but that requires
inconvenient build-system changes. %lu works on all current and
foreseable future hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60616
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 5 Dec 2008 22:38:21 +0000 (22:38 +0000)]
Fix test to pass on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60614
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 5 Dec 2008 21:55:35 +0000 (21:55 +0000)]
Forgot a file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60609
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Fri, 5 Dec 2008 21:47:27 +0000 (21:47 +0000)]
Make LoopStrengthReduce smarter about hoisting things out of
loops when they can be subsumed into addressing modes.
Change X86 addressing mode check to realize that
some PIC references need an extra register.
(I believe this is correct for Linux, if not, I'm sure
someone will tell me.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60608
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 21:04:20 +0000 (21:04 +0000)]
Make a few major changes to memdep and its clients:
1. Merge the 'None' result into 'Normal', making loads
and stores return their dependencies on allocations as Normal.
2. Split the 'Normal' result into 'Clobber' and 'Def' to
distinguish between the cases when memdep knows the value is
produced from when we just know if may be changed.
3. Move some of the logic for determining whether readonly calls
are CSEs into memdep instead of it being in GVN. This still
leaves verification that the arguments are hte same to GVN to
let it know about value equivalences in different contexts.
4. Change memdep's call/call dependency analysis to use
getModRefInfo(CallSite,CallSite) instead of doing something
very weak. This only really matters for things like DSA, but
someday maybe we'll have some other decent context sensitive
analyses :)
5. This reimplements the guts of memdep to handle the new results.
6. This simplifies GVN significantly:
a) readonly call CSE is slightly simpler
b) I eliminated the "getDependencyFrom" chaining for load
elimination and load CSE doesn't have to worry about
volatile (they are always clobbers) anymore.
c) GVN no longer does any 'lastLoad' caching, leaving it to
memdep.
7. The logic in DSE is simplified a bit and sped up. A potentially
unsafe case was eliminated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60607
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 20:12:48 +0000 (20:12 +0000)]
Demangle and pretty-print symbols in internal backtraces. Patch by
Wesley Peck, with a few fixes by me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60605
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 5 Dec 2008 19:38:49 +0000 (19:38 +0000)]
Revert invalid r60393. It causes llvm-gcc bootstrap fails in release builds.
See PR3160 for details
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60604
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 19:26:37 +0000 (19:26 +0000)]
This test also requires -mattr=+sse41.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60601
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 18:46:19 +0000 (18:46 +0000)]
Make it illegal to call getDependency* on non-memory instructions
like binary operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60600
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 17:41:31 +0000 (17:41 +0000)]
Reason #3 from 60595 doesn't hold true. If we can fold a PIC load from constpool into a use, the rewrite happens at time of spill (not in VirtRegMap). Later on, if the GlobalBaseReg is spilled, the spiller can see the use uses GlobalBaseReg and do the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 17:23:48 +0000 (17:23 +0000)]
Effectively undo 60461 in PIC mode which simply transform V_SET0 / V_SETALLONES into a load from constpool in order to fold into restores. This is not safe to do when PIC base is being used for a number of reasons:
1. GlobalBaseReg may have been spilled.
2. It may not be live at the use.
3. Spiller doesn't know this is happening so it won't prevent GlobalBaseReg from being spilled later (That by itself is a nasty hack. It's needed because we don't insert the reload until later).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60595
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 17:04:12 +0000 (17:04 +0000)]
Fix test/Transforms/GVN/pre-load.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60594
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 17:00:16 +0000 (17:00 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60592
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Fri, 5 Dec 2008 13:37:30 +0000 (13:37 +0000)]
The use of the construct:
for(Type1 B = ...;;) { Type2 B ; ... }
is bad: code is hard to read and VS VS don't like it (it ignore the second declaration of B).
This patch fix the problem in tablegen. Please don't write code like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60590
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 07:49:08 +0000 (07:49 +0000)]
Make IsValueFullyAvailableInBlock safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60588
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 07:11:05 +0000 (07:11 +0000)]
add a new pop_back_val method which returns the value popped. This is
heretical from a STL standpoint, but is oh-so-useful for things that
can't throw exceptions when copied, like, well, everything in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60587
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:45:42 +0000 (05:45 +0000)]
Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60586
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:35:21 +0000 (05:35 +0000)]
Update comments. There is no getArgumentAccesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60585
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:31:14 +0000 (05:31 +0000)]
Teach StackSlotColoring to update MachineMemOperands when
changing the stack slots on an instruction, to keep them
consistent with the actual memory addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60584
91177308-0d34-0410-b5e6-
96231b3b80d8