oota-llvm.git
15 years agoUpdated the comment for isArithmeticShift() to match reality.
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

15 years agoConstify check. This fixes PR3900.
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

15 years agoTestcase for recent ro/relocs stuff
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

15 years agoIA64 is as weird as Alpha wrt r/o relocs :)
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

15 years agoAlpha always requires global relocations to be r/w regardless of PIC.
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

15 years agoHonour relocation behaviour stuff for ro objects
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

15 years agoExtend the relocation tracker handler, so we can filter on different 'kinds' of reloc...
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

15 years agoFix PR3899: add support for extracting floats from vectors
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

15 years agoadd missing space.
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

15 years agoadd some comments, add a dyn_cast method.
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

15 years agoWhen forming sentinels for empty/tombstone, make sure to respect the
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

15 years agoadd helper method.
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

15 years agoAdd a simple type-safe bit-mangling pointer union class. This allows
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

15 years agoAllow a specific PointerIntPair instance to use a specific Pointer trait:
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

15 years agoAdd a PointerLikeTypeTraits specialization for uintptr_t
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

15 years agoValue* only has 2 bits free as well.
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

15 years agoReplace the PointerLikeTypeTraits::getNumLowBitsAvailable
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

15 years agorename PointerLikeTypeInto to PointerLikeTypeTraits, add trait for
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

15 years agonow that you can put a PointerIntPair in a SmallPtrSet, remove some
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

15 years agoteach SmallPtrSet that PointerIntPair is "basically a pointer".
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

15 years agoadd a note
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

15 years agoUse array_lengthof
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

15 years agoHave only one definition of X86AddrNumOperands.
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

15 years agoMake code a bit less brittle by no hardcoding the number
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

15 years agoMake check in CheckTailCallReturnConstraints for ignorable instructions between
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

15 years agoUpdate the Visual Studio docs. Patch by Stefanus!
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

15 years agoEnable tail call optimization for functions that return a struct (bug 3664) and for...
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

15 years agodeclare everything as class to avoid angering the VC++ gods.
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

15 years agoadd a traits class for SmallPtrSet that allows us to stick things that are
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

15 years agoOptimize some 64-bit multiplication by constants into two lea's or one lea + shl...
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

15 years agomove a large method out of line.
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

15 years agoFix what surely must be a copy+pasto.
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

15 years agoInitialize LiveOutInfo's APInt members to zero, as APInt's
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

15 years agoremove trailing whitespace
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

15 years ago"ghostify" the ilist<Function> sentinel
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

15 years agoAllow invertable -xno- style optins as well.
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

15 years agoRevert r67844. This fixes the llvm-gcc-4.2 build on Darwin.
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

15 years agoFix build on MacOS 10.4 systems (suggested by Mike Smith).
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

15 years agoFix this test so that it doesn't spuriously fail due to some
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

15 years agoAvoid hardcoding that X86 addresses have 4 operands.
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

15 years agoUse less hard coded constants to make the code less brittle.
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

15 years agoReapply r66415, which was reverted in r66426 for
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

15 years agoI am trying to add a segment to the X86 addresses matching to
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

15 years agoRevert r67798: it breaks llvm-gcc bootstrap on x86-64-linux, presumably due to
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

15 years agoDocumentation update.
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

15 years ago-write-graph now can be used with -o.
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

15 years agoRevert previous change in favour of an explanatory
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

15 years agoA Release-Asserts build makes it sound like assertions
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

15 years agoShrink wrapping in PEI: initial release. Finishing development, enable with --shrink...
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

15 years agoAdd a __builtin___memset_chk test.
Evan Cheng [Fri, 27 Mar 2009 02:45:14 +0000 (02:45 +0000)]
Add a __builtin___memset_chk test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67815 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOne more place to skip debug info.
Dale Johannesen [Fri, 27 Mar 2009 01:13:37 +0000 (01:13 +0000)]
One more place to skip debug info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67811 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhile hoisting an instruction, update alias info set tracker.
Devang Patel [Thu, 26 Mar 2009 23:48:52 +0000 (23:48 +0000)]
While hoisting an instruction, update alias info set tracker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67798 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate to account for driver renaming.
Mike Stump [Thu, 26 Mar 2009 23:43:14 +0000 (23:43 +0000)]
Update to account for driver renaming.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67791 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-no-implicit-float means explicit fp operations are legal.
Evan Cheng [Thu, 26 Mar 2009 23:06:32 +0000 (23:06 +0000)]
-no-implicit-float means explicit fp operations are legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -march=x86.
Evan Cheng [Thu, 26 Mar 2009 23:03:32 +0000 (23:03 +0000)]
Add -march=x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67783 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix misc. small issues with debug visualization.
Mikhail Glushenkov [Thu, 26 Mar 2009 21:23:48 +0000 (21:23 +0000)]
Fix misc. small issues with debug visualization.

Detailed bug report:
http://llvm.org/bugs/show_bug.cgi?id=3873

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67768 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotADDhirr is a thumb instruction. Do not allow this code to be reached in non-thumb...
Evan Cheng [Thu, 26 Mar 2009 19:09:01 +0000 (19:09 +0000)]
tADDhirr is a thumb instruction. Do not allow this code to be reached in non-thumb mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67765 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't assign a new stack slot if the pre-alloc splitter already assigned one.
Owen Anderson [Thu, 26 Mar 2009 18:53:38 +0000 (18:53 +0000)]
Don't assign a new stack slot if the pre-alloc splitter already assigned one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67764 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a few spelling errors and typos
Jim Grosbach [Thu, 26 Mar 2009 16:17:51 +0000 (16:17 +0000)]
fix a few spelling errors and typos

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67758 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse 'bool' for FoundRC
Jim Grosbach [Thu, 26 Mar 2009 14:45:34 +0000 (14:45 +0000)]
Use 'bool' for FoundRC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67750 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -f to RUN line.
Bill Wendling [Thu, 26 Mar 2009 06:17:54 +0000 (06:17 +0000)]
Add -f to RUN line.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67744 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPull transform from target-dependent code into target-independent code.
Bill Wendling [Thu, 26 Mar 2009 06:14:09 +0000 (06:14 +0000)]
Pull transform from target-dependent code into target-independent code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67742 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agono need for eh info
Chris Lattner [Thu, 26 Mar 2009 05:51:18 +0000 (05:51 +0000)]
no need for eh info

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67740 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix warning in -asserts mode.
Chris Lattner [Thu, 26 Mar 2009 05:29:34 +0000 (05:29 +0000)]
fix warning in -asserts mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67739 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix some warnings in release-asserts mode.
Chris Lattner [Thu, 26 Mar 2009 05:28:26 +0000 (05:28 +0000)]
fix some warnings in release-asserts mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67738 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix an apparently real bug exposed by a warning in -asserts mode.
Chris Lattner [Thu, 26 Mar 2009 05:28:14 +0000 (05:28 +0000)]
fix an apparently real bug exposed by a warning in -asserts mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67737 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix warning in -asserts build.
Chris Lattner [Thu, 26 Mar 2009 05:25:59 +0000 (05:25 +0000)]
fix warning in -asserts build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67736 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd testcase for r67728.
Bill Wendling [Thu, 26 Mar 2009 01:52:47 +0000 (01:52 +0000)]
Add testcase for r67728.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67729 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMatch this pattern so that we can generate simpler code:
Bill Wendling [Thu, 26 Mar 2009 01:47:50 +0000 (01:47 +0000)]
Match this pattern so that we can generate simpler code:

  %a = ...
  %b = and i32 %a, 2
  %c = srl i32 %b, 1
  %d = br i32 %c,

into

  %a = ...
  %b = and %a, 2
  %c = X86ISD::CMP %b, 0
  %d = X86ISD::BRCOND %c ...

This applies only when the AND constant value has one bit set and the SRL
constant is equal to the log2 of the AND constant. The back-end is smart enough
to convert the result into a TEST/JMP sequence.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67728 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDoxygen-ify comments.
Bill Wendling [Thu, 26 Mar 2009 01:46:56 +0000 (01:46 +0000)]
Doxygen-ify comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67727 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSkip debug info one more place. (This one gets
Dale Johannesen [Thu, 26 Mar 2009 01:15:07 +0000 (01:15 +0000)]
Skip debug info one more place.  (This one gets
called from llc, not opt, but it's an IR level
optimization nevertheless.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67724 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBefore deleting a basic block, give other loop passes a chance cleanup analysis value...
Devang Patel [Wed, 25 Mar 2009 23:57:48 +0000 (23:57 +0000)]
Before deleting a basic block, give other loop passes a chance cleanup analysis values, related to the instructions in the basic block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67719 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoModify getRegisterValueType() to allow for a register being in mutliple
Jim Grosbach [Wed, 25 Mar 2009 23:28:33 +0000 (23:28 +0000)]
Modify getRegisterValueType() to allow for a register being in mutliple
register classes. Before, MVT::Other would be returned anytime a reg was
in multiple register classes. Now, MVT::Other is only returned if the types
for those register classes differ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67714 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a test case for PR3779: when to promote the function return value.
Evan Cheng [Wed, 25 Mar 2009 20:30:19 +0000 (20:30 +0000)]
Add a test case for PR3779: when to promote the function return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67702 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert 67132. This is breaking some objective-c apps.
Evan Cheng [Wed, 25 Mar 2009 20:20:11 +0000 (20:20 +0000)]
Revert 67132. This is breaking some objective-c apps.
Also fixes SDISel so it *does not* force promote return value if the function is not marked signext / zeroext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67701 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOne more test.
Evan Cheng [Wed, 25 Mar 2009 17:45:18 +0000 (17:45 +0000)]
One more test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67694 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen optimizing with debug info, don't keep the
Dale Johannesen [Wed, 25 Mar 2009 17:36:08 +0000 (17:36 +0000)]
When optimizing with debug info, don't keep the
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67692 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd __builtin___memcpy_chk tests.
Evan Cheng [Wed, 25 Mar 2009 16:49:31 +0000 (16:49 +0000)]
Add __builtin___memcpy_chk tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67691 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThese tests pass on linux.
Duncan Sands [Wed, 25 Mar 2009 16:43:59 +0000 (16:43 +0000)]
These tests pass on linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67689 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a __builtin_object_size test.
Evan Cheng [Wed, 25 Mar 2009 16:29:33 +0000 (16:29 +0000)]
Add a __builtin_object_size test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67688 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug in our autoupgrade support: in an argument list to a function
Chris Lattner [Wed, 25 Mar 2009 06:36:36 +0000 (06:36 +0000)]
Fix a bug in our autoupgrade support: in an argument list to a function
call, we should treat "i64 zext" as the start of a constant expr, but
"i64 0 zext" as an argument with an obsolete attribute on it (this form
is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll).

Make the autoupgrade logic more discerning to avoid treating "i64 zext"
as an old-style attribute, causing us to reject a valid constant expr.
This fixes PR3876.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67682 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodo not rely on callee being operand 0
Gabor Greif [Wed, 25 Mar 2009 06:32:59 +0000 (06:32 +0000)]
do not rely on callee being operand 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67681 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not ignore DW_TAG_class_type!
Devang Patel [Wed, 25 Mar 2009 03:52:06 +0000 (03:52 +0000)]
Do not ignore DW_TAG_class_type!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67675 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCodeGen still defaults to non-verbose asm, but llc now overrides it and default to...
Evan Cheng [Wed, 25 Mar 2009 01:48:21 +0000 (01:48 +0000)]
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67669 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCodeGen still defaults to non-verbose asm, but llc now overrides it and default to...
Evan Cheng [Wed, 25 Mar 2009 01:47:28 +0000 (01:47 +0000)]
CodeGen still defaults to non-verbose asm, but llc now overrides it and default to verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67668 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't print global names twice with -asm-verbose.
Evan Cheng [Wed, 25 Mar 2009 01:08:42 +0000 (01:08 +0000)]
Don't print global names twice with -asm-verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67667 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r67655 and r67656, as they are breaking the build. I'm
Dan Gohman [Wed, 25 Mar 2009 00:52:11 +0000 (00:52 +0000)]
Revert r67655 and r67656, as they are breaking the build. I'm
not going to persue this further at this time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67666 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3874 by restoring a condition I removed, but making it more
Chris Lattner [Wed, 25 Mar 2009 00:28:58 +0000 (00:28 +0000)]
Fix PR3874 by restoring a condition I removed, but making it more
precise than it used to be.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67662 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not ignore DW_TAG_class_type!
Devang Patel [Wed, 25 Mar 2009 00:28:40 +0000 (00:28 +0000)]
Do not ignore DW_TAG_class_type!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67661 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.
Dan Gohman [Wed, 25 Mar 2009 00:09:05 +0000 (00:09 +0000)]
LLVM's master Makefile.common is in LLVM_SRC_ROOT, not LLVM_OBJ_ROOT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67658 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agooops, I intended to remove this, not comment it out. Thanks Duncan!
Chris Lattner [Tue, 24 Mar 2009 23:48:25 +0000 (23:48 +0000)]
oops, I intended to remove this, not comment it out.  Thanks Duncan!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67657 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate configure.
Dan Gohman [Tue, 24 Mar 2009 23:47:11 +0000 (23:47 +0000)]
Regenerate configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67656 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix paths; AutoRegen.sh changes its current working directory to be the
Dan Gohman [Tue, 24 Mar 2009 23:46:25 +0000 (23:46 +0000)]
Fix paths; AutoRegen.sh changes its current working directory to be the
autoconf directory, but these paths need to be relative to the main
source directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67655 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate for autoconf 2.6x;
Dan Gohman [Tue, 24 Mar 2009 23:45:13 +0000 (23:45 +0000)]
Update for autoconf 2.6x;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67654 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConverted a1.ll to unittests.
Misha Brukman [Tue, 24 Mar 2009 21:36:09 +0000 (21:36 +0000)]
Converted a1.ll to unittests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67652 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMention explicitly that the Ada front-end will not bootstrap.
Duncan Sands [Tue, 24 Mar 2009 21:16:39 +0000 (21:16 +0000)]
Mention explicitly that the Ada front-end will not bootstrap.
The configure line had --disable-bootstrap, but it was not
clear that this is essential.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67651 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3845: Avoid stale MachineInstruction pointer reference.
Evan Cheng [Tue, 24 Mar 2009 20:33:17 +0000 (20:33 +0000)]
Fix PR3845: Avoid stale MachineInstruction pointer reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67649 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix bash-isms.
Dan Gohman [Tue, 24 Mar 2009 20:21:37 +0000 (20:21 +0000)]
Fix bash-isms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67647 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet the svn:mime-type to text/x-sh, so that diffs work.
Dan Gohman [Tue, 24 Mar 2009 20:20:28 +0000 (20:20 +0000)]
Set the svn:mime-type to text/x-sh, so that diffs work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67646 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify logic and get rid of the assumption that operand 0 is the callee
Gabor Greif [Tue, 24 Mar 2009 19:28:39 +0000 (19:28 +0000)]
simplify logic and get rid of the assumption that operand 0 is the callee

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67642 91177308-0d34-0410-b5e6-96231b3b80d8