OSDN Git Service
Chris Lattner [Tue, 31 Mar 2009 22:13:29 +0000 (22:13 +0000)]
Make the key of ValueRankMap an AssertingVH, so that we die violently
if it dangles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68150
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Mar 2009 22:11:05 +0000 (22:11 +0000)]
Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles",
which are effectively smart pointers to Value*'s. They are both very light
weight and simple, and react to values being destroyed or being RAUW'd.
WeakVN does a best effort to follow a value around, including through RAUW
operations and will get nulled out of the value is destroyed. This is useful
for the eventual "metadata that references a value" work, because it is a
reference to a value that does not show up on its use_* list.
AssertingVH is a pointer that compiles down to a dumb raw pointer when
assertions are disabled. When enabled, it emits an assertion if the
pointed-to value is destroyed while it is still being referenced. This
is very useful for Maps and other things, and should have caught the recent
bugs in CallGraph and Reassociate, for example.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Mar 2009 21:28:39 +0000 (21:28 +0000)]
teach PointerLikeTypeTraits that all pointers to pointers may only be 4-byte aligned.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68147
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Mar 2009 20:57:23 +0000 (20:57 +0000)]
add some accessors so I can play games with DenseMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68145
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Mar 2009 20:42:45 +0000 (20:42 +0000)]
Throttle back "fold select into operand" transformation. InstCombine should not generate selects of two constants unless they are selects of 0 and 1.
e.g.
define i32 @t1(i32 %c, i32 %x) nounwind {
%t1 = icmp eq i32 %c, 0
%t2 = lshr i32 %x, 18
%t3 = select i1 %t1, i32 %t2, i32 %x
ret i32 %t3
}
was turned into
define i32 @t2(i32 %c, i32 %x) nounwind {
%t1 = icmp eq i32 %c, 0
%t2 = select i1 %t1, i32 18, i32 0
%t3 = lshr i32 %x, %t2
ret i32 %t3
}
For most targets, that means materializing two constants and then a select. e.g. On x86-64
movl %esi, %eax
shrl $18, %eax
testl %edi, %edi
cmovne %esi, %eax
ret
=>
xorl %eax, %eax
testl %edi, %edi
movl $18, %ecx
cmovne %eax, %ecx
movl %esi, %eax
shrl %cl, %eax
ret
Also, the optimizer and codegen can reason about shl / and / add, etc. by a constant. This optimization will hinder optimizations using ComputeMaskedBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68142
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Mar 2009 19:39:24 +0000 (19:39 +0000)]
Fully general expansion of integer shift of any size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68134
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Mar 2009 19:38:51 +0000 (19:38 +0000)]
i128 shift libcalls are not available on x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68133
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Mar 2009 18:39:13 +0000 (18:39 +0000)]
Reapply 68073, with fixes. EH Landing-pad basic blocks are not
entered via fall-through. Don't miss fallthroughs from blocks
terminated by conditional branches. Also, move
isOnlyReachableByFallthrough out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68129
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 31 Mar 2009 18:33:54 +0000 (18:33 +0000)]
Do not pass '-relocation-model=pic' to llc.
Does not work well on 32 bit targets. Bug reported by Albert Graef.
This patch also adds new "-Wllc,option" syntax to pass options to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68127
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 31 Mar 2009 18:31:03 +0000 (18:31 +0000)]
Stop guessing, start thinking, and make PointerUnion3::is actually be correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68126
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Mar 2009 18:20:47 +0000 (18:20 +0000)]
Add an explicit -asm-verbose to these tests, to make it
possible to run the tests with -asm-verbose defaulting
to false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68124
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 31 Mar 2009 17:36:12 +0000 (17:36 +0000)]
Update call graph after inlining invoke.
Patch by Jay Foad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68120
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 31 Mar 2009 17:30:15 +0000 (17:30 +0000)]
Add llvm::sys::getHostTriple and remove
llvm::sys::getOS{Name,Version}.
Right now the implementation just derives from LLVM_HOSTTRIPLE (which
is wrong, but it doesn't look like we have a define for the target
triple). Ideally this routine would actually be able to compute the
triple for targets we care about.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68118
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Mar 2009 16:51:18 +0000 (16:51 +0000)]
Minor top-level comment fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68113
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Mar 2009 16:48:35 +0000 (16:48 +0000)]
Tidy up some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68112
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Mar 2009 16:46:45 +0000 (16:46 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68111
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 31 Mar 2009 16:16:57 +0000 (16:16 +0000)]
remove unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68109
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Mar 2009 08:42:40 +0000 (08:42 +0000)]
Really temporarily revert r68073.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68100
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Mar 2009 08:41:31 +0000 (08:41 +0000)]
Oy! When reverting r68073, I added in experimental code. Sorry...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68099
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 31 Mar 2009 08:27:09 +0000 (08:27 +0000)]
Remove the "fast" cases for spill and restore point determination, as these were subtlely wrong in obscure cases. Patch the testcase
to account for this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68093
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 31 Mar 2009 08:26:26 +0000 (08:26 +0000)]
Revert r68073. It's causing a failure in the Apple-style builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 31 Mar 2009 07:25:22 +0000 (07:25 +0000)]
shrink subclassid, liberating some bits for future (ab)use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68087
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 31 Mar 2009 01:38:29 +0000 (01:38 +0000)]
Fix live-out reg logic to not insert over-aggressive AssertZExt
instructions. This fixes lua.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68083
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 31 Mar 2009 01:13:53 +0000 (01:13 +0000)]
X86 address mode isel tweak. If the base of the address is also used by a CopyToReg (i.e. it's likely live-out), do not fold the sub-expressions into the addressing mode to avoid computing the address twice. The CopyToReg use will be isel'ed to a LEA, re-use it for address instead.
This is not yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68082
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 31 Mar 2009 00:34:31 +0000 (00:34 +0000)]
Really, really fix PointerUnion3::is
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68079
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Mar 2009 22:55:17 +0000 (22:55 +0000)]
Except in asm-verbose mode, avoid printing labels for blocks that are
only reachable via fall-through edges. This dramatically reduces the
number of labels printed, and thus also the number of labels the
assembler must parse and remember.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68073
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Mar 2009 22:24:10 +0000 (22:24 +0000)]
Loop Index Split can eliminate a loop if it can determin if loop body is executed only once. There was a bug in determining IV based value of the iteration for which the loop body is executed. Fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68071
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 30 Mar 2009 21:44:13 +0000 (21:44 +0000)]
Make PointerUnion3::get work properly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68067
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 30 Mar 2009 21:36:47 +0000 (21:36 +0000)]
When optimzing a mul by immediate into two, the resulting mul's should get a x86 specific node to avoid dag combiner from hacking on them further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68066
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 30 Mar 2009 21:34:07 +0000 (21:34 +0000)]
Turn a 2-address instruction into a 3-address one when it's profitable even if the two-address operand is killed.
e.g.
%reg1024<def> = MOV r1
%reg1025<def> = ADD %reg1024, %reg1026
r0 = MOV %reg1025
If it's not possible / profitable to commute ADD, then turning ADD into a LEA saves a copy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Mar 2009 20:44:04 +0000 (20:44 +0000)]
update comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68060
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Mar 2009 20:32:22 +0000 (20:32 +0000)]
Balance out quote in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68059
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 30 Mar 2009 20:30:02 +0000 (20:30 +0000)]
Fix grammar-o in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68057
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Mar 2009 20:29:27 +0000 (20:29 +0000)]
add a PointerUnion3 class and generalize PointerUnion to work with
anything pointer-like, which may or may not actually be a pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Mar 2009 20:28:50 +0000 (20:28 +0000)]
fix the PointerLikeTypeTraits specialization for PointerIntPair to
allow the traits to be specified as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68055
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Mar 2009 20:06:29 +0000 (20:06 +0000)]
Constify arguments in isSuccessor and isLayoutSuccessor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68054
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 30 Mar 2009 19:59:02 +0000 (19:59 +0000)]
Update the polygen grammer to reflect that zext and sext are no longer
valid argument attributes (zeroext and signext are).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68053
91177308-0d34-0410-b5e6-
96231b3b80d8
John Mosby [Mon, 30 Mar 2009 18:56:53 +0000 (18:56 +0000)]
docs/TestingGuide.html: correction to prev. text (objdir!=srcdir required for running test-suite), removed refs to llvm-test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68051
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 30 Mar 2009 18:49:37 +0000 (18:49 +0000)]
Fix comment to match function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68050
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 30 Mar 2009 18:34:47 +0000 (18:34 +0000)]
getEntryFor() may invalidate DenseMap iterator.
Walking an invalidated iterator is not a good idea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68047
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 30 Mar 2009 17:43:04 +0000 (17:43 +0000)]
Add ccc back for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68038
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 17:38:00 +0000 (17:38 +0000)]
Clearify local/global relocations wording
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68037
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 17:37:43 +0000 (17:37 +0000)]
Fix thinko: put stuff with both global and local relocations into data.rel{.ro}, not .local
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68036
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 15:28:40 +0000 (15:28 +0000)]
Tweak test for recent relro stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68035
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 15:28:21 +0000 (15:28 +0000)]
Fix infinite looping
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68034
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 15:28:00 +0000 (15:28 +0000)]
Properly propagate Kind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68033
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 15:27:43 +0000 (15:27 +0000)]
Do not propagate ELF-specific stuff (data.rel) into other targets. This simplifies code and also ensures correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68032
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 30 Mar 2009 15:27:03 +0000 (15:27 +0000)]
Add data.rel stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 30 Mar 2009 06:34:59 +0000 (06:34 +0000)]
fix some validation problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68026
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 30 Mar 2009 06:17:34 +0000 (06:17 +0000)]
Forgot this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68025
91177308-0d34-0410-b5e6-
96231b3b80d8
John Mosby [Mon, 30 Mar 2009 04:37:51 +0000 (04:37 +0000)]
Clarify section on setting up and running test-suite
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68023
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Sun, 29 Mar 2009 20:41:38 +0000 (20:41 +0000)]
Updated the comment for isArithmeticShift() to match reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68016
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sun, 29 Mar 2009 20:08:56 +0000 (20:08 +0000)]
Constify check. This fixes PR3900.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68013
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Mar 2009 17:14:57 +0000 (17:14 +0000)]
Testcase for recent ro/relocs stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68008
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Mar 2009 17:14:35 +0000 (17:14 +0000)]
IA64 is as weird as Alpha wrt r/o relocs :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68007
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Mar 2009 17:14:14 +0000 (17:14 +0000)]
Alpha always requires global relocations to be r/w regardless of PIC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68006
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Mar 2009 17:13:49 +0000 (17:13 +0000)]
Honour relocation behaviour stuff for ro objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68005
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 29 Mar 2009 17:13:18 +0000 (17:13 +0000)]
Extend the relocation tracker handler, so we can filter on different 'kinds' of relocations required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68004
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 29 Mar 2009 13:51:06 +0000 (13:51 +0000)]
Fix PR3899: add support for extracting floats from vectors
when using -soft-float.
Based on a patch by Jakob Stoklund Olesen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67996
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 13:26:05 +0000 (13:26 +0000)]
add missing space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 07:03:30 +0000 (07:03 +0000)]
add some comments, add a dyn_cast method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67992
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 06:33:22 +0000 (06:33 +0000)]
When forming sentinels for empty/tombstone, make sure to respect the
pointer's expected number of zero low-bits.
This should fix the breakage I introduced recently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67990
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 06:32:46 +0000 (06:32 +0000)]
add helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67989
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 06:06:02 +0000 (06:06 +0000)]
Add a simple type-safe bit-mangling pointer union class. This allows
you to do things like:
/// PointerUnion<int*, float*> P;
/// P = (int*)0;
/// printf("%d %d", P.is<int*>(), P.is<float*>()); // prints "1 0"
/// X = P.get<int*>(); // ok.
/// Y = P.get<float*>(); // runtime assertion failure.
/// Z = P.get<double*>(); // does not compile.
/// P = (float*)0;
/// Y = P.get<float*>(); // ok.
/// X = P.get<int*>(); // runtime assertion failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67987
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 06:02:20 +0000 (06:02 +0000)]
Allow a specific PointerIntPair instance to use a specific Pointer trait:
some pointer instances have properties that not all of a type have.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67986
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 06:00:21 +0000 (06:00 +0000)]
Add a PointerLikeTypeTraits specialization for uintptr_t
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67985
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 05:45:43 +0000 (05:45 +0000)]
Value* only has 2 bits free as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67984
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 04:32:37 +0000 (04:32 +0000)]
Replace the PointerLikeTypeTraits::getNumLowBitsAvailable
function with a new NumLowBitsAvailable enum, which makes the
value available as an integer constant expression.
Add PointerLikeTypeTraits specializations for Instruction* and
Use** since they are only guaranteed 4-byte aligned.
Enhance PointerIntPair to know about (and enforce) the alignment
specified by PointerLikeTypeTraits. This should allow things
like PointerIntPair<PointerIntPair<void*, 1,bool>, 1, bool>
because the inner one knows that 2 low bits are free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67979
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 00:39:30 +0000 (00:39 +0000)]
rename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for
# low bits free, and move to its own header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67973
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 00:24:04 +0000 (00:24 +0000)]
now that you can put a PointerIntPair in a SmallPtrSet, remove some
hackish workarounds from memdep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67971
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 29 Mar 2009 00:18:42 +0000 (00:18 +0000)]
teach SmallPtrSet that PointerIntPair is "basically a pointer".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67970
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 19:26:55 +0000 (19:26 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67953
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 Mar 2009 19:02:18 +0000 (19:02 +0000)]
Use array_lengthof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67950
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 Mar 2009 18:55:31 +0000 (18:55 +0000)]
Have only one definition of X86AddrNumOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67949
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 28 Mar 2009 17:03:24 +0000 (17:03 +0000)]
Make code a bit less brittle by no hardcoding the number
of operands in an address in so many places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67945
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 28 Mar 2009 12:36:29 +0000 (12:36 +0000)]
Make check in CheckTailCallReturnConstraints for ignorable instructions between
a CALL and a RET node more generic. Add a test for tail calls with a void
return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67943
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 28 Mar 2009 10:24:15 +0000 (10:24 +0000)]
Update the Visual Studio docs. Patch by Stefanus!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67940
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 28 Mar 2009 08:33:27 +0000 (08:33 +0000)]
Enable tail call optimization for functions that return a struct (bug 3664) and for functions that return types that need extending (e.g i1).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67934
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 07:48:03 +0000 (07:48 +0000)]
declare everything as class to avoid angering the VC++ gods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67931
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 07:44:53 +0000 (07:44 +0000)]
add a traits class for SmallPtrSet that allows us to stick things that are
"basically pointers" into it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67930
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 28 Mar 2009 05:57:29 +0000 (05:57 +0000)]
Optimize some 64-bit multiplication by constants into two lea's or one lea + shl since imulq is slow (latency 5). e.g.
x * 40
=>
shlq $3, %rdi
leaq (%rdi,%rdi,4), %rax
This has the added benefit of allowing more multiply to be folded into addressing mode. e.g.
a * 24 + b
=>
leaq (%rdi,%rdi,2), %rax
leaq (%rsi,%rax,8), %rax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67917
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 28 Mar 2009 02:08:47 +0000 (02:08 +0000)]
move a large method out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67892
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Mar 2009 23:55:04 +0000 (23:55 +0000)]
Fix what surely must be a copy+pasto.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67881
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Mar 2009 23:51:02 +0000 (23:51 +0000)]
Initialize LiveOutInfo's APInt members to zero, as APInt's
default constructor produces an uninitialized APInt.
This fixes PR3896.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67879
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 27 Mar 2009 23:06:27 +0000 (23:06 +0000)]
remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67874
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 27 Mar 2009 22:28:33 +0000 (22:28 +0000)]
"ghostify" the ilist<Function> sentinel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67872
91177308-0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 27 Mar 2009 20:12:55 +0000 (20:12 +0000)]
Allow invertable -xno- style optins as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67862
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Mar 2009 18:37:13 +0000 (18:37 +0000)]
Revert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67856
91177308-0d34-0410-b5e6-
96231b3b80d8
Julien Lerouge [Fri, 27 Mar 2009 18:18:00 +0000 (18:18 +0000)]
Fix build on MacOS 10.4 systems (suggested by Mike Smith).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67855
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 27 Mar 2009 16:17:22 +0000 (16:17 +0000)]
Fix this test so that it doesn't spuriously fail due to some
unrelated debugging output happening to contain the string "store".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67849
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 Mar 2009 15:57:50 +0000 (15:57 +0000)]
Avoid hardcoding that X86 addresses have 4 operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67848
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 Mar 2009 15:45:05 +0000 (15:45 +0000)]
Use less hard coded constants to make the code less brittle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67846
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Mar 2009 15:29:38 +0000 (15:29 +0000)]
Reapply r66415, which was reverted in r66426 for
causing a bootstrap failure. Bootstraps here on
x86-32-linux and x86-64-linux. Requested by the
author Gabor Greif who says that a bug that might
have been causing the failure has since been fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67844
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 27 Mar 2009 15:26:30 +0000 (15:26 +0000)]
I am trying to add a segment to the X86 addresses matching to
improve TLS support (see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20090309/075220.html), but that code is VERY brittle.
This patch just makes it a bit more resistant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67843
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Mar 2009 14:56:47 +0000 (14:56 +0000)]
Revert r67798: it breaks llvm-gcc bootstrap on x86-64-linux, presumably due to
a miscompilation.
make[4]: Entering directory `gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include'
if [ ! -d "./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch" ]; then \
mkdir -p ./x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch; \
fi; \
gcc-4.2.llvm-objects/./gcc/xgcc -shared-libgcc -Bgcc-4.2.llvm-objects/./gcc -nostdinc++
-Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src -Lgcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/bin/ -B/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/gnat-llvm/x86_64-unknown-linux-gnu/include -isystem /usr/local/gnat-llvm/x86_64-unknown-linux-gnu/sys-include -Winvalid-pch -Wno-deprecated -x
c++-header -g -O2 -D_GNU_SOURCE -Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-Igcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include -Igcc-4.2.llvm/libstdc++-v3/libsupc++ -O2 -g
gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h -o x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch
In file included from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/repeat.h:247,
from gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional:1098,
from gcc-4.2.llvm/libstdc++-v3/include/precompiled/stdtr1c++.h:53:
gcc-4.2.llvm-objects/x86_64-unknown-linux-gnu/libstdc++-v3/include/tr1/functional_iterate.h:417: internal compiler error: in ggc_recalculate_in_use_p, at
ggc-page.c:1602
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.
make[4]: *** [x86_64-unknown-linux-gnu/bits/stdtr1c++.h.gch/O2g.gch] Error 1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67839
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 27 Mar 2009 12:58:29 +0000 (12:58 +0000)]
Documentation update.
Expand a bit on various '--*-graph' options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67836
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 27 Mar 2009 12:57:14 +0000 (12:57 +0000)]
-write-graph now can be used with -o.
Makes it possible to set the output file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67835
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Mar 2009 11:35:00 +0000 (11:35 +0000)]
Revert previous change in favour of an explanatory
comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67833
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 27 Mar 2009 09:41:56 +0000 (09:41 +0000)]
A Release-Asserts build makes it sound like assertions
are turned on, while in fact they are turned off. Name
this Release-NoAsserts instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67831
91177308-0d34-0410-b5e6-
96231b3b80d8
John Mosby [Fri, 27 Mar 2009 06:09:40 +0000 (06:09 +0000)]
Shrink wrapping in PEI: initial release. Finishing development, enable with --shrink-wrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67828
91177308-0d34-0410-b5e6-
96231b3b80d8