oota-llvm.git
13 years agoLibCallAliasAnalysis uses multiple inheritance, so it needs to implement
Nick Lewycky [Fri, 30 Jul 2010 20:19:09 +0000 (20:19 +0000)]
LibCallAliasAnalysis uses multiple inheritance, so it needs to implement
getAdjustedAnalysisPointer. Part of a fix to PR7760.

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

13 years agoA *bunch* of tests for AVX intrinsics
Bruno Cardoso Lopes [Fri, 30 Jul 2010 19:57:56 +0000 (19:57 +0000)]
A *bunch* of tests for AVX intrinsics

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

13 years agoAdd the __TEXT,__StaticInit section to the list of sections emitted at the
Bob Wilson [Fri, 30 Jul 2010 19:55:47 +0000 (19:55 +0000)]
Add the __TEXT,__StaticInit section to the list of sections emitted at the
beginning on ARM Darwin assembly files so that it won't be placed after
debug sections.  Radar 8252813.

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

13 years agoSupport all 128-bit AVX vector intrinsics. Most part of them I already
Bruno Cardoso Lopes [Fri, 30 Jul 2010 19:54:33 +0000 (19:54 +0000)]
Support all 128-bit AVX vector intrinsics. Most part of them I already
declared during the addition of the assembler support, the additional
changes are:
- Add missing intrinsics
- Move all SSE conversion instructions in X86InstInfo64.td to the SSE.td file.
- Duplicate some patterns to AVX mode.
- Step into PCMPEST/PCMPIST custom inserter and add AVX versions.

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

13 years agoFix typo!
Bruno Cardoso Lopes [Fri, 30 Jul 2010 19:41:24 +0000 (19:41 +0000)]
Fix typo!

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

13 years agoAttempt to fix the llvm-gcc-powerpc-darwin9 buildbot.
Bob Wilson [Fri, 30 Jul 2010 18:52:47 +0000 (18:52 +0000)]
Attempt to fix the llvm-gcc-powerpc-darwin9 buildbot.

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

13 years agoMC: Initialize MCFragment::Offset, noticed by Cameron Esfahani.
Daniel Dunbar [Fri, 30 Jul 2010 18:32:09 +0000 (18:32 +0000)]
MC: Initialize MCFragment::Offset, noticed by Cameron Esfahani.

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

13 years agoFix -Wmissing-field-initializers warnings.
Daniel Dunbar [Fri, 30 Jul 2010 17:49:04 +0000 (17:49 +0000)]
Fix -Wmissing-field-initializers warnings.

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

13 years agoGrammar cop pullover: Corrected and improved some grammar in the description of
John Criswell [Fri, 30 Jul 2010 16:30:28 +0000 (16:30 +0000)]
Grammar cop pullover: Corrected and improved some grammar in the description of
the llvm.memset() intrinsic family.
No content changes.

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

13 years agoAdd a Program argument to diffProgram to avoid a use of swapProgramIn.
Rafael Espindola [Fri, 30 Jul 2010 14:19:00 +0000 (14:19 +0000)]
Add a Program argument to diffProgram to avoid a use of swapProgramIn.

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

13 years agoTweak suppressions.
Benjamin Kramer [Fri, 30 Jul 2010 12:18:36 +0000 (12:18 +0000)]
Tweak suppressions.

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

13 years agoFix for bug reported by Evzen Muller on llvm-commits: make sure to correctly
Eli Friedman [Fri, 30 Jul 2010 06:44:31 +0000 (06:44 +0000)]
Fix for bug reported by Evzen Muller on llvm-commits: make sure to correctly
check the range of the constant when optimizing a comparison between a
constant and a sign_extend_inreg node.

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

13 years agoDo not pass a copy of the value map, pass a reference to it.
Duncan Sands [Fri, 30 Jul 2010 05:50:45 +0000 (05:50 +0000)]
Do not pass a copy of the value map, pass a reference to it.

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

13 years agoFix the ValueMap copy constructor. The issue is that the map keys are value
Duncan Sands [Fri, 30 Jul 2010 05:49:32 +0000 (05:49 +0000)]
Fix the ValueMap copy constructor.  The issue is that the map keys are value
handles with a pointer to the containing map.  When a map is copied, these
pointers need to be corrected to point to the new map.  If not, then consider
the case of a map M1 which maps a value V to something.  Create a copy M2 of
M1.  At this point there are two value handles on V, one representing V as a
key in M1, the other representing V as a key in M2.  But both value handles
point to M1 as the containing map.  Now delete V.  The value handles remove
themselves from their containing map (which destroys them), but only the first
value handle is successful: the second one cannot remove itself from M1 as
(once the first one has removed itself) there is nothing there to remove; it
is therefore not destroyed.  This causes an assertion failure "All references
to V were not removed?".

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

13 years agoMany Thumb2 instructions can reference the full ARM register set (i.e.,
Jim Grosbach [Fri, 30 Jul 2010 02:41:01 +0000 (02:41 +0000)]
Many Thumb2 instructions can reference the full ARM register set (i.e.,
have 4 bits per register in the operand encoding), but have undefined
behavior when the operand value is 13 or 15 (SP and PC, respectively).
The trivial coalescer in linear scan sometimes will merge a copy from
SP into a subsequent instruction which uses the copy, and if that
instruction cannot legally reference SP, we get bad code such as:
  mls r0,r9,r0,sp
instead of:
  mov r2, sp
  mls r0, r9, r0, r2

This patch adds a new register class for use by Thumb2 that excludes
the problematic registers (SP and PC) and is used instead of GPR
for those operands which cannot legally reference PC or SP. The
trivial coalescer explicitly requires that the register class
of the destination for the COPY instruction contain the source
register for the COPY to be considered for coalescing. This prevents
errant instructions like that above.

PR7499

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

13 years agoremove a layer of cruft
Gabor Greif [Thu, 29 Jul 2010 23:35:00 +0000 (23:35 +0000)]
remove a layer of cruft

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

13 years agoFix this up per llvm-gcc r109819.
Eric Christopher [Thu, 29 Jul 2010 23:20:29 +0000 (23:20 +0000)]
Fix this up per llvm-gcc r109819.

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

13 years agoSupress valgrind errors from python.
Benjamin Kramer [Thu, 29 Jul 2010 23:15:04 +0000 (23:15 +0000)]
Supress valgrind errors from python.

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

13 years agoRemove the temporary hack, now that the llvm-i686-linux buildbot has
Bob Wilson [Thu, 29 Jul 2010 22:55:29 +0000 (22:55 +0000)]
Remove the temporary hack, now that the llvm-i686-linux buildbot has
completed a successful build.

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

13 years agoAdd builtins for ssat/usat, similar to RealView's __ssat and __usat intrinsics.
Nate Begeman [Thu, 29 Jul 2010 22:48:09 +0000 (22:48 +0000)]
Add builtins for ssat/usat, similar to RealView's __ssat and __usat intrinsics.

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

13 years agoFix the temporary hack.
Bob Wilson [Thu, 29 Jul 2010 22:33:35 +0000 (22:33 +0000)]
Fix the temporary hack.

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

13 years agoTemporary hack to ensure stale Analysis dir is cleaned up on llvm-i686-linux.
Daniel Dunbar [Thu, 29 Jul 2010 22:18:50 +0000 (22:18 +0000)]
Temporary hack to ensure stale Analysis dir is cleaned up on llvm-i686-linux.

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

13 years agoRemove XFAIL, test doesn't leak anymore.
Benjamin Kramer [Thu, 29 Jul 2010 20:36:36 +0000 (20:36 +0000)]
Remove XFAIL, test doesn't leak anymore.

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

13 years agoRefactor ARM-specific DAG combining in preparation for adding some more
Bob Wilson [Thu, 29 Jul 2010 20:34:14 +0000 (20:34 +0000)]
Refactor ARM-specific DAG combining in preparation for adding some more
transformations.

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

13 years agoImplement vector constants which are splat of
Dale Johannesen [Thu, 29 Jul 2010 20:10:08 +0000 (20:10 +0000)]
Implement vector constants which are splat of
integers with mov + vdup.  8003375.  This is
currently disabled by default because LICM will
not hoist a VDUP, so it pessimizes the code if
the construct occurs inside a loop (8248029).

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

13 years agoDon't assert on an unrecognized BrMiscFrm instruction.
Bob Wilson [Thu, 29 Jul 2010 18:29:28 +0000 (18:29 +0000)]
Don't assert on an unrecognized BrMiscFrm instruction.
PR7745.

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

13 years agoTranscribe IRC to svn. Also don't print basic block names twice if they match.
John McCall [Thu, 29 Jul 2010 18:20:13 +0000 (18:20 +0000)]
Transcribe IRC to svn.  Also don't print basic block names twice if they match.

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

13 years agoGrammar.
Eric Christopher [Thu, 29 Jul 2010 18:11:28 +0000 (18:11 +0000)]
Grammar.

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

13 years agoMake the header self-contained and follow #include guidelines.
John McCall [Thu, 29 Jul 2010 18:08:23 +0000 (18:08 +0000)]
Make the header self-contained and follow #include guidelines.

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

13 years agoPR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
Eli Friedman [Thu, 29 Jul 2010 18:03:33 +0000 (18:03 +0000)]
PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt.

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

13 years agoMake un-named values legible in certain vim configurations.
Owen Anderson [Thu, 29 Jul 2010 17:57:57 +0000 (17:57 +0000)]
Make un-named values legible in certain vim configurations.

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

13 years agoAdd intrinsics __builtin_arm_qadd & __builtin_arm_qsub to allow access to the QADD...
Nate Begeman [Thu, 29 Jul 2010 17:56:55 +0000 (17:56 +0000)]
Add intrinsics __builtin_arm_qadd & __builtin_arm_qsub to allow access to the QADD & QSUB instructions.
Behave identically to __qadd & __qsub RealView instruction intrinsics.

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

13 years agoSwitch to using the LLVM CommandLine library so that our help
John McCall [Thu, 29 Jul 2010 17:55:00 +0000 (17:55 +0000)]
Switch to using the LLVM CommandLine library so that our help
message is properly contaminated with nonsense about timing passes
that doesn't apply at all to this utility. :)

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

13 years agoPlug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of...
Benjamin Kramer [Thu, 29 Jul 2010 17:48:06 +0000 (17:48 +0000)]
Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.

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

13 years agoComment typo.
Dale Johannesen [Thu, 29 Jul 2010 17:45:24 +0000 (17:45 +0000)]
Comment typo.

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

13 years agoRevert r109652, and remove the offending assert in loadRegFromStackSlot instead.
Jakob Stoklund Olesen [Thu, 29 Jul 2010 17:42:27 +0000 (17:42 +0000)]
Revert r109652, and remove the offending assert in loadRegFromStackSlot instead.

We do sometimes load from a too small stack slot when dealing with x86 arguments
(varargs and smaller-than-32-bit args). It looks like we know what we are doing
in those cases, so I am going to remove the assert instead of artifically
enlarging stack slot sizes.

The assert in storeRegToStackSlot stays in. We don't want to write beyond the
bounds of a stack slot.

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

13 years agoCrashRecovery: Use ThreadLocal::erase() instead of set(0).
Daniel Dunbar [Thu, 29 Jul 2010 15:24:21 +0000 (15:24 +0000)]
CrashRecovery: Use ThreadLocal::erase() instead of set(0).

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

13 years agoMake the test while reducing blocks functional. This avoids accessing freed
Rafael Espindola [Thu, 29 Jul 2010 14:20:59 +0000 (14:20 +0000)]
Make the test while reducing blocks functional. This avoids accessing freed
memory when one of the original BB is destroyed.

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

13 years agoStop leaking std::strings in GetDwarfFile.
Benjamin Kramer [Thu, 29 Jul 2010 13:53:19 +0000 (13:53 +0000)]
Stop leaking std::strings in GetDwarfFile.

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

13 years agoCOFFObjectWriter: Don't leak COFFSymbols and COFFSections.
Benjamin Kramer [Thu, 29 Jul 2010 11:57:59 +0000 (11:57 +0000)]
COFFObjectWriter: Don't leak COFFSymbols and COFFSections.

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

13 years agoCentralize the logic to permanently unify two instructions and make sure
John McCall [Thu, 29 Jul 2010 09:20:34 +0000 (09:20 +0000)]
Centralize the logic to permanently unify two instructions and make sure
it establishes a context and does a complaining diff.  Also make sure we
unify the prelude and postlude of a diff after a block-diff call.

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

13 years agoDiagnose non-structural differences in the case where blocks were
John McCall [Thu, 29 Jul 2010 09:04:45 +0000 (09:04 +0000)]
Diagnose non-structural differences in the case where blocks were
structurally identical.

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

13 years agoWhen unifying instructions during a block diff, actually complain about
John McCall [Thu, 29 Jul 2010 08:59:27 +0000 (08:59 +0000)]
When unifying instructions during a block diff, actually complain about
any differences we see.  This should only happen if there are "non-structural"
differences between the instructions, i.e. differences which wouldn't cause
diff to return true.

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

13 years agoSomehow I was getting reasonable results for the test cases I was interested
John McCall [Thu, 29 Jul 2010 08:53:59 +0000 (08:53 +0000)]
Somehow I was getting reasonable results for the test cases I was interested
in despite not ever incrementing any path costs, so that the only nonzero costs
arose from the all-left path in the first column.  Anyway.  Perform the diff
starting from the beginning of the block to avoid capturing (say) loads of
allocas.

Vastly improves diff results on code that hasn't been mem2reg'ed.

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

13 years agoCache the result of errs() and implement formatted logging.
John McCall [Thu, 29 Jul 2010 08:14:41 +0000 (08:14 +0000)]
Cache the result of errs() and implement formatted logging.

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

13 years agoAdd the llvm-diff tool, which performs a relatively naive structural
John McCall [Thu, 29 Jul 2010 07:53:27 +0000 (07:53 +0000)]
Add the llvm-diff tool, which performs a relatively naive structural
diff of a function.  There's a lot of cruft in the current version, and
it's pretty far from perfect, but it's usable.

Currently only capable of comparing functions.  Currently ignores metadata.
Currently ignores most attributes of functions and instructions.

Patches welcome.

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

13 years agoMake sure to include config.h, to pickup LLVM_ON_WIN32.
Daniel Dunbar [Thu, 29 Jul 2010 01:52:04 +0000 (01:52 +0000)]
Make sure to include config.h, to pickup LLVM_ON_WIN32.

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

13 years agoMC: Destroy Macro instances.
Daniel Dunbar [Thu, 29 Jul 2010 01:51:55 +0000 (01:51 +0000)]
MC: Destroy Macro instances.

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

13 years agoSpeculatively revert r109705 since it seems to be causing some build bot
Eric Christopher [Thu, 29 Jul 2010 01:25:38 +0000 (01:25 +0000)]
Speculatively revert r109705 since it seems to be causing some build bot
angst.

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

13 years agoCrashRecoveryContext: Add a simple POSIX implementation.
Daniel Dunbar [Thu, 29 Jul 2010 01:21:47 +0000 (01:21 +0000)]
CrashRecoveryContext: Add a simple POSIX implementation.
 - This works, but won't handle crashes on stack overflow, or signals delivered
   to a thread other than the one that crashed. The latter is particular annoying
   on Darwin, because SIGABRT tends to go to the main thread.

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

13 years agoFix a bug in the -regalloc=fast handling of exotic two-address instruction with
Jakob Stoklund Olesen [Thu, 29 Jul 2010 00:52:19 +0000 (00:52 +0000)]
Fix a bug in the -regalloc=fast handling of exotic two-address instruction with
multiple defs, like t2LDRSB_POST.

The first def could accidentally steal the physreg that the second, tied def was
required to be allocated to.

Now, the tied use-def is treated more like an early clobber, and the physreg is
reserved before allocating the other defs.

This would never be a problem when the tied def was the only def which is the
usual case.

This fixes MallocBench/gs for thumb2 -O0.

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

13 years agoUse the right gcc tool args for IsARMArchitecture.
Jakob Stoklund Olesen [Thu, 29 Jul 2010 00:52:16 +0000 (00:52 +0000)]
Use the right gcc tool args for IsARMArchitecture.

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

13 years agoFactor out some of the code for updating old SCEVUnknown values, and
Dan Gohman [Thu, 29 Jul 2010 00:17:55 +0000 (00:17 +0000)]
Factor out some of the code for updating old SCEVUnknown values, and
extend it to handle the case where multiple RAUWs affect a single
SCEVUnknown.

Add a ScalarEvolution unittest to test for this situation.

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

13 years agoPass the queried value by argument rather than in a member, in preparation for suppor...
Owen Anderson [Wed, 28 Jul 2010 23:50:08 +0000 (23:50 +0000)]
Pass the queried value by argument rather than in a member, in preparation for supporting PHI translation.

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

13 years agoARM mode version of r109693. Remove incorrect substitution pattern for UXTB16. It...
Jim Grosbach [Wed, 28 Jul 2010 23:25:44 +0000 (23:25 +0000)]
ARM mode version of r109693. Remove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift was actually a rotate. rdar://8240138

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

13 years agoRemove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift...
Jim Grosbach [Wed, 28 Jul 2010 23:17:45 +0000 (23:17 +0000)]
Remove incorrect substitution pattern for UXTB16. It wrongly assumed the input shift was actually a rotate. rdar://8240138

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

13 years agoRemove dead prototype
Jim Grosbach [Wed, 28 Jul 2010 23:16:12 +0000 (23:16 +0000)]
Remove dead prototype

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

13 years agosimplify by using CallSite constructors; virtually eliminates CallSite::get from...
Gabor Greif [Wed, 28 Jul 2010 22:50:26 +0000 (22:50 +0000)]
simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree

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

13 years agoAdd an erase() method to llvm::ThreadLocal.
Owen Anderson [Wed, 28 Jul 2010 22:49:43 +0000 (22:49 +0000)]
Add an erase() method to llvm::ThreadLocal.

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

13 years agoAdd more doxygen comments for llvm::ThreadLocal.
Owen Anderson [Wed, 28 Jul 2010 22:30:53 +0000 (22:30 +0000)]
Add more doxygen comments for llvm::ThreadLocal.

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

13 years agoGet rid of LVIQuery as a distinct data structure, so that we don't have to initialize...
Owen Anderson [Wed, 28 Jul 2010 22:07:25 +0000 (22:07 +0000)]
Get rid of LVIQuery as a distinct data structure, so that we don't have to initialize a new set of maps on every query.

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

13 years agoMove MaximumAlignment to Value.h, now that GlobalValue.h needs it.
Dan Gohman [Wed, 28 Jul 2010 21:02:38 +0000 (21:02 +0000)]
Move MaximumAlignment to Value.h, now that GlobalValue.h needs it.

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

13 years agoMake GlobalValue alignment consistent with load, store, and alloca
Dan Gohman [Wed, 28 Jul 2010 20:56:48 +0000 (20:56 +0000)]
Make GlobalValue alignment consistent with load, store, and alloca
alignment, fixing silent truncation of alignment values.

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

13 years agoCreate a fixed stack object for varargs that is as large as any register.
Jakob Stoklund Olesen [Wed, 28 Jul 2010 20:55:38 +0000 (20:55 +0000)]
Create a fixed stack object for varargs that is as large as any register.

The size of this object isn't used for anything - technically it is of variable
size.

This avoids a false positive from the assert in
X86InstrInfo::loadRegFromStackSlot, and fixes PR7735.

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

13 years agoAdded first bit of support for the dwarf .file directive. This patch collects
Kevin Enderby [Wed, 28 Jul 2010 20:55:35 +0000 (20:55 +0000)]
Added first bit of support for the dwarf .file directive.  This patch collects
the info from the .file directive and makes file and directory tables that
will eventually be put out as part of the dwarf info in the output file.

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

13 years agoRegionInfo: Make sure to free cached nodes; Tobias, please check!
Daniel Dunbar [Wed, 28 Jul 2010 20:28:50 +0000 (20:28 +0000)]
RegionInfo: Make sure to free cached nodes; Tobias, please check!

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

13 years agoMC: Put back the MCFragment vtable, so subclasses are destroyed properly (duh).
Daniel Dunbar [Wed, 28 Jul 2010 20:28:45 +0000 (20:28 +0000)]
MC: Put back the MCFragment vtable, so subclasses are destroyed properly (duh).

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

13 years agoRegenerate.
Eric Christopher [Wed, 28 Jul 2010 20:26:43 +0000 (20:26 +0000)]
Regenerate.

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

13 years agoUse a C++ compiler for the atomic builtin check since we'll
Eric Christopher [Wed, 28 Jul 2010 20:26:34 +0000 (20:26 +0000)]
Use a C++ compiler for the atomic builtin check since we'll
be using a C++ compiler to build.

Patch by Török Edwin!

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

13 years agoDefine a maximum supported alignment value for load, store, and
Dan Gohman [Wed, 28 Jul 2010 20:12:04 +0000 (20:12 +0000)]
Define a maximum supported alignment value for load, store, and
alloca instructions (constrained by their internal encoding),
and add error checking for it. Fix an instcombine bug which
generated huge alignment values (null is infinitely aligned).
This fixes undefined behavior noticed by John Regehr.

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

13 years agoPrint out the regclass of any virtual registers used by a machine instruction.
Jakob Stoklund Olesen [Wed, 28 Jul 2010 18:35:46 +0000 (18:35 +0000)]
Print out the regclass of any virtual registers used by a machine instruction.

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

13 years agoFix a warning from gcc-4.0 (from the ppc buildbot).
Bob Wilson [Wed, 28 Jul 2010 18:21:10 +0000 (18:21 +0000)]
Fix a warning from gcc-4.0 (from the ppc buildbot).

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

13 years agoInstead of abusing swapProgramIn, just add a Module argument to
Rafael Espindola [Wed, 28 Jul 2010 18:12:30 +0000 (18:12 +0000)]
Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

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

13 years agoUnbreak my CMake build, say you'll compile for me again...
Douglas Gregor [Wed, 28 Jul 2010 17:17:46 +0000 (17:17 +0000)]
Unbreak my CMake build, say you'll compile for me again...

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

13 years agoFix this code to avoid decrementing an iterator past the beginning
Dan Gohman [Wed, 28 Jul 2010 17:15:36 +0000 (17:15 +0000)]
Fix this code to avoid decrementing an iterator past the beginning
of a std::vector.

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

13 years agoWhen user code intentionally dereferences null, the alignment of the
Dan Gohman [Wed, 28 Jul 2010 17:14:23 +0000 (17:14 +0000)]
When user code intentionally dereferences null, the alignment of the
dereference is theoretically infinite. Put a cap on the computed
alignment to avoid overflow, noticed by John Regehr.

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

13 years agoDo GEP offset calculations with unsigned math rather than signed math
Dan Gohman [Wed, 28 Jul 2010 17:11:36 +0000 (17:11 +0000)]
Do GEP offset calculations with unsigned math rather than signed math
to avoid undefined behavior on overflow, noticed by John Regehr.

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

13 years agoAdd some extra friend declarations to fix a gcc-4.0 compile error.
Dan Gohman [Wed, 28 Jul 2010 17:09:24 +0000 (17:09 +0000)]
Add some extra friend declarations to fix a gcc-4.0 compile error.
This is a temporary fix, until more elaborate changes are ready.

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

13 years agosimplify
Gabor Greif [Wed, 28 Jul 2010 15:52:43 +0000 (15:52 +0000)]
simplify

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

13 years agoSupport: Add CrashRecoveryContext helper object.
Daniel Dunbar [Wed, 28 Jul 2010 15:40:20 +0000 (15:40 +0000)]
Support: Add CrashRecoveryContext helper object.
 - Designed as a simple wrapper to allow clients to attempt to catch crashes
   (memory errors, assertion violations, etc.) and do some kind of recovery.

 - Currently doesn't actually attempt to catch crashes.

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

13 years agosimplify
Gabor Greif [Wed, 28 Jul 2010 15:31:37 +0000 (15:31 +0000)]
simplify

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

13 years agoUpdate svn:ignore properties.
Dan Gohman [Wed, 28 Jul 2010 15:17:26 +0000 (15:17 +0000)]
Update svn:ignore properties.

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

13 years agouse Value* constructor of CallSite to create potentially improper site, and test...
Gabor Greif [Wed, 28 Jul 2010 14:28:18 +0000 (14:28 +0000)]
use Value* constructor of CallSite to create potentially improper site, and test that

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

13 years agouse Value* constructor of CallSite to create potentially improper site, and test...
Gabor Greif [Wed, 28 Jul 2010 12:35:54 +0000 (12:35 +0000)]
use Value* constructor of CallSite to create potentially improper site, and test that

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

13 years agouse Value* constructor of CallSite to create potentially improper site
Gabor Greif [Wed, 28 Jul 2010 12:19:46 +0000 (12:19 +0000)]
use Value* constructor of CallSite to create potentially improper site

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

13 years agosimplify
Gabor Greif [Wed, 28 Jul 2010 10:57:28 +0000 (10:57 +0000)]
simplify

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

13 years agosimplify
Gabor Greif [Wed, 28 Jul 2010 10:46:09 +0000 (10:46 +0000)]
simplify

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

13 years agowe are supposed to only create proper CallSites from an instruction (esp. CallInst...
Gabor Greif [Wed, 28 Jul 2010 10:44:59 +0000 (10:44 +0000)]
we are supposed to only create proper CallSites from an instruction (esp. CallInst and InvokeInst)

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

13 years agoFilter out patterns that have PredicateOperands.
Eric Christopher [Wed, 28 Jul 2010 01:52:23 +0000 (01:52 +0000)]
Filter out patterns that have PredicateOperands.

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

13 years agoMake SCEVCallbackVH::allUsesReplacedWith update the old SCEVUnknown
Dan Gohman [Wed, 28 Jul 2010 01:09:07 +0000 (01:09 +0000)]
Make SCEVCallbackVH::allUsesReplacedWith update the old SCEVUnknown
object, as it may still be referenced by SCEVs not cleaned up by the
use list traversal.

Also, in ScalarEvolution::forgetValue, only check for a SCEVUnknown
object for the original value, not for any value in the use list,
because other SCEVUnknown values aren't necessary obsolete at that
point.

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

13 years agoMake SCEVCallbackVH::allUsesReplacedWith unconditionally delete
Dan Gohman [Wed, 28 Jul 2010 00:28:25 +0000 (00:28 +0000)]
Make SCEVCallbackVH::allUsesReplacedWith unconditionally delete
the old value.

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

13 years agoImplement a vectorized algorithm for <16 x i8> << <16 x i8>
Nate Begeman [Wed, 28 Jul 2010 00:21:48 +0000 (00:21 +0000)]
Implement a vectorized algorithm for <16 x i8> << <16 x i8>
This is about 4x faster and smaller than the existing scalarization.

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

13 years agoAdd a comment.
Dan Gohman [Wed, 28 Jul 2010 00:21:18 +0000 (00:21 +0000)]
Add a comment.

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

13 years agoRearrange several datastructures in LazyValueInfo to improve compile time.
Owen Anderson [Tue, 27 Jul 2010 23:58:11 +0000 (23:58 +0000)]
Rearrange several datastructures in LazyValueInfo to improve compile time.
This is still not perfect, but better than it was before.

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

13 years agoFill out the interface of DenseSet a bit.
Owen Anderson [Tue, 27 Jul 2010 23:55:47 +0000 (23:55 +0000)]
Fill out the interface of DenseSet a bit.

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

13 years agoTestcase for r109556. Radar 8198362.
Stuart Hastings [Tue, 27 Jul 2010 23:15:25 +0000 (23:15 +0000)]
Testcase for r109556.  Radar 8198362.

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

13 years agoreintroduce original (asserting) semantics of CallSite(Instruction *II)
Gabor Greif [Tue, 27 Jul 2010 22:53:28 +0000 (22:53 +0000)]
reintroduce original (asserting) semantics of CallSite(Instruction *II)
add instead a CallSite(Value* V) constructor that is consistent with ImmutableCallSize
and use that one in client code

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

13 years ago~40% faster vector shl <4 x i32> on SSE 4.1 Larger improvements for smaller types...
Nate Begeman [Tue, 27 Jul 2010 22:37:06 +0000 (22:37 +0000)]
~40% faster vector shl <4 x i32> on SSE 4.1  Larger improvements for smaller types coming in future patches.

For:

define <2 x i64> @shl(<4 x i32> %r, <4 x i32> %a) nounwind readnone ssp {
entry:
  %shl = shl <4 x i32> %r, %a                     ; <<4 x i32>> [#uses=1]
  %tmp2 = bitcast <4 x i32> %shl to <2 x i64>     ; <<2 x i64>> [#uses=1]
  ret <2 x i64> %tmp2
}

We get:

_shl:                                   ## @shl
pslld $23, %xmm1
paddd LCPI0_0, %xmm1
cvttps2dq %xmm1, %xmm1
pmulld %xmm1, %xmm0
ret

Instead of:

_shl:                                   ## @shl
pshufd $3, %xmm0, %xmm2
movd %xmm2, %eax
pshufd $3, %xmm1, %xmm2
movd %xmm2, %ecx
shll %cl, %eax
movd %eax, %xmm2
pshufd $1, %xmm0, %xmm3
movd %xmm3, %eax
pshufd $1, %xmm1, %xmm3
movd %xmm3, %ecx
shll %cl, %eax
movd %eax, %xmm3
punpckldq %xmm2, %xmm3
movd %xmm0, %eax
movd %xmm1, %ecx
shll %cl, %eax
movd %eax, %xmm2
movhlps %xmm0, %xmm0
movd %xmm0, %eax
movhlps %xmm1, %xmm1
movd %xmm1, %ecx
shll %cl, %eax
movd %eax, %xmm0
punpckldq %xmm0, %xmm2
movdqa %xmm2, %xmm0
punpckldq %xmm3, %xmm0
ret

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

13 years agorecommit simplification (originally r109504, backed out in r109508) now that problem...
Gabor Greif [Tue, 27 Jul 2010 22:02:00 +0000 (22:02 +0000)]
recommit simplification (originally r109504, backed out in r109508) now that problem in CallSiteBase is fixed

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

13 years agoremove bogus assert, use static_cast for additional checking
Gabor Greif [Tue, 27 Jul 2010 21:46:11 +0000 (21:46 +0000)]
remove bogus assert, use static_cast for additional checking

left two new asserts commented out, because they would fire in clang, have to hunt those down first

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