oota-llvm.git
15 years agoMove the memoization check for SCEVSignExtendExpr and
Dan Gohman [Mon, 13 Jul 2009 20:55:53 +0000 (20:55 +0000)]
Move the memoization check for SCEVSignExtendExpr and
SCEVZeroExtendExpr ahead of the most expensive analysis. This
speeds up analysis and helps avoid pathologically bad behavior
on the testcase in PR4534.

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

15 years agoDon't bother to call commonIntCastTransforms for bitcasts; int->int
Eli Friedman [Mon, 13 Jul 2009 20:53:00 +0000 (20:53 +0000)]
Don't bother to call commonIntCastTransforms for bitcasts; int->int
bitcasts will always be eliminated anyway.

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

15 years agoConvert SCEV from FoldingSetNode to FastFoldingSetNode. This eliminates
Dan Gohman [Mon, 13 Jul 2009 20:50:19 +0000 (20:50 +0000)]
Convert SCEV from FoldingSetNode to FastFoldingSetNode. This eliminates
a bunch of redundent code in Profile methods, and prepares for upcoming
changes to do improved memoization.

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

15 years agoDelete a spurious const.
Dan Gohman [Mon, 13 Jul 2009 20:46:11 +0000 (20:46 +0000)]
Delete a spurious const.

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

15 years agoReverted r75484. It was causing a failure with Apple-style builds.
Bill Wendling [Mon, 13 Jul 2009 20:27:41 +0000 (20:27 +0000)]
Reverted r75484. It was causing a failure with Apple-style builds.

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

15 years agoAdd infrastructure to allow post instruction printing action triggers.
David Greene [Mon, 13 Jul 2009 20:25:48 +0000 (20:25 +0000)]
Add infrastructure to allow post instruction printing action triggers.
We'll eventually use this to print comments in asm files and do other
fun things.

This adds interfaces to the AsmPrinter and changes TableGen to invoke
the postInstructionAction when appropriate.  It also add parameters to
TargetAsmInfo to control comment layout.

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

15 years agoAdd NetBSD to the Triple class, patch by Krister Walfridsson!
Chris Lattner [Mon, 13 Jul 2009 20:22:23 +0000 (20:22 +0000)]
Add NetBSD to the Triple class, patch by Krister Walfridsson!

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

15 years agoMore standard way of specifying greater than Leopard.
Bill Wendling [Mon, 13 Jul 2009 20:18:43 +0000 (20:18 +0000)]
More standard way of specifying greater than Leopard.

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

15 years agoOn greater than Leopard systems, place exception tables in the __TEXT section.
Bill Wendling [Mon, 13 Jul 2009 18:48:39 +0000 (18:48 +0000)]
On greater than Leopard systems, place exception tables in the __TEXT section.

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

15 years agoMakefile rules for generating assembly matcher.
Daniel Dunbar [Mon, 13 Jul 2009 18:35:35 +0000 (18:35 +0000)]
Makefile rules for generating assembly matcher.
 - Unused, fear not cmakers.

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

15 years agoChange printInstruction to not print a trailing newline. Value::dump
Dan Gohman [Mon, 13 Jul 2009 18:27:59 +0000 (18:27 +0000)]
Change printInstruction to not print a trailing newline. Value::dump
always adds a newline, so this fixes Value::dump printing an
extra blank line.

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

15 years agoAdd an optional optimization to FoldingSet to allow ID values to be
Dan Gohman [Mon, 13 Jul 2009 18:25:44 +0000 (18:25 +0000)]
Add an optional optimization to FoldingSet to allow ID values to be
stored rather than recomputed on each bucket traversal.

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

15 years agoFix comment typos.
Bob Wilson [Mon, 13 Jul 2009 18:11:36 +0000 (18:11 +0000)]
Fix comment typos.

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

15 years agofactor the 'optimized sort' code out into a static helper function
Chris Lattner [Mon, 13 Jul 2009 17:20:05 +0000 (17:20 +0000)]
factor the 'optimized sort' code out into a static helper function
and use it from one more place.  Patch by Jakub Staszak!

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

15 years agoMove the re-sort of invalidated NonLocalPointerDeps cache earlier
Chris Lattner [Mon, 13 Jul 2009 17:14:23 +0000 (17:14 +0000)]
Move the re-sort of invalidated NonLocalPointerDeps cache earlier
so that all code paths get it.  PR4256 was about a case where the
phi translation loop would find all preds in the Visited cache, so
it could get by without re-sorting the NonLocalPointerDeps cache.
Fix this by resorting it earlier, there is no reason not to do this.

This patch inspired by Jakub Staszak's patch.

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

15 years agoMake some more changes suggested by Chris. Manipulators go away.
David Greene [Mon, 13 Jul 2009 16:49:27 +0000 (16:49 +0000)]
Make some more changes suggested by Chris.  Manipulators go away.

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

15 years agoAdded a fixme for platform specific GetDirSeparator().
Sanjiv Gupta [Mon, 13 Jul 2009 10:58:55 +0000 (10:58 +0000)]
Added a fixme for platform specific GetDirSeparator().

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

15 years agoallow mcc16 users to specify --save-temps even though it is hidden by mcc16.
Sanjiv Gupta [Mon, 13 Jul 2009 10:56:29 +0000 (10:56 +0000)]
allow mcc16 users to specify --save-temps even though it is hidden by mcc16.
link libstd.so with llvm-ld by default with all the programs user is trying to build.

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

15 years agoMatch declaration to definition (missed a few).
Daniel Dunbar [Mon, 13 Jul 2009 06:04:06 +0000 (06:04 +0000)]
Match declaration to definition (missed a few).

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

15 years agoTweak svn:ignore
Daniel Dunbar [Mon, 13 Jul 2009 06:00:39 +0000 (06:00 +0000)]
Tweak svn:ignore

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

15 years agoMatch declaration to definition.
Daniel Dunbar [Mon, 13 Jul 2009 06:00:13 +0000 (06:00 +0000)]
Match declaration to definition.

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

15 years agoFix build on Linux.
Nick Lewycky [Mon, 13 Jul 2009 05:49:04 +0000 (05:49 +0000)]
Fix build on Linux.

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

15 years agoFix some non-sensical code.
Daniel Dunbar [Mon, 13 Jul 2009 05:29:34 +0000 (05:29 +0000)]
Fix some non-sensical code.
 - This makes it more like other similar code in Archive handling.

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

15 years agoSwitch to raw_ostream.
Daniel Dunbar [Mon, 13 Jul 2009 05:27:30 +0000 (05:27 +0000)]
Switch to raw_ostream.

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

15 years agoRemoved some junk code that snuck in to an earlier commit.
Lang Hames [Mon, 13 Jul 2009 05:01:19 +0000 (05:01 +0000)]
Removed some junk code that snuck in to an earlier commit.

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

15 years agoFix an error in ConstantRange::getSignedMax on wrapped ranges. Thanks once
Nick Lewycky [Mon, 13 Jul 2009 04:50:21 +0000 (04:50 +0000)]
Fix an error in ConstantRange::getSignedMax on wrapped ranges. Thanks once
again to Daniel Dunbar and KLEE!

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

15 years ago'i8 full-range' sign extended to i16 should equal [-128, 128) not [-128, 127).
Nick Lewycky [Mon, 13 Jul 2009 04:17:23 +0000 (04:17 +0000)]
'i8 full-range' sign extended to i16 should equal [-128, 128) not [-128, 127).
Found by Daniel Dunbar and KLEE.

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

15 years agoBegin the painful process of tearing apart the rat'ss nest that is Constants.cpp...
Owen Anderson [Mon, 13 Jul 2009 04:09:18 +0000 (04:09 +0000)]
Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.

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

15 years agoMultiply was very wrong for wrapped ranges. This supplies a half-fix that will
Nick Lewycky [Mon, 13 Jul 2009 03:27:41 +0000 (03:27 +0000)]
Multiply was very wrong for wrapped ranges. This supplies a half-fix that will
generally return Full on all wrapped inputs. "Fixes" PR4545.

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

15 years agoFix a bug summing two full sets. The overflow checking doesn't handle sets as
Nick Lewycky [Mon, 13 Jul 2009 02:49:08 +0000 (02:49 +0000)]
Fix a bug summing two full sets. The overflow checking doesn't handle sets as
large as the full set, only those one size smaller. Thanks to Daniel Dunbar
who found this bug using Klee!

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

15 years agoMatch declaration to definition.
Daniel Dunbar [Sun, 12 Jul 2009 23:50:34 +0000 (23:50 +0000)]
Match declaration to definition.

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

15 years agoMatch declaration to definition.
Daniel Dunbar [Sun, 12 Jul 2009 22:46:08 +0000 (22:46 +0000)]
Match declaration to definition.

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

15 years agoremove tests for removed intrinsics.
Chris Lattner [Sun, 12 Jul 2009 21:30:06 +0000 (21:30 +0000)]
remove tests for removed intrinsics.

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

15 years agoremove llvm.part.set.* and llvm.part.select.*. They have never been
Chris Lattner [Sun, 12 Jul 2009 21:08:53 +0000 (21:08 +0000)]
remove llvm.part.set.* and llvm.part.select.*.  They have never been
implemented in codegen, have no frontend to generate them, and are
better implemented with pattern matching (like the ppc backend does
to generate rlwimi/rlwinm etc).

PR4543

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

15 years agoUse llvm_report_error, not llvm_unreachable.
Daniel Dunbar [Sun, 12 Jul 2009 21:01:49 +0000 (21:01 +0000)]
Use llvm_report_error, not llvm_unreachable.

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

15 years agoMention that llvm_report_error() does not return.
Torok Edwin [Sun, 12 Jul 2009 21:01:44 +0000 (21:01 +0000)]
Mention that llvm_report_error() does not return.

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

15 years agoAdd an LLVM API change.
Daniel Dunbar [Sun, 12 Jul 2009 20:41:27 +0000 (20:41 +0000)]
Add an LLVM API change.

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

15 years agoImprove sys::Path::makeAbsolute on Win32.
Daniel Dunbar [Sun, 12 Jul 2009 20:23:56 +0000 (20:23 +0000)]
Improve sys::Path::makeAbsolute on Win32.
 - Patch by Viktor Kutuzov!

 - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths.

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

15 years agoFix assert(0) conversion, as suggested by Chris.
Torok Edwin [Sun, 12 Jul 2009 20:07:01 +0000 (20:07 +0000)]
Fix assert(0) conversion, as suggested by Chris.

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

15 years agoClarify a FIXME.
Daniel Dunbar [Sun, 12 Jul 2009 19:45:34 +0000 (19:45 +0000)]
Clarify a FIXME.

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

15 years ago"UNIX paths can contain non-ASCII characters, so Path::isValid() should not reject...
Chris Lattner [Sun, 12 Jul 2009 19:01:16 +0000 (19:01 +0000)]
"UNIX paths can contain non-ASCII characters, so Path::isValid() should not reject paths with such characters in them. The attached patch removes the check from Path::isValid()."

patch by Benjamin Kramer!

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

15 years agoImplement support for promotion of AND/OR/XOR on integer types.
Jakob Stoklund Olesen [Sun, 12 Jul 2009 18:10:18 +0000 (18:10 +0000)]
Implement support for promotion of AND/OR/XOR on integer types.

The blackfin processor has a legal i16 type, but only logic operations on i32.

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

15 years agoFix types in PromoteNode handling of CTPOP and friends.
Jakob Stoklund Olesen [Sun, 12 Jul 2009 17:43:20 +0000 (17:43 +0000)]
Fix types in PromoteNode handling of CTPOP and friends.

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

15 years agoAdd CCIfSRet calling convention predicate.
Jakob Stoklund Olesen [Sun, 12 Jul 2009 13:15:50 +0000 (13:15 +0000)]
Add CCIfSRet calling convention predicate.

The blackfin calling convention uses a different register for sret arguments.

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

15 years agoRemove extra \n from LLVM_UNREACHABLE calls.
Torok Edwin [Sun, 12 Jul 2009 07:15:17 +0000 (07:15 +0000)]
Remove extra \n from LLVM_UNREACHABLE calls.

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

15 years agoMake this clearer for the mathematically inclined. Thanks to Duncan Sands for
Nick Lewycky [Sun, 12 Jul 2009 05:44:08 +0000 (05:44 +0000)]
Make this clearer for the mathematically inclined. Thanks to Duncan Sands for
going over the text!

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

15 years agoImplement udiv for ConstantRanges.
Nick Lewycky [Sun, 12 Jul 2009 05:18:18 +0000 (05:18 +0000)]
Implement udiv for ConstantRanges.

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

15 years agoTemporarily revert r75408. It appears to break the Apple-style builds:
Bill Wendling [Sun, 12 Jul 2009 02:49:22 +0000 (02:49 +0000)]
Temporarily revert r75408. It appears to break the Apple-style builds:

x86_64-apple-darwin10-gcc -c   -g -O2  -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wmissing-format-attribute   -mdynamic-no-pic -DHAVE_CONFIG_H -I. -I. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/. -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../include -I./../intl -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libcpp/include  -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~dst/Developer/usr/local/include -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~obj/src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmCore.roots/llvmCore~dst/Developer/usr/local/include  -D_DEBUG  -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_VERSION_INFO='"9999"' -DBUILD_LLVM_APPLE_STYLE   /Volumes/Sandbox/Buildbot/llvm/build.llvm-gcc-x86_64-darwin10-selfhost/build/llvmgcc42.roots/llvmgcc42~obj/src/gcc/tree-ssa-alias.c -o tree-ssa-alias.o
/var/tmp//ccJQ2JBT.s:4134:Incorrect register `%rcx' used with `l' suffix
make[2]: *** [tree-ssa-live.o] Error 1
make[2]: *** Waiting for unfinished jobs....

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

15 years agoThis is not overly conservative.
Nick Lewycky [Sun, 12 Jul 2009 02:28:40 +0000 (02:28 +0000)]
This is not overly conservative.

Some = [10, 2730). A subset of that is [1024..2048) which covers every possible
10-bit pattern.

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

15 years agoImplement ConstantRange::multiply based on the code in LoopVR.
Nick Lewycky [Sun, 12 Jul 2009 02:19:05 +0000 (02:19 +0000)]
Implement ConstantRange::multiply based on the code in LoopVR.

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

15 years agoRemove check which is duplicated in
Eli Friedman [Sun, 12 Jul 2009 02:00:05 +0000 (02:00 +0000)]
Remove check which is duplicated in
InstCombiner::visitSelectInstWithICmp.

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

15 years agoeliminate MOV64r0 in favor of a Pat<> pattern. This is only nontrivial because
Chris Lattner [Sun, 12 Jul 2009 00:47:55 +0000 (00:47 +0000)]
eliminate MOV64r0 in favor of a Pat<> pattern.  This is only nontrivial because
the div lowering code explicitly references it.

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

15 years agoadd nounwind
Chris Lattner [Sun, 12 Jul 2009 00:46:16 +0000 (00:46 +0000)]
add nounwind

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

15 years agobe explicit about making comments real sentences.
Chris Lattner [Sun, 12 Jul 2009 00:10:24 +0000 (00:10 +0000)]
be explicit about making comments real sentences.

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

15 years agoDarwin prepends an _ to internal globals, Linux doesn't.
Nick Lewycky [Sat, 11 Jul 2009 23:48:59 +0000 (23:48 +0000)]
Darwin prepends an _ to internal globals, Linux doesn't.

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

15 years agofix x86-64 static codegen to materialize the address of a global with movl instead
Chris Lattner [Sat, 11 Jul 2009 23:17:29 +0000 (23:17 +0000)]
fix x86-64 static codegen to materialize the address of a global with movl instead
of lea.  It is better for code size (and presumably efficiency) to use:

  movl $foo, %eax

rather than:

  leal foo, eax

Both give a nice zero extending "move immediate" instruction, the former is just
smaller.  Note that global addresses should be handled different by the x86
backend, but I chose to follow the style already in place and add more fixme's.

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

15 years agofix a bug in my cleanup patch
Chris Lattner [Sat, 11 Jul 2009 23:07:30 +0000 (23:07 +0000)]
fix a bug in my cleanup patch

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

15 years agocomment cleanup, reduce nesting.
Chris Lattner [Sat, 11 Jul 2009 22:50:33 +0000 (22:50 +0000)]
comment cleanup, reduce nesting.

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

15 years agoremove some dead patterns, WrapperRIP doesn't exist in -static mode
Chris Lattner [Sat, 11 Jul 2009 22:47:21 +0000 (22:47 +0000)]
remove some dead patterns, WrapperRIP doesn't exist in -static mode
anymore, so these aren't needed.

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

15 years agosilence vc++ warning.
Chris Lattner [Sat, 11 Jul 2009 22:32:37 +0000 (22:32 +0000)]
silence vc++ warning.

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

15 years agosilence a vc++ warning.
Chris Lattner [Sat, 11 Jul 2009 22:31:59 +0000 (22:31 +0000)]
silence a vc++ warning.

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

15 years agothis test was incorrect for x86-64 static. It passed on darwin, because darwin
Chris Lattner [Sat, 11 Jul 2009 22:30:05 +0000 (22:30 +0000)]
this test was incorrect for x86-64 static.  It passed on darwin, because darwin
doesn't have static x86-64 mode.

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

15 years agoTweak comment.
Daniel Dunbar [Sat, 11 Jul 2009 22:06:10 +0000 (22:06 +0000)]
Tweak comment.

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

15 years agoUpdate CMakeLists.txt
Daniel Dunbar [Sat, 11 Jul 2009 21:53:14 +0000 (21:53 +0000)]
Update CMakeLists.txt

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

15 years agoTweak svn:ignore
Daniel Dunbar [Sat, 11 Jul 2009 21:40:36 +0000 (21:40 +0000)]
Tweak svn:ignore

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

15 years agoFix unused function warning.
Daniel Dunbar [Sat, 11 Jul 2009 21:24:52 +0000 (21:24 +0000)]
Fix unused function warning.

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

15 years agoRevert r75252 which was causing some crashes at compile time.
Nick Lewycky [Sat, 11 Jul 2009 20:38:25 +0000 (20:38 +0000)]
Revert r75252 which was causing some crashes at compile time.

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

15 years agoFix PR4533, which is about buggy codegen in x86-64 -static mode.
Chris Lattner [Sat, 11 Jul 2009 20:29:19 +0000 (20:29 +0000)]
Fix PR4533, which is about buggy codegen in x86-64 -static mode.
Basically, using:
  lea symbol(%rip), %rax

is not valid in -static mode, because the current RIP may not be
within 32-bits of "symbol" when an app is built partially pic and
partially static.  The fix for this is to compile it to:

  lea symbol, %rax

It would be better to codegen this as:

  movq $symbol, %rax

but that will come next.

The hard part of fixing this bug was fixing abi-isel, which was actively
testing for the wrong behavior.  Also, the RUN lines are completely impossible
to understand what they are testing.  To help with this, convert the -static
x86-64 codegen tests to use filecheck.  This is much more stable and makes it
more clear what the codegen is expected to be.

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

15 years agoFix comment.
Torok Edwin [Sat, 11 Jul 2009 20:13:58 +0000 (20:13 +0000)]
Fix comment.

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

15 years agoassert(0) -> LLVM_UNREACHABLE.
Torok Edwin [Sat, 11 Jul 2009 20:10:48 +0000 (20:10 +0000)]
assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.

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

15 years agoStub out assembly matcher (.s -> MCInst) tblgen backend.
Daniel Dunbar [Sat, 11 Jul 2009 19:39:44 +0000 (19:39 +0000)]
Stub out assembly matcher (.s -> MCInst) tblgen backend.

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

15 years agoRegenerate.
Mikhail Glushenkov [Sat, 11 Jul 2009 19:28:00 +0000 (19:28 +0000)]
Regenerate.

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

15 years agoUpdate documentation.
Mikhail Glushenkov [Sat, 11 Jul 2009 19:27:40 +0000 (19:27 +0000)]
Update documentation.

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

15 years agoDelete the temp dir even when '--temp-dir' is specified.
Mikhail Glushenkov [Sat, 11 Jul 2009 19:27:07 +0000 (19:27 +0000)]
Delete the temp dir even when '--temp-dir' is specified.

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

15 years agoFix handling of max and full set.
Nick Lewycky [Sat, 11 Jul 2009 19:22:21 +0000 (19:22 +0000)]
Fix handling of max and full set.

A full set is a constant range that represents any number. If you take the
umax of that and [5, 10) you end up with [5, INT_MAX] because the values less
than 5 would be umax's against a value which is at least 5.

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

15 years agoimprove filecheck's "scanning from here" caret position.
Chris Lattner [Sat, 11 Jul 2009 19:21:09 +0000 (19:21 +0000)]
improve filecheck's "scanning from here" caret position.

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

15 years agomake filecheck default to canonicalizing horizontal whitespace
Chris Lattner [Sat, 11 Jul 2009 18:58:15 +0000 (18:58 +0000)]
make filecheck default to canonicalizing horizontal whitespace
away.  This way you can write a space and it matches arbitrary spaces and tabs.

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

15 years agoBreak the world's largest unit test down a few logical lines. No semantic
Nick Lewycky [Sat, 11 Jul 2009 18:43:20 +0000 (18:43 +0000)]
Break the world's largest unit test down a few logical lines. No semantic
changes.

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

15 years agoErase the temp dir before starting.
Sanjiv Gupta [Sat, 11 Jul 2009 17:35:46 +0000 (17:35 +0000)]
Erase the temp dir before starting.

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

15 years agoClarify and simplify.
Nick Lewycky [Sat, 11 Jul 2009 17:04:01 +0000 (17:04 +0000)]
Clarify and simplify.

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

15 years agoDon't use a void return type with a function that returns a value.
Dan Gohman [Sat, 11 Jul 2009 13:56:14 +0000 (13:56 +0000)]
Don't use a void return type with a function that returns a value.

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

15 years agoConvert more assert(0)+abort() -> LLVM_UNREACHABLE,
Torok Edwin [Sat, 11 Jul 2009 13:10:19 +0000 (13:10 +0000)]
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().

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

15 years agoWe get the P modifier wrong in a lot of cases, just add some more rigorous testing.
Chris Lattner [Sat, 11 Jul 2009 08:30:22 +0000 (08:30 +0000)]
We get the P modifier wrong in a lot of cases, just add some more rigorous testing.
In addition to fixing this, I still need to do some more testing on darwin.

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

15 years agoDon't put IT instruction before conditional branches.
Evan Cheng [Sat, 11 Jul 2009 07:26:20 +0000 (07:26 +0000)]
Don't put IT instruction before conditional branches.

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

15 years agoSmarter isel of ldrsb / ldrsh. Only make use of these when [r,r] address is feasible.
Evan Cheng [Sat, 11 Jul 2009 07:08:13 +0000 (07:08 +0000)]
Smarter isel of ldrsb / ldrsh. Only make use of these when [r,r] address is feasible.

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

15 years agoMajor changes to Thumb (not Thumb2). Many 16-bit instructions either modifies CPSR...
Evan Cheng [Sat, 11 Jul 2009 06:43:01 +0000 (06:43 +0000)]
Major changes to Thumb (not Thumb2). Many 16-bit instructions either modifies CPSR  when they are outside the IT blocks, or they can predicated when in Thumb2. Move the implicit def of CPSR to an optional def which defaults CPSR. This allows the 's' bit to be toggled dynamically.

A side-effect of this change is asm printer is now using unified assembly. There are some minor clean ups and fixes as well.

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

15 years ago80 col violation.
Evan Cheng [Sat, 11 Jul 2009 06:37:27 +0000 (06:37 +0000)]
80 col violation.

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

15 years agoMove a method that creates constant ranges relative to another constant range
Nick Lewycky [Sat, 11 Jul 2009 06:15:39 +0000 (06:15 +0000)]
Move a method that creates constant ranges relative to another constant range
per icmp predicate out of predsimplify and into ConstantRange.

Add another utility method that determines whether one range is a subset of
another. Combine with the former to determine whether icmp pred range, range
is known to be true or not.

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

15 years agoFix up support for OptionalDefOperand when it defaults to an actual register def...
Evan Cheng [Sat, 11 Jul 2009 01:06:50 +0000 (01:06 +0000)]
Fix up support for OptionalDefOperand when it defaults to an actual register def. I need this to get ready for major Thumb1 surgery.

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

15 years agoUse CreateStackStoreLoad helper in more places.
Eli Friedman [Sat, 11 Jul 2009 00:11:07 +0000 (00:11 +0000)]
Use CreateStackStoreLoad helper in more places.

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

15 years agoTwo-address pass should use findCommutedOpIndices to determine what registers are...
Evan Cheng [Sat, 11 Jul 2009 00:04:23 +0000 (00:04 +0000)]
Two-address pass should use findCommutedOpIndices to determine what registers are commuted.

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

15 years agoUse findCommutedOpIndices to find the operands to commute.
Evan Cheng [Fri, 10 Jul 2009 23:26:12 +0000 (23:26 +0000)]
Use findCommutedOpIndices to find the operands to commute.

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

15 years agoAdd superclasses of ARM Neon quad registers. The Q2PR class contains pairs of
Bob Wilson [Fri, 10 Jul 2009 23:09:06 +0000 (23:09 +0000)]
Add superclasses of ARM Neon quad registers.  The Q2PR class contains pairs of
quad registers and the Q4PR class holds sets of 4 quad registers.

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

15 years agoAdd new vector types for 192-bit, 348-bit and 512-bit sizes.
Bob Wilson [Fri, 10 Jul 2009 23:05:09 +0000 (23:05 +0000)]
Add new vector types for 192-bit, 348-bit and 512-bit sizes.
These are needed to represent ARM Neon struct datatypes containing 2, 3 or 4
separate vectors.

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

15 years agoremove the "debug" modifier, it is only used by one instruction which can
Chris Lattner [Fri, 10 Jul 2009 22:34:11 +0000 (22:34 +0000)]
remove the "debug" modifier, it is only used by one instruction which can
never be generated.

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

15 years agoRefactor TableGen's llvm::getName to share code with llvm::getEnumName,
Bob Wilson [Fri, 10 Jul 2009 22:25:24 +0000 (22:25 +0000)]
Refactor TableGen's llvm::getName to share code with llvm::getEnumName,
since names are the same for almost all the types.

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

15 years agoadd support for .zerofill, patch by Kevin Enderby!
Chris Lattner [Fri, 10 Jul 2009 22:20:30 +0000 (22:20 +0000)]
add support for .zerofill, patch by Kevin Enderby!

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

15 years agoOops. s/#if defined(USE_OPROFILE)/#if USE_OPROFILE/. We #define
Jeffrey Yasskin [Fri, 10 Jul 2009 22:13:21 +0000 (22:13 +0000)]
Oops. s/#if defined(USE_OPROFILE)/#if USE_OPROFILE/. We #define
USE_OPROFILE to 0 on some paths through configure, which does the
wrong thing with #if defined().

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

15 years agomake pcrel and non-pcrel global printing more similar.
Chris Lattner [Fri, 10 Jul 2009 21:57:21 +0000 (21:57 +0000)]
make pcrel and non-pcrel global printing more similar.

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

15 years agoSupport remote execute for ARM.
David Goodwin [Fri, 10 Jul 2009 21:39:28 +0000 (21:39 +0000)]
Support remote execute for ARM.

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