oota-llvm.git
15 years agoFix stylistic and documentation problems in ValueMap found by Nick Lewycky and
Jeffrey Yasskin [Fri, 23 Oct 2009 20:54:00 +0000 (20:54 +0000)]
Fix stylistic and documentation problems in ValueMap found by Nick Lewycky and
Evan Cheng.

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

15 years agoAPInt-ify the gep scaling code, so that it correctly handles the case where
Dan Gohman [Fri, 23 Oct 2009 17:57:43 +0000 (17:57 +0000)]
APInt-ify the gep scaling code, so that it correctly handles the case where
the scale overflows pointer-sized arithmetic. This fixes PR5281.

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

15 years agoMake LoopDeletion check the maximum backedge taken count, rather than the
Dan Gohman [Fri, 23 Oct 2009 17:10:01 +0000 (17:10 +0000)]
Make LoopDeletion check the maximum backedge taken count, rather than the
exact backedge taken count, when checking for infinite loops. This allows
it to delete loops with multiple exit conditions.

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

15 years agosome stuff is done, we still have constantexpr simplification to do.
Chris Lattner [Fri, 23 Oct 2009 07:00:55 +0000 (07:00 +0000)]
some stuff is done, we still have constantexpr simplification to do.

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

15 years agoteach libanalysis to simplify vector loads with bitcast sources. This
Chris Lattner [Fri, 23 Oct 2009 06:57:37 +0000 (06:57 +0000)]
teach libanalysis to simplify vector loads with bitcast sources.  This
implements something out of Target/README.txt producing:

_foo:                                                       ## @foo
movl 4(%esp), %eax
movapd LCPI1_0, %xmm0
movapd %xmm0, (%eax)
ret $4

instead of:

_foo:                                                       ## @foo
movl 4(%esp), %eax
movapd _b, %xmm0
mulpd LCPI1_0, %xmm0
addpd _a, %xmm0
movapd %xmm0, (%eax)
ret $4

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

15 years agoenhance FoldReinterpretLoadFromConstPtr to handle loads of up to 32
Chris Lattner [Fri, 23 Oct 2009 06:50:36 +0000 (06:50 +0000)]
enhance FoldReinterpretLoadFromConstPtr to handle loads of up to 32
bytes (i256).

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

15 years agoteach libanalysis to fold int and fp loads from almost arbitrary
Chris Lattner [Fri, 23 Oct 2009 06:23:49 +0000 (06:23 +0000)]
teach libanalysis to fold int and fp loads from almost arbitrary
non-type-safe constant initializers.  This sort of thing happens
quite a bit for 4-byte loads out of string constants, unions,
bitfields, and an interesting endianness check from sqlite, which
is something like this:

const int sqlite3one = 1;
# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)

all of these macros now constant fold away.

This implements PR3152 and is based on a patch started by Eli, but heavily
modified and extended.

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

15 years agoAdd 2.6 release note.
Tanya Lattner [Fri, 23 Oct 2009 06:20:06 +0000 (06:20 +0000)]
Add 2.6 release note.

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

15 years agoUpdate tests for 84931.
Evan Cheng [Fri, 23 Oct 2009 05:58:34 +0000 (05:58 +0000)]
Update tests for 84931.

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

15 years agoX86 needs critical path anti-dependency breaking.
Evan Cheng [Fri, 23 Oct 2009 05:57:35 +0000 (05:57 +0000)]
X86 needs critical path anti-dependency breaking.

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

15 years agoCommit fixes for half precision I noted in review, so
Dale Johannesen [Fri, 23 Oct 2009 04:02:51 +0000 (04:02 +0000)]
Commit fixes for half precision I noted in review, so
they don't get lost; I don't think the originator has
write access.

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

15 years agoThis is passing on Darwin PPC.
Bill Wendling [Fri, 23 Oct 2009 01:37:01 +0000 (01:37 +0000)]
This is passing on Darwin PPC.

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

15 years agoMinor code cleanup.
Victor Hernandez [Fri, 23 Oct 2009 00:59:10 +0000 (00:59 +0000)]
Minor code cleanup.

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

15 years agoNeuter stack protectors by only checking character arrays. This is what GCC
Bill Wendling [Fri, 23 Oct 2009 00:01:05 +0000 (00:01 +0000)]
Neuter stack protectors by only checking character arrays. This is what GCC
does.

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

15 years agoAllow the target to select the level of anti-dependence breaking that should be perfo...
David Goodwin [Thu, 22 Oct 2009 23:19:17 +0000 (23:19 +0000)]
Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.

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

15 years agoUse 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it...
Ted Kremenek [Thu, 22 Oct 2009 22:16:17 +0000 (22:16 +0000)]
Use 'waitpid' instead of 'wait'.  Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context.

This address: PR 5277 (Program::Wait is unsafe to call from multiple threads).

Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into
another solution.

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

15 years agoTry r84890 again (adding ValueMap<>), now that I've tested the compile on
Jeffrey Yasskin [Thu, 22 Oct 2009 22:11:22 +0000 (22:11 +0000)]
Try r84890 again (adding ValueMap<>), now that I've tested the compile on
gcc-4.4.

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

15 years agosize_t, not unsigned here to silence a warning.
Eric Christopher [Thu, 22 Oct 2009 22:06:50 +0000 (22:06 +0000)]
size_t, not unsigned here to silence a warning.

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

15 years agoRandom include cleanup.
Benjamin Kramer [Thu, 22 Oct 2009 21:49:41 +0000 (21:49 +0000)]
Random include cleanup.

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

15 years agoFix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.
Jeffrey Yasskin [Thu, 22 Oct 2009 20:57:35 +0000 (20:57 +0000)]
Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.

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

15 years agoTidying up some code and comments. No functionality change.
Bill Wendling [Thu, 22 Oct 2009 20:48:59 +0000 (20:48 +0000)]
Tidying up some code and comments. No functionality change.

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

15 years agoRevert r84890, which broke the linux build.
Jeffrey Yasskin [Thu, 22 Oct 2009 20:23:43 +0000 (20:23 +0000)]
Revert r84890, which broke the linux build.

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

15 years agoAdd a ValueMap<ValueOrSubclass*, T> type. ValueMap<Value*, T> is safe to use
Jeffrey Yasskin [Thu, 22 Oct 2009 20:10:20 +0000 (20:10 +0000)]
Add a ValueMap<ValueOrSubclass*, T> type.  ValueMap<Value*, T> is safe to use
even when keys get RAUWed and deleted during its lifetime. By default the keys
act like WeakVHs, but users can pass a third template parameter to configure
how updates work and whether to do anything beyond updating the map on each
action.

It's also possible to automatically acquire a lock around ValueMap updates
triggered by RAUWs and deletes, to support the ExecutionEngine.

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

15 years agoHide MetadataContext implementation details.
Devang Patel [Thu, 22 Oct 2009 19:36:54 +0000 (19:36 +0000)]
Hide MetadataContext implementation details.

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

15 years agoFix getMDs() interface such that it does not expose implementation details.
Devang Patel [Thu, 22 Oct 2009 18:55:16 +0000 (18:55 +0000)]
Fix getMDs() interface such that it does not expose implementation details.

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

15 years agoUsing TrackingVH instead of WeakVH or WeakMetadataVH.
Devang Patel [Thu, 22 Oct 2009 18:25:28 +0000 (18:25 +0000)]
Using TrackingVH instead of WeakVH or WeakMetadataVH.

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

15 years agoSort handler names to ensure deterministic behavior.
Devang Patel [Thu, 22 Oct 2009 17:40:37 +0000 (17:40 +0000)]
Sort handler names to ensure deterministic behavior.

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

15 years agoTrying again to tweak the top-level Makefile to facilitate an Apple-style build.
Stuart Hastings [Thu, 22 Oct 2009 17:22:37 +0000 (17:22 +0000)]
Trying again to tweak the top-level Makefile to facilitate an Apple-style build.
Now with Clang-compatibility.

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

15 years agoRevert 84843. Evan, this was breaking some of the if-conversion tests.
Bob Wilson [Thu, 22 Oct 2009 16:52:21 +0000 (16:52 +0000)]
Revert 84843.  Evan, this was breaking some of the if-conversion tests.

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

15 years agoInclude config.h in order to have HAVE_STDINT_H be defined.
Duncan Sands [Thu, 22 Oct 2009 16:03:32 +0000 (16:03 +0000)]
Include config.h in order to have HAVE_STDINT_H be defined.
In the latest binutils the plugin-api.h needs this - without
it the LLVM gold plugin fails to compile.

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

15 years agoVerify that the function and exception table have been allocated
Nicolas Geoffray [Thu, 22 Oct 2009 14:35:57 +0000 (14:35 +0000)]
Verify that the function and exception table have been allocated
before freeing them.

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

15 years agoCheck that accessing a struct field that occurs before the start
Duncan Sands [Thu, 22 Oct 2009 12:53:25 +0000 (12:53 +0000)]
Check that accessing a struct field that occurs before the start
of the struct (!) works correctly.

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

15 years agoTest handling of record fields with negative offsets.
Duncan Sands [Thu, 22 Oct 2009 10:02:10 +0000 (10:02 +0000)]
Test handling of record fields with negative offsets.

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

15 years agoShift art to the right to keep GCC from complaining about multi-line comments.
Benjamin Kramer [Thu, 22 Oct 2009 09:28:49 +0000 (09:28 +0000)]
Shift art to the right to keep GCC from complaining about multi-line comments.

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

15 years agoMove if-conversion before post-regalloc scheduling so the predicated instruction...
Evan Cheng [Thu, 22 Oct 2009 06:48:32 +0000 (06:48 +0000)]
Move if-conversion before post-regalloc scheduling so the predicated instruction get scheduled properly.

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

15 years agoLoad / store multiple was missing opportunites when the load / store bundles are...
Evan Cheng [Thu, 22 Oct 2009 06:47:35 +0000 (06:47 +0000)]
Load / store multiple was missing opportunites when the load / store bundles are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit.

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

15 years agomove another load optimization from instcombine -> libanalysis.
Chris Lattner [Thu, 22 Oct 2009 06:44:07 +0000 (06:44 +0000)]
move another load optimization from instcombine -> libanalysis.

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

15 years agomove 'loading i32 from string' optimization from instcombine
Chris Lattner [Thu, 22 Oct 2009 06:38:35 +0000 (06:38 +0000)]
move 'loading i32 from string' optimization from instcombine
to libanalysis.  Instcombine shrinking... does this even
make sense???

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

15 years agoMove some constant folding logic for loads out of instcombine into
Chris Lattner [Thu, 22 Oct 2009 06:25:11 +0000 (06:25 +0000)]
Move some constant folding logic for loads out of instcombine into
Analysis/ConstantFolding.cpp.  This doesn't change the behavior of
instcombine but makes other clients of ConstantFoldInstruction
able to handle loads.  This was partially extracted from Eli's patch
in PR3152.

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

15 years agoTrim more includes.
Evan Cheng [Thu, 22 Oct 2009 05:11:00 +0000 (05:11 +0000)]
Trim more includes.

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

15 years agoTrim include.
Evan Cheng [Thu, 22 Oct 2009 05:08:49 +0000 (05:08 +0000)]
Trim include.

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

15 years agotestcase for PR4678 & rdar://7309675
Chris Lattner [Thu, 22 Oct 2009 04:47:09 +0000 (04:47 +0000)]
testcase for PR4678 & rdar://7309675

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

15 years agoForgot a declaration.
Mikhail Glushenkov [Thu, 22 Oct 2009 04:15:24 +0000 (04:15 +0000)]
Forgot a declaration.

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

15 years agoMake 'unset_option' work on list options.
Mikhail Glushenkov [Thu, 22 Oct 2009 04:15:07 +0000 (04:15 +0000)]
Make 'unset_option' work on list options.

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

15 years agofix warning.
Chris Lattner [Thu, 22 Oct 2009 03:42:27 +0000 (03:42 +0000)]
fix warning.

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

15 years agoFix getHandlerNames() interface. Now it populate clinet supplied small vector with...
Devang Patel [Thu, 22 Oct 2009 01:01:24 +0000 (01:01 +0000)]
Fix getHandlerNames() interface. Now it populate clinet supplied small vector with handler names.

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

15 years agollvm-ld doesn't throw.
Chris Lattner [Thu, 22 Oct 2009 00:52:28 +0000 (00:52 +0000)]
llvm-ld doesn't throw.

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

15 years agothis doesn't use EH either.
Chris Lattner [Thu, 22 Oct 2009 00:50:24 +0000 (00:50 +0000)]
this doesn't use EH either.

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

15 years agonothing opt uses can throw, remove the try block and -fexceptions when
Chris Lattner [Thu, 22 Oct 2009 00:46:41 +0000 (00:46 +0000)]
nothing opt uses can throw, remove the try block and -fexceptions when
building opt.

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

15 years agoAdd some command line options for twiddling the default data layout
Chris Lattner [Thu, 22 Oct 2009 00:44:10 +0000 (00:44 +0000)]
Add some command line options for twiddling the default data layout
used by opt when a module doesn't specify one.  Patch from Kenneth Uildriks!

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

15 years agoDon't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
Evan Cheng [Thu, 22 Oct 2009 00:40:00 +0000 (00:40 +0000)]
Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.

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

15 years agoUse StringRef to construct MDString.
Devang Patel [Thu, 22 Oct 2009 00:22:05 +0000 (00:22 +0000)]
Use StringRef to construct MDString.

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

15 years agofix PR5262.
Chris Lattner [Thu, 22 Oct 2009 00:17:26 +0000 (00:17 +0000)]
fix PR5262.

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

15 years agoUse special DAG-to-DAG preprocessing to allow mem-mem instructions to be selected.
Anton Korobeynikov [Thu, 22 Oct 2009 00:16:00 +0000 (00:16 +0000)]
Use special DAG-to-DAG preprocessing to allow mem-mem instructions to be selected.
Yay for ASCII graphics!

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

15 years agoFix null pointer dereference.
Anton Korobeynikov [Thu, 22 Oct 2009 00:15:17 +0000 (00:15 +0000)]
Fix null pointer dereference.

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

15 years agoRemove meaningless const.
Devang Patel [Thu, 22 Oct 2009 00:10:15 +0000 (00:10 +0000)]
Remove meaningless const.
Pass StringRef by value.

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

15 years agoRevert the main portion of r31856. It was causing BranchFolding
Dan Gohman [Thu, 22 Oct 2009 00:03:58 +0000 (00:03 +0000)]
Revert the main portion of r31856. It was causing BranchFolding
to break up CFG diamonds by banishing one of the blocks to the end of
the function, which is bad for code density and branch size.

This does pessimize MultiSource/Benchmarks/Ptrdist/yacr2, the
benchmark cited as the reason for the change, however I've examined
the code and it looks more like a case of gaming a particular
branch than of being generally applicable.

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

15 years agoDerive metadata hierarchy from Value instead of User.
Devang Patel [Wed, 21 Oct 2009 23:57:35 +0000 (23:57 +0000)]
Derive metadata hierarchy from Value instead of User.

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

15 years agorevert r84754, it isn't the right approach. Edwin, please propose
Chris Lattner [Wed, 21 Oct 2009 23:41:58 +0000 (23:41 +0000)]
revert r84754, it isn't the right approach.  Edwin, please propose
patches for fixes like this instead of committing them directly.

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

15 years agoMissing piece of the ARM frame index post-scavenging conditionalization
Jim Grosbach [Wed, 21 Oct 2009 23:40:56 +0000 (23:40 +0000)]
Missing piece of the ARM frame index post-scavenging conditionalization

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

15 years agoFix thinko noticed by Chris.
Benjamin Kramer [Wed, 21 Oct 2009 23:29:32 +0000 (23:29 +0000)]
Fix thinko noticed by Chris.

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

15 years agoAdjust testcases for msasm -> alignstack.
Dale Johannesen [Wed, 21 Oct 2009 23:29:12 +0000 (23:29 +0000)]
Adjust testcases for msasm -> alignstack.

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

15 years agoRename msasm to alignstack per review.
Dale Johannesen [Wed, 21 Oct 2009 23:28:00 +0000 (23:28 +0000)]
Rename msasm to alignstack per review.

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

15 years agoRemove pointless return; at end of function.
Benjamin Kramer [Wed, 21 Oct 2009 23:27:54 +0000 (23:27 +0000)]
Remove pointless return; at end of function.

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

15 years agoThe spill restore needs to be resolved to the SP/FP just like the spill
Jim Grosbach [Wed, 21 Oct 2009 22:59:56 +0000 (22:59 +0000)]
The spill restore needs to be resolved to the SP/FP just like the spill

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

15 years agoConditionalize ARM/T2 frame index post-scavenging while working out fixes
Jim Grosbach [Wed, 21 Oct 2009 22:59:24 +0000 (22:59 +0000)]
Conditionalize ARM/T2 frame index post-scavenging while working out fixes
for a few bugs.

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

15 years agoSimplify code. No intended functionality change.
Benjamin Kramer [Wed, 21 Oct 2009 22:55:51 +0000 (22:55 +0000)]
Simplify code. No intended functionality change.

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

15 years agoUse StringRef.
Devang Patel [Wed, 21 Oct 2009 21:57:13 +0000 (21:57 +0000)]
Use StringRef.

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

15 years agoMost of the NEON shuffle instructions do not support 64-bit element types.
Bob Wilson [Wed, 21 Oct 2009 21:36:27 +0000 (21:36 +0000)]
Most of the NEON shuffle instructions do not support 64-bit element types.

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

15 years agoDo not use SmallVector to store MDNode elements.
Devang Patel [Wed, 21 Oct 2009 21:25:09 +0000 (21:25 +0000)]
Do not use SmallVector to store MDNode elements.

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

15 years agoRevert r84764, it breaks mingw build
Anton Korobeynikov [Wed, 21 Oct 2009 21:15:18 +0000 (21:15 +0000)]
Revert r84764, it breaks mingw build

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

15 years agoXFAIL this test for PPC.
Bill Wendling [Wed, 21 Oct 2009 21:09:48 +0000 (21:09 +0000)]
XFAIL this test for PPC.

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

15 years agoImprove handling of immediates by splitting 32-bit immediates into two 16-bit
Jim Grosbach [Wed, 21 Oct 2009 20:44:34 +0000 (20:44 +0000)]
Improve handling of immediates by splitting 32-bit immediates into two 16-bit
immediate operands when they will fit into the using instruction.

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

15 years agoAdd DAG printing for RMW stuff debugging
Anton Korobeynikov [Wed, 21 Oct 2009 19:18:28 +0000 (19:18 +0000)]
Add DAG printing for RMW stuff debugging

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

15 years agoRMW preprocessing stuff was incorrect. Grab the stuff from x86 backend and disable...
Anton Korobeynikov [Wed, 21 Oct 2009 19:17:55 +0000 (19:17 +0000)]
RMW preprocessing stuff was incorrect. Grab the stuff from x86 backend and disable some tests until it will be clever enough to handle them.

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

15 years agoImplement branch folding
Anton Korobeynikov [Wed, 21 Oct 2009 19:17:18 +0000 (19:17 +0000)]
Implement branch folding

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

15 years agoCosmetic changes, no functionality changes
Anton Korobeynikov [Wed, 21 Oct 2009 19:16:49 +0000 (19:16 +0000)]
Cosmetic changes, no functionality changes

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

15 years agoMake changes to rev 84292 as requested by Chris Lattner.
Victor Hernandez [Wed, 21 Oct 2009 19:11:40 +0000 (19:11 +0000)]
Make changes to rev 84292 as requested by Chris Lattner.

Most changes are cleanup, but there is 1 correctness fix:
I fixed InstCombine so that the icmp is removed only if the malloc call is removed (which requires explicit removal because the Worklist won't DCE any calls since they can have side-effects).

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

15 years agoFix NEON VST2LN instruction encoding.
Bob Wilson [Wed, 21 Oct 2009 17:54:01 +0000 (17:54 +0000)]
Fix NEON VST2LN instruction encoding.
Patch by Johnny Chen.

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

15 years agoRevert 84732. It was the wrong fix.
Bob Wilson [Wed, 21 Oct 2009 17:52:34 +0000 (17:52 +0000)]
Revert 84732.  It was the wrong fix.

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

15 years agoIncorporate various suggestions Chris gave during metadata review.
Devang Patel [Wed, 21 Oct 2009 17:33:41 +0000 (17:33 +0000)]
Incorporate various suggestions Chris gave during metadata review.

- i < getNumElements()  instead of getNumElements() > i
- Make setParent() private
- Fix use of resizeOperands
- Reset HasMetadata bit after removing all metadata attached to an instruction
- Efficient use of iterators

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

15 years agoBuild shared lib instead of an archive.
Sanjiv Gupta [Wed, 21 Oct 2009 17:27:23 +0000 (17:27 +0000)]
Build shared lib instead of an archive.

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

15 years agoCleanup of frame index scavenging. Better code flow and more accurately
Jim Grosbach [Wed, 21 Oct 2009 15:26:21 +0000 (15:26 +0000)]
Cleanup of frame index scavenging. Better code flow and more accurately
handles T2 and ARM use cases.

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

15 years agoTwo corrections for docs/CMake.html.
Oscar Fuentes [Wed, 21 Oct 2009 13:22:20 +0000 (13:22 +0000)]
Two corrections for docs/CMake.html.

Patch by Victor Zverovich!

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

15 years agoFix PR5262: when folding select into PHI, make sure all operands are available
Torok Edwin [Wed, 21 Oct 2009 10:49:00 +0000 (10:49 +0000)]
Fix PR5262: when folding select into PHI, make sure all operands are available
in the PHI's Basic Block. This uses a conservative approach, because we don't
have dominator info in instcombine.

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

15 years agoAdd a pass to overlay pic16 data sections for function frame and automatic
Sanjiv Gupta [Wed, 21 Oct 2009 10:42:44 +0000 (10:42 +0000)]
Add a pass to overlay pic16 data sections for function frame and automatic
variables. This pass can be invoked by llvm-ld or opt to traverse over the call graph
to detect what function frames and their automatic variables can be overlaid.
Currently this builds an archive , but needs to be changed to a loadable module.

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

15 years agoAdded more options to mcc16 driver.
Sanjiv Gupta [Wed, 21 Oct 2009 10:38:59 +0000 (10:38 +0000)]
Added more options to mcc16 driver.

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

15 years agoMatch more patterns to movt.
Evan Cheng [Wed, 21 Oct 2009 08:15:52 +0000 (08:15 +0000)]
Match more patterns to movt.

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

15 years agoNeed a comma after imp-use.
Evan Cheng [Wed, 21 Oct 2009 07:56:02 +0000 (07:56 +0000)]
Need a comma after imp-use.

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

15 years agoDe-bork CMake build
Douglas Gregor [Wed, 21 Oct 2009 06:01:54 +0000 (06:01 +0000)]
De-bork CMake build

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

15 years agoSet comment string, patch by Johnny Chen!
Chris Lattner [Wed, 21 Oct 2009 05:07:57 +0000 (05:07 +0000)]
Set comment string, patch by Johnny Chen!

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

15 years agomake GVN work better when TD is not around:
Chris Lattner [Wed, 21 Oct 2009 04:11:19 +0000 (04:11 +0000)]
make GVN work better when TD is not around:

"In the existing code, if the load and the value to replace it with are
of different types *and* target data is available, it tries to use the
target data to coerce the replacement value to the type of the load.
Otherwise, it skips all effort to handle the type mismatch and just
feeds the wrongly-typed replacement value to replaceAllUsesWith, which
triggers an assertion.

The patch replaces it with an outer if checking for type mismatch, and
an inner if-else that checks whether target data is available and, if
not, returns false rather than trying to replace the load."

Patch by Kenneth Uildriks!

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

15 years agotidy
Chris Lattner [Wed, 21 Oct 2009 04:10:24 +0000 (04:10 +0000)]
tidy

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

15 years agoFix some more NEON instruction encoding problems.
Bob Wilson [Wed, 21 Oct 2009 02:27:20 +0000 (02:27 +0000)]
Fix some more NEON instruction encoding problems.
Thanks to Johnny Chen for discovering the problem.

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

15 years agoDo not remove dead metadata for now.
Devang Patel [Wed, 21 Oct 2009 02:21:34 +0000 (02:21 +0000)]
Do not remove dead metadata for now.

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

15 years agoLeave some NEON instruction encoding bits unspecified instead of setting
Bob Wilson [Wed, 21 Oct 2009 02:15:46 +0000 (02:15 +0000)]
Leave some NEON instruction encoding bits unspecified instead of setting
a default value of zero.  This is important for decoding the instructions.
Patch by Johnny Chen, with some changes from me, too.

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

15 years agoClarify documentation on multi_val options.
Mikhail Glushenkov [Wed, 21 Oct 2009 02:13:52 +0000 (02:13 +0000)]
Clarify documentation on multi_val options.

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

15 years agoImplement any_[not_]empty and list versions of switch_on and [not_]empty.
Mikhail Glushenkov [Wed, 21 Oct 2009 02:13:13 +0000 (02:13 +0000)]
Implement any_[not_]empty and list versions of switch_on and [not_]empty.

Useful for OptionPreprocessor.

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

15 years agoRevert r84658 and r84691. They were causing llvm-gcc bootstrap to fail.
Dan Gohman [Wed, 21 Oct 2009 01:44:44 +0000 (01:44 +0000)]
Revert r84658 and r84691. They were causing llvm-gcc bootstrap to fail.

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

15 years agoIPSCCP is missing stuff.
Chris Lattner [Wed, 21 Oct 2009 01:10:37 +0000 (01:10 +0000)]
IPSCCP is missing stuff.

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