1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

63142 Commits

Author SHA1 Message Date
Bruno Cardoso Lopes
0c0dd2173c 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.

llvm-svn: 109878
2010-07-30 19:54:33 +00:00
Bruno Cardoso Lopes
5d4afd0cb9 Fix typo!
llvm-svn: 109877
2010-07-30 19:41:24 +00:00
Bob Wilson
6394c4bdd1 Attempt to fix the llvm-gcc-powerpc-darwin9 buildbot.
llvm-svn: 109876
2010-07-30 18:52:47 +00:00
Daniel Dunbar
19ee08da53 MC: Initialize MCFragment::Offset, noticed by Cameron Esfahani.
llvm-svn: 109875
2010-07-30 18:32:09 +00:00
Daniel Dunbar
c97e760282 Fix -Wmissing-field-initializers warnings.
llvm-svn: 109872
2010-07-30 17:49:04 +00:00
John Criswell
bc5393a5fe Grammar cop pullover: Corrected and improved some grammar in the description of
the llvm.memset() intrinsic family.
No content changes.

llvm-svn: 109863
2010-07-30 16:30:28 +00:00
Rafael Espindola
ba90b65153 Add a Program argument to diffProgram to avoid a use of swapProgramIn.
llvm-svn: 109859
2010-07-30 14:19:00 +00:00
Benjamin Kramer
5d796b0d8f Tweak suppressions.
llvm-svn: 109858
2010-07-30 12:18:36 +00:00
Eli Friedman
bea7c851cf 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.

llvm-svn: 109854
2010-07-30 06:44:31 +00:00
Duncan Sands
07cc85fd7c Do not pass a copy of the value map, pass a reference to it.
llvm-svn: 109852
2010-07-30 05:50:45 +00:00
Duncan Sands
57ab333302 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?".

llvm-svn: 109851
2010-07-30 05:49:32 +00:00
Jim Grosbach
1718345a30 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

llvm-svn: 109842
2010-07-30 02:41:01 +00:00
Gabor Greif
d85a524ba1 remove a layer of cruft
llvm-svn: 109821
2010-07-29 23:35:00 +00:00
Eric Christopher
82701d8dfe Fix this up per llvm-gcc r109819.
llvm-svn: 109820
2010-07-29 23:20:29 +00:00
Benjamin Kramer
d9b8cddbb1 Supress valgrind errors from python.
llvm-svn: 109818
2010-07-29 23:15:04 +00:00
Bob Wilson
affdd7e848 Remove the temporary hack, now that the llvm-i686-linux buildbot has
completed a successful build.

llvm-svn: 109815
2010-07-29 22:55:29 +00:00
Nate Begeman
0b0f838c32 Add builtins for ssat/usat, similar to RealView's __ssat and __usat intrinsics.
llvm-svn: 109813
2010-07-29 22:48:09 +00:00
Bob Wilson
18f5ca81b3 Fix the temporary hack.
llvm-svn: 109810
2010-07-29 22:33:35 +00:00
Daniel Dunbar
877b4fe7e9 Temporary hack to ensure stale Analysis dir is cleaned up on llvm-i686-linux.
llvm-svn: 109809
2010-07-29 22:18:50 +00:00
Benjamin Kramer
23151050ce Remove XFAIL, test doesn't leak anymore.
llvm-svn: 109801
2010-07-29 20:36:36 +00:00
Bob Wilson
d70ec880ea Refactor ARM-specific DAG combining in preparation for adding some more
transformations.

llvm-svn: 109800
2010-07-29 20:34:14 +00:00
Dale Johannesen
717fbb2b32 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).

llvm-svn: 109799
2010-07-29 20:10:08 +00:00
Bob Wilson
823182c3e5 Don't assert on an unrecognized BrMiscFrm instruction.
PR7745.

llvm-svn: 109788
2010-07-29 18:29:28 +00:00
John McCall
3eb1263b83 Transcribe IRC to svn. Also don't print basic block names twice if they match.
llvm-svn: 109787
2010-07-29 18:20:13 +00:00
Eric Christopher
793776c154 Grammar.
llvm-svn: 109775
2010-07-29 18:11:28 +00:00
John McCall
1e34d6da8e Make the header self-contained and follow #include guidelines.
llvm-svn: 109774
2010-07-29 18:08:23 +00:00
Eli Friedman
642f4c66c3 PR7750: !CExpr->isNullValue() only properly computes whether CExpr is nonnull
if CExpr is a ConstantInt.

llvm-svn: 109773
2010-07-29 18:03:33 +00:00
Owen Anderson
b751d2944b Make un-named values legible in certain vim configurations.
llvm-svn: 109772
2010-07-29 17:57:57 +00:00
Nate Begeman
b24fa8b8ae Add intrinsics __builtin_arm_qadd & __builtin_arm_qsub to allow access to the QADD & QSUB instructions.
Behave identically to __qadd & __qsub RealView instruction intrinsics.

llvm-svn: 109770
2010-07-29 17:56:55 +00:00
John McCall
892a09a0a9 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. :)

llvm-svn: 109769
2010-07-29 17:55:00 +00:00
Benjamin Kramer
d1340209a1 Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
llvm-svn: 109767
2010-07-29 17:48:06 +00:00
Dale Johannesen
71204e008b Comment typo.
llvm-svn: 109765
2010-07-29 17:45:24 +00:00
Jakob Stoklund Olesen
1dee3913d6 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.

llvm-svn: 109764
2010-07-29 17:42:27 +00:00
Daniel Dunbar
d516b0a1bd CrashRecovery: Use ThreadLocal::erase() instead of set(0).
llvm-svn: 109752
2010-07-29 15:24:21 +00:00
Rafael Espindola
6401c853ee Make the test while reducing blocks functional. This avoids accessing freed
memory when one of the original BB is destroyed.

llvm-svn: 109747
2010-07-29 14:20:59 +00:00
Benjamin Kramer
85d8649a9c Stop leaking std::strings in GetDwarfFile.
llvm-svn: 109746
2010-07-29 13:53:19 +00:00
Benjamin Kramer
20e27bc59b COFFObjectWriter: Don't leak COFFSymbols and COFFSections.
llvm-svn: 109745
2010-07-29 11:57:59 +00:00
John McCall
0722760971 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.

llvm-svn: 109744
2010-07-29 09:20:34 +00:00
John McCall
8fda7303db Diagnose non-structural differences in the case where blocks were
structurally identical.

llvm-svn: 109743
2010-07-29 09:04:45 +00:00
John McCall
9c21031e5b 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.

llvm-svn: 109742
2010-07-29 08:59:27 +00:00
John McCall
a56b8f4800 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.

llvm-svn: 109741
2010-07-29 08:53:59 +00:00
John McCall
f1e24e1d2b Cache the result of errs() and implement formatted logging.
llvm-svn: 109740
2010-07-29 08:14:41 +00:00
John McCall
edc50f3f5b 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.

llvm-svn: 109739
2010-07-29 07:53:27 +00:00
Daniel Dunbar
d62252d9f8 Make sure to include config.h, to pickup LLVM_ON_WIN32.
llvm-svn: 109721
2010-07-29 01:52:04 +00:00
Daniel Dunbar
7972ac4c88 MC: Destroy Macro instances.
llvm-svn: 109720
2010-07-29 01:51:55 +00:00
Eric Christopher
6a1da7b4a5 Speculatively revert r109705 since it seems to be causing some build bot
angst.

llvm-svn: 109718
2010-07-29 01:25:38 +00:00
Daniel Dunbar
a5b23b4df1 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.

llvm-svn: 109717
2010-07-29 01:21:47 +00:00
Jakob Stoklund Olesen
7f337a8e64 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.

llvm-svn: 109715
2010-07-29 00:52:19 +00:00
Jakob Stoklund Olesen
6a7ab2405c Use the right gcc tool args for IsARMArchitecture.
llvm-svn: 109714
2010-07-29 00:52:16 +00:00
Dan Gohman
ea1486b53c 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.

llvm-svn: 109705
2010-07-29 00:17:55 +00:00