Venkatraman Govindaraju [Tue, 30 Jul 2013 02:26:29 +0000 (02:26 +0000)]
[Sparc] Use call's debugloc for the unimp instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187402
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Tue, 30 Jul 2013 00:50:39 +0000 (00:50 +0000)]
[PowerPC] Skeletal FastISel support for 64-bit PowerPC ELF.
This is the first of many upcoming patches for PowerPC fast
instruction selection support. This patch implements the minimum
necessary for a functional (but extremely limited) FastISel pass. It
allows the table-generated portions of the selector to be created and
used, but in most cases selection will fall back to the DAG selector.
None of the block terminator instructions are implemented yet, and
most interesting instructions require some special handling.
Therefore there aren't any new test cases with this patch. There will
be quite a few tests coming with future patches.
This patch adds the make/CMake support for the new code (including
tablegen -gen-fast-isel) and creates the FastISel object for PPC64 ELF
only. It instantiates the necessary virtual functions
(TargetSelectInstruction, TargetMaterializeConstant,
TargetMaterializeAlloca, tryToFoldLoadIntoMI, and FastLowerArguments),
but of these, only TargetMaterializeConstant contains any useful
implementation. This is present since the table-generated code
requires the ability to materialize integer constants for some
instructions.
This patch has been tested by building and running the
projects/test-suite code with -O0. All tests passed with the
exception of a couple of long-running tests that time out using -O0
code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187399
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 30 Jul 2013 00:27:16 +0000 (00:27 +0000)]
[R600] Replicate old DAGCombiner behavior in target specific DAG combine.
build_vector is lowered to REG_SEQUENCE, which is something the register
allocator does a good job at optimizing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187397
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 30 Jul 2013 00:24:09 +0000 (00:24 +0000)]
[DAGCombiner] insert_vector_elt: Avoid building a vector twice.
This patch prevents the following combine when the input vector is used more
than once.
insert_vector_elt (build_vector elt0, ..., eltN), NewEltIdx, idx
=>
build_vector elt0, ..., NewEltIdx, ..., eltN
The reasons are:
- Building a vector may be expensive, so try to reuse the existing part of a
vector instead of creating a new one (think big vectors).
- elt0 to eltN now have two users instead of one. This may prevent some other
optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187396
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 30 Jul 2013 00:20:06 +0000 (00:20 +0000)]
Move file to X86 and add a triple to fix darwin bots for now.
The problem is due to the section name being explicitly mentioned in
the IR and differing between the two platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187394
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 29 Jul 2013 23:53:08 +0000 (23:53 +0000)]
Fix a truly egregious thinko in anonymous namespace check,
update testcase to make sure we generate debug info for walrus
by adding a non-trivial constructor and verify that we don't
emit an ODR signature for the type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187393
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 29 Jul 2013 23:53:05 +0000 (23:53 +0000)]
Make sure we don't emit an ODR hash for types with no name and make
sure the comments for each testcase are a bit easier to distinguish.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187392
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 29 Jul 2013 23:53:01 +0000 (23:53 +0000)]
Clarify comments for types contained in anonymous namespaces and
odr hashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187391
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 29 Jul 2013 22:24:32 +0000 (22:24 +0000)]
Elaborate a bit on the type unit and ODR conditional code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187385
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jul 2013 21:55:38 +0000 (21:55 +0000)]
Make file_status::getUniqueID const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187383
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jul 2013 21:35:48 +0000 (21:35 +0000)]
Delete documentation for deleted options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187380
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jul 2013 21:26:49 +0000 (21:26 +0000)]
Include st_dev to make the result of getUniqueID actually unique.
This will let us use getUniqueID instead of st_dev directly on clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187378
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 29 Jul 2013 20:18:19 +0000 (20:18 +0000)]
Debug Info: enable verifier for testing cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187375
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 29 Jul 2013 19:08:34 +0000 (19:08 +0000)]
[mips] Add comment and simplify function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187371
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Jul 2013 18:47:36 +0000 (18:47 +0000)]
Add the C source code to the test to make it easier to update when debug info changes.
Thanks Eric.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187368
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Jul 2013 18:18:46 +0000 (18:18 +0000)]
SLPVectorier: update the debug location for the new instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187363
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 29 Jul 2013 18:12:58 +0000 (18:12 +0000)]
Debug Info: update testing cases to pass verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187362
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Mon, 29 Jul 2013 13:58:39 +0000 (13:58 +0000)]
Use proper section suffix for COFF weak symbols
32-bit symbols have "_" as global prefix, but when forming the name of
COMDAT sections this prefix is ignored. The current behavior assumes that
this prefix is always present which is not the case for 64-bit and names
are truncated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187356
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Mon, 29 Jul 2013 13:07:06 +0000 (13:07 +0000)]
Proper va_arg/va_copy lowering on win64
Win64 uses CharPtrBuiltinVaList instead of X86_64ABIBuiltinVaList like
other 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187355
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 29 Jul 2013 13:02:08 +0000 (13:02 +0000)]
Re-application of 187310. Re-enabling warning C4275 for MSVC 11 and up, but not MSVC 10 since it is still required there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187354
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jul 2013 12:40:31 +0000 (12:40 +0000)]
Add support for the 's' operation to llvm-ar.
If no other operation is specified, 's' becomes an operation instead of an
modifier. The s operation just creates a symbol table. It is the same as
running ranlib.
We assume the archive was created by a sane ar (like llvm-ar or gnu ar) and
if the symbol table is present, then it is current. We use that to optimize
the most common case: a broken build system that thinks it has to run ranlib.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187353
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Mon, 29 Jul 2013 12:30:12 +0000 (12:30 +0000)]
MC: Support larger COFF string tables
Single-slash encoded entries do not require a terminating null. This bumps
the maximum table size from ~1MB to ~9.5MB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187352
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Jul 2013 11:03:50 +0000 (11:03 +0000)]
ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187351
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 29 Jul 2013 11:02:08 +0000 (11:02 +0000)]
Some Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.
PR16721.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187350
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Mon, 29 Jul 2013 09:25:50 +0000 (09:25 +0000)]
Allow generation of vmla.f32 instructions when targeting Cortex-A15. The patch also adds the VFP4 feature to Cortex-A15 and fixes the DontUseFusedMAC predicate so that we can still generate vmla.f32 instructions on non-darwin targets with VFP4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187349
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Mon, 29 Jul 2013 09:23:13 +0000 (09:23 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 29 Jul 2013 09:06:53 +0000 (09:06 +0000)]
Teach the AllocaPromoter which is wrapped around the SSAUpdater
infrastructure to do promotion without a domtree the same smarts about
looking through GEPs, bitcasts, etc., that I just taught mem2reg about.
This way, if SROA chooses to promote an alloca which still has some
noisy instructions this code can cope with them.
I've not used as principled of an approach here for two reasons:
1) This code doesn't really need it as we were already set up to zip
through the instructions used by the alloca.
2) I view the code here as more of a hack, and hopefully a temporary one.
The SSAUpdater path in SROA is a real sore point for me. It doesn't make
a lot of architectural sense for many reasons:
- We're likely to end up needing the domtree anyways in a subsequent
pass, so why not compute it earlier and use it.
- In the future we'll likely end up needing the domtree for parts of the
inliner itself.
- If we need to we could teach the inliner to preserve the domtree. Part
of the re-work of the pass manager will allow this to be very powerful
even in large SCCs with many functions.
- Ultimately, computing a domtree has gotten significantly faster since
the original SSAUpdater-using code went into ScalarRepl. We no longer
use domfrontiers, and much of domtree is lazily done based on queries
rather than eagerly.
- At this point keeping the SSAUpdater-based promotion saves a total of
0.7% on a build of the 'opt' tool for me. That's not a lot of
performance given the complexity!
So I'm leaving this a bit ugly in the hope that eventually we just
remove all of this nonsense.
I can't even readily test this because this code isn't reachable except
through SROA. When I re-instate the patch that fast-tracks allocas
already suitable for promotion, I'll add a testcase there that failed
before this change. Before that, SROA will fix any test case I give it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187347
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Jul 2013 05:13:00 +0000 (05:13 +0000)]
Don't vectorize when the attribute NoImplicitFloat is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187340
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Jul 2013 23:43:28 +0000 (23:43 +0000)]
Fix -Wdocumentation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187336
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 28 Jul 2013 22:00:33 +0000 (22:00 +0000)]
Update comments for SSAUpdater to use the modern doxygen comment
standards for LLVM. Remove duplicated comments on the interface from the
implementation file (implementation comments are left there of course).
Also clean up, re-word, and fix a few typos and errors in the commenst
spotted along the way.
This is in preparation for changes to these files and to keep the
uninteresting tidying in a separate commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187335
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 28 Jul 2013 21:28:02 +0000 (21:28 +0000)]
Remove use of sprintf added to X86 disassembler tablegen code. Send message with instruction name to errs() instead and use a generic message for the llvm_unreachable. Consistent with other places in this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187333
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 28 Jul 2013 18:04:26 +0000 (18:04 +0000)]
Partial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC 11 does not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187331
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 28 Jul 2013 09:05:49 +0000 (09:05 +0000)]
Temporarily revert r187323 until I update SSAUpdater to match mem2reg.
I forgot that we had two totally independent things here. :: sigh ::
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187327
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 28 Jul 2013 08:45:12 +0000 (08:45 +0000)]
fixed compilation issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187325
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 28 Jul 2013 08:28:38 +0000 (08:28 +0000)]
Added encoding prefixes for KNL instructions (EVEX).
Added 512-bit operands printing.
Added instruction formats for KNL instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187324
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 28 Jul 2013 08:27:12 +0000 (08:27 +0000)]
Now that mem2reg understands how to cope with a slightly wider set of
uses of an alloca, we can pre-compute promotability while analyzing an
alloca for splitting in SROA. That lets us short-circuit the common case
of a bunch of trivially promotable allocas. This cuts 20% to 30% off the
run time of SROA for typical frontend-generated IR sequneces I'm seeing.
It gets the new SROA to within 20% of ScalarRepl for such code. My
current benchmark for these numbers is PR15412, but it fits the general
pattern of IR emitted by Clang so it should be widely applicable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187323
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 28 Jul 2013 06:43:11 +0000 (06:43 +0000)]
Thread DataLayout through the callers and into mem2reg. This will be
useful in a subsequent patch, but causes an unfortunate amount of noise,
so I pulled it out into a separate patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187322
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Sun, 28 Jul 2013 03:23:32 +0000 (03:23 +0000)]
[PowerPC] Add comment explaining preprocessor directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187320
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Sun, 28 Jul 2013 02:13:24 +0000 (02:13 +0000)]
Revert 187318
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187319
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Sun, 28 Jul 2013 02:08:13 +0000 (02:08 +0000)]
[PowerPC] Remove unnecessary preprocessor checking.
The tests !defined(__ppc__) && !defined(__powerpc__) are not needed
or helpful when verifying that code is being compiled for a 64-bit
target. The simpler test provided by this revision is sufficient to
tell if the target is 64-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187318
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 27 Jul 2013 23:28:47 +0000 (23:28 +0000)]
Update the comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187316
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 27 Jul 2013 21:49:25 +0000 (21:49 +0000)]
[APFloat] Make all arithmetic operations with NaN produce positive NaNs.
IEEE-754R 1.4 Exclusions states that IEEE-754R does not specify the
interpretation of the sign of NaNs. In order to remove an irrelevant
variable that most floating point implementations do not use,
standardize add, sub, mul, div, mod so that operating anything with
NaN always yields a positive NaN.
In a later commit I am going to update the APIs for creating NaNs so
that one can not even create a negative NaN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187314
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 27 Jul 2013 21:49:21 +0000 (21:49 +0000)]
[APFloat] Move setting fcNormal in zeroSignificand() to calling code.
Zeroing the significand of a floating point number does not necessarily cause a
floating point number to become finite non zero. For instance, if one has a NaN,
zeroing the significand will cause it to become +/- infinity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187313
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 27 Jul 2013 21:49:19 +0000 (21:49 +0000)]
[APFloat] Removed nextafter from missing operations since it is implemented in APFloat::next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187312
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 27 Jul 2013 20:20:28 +0000 (20:20 +0000)]
Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187310
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 27 Jul 2013 19:22:28 +0000 (19:22 +0000)]
Minor code simplification suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187309
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Jul 2013 14:14:43 +0000 (14:14 +0000)]
DwarfDebug: MD5 is always little endian, bswap on big endian platforms.
This makes LLVM emit the same signature regardless of host and target endianess.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187304
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Jul 2013 11:58:26 +0000 (11:58 +0000)]
Create a constant pool symbol for the GOT in the ARMCGBR the same way we
do in the SDag when lowering references to the GOT: use
ARMConstantPoolSymbol rather than creating a dummy global variable. The
computation of the alignment still feels weird (it uses IR types and
datalayout) but it preserves the exact previous behavior. This change
fixes the memory leak of the global variable detected on the valgrind
leak checking bot.
Thanks to Benjamin Kramer for pointing me at ARMConstantPoolSymbol to
handle this use case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187303
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Jul 2013 11:23:08 +0000 (11:23 +0000)]
Fix yet another memory leak found by the vg-leak bot. Folks (including
me) should start watching this bot more as its catching lots of bugs.
The fix here is to not construct the global if we aren't going to need
it. That's cheaper anyways, and globals have highly predictable types in
practice. I've added an assert to catch skew between our manual testing
of the type and the actual type just for paranoia's sake.
Note that this pattern is actually fine in most globals because when you
build a global with a module it automatically is moved to be owned by
that module. But here, we're in isel and don't really want to do that.
The solution of not creating a global is simpler anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187302
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Jul 2013 11:09:58 +0000 (11:09 +0000)]
Fix a memory leak in the debug emission by simply not allocating memory.
There doesn't appear to be any reason to put this variable on the heap.
I'm suspicious of the LexicalScope above that we stuff in a map and then
delete afterward, but I'm just trying to get the valgrind bot clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187301
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Jul 2013 10:48:45 +0000 (10:48 +0000)]
Fix a memory leak in the hexagon scheduler. We call initialize here more
than once, and the second time through we leaked memory. Found thanks to
the vg-leak bot, but I can't locally reproduce it with valgrind. The
debugger confirms that it is in fact leaking here.
This whole code is totally gross. Why is initialize being called on each
runOnFunction??? Why aren't these OwningPtr<>s, and why aren't their
lifetimes better defined? Anyways, this is just a surgical change to
help out the leak checking bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187299
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Jul 2013 10:17:49 +0000 (10:17 +0000)]
Don't use all the #ifdefs to hide the stats counters and instead rely on
their being optimized out in debug mode. Realistically, this just isn't
going to be the slow part anyways. This also fixes unused variable
warnings that are breaking LLD build bots. =/ I didn't see these at
first, and kept losing track of the fact that they were broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187297
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Jul 2013 09:43:30 +0000 (09:43 +0000)]
Merge the removal of dead instructions and lifetime markers with the
analysis of the alloca. We don't need to visit all the users twice for
this. We build up a kill list during the analysis and then just process
it afterward. This recovers the tiny bit of performance lost by moving
to the visitor based analysis system as it removes one entire use-list
walk from mem2reg. In some cases, this is now faster than mem2reg was
previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187296
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 27 Jul 2013 03:35:44 +0000 (03:35 +0000)]
Re-enabling a warning in MSVC mode now that r187292 fixed the only instance of the warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187293
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 27 Jul 2013 02:54:44 +0000 (02:54 +0000)]
SimplifyCFG: Add missing tests from r187278
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187291
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 27 Jul 2013 01:26:30 +0000 (01:26 +0000)]
Update this CMakeLists.txt for r187283 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187286
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 27 Jul 2013 01:26:08 +0000 (01:26 +0000)]
Debug Info Verifier: verify SPs in llvm.dbg.sp.
Also always add DIType, DISubprogram and DIGlobalVariable to the list
in DebugInfoFinder without checking them, so we can verify them later
on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187285
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 27 Jul 2013 01:25:51 +0000 (01:25 +0000)]
Also update CMakeLists.txt for r187283.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187284
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 27 Jul 2013 01:24:00 +0000 (01:24 +0000)]
Reimplement isPotentiallyReachable to make nocapture deduction much stronger.
Adds unit tests for it too.
Split BasicBlockUtils into an analysis-half and a transforms-half, and put the
analysis bits into a new Analysis/CFG.{h,cpp}. Promote isPotentiallyReachable
into llvm::isPotentiallyReachable and move it into Analysis/CFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187283
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 27 Jul 2013 00:13:11 +0000 (00:13 +0000)]
Re-enabling some more MSVC warnings; all of these compile cleanly with no further changes required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187279
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 27 Jul 2013 00:01:07 +0000 (00:01 +0000)]
SimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions
Merge consecutive if-regions if they contain identical statements.
Both transformations reduce number of branches. The transformation
is guarded by a target-hook, and is currently enabled only for +R600,
but the correctness has been tested on X86 target using a variety of
CPU benchmarks.
Patch by: Mei Ye
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187278
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 23:22:43 +0000 (23:22 +0000)]
Move the default back to pipefail. I accidentally reverted it before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187271
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 23:17:38 +0000 (23:17 +0000)]
Propagate pipefail when cloning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187268
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 26 Jul 2013 23:07:55 +0000 (23:07 +0000)]
SLP Vectorier: Don't vectorize really short chains because they are already handled by the SelectionDAG store-vectorizer, which does a better job in deciding when to vectorize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187267
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Fri, 26 Jul 2013 22:53:11 +0000 (22:53 +0000)]
SLP Vectorizer: Disable the vectorization of non power of two chains, such as <3 x float>, because we dont have a good cost model for these types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187265
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 22:32:58 +0000 (22:32 +0000)]
Use pipefail when available.
This change makes test with RUN lines like
RUN: opt ... | FileCheck
fail if opt fails, even if it prints what FileCheck wants. Enabling this
found some interesting cases of broken tests that were not being noticed
because opt (or some other tool) was crashing late.
Pipefail is used when the shell supports it or when using the internal
python based tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187261
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 22:31:26 +0000 (22:31 +0000)]
next batch of -disable-debug-info-verifier
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187260
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 22:13:57 +0000 (22:13 +0000)]
Revert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."
This reverts commit r187248. It broke many bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187254
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 Jul 2013 22:06:21 +0000 (22:06 +0000)]
Fix variable name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187253
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Fri, 26 Jul 2013 22:03:03 +0000 (22:03 +0000)]
Re-enabling the C4065 warning for MSVC builds as it no longer fires due to tablegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187252
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 26 Jul 2013 21:50:30 +0000 (21:50 +0000)]
Use a non-c'tor for converting a boolean into a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187250
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 26 Jul 2013 21:40:29 +0000 (21:40 +0000)]
When InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
also worthwhile for it to look through FP extensions and truncations, whose
application commutes with fneg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187249
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 26 Jul 2013 21:39:15 +0000 (21:39 +0000)]
[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.
Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
all PowerPC targets, whether 32- or 64-bit. They will both implicitly
define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not
for 32-bit targets. We cannot be sure that all other possible
compilers used to compile Clang/LLVM define both __ppc__ and
__powerpc__, for example, so it is best to check for both when relying
on either inside the Clang/LLVM code base.
This patch makes sure we always check for both variants. In addition,
it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp.
(At least one of __ppc__ and __powerpc__ should always be defined when
compiling for a PowerPC target, no matter which compiler is used, so
testing for them is unnecessary.)
There are some places in the compiler that check for other variants,
like __POWERPC__ and _POWER, and I have left those in place. There is
no need to add them elsewhere. This seems to be in Apple-specific
code, and I won't take a chance on breaking it.
There is no intended change in behavior; thus, no test cases are
added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187248
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 21:16:25 +0000 (21:16 +0000)]
Use more parens to clarify assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187247
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 21:07:18 +0000 (21:07 +0000)]
Remove addLetterToHash, no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187245
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 20:58:55 +0000 (20:58 +0000)]
[mips] Implement llvm.trap intrinsic.
Patch by Sasa Stankovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187244
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 20:51:20 +0000 (20:51 +0000)]
[mips] Fix FP conditional move instructions to have explicit FP condition code
register operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187242
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 20:44:45 +0000 (20:44 +0000)]
Add missing 'n'.
Thanks to Han Finkel for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187241
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 20:13:47 +0000 (20:13 +0000)]
[mips] Fix FP branch instructions to have explicit FP condition code register
operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187238
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 26 Jul 2013 20:04:30 +0000 (20:04 +0000)]
Debug Info Verifier: enable verification of DICompileUnit.
We used to call Verify before adding DICompileUnit to the list, and now we
remove the check and always add DICompileUnit to the list in DebugInfoFinder,
so we can verify them later on.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187237
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 19:03:48 +0000 (19:03 +0000)]
[mips] Increase the number of floating point condition code registers to eight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187234
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 19:01:56 +0000 (19:01 +0000)]
[mips] Fix floating point branch, comparison, and conditional move instructions
to have register FCC0 (the first floating point condition code register) in
their Uses/Defs list.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187233
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 18:50:42 +0000 (18:50 +0000)]
[mips] Delete register print method MipsInstPrinter::printCPURegs that is not
needed. The generic method printOperand will do.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187231
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Jul 2013 18:34:25 +0000 (18:34 +0000)]
[mips] Print instructions "beq", "bne" and "or" using assembler pseudo
instructions "beqz", "bnez" and "move", when possible.
beq $2, $zero, $L1 => beqz $2, $L1
bne $2, $zero, $L1 => bnez $2, $L1
or $2, $3, $zero => move $2, $3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187229
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Fri, 26 Jul 2013 18:09:50 +0000 (18:09 +0000)]
Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187226
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Lin [Fri, 26 Jul 2013 17:55:00 +0000 (17:55 +0000)]
Correct case of m_UIToFp to m_UIToFP to match instruction name, add m_SIToFP for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187225
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 17:45:19 +0000 (17:45 +0000)]
Collapse conditional and add an assert for unhandled scope types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187224
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 26 Jul 2013 17:37:20 +0000 (17:37 +0000)]
Re-add DataLayout pointer size convenience functions.
These were reverted in r167222 along with the rest
of the last different address space pointer size attempt.
These will be used in later commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187223
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 17:35:47 +0000 (17:35 +0000)]
Move this to the X86 directory, unfortunately the hashes are not
endian independent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187222
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 17:13:47 +0000 (17:13 +0000)]
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187217
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 17:02:41 +0000 (17:02 +0000)]
Add preliminary support for hashing DIEs and breaking them into
type units.
Initially this support is used in the computation of an ODR checker
for C++. For now we're attaching it to the DIE, but in the future
it will be attached to the type unit.
This also starts breaking out types into the separation for type
units, but without actually splitting the DIEs.
In preparation for hashing the DIEs this adds a DIEString type
that contains a StringRef with the string contained at the label.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187213
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 26 Jul 2013 17:02:36 +0000 (17:02 +0000)]
Add a way to get the context of any particular scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187212
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 26 Jul 2013 16:54:23 +0000 (16:54 +0000)]
Remove dead or useless header checks from cmake and autoconf
On Windows, this improves clean cmake configuration time on my
workstation from 1m58s to 1m32s, which is pretty significant. There's
probably more that can be done here, but this is the low hanging fruit.
Eric volunteered to regenerate ./configure for me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187209
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 16:21:31 +0000 (16:21 +0000)]
Extend the lifetime of the strings passed to posix_spawn_file_actions_addopen.
Thanks to Hal Finkel for finding the bug and for the initial patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187208
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 14:55:36 +0000 (14:55 +0000)]
Improve our error handling on windows.
* Remove LLVM_ENABLE_CRT_REPORT. LLVM_DISABLE_CRASH_REPORT made it redundant.
* set Return to 1, so that we get a stack trace on failure.
* don't call _exit, so that we get a negative exit value and "not --crash"
correctly differentiates crashes and regular errors.
This is a bit experimental since the documentation on this interface is sparse.
It doesn't bring up a dialog on my windows setup, but feel free to revert
if it causes problem for your setup (and let me know what it is so that I
can try to fix this patch).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187206
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 14:16:30 +0000 (14:16 +0000)]
Next batch of -disable-debug-info-verifier.
These tests fail without it if pipefail is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187205
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 26 Jul 2013 13:28:29 +0000 (13:28 +0000)]
Add a target legalize hook for SplitVectorOperand (again)
CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.
This also adds a test case for NVPTX that depends on this custom
legalization.
Differential Revision: http://llvm-reviews.chandlerc.com/D1195
Attempt to fix the buildbots by making the X86 test I just added platform independent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187202
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 26 Jul 2013 13:18:16 +0000 (13:18 +0000)]
Revert "Add a target legalize hook for SplitVectorOperand"
This reverts commit 187198. It broke the bots.
The soft float test probably needs a -triple because of name differences.
On the hard float test I am getting a "roundss $1, %xmm0, %xmm0", instead of
"vroundss $1, %xmm0, %xmm0, %xmm0".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187201
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Fri, 26 Jul 2013 12:46:39 +0000 (12:46 +0000)]
Add a target legalize hook for SplitVectorOperand
CustomLowerNode was not being called during SplitVectorOperand,
meaning custom legalization could not be used by targets.
This also adds a test case for NVPTX that depends on this custom
legalization.
Differential Revision: http://llvm-reviews.chandlerc.com/D1195
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187198
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Fri, 26 Jul 2013 10:19:02 +0000 (10:19 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187195
91177308-0d34-0410-b5e6-
96231b3b80d8