oota-llvm.git
11 years agoMake sure that -gsplit-dwarf isn't passed to the linker.
Eric Christopher [Tue, 30 Jul 2013 22:34:30 +0000 (22:34 +0000)]
Make sure that -gsplit-dwarf isn't passed to the linker.

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

11 years agoRespect address space sizes in isEliminableCastPair.
Matt Arsenault [Tue, 30 Jul 2013 22:27:10 +0000 (22:27 +0000)]
Respect address space sizes in isEliminableCastPair.

This avoids constant folding bitcast/ptrtoint/inttoptr combinations
that have illegal bitcasts between differently sized address spaces.

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

11 years agoRevert "Remove isCastable since nothing uses it now"
Matt Arsenault [Tue, 30 Jul 2013 22:02:14 +0000 (22:02 +0000)]
Revert "Remove isCastable since nothing uses it now"

Apparently dragonegg uses it.

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

11 years agoAdd capability for building with -gsplit-dwarf to the cmake build.
Eric Christopher [Tue, 30 Jul 2013 21:44:10 +0000 (21:44 +0000)]
Add capability for building with -gsplit-dwarf to the cmake build.

In limited testing this seems to work. Caveat emptor.

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

11 years agoRemove isCastable since nothing uses it now
Matt Arsenault [Tue, 30 Jul 2013 21:11:17 +0000 (21:11 +0000)]
Remove isCastable since nothing uses it now

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

11 years agoisKnownToBeAPowerOfTwo: Strengthen isKnownToBeAPowerOfTwo's analysis on add instructions
David Majnemer [Tue, 30 Jul 2013 21:01:36 +0000 (21:01 +0000)]
isKnownToBeAPowerOfTwo: Strengthen isKnownToBeAPowerOfTwo's analysis on add instructions

Call into ComputeMaskedBits to figure out which bits are set on both add
operands and determine if the value is a power-of-two-or-zero or not.

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

11 years agoChange behavior of calling bitcasted alias functions.
Matt Arsenault [Tue, 30 Jul 2013 20:45:05 +0000 (20:45 +0000)]
Change behavior of calling bitcasted alias functions.

It will now only convert the arguments / return value and call
the underlying function if the types are able to be bitcasted.
This avoids using fp<->int conversions that would occur before.

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

11 years ago[mips] Delete instruction format for "bal".
Akira Hatanaka [Tue, 30 Jul 2013 20:42:19 +0000 (20:42 +0000)]
[mips] Delete instruction format for "bal".

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

11 years agoThis test may have been sensitive to the ARM ABI...
Andrew Trick [Tue, 30 Jul 2013 20:34:59 +0000 (20:34 +0000)]
This test may have been sensitive to the ARM ABI...

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

11 years agoImplement getUniqueID for directories on windows.
Rafael Espindola [Tue, 30 Jul 2013 20:25:53 +0000 (20:25 +0000)]
Implement getUniqueID for directories on windows.

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

11 years ago[mips] Define "bal" as a pseudo instruction. Also, fix bug in the InstAlias that
Akira Hatanaka [Tue, 30 Jul 2013 20:24:24 +0000 (20:24 +0000)]
[mips] Define "bal" as a pseudo instruction. Also, fix bug in the InstAlias that
turns "bal" into "bgezal".

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

11 years agoRemove dead code.
Rafael Espindola [Tue, 30 Jul 2013 20:02:18 +0000 (20:02 +0000)]
Remove dead code.

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

11 years agoDown-scale slot index distance to save bits.
Andrew Trick [Tue, 30 Jul 2013 19:59:19 +0000 (19:59 +0000)]
Down-scale slot index distance to save bits.

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

11 years agowhitespace
Andrew Trick [Tue, 30 Jul 2013 19:59:15 +0000 (19:59 +0000)]
whitespace

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

11 years agoMI Sched: Track live-thru registers.
Andrew Trick [Tue, 30 Jul 2013 19:59:12 +0000 (19:59 +0000)]
MI Sched: Track live-thru registers.

When registers must be live throughout the scheduling region, increase
the limit for the register class. Once we exceed the original limit,
they will be spilled, and there's no point further reducing pressure.

This isn't a perfect heuristics but avoids a situation where the
scheduler could become trapped by trying to achieve the impossible.

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

11 years agoMI Sched fix: assert "Disconnected LRG within the scheduling region."
Andrew Trick [Tue, 30 Jul 2013 19:59:08 +0000 (19:59 +0000)]
MI Sched fix: assert "Disconnected LRG within the scheduling region."

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

11 years ago[Sparc] Rewrite MBB's live-in registers for leaf functions. Also, add
Venkatraman Govindaraju [Tue, 30 Jul 2013 19:53:10 +0000 (19:53 +0000)]
[Sparc] Rewrite MBB's live-in registers for leaf functions. Also, add
register i7 as a live-in if current function's return address is taken.

This revision fixes PR16269.

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

11 years agoImplement TokenizeWindowsCommandLine.
Rui Ueyama [Tue, 30 Jul 2013 19:03:20 +0000 (19:03 +0000)]
Implement TokenizeWindowsCommandLine.

This is a follow up patch for r187390 to implement the parser for the
Windows-style command line. This should follow the rule as described
at http://msdn.microsoft.com/en-us/library/windows/desktop/17w5ykft(v=vs.85).aspx

Differential Revision: http://llvm-reviews.chandlerc.com/D1235

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

11 years agoFix parameter ordering bug in createDebugIRPass()
Daniel Malea [Tue, 30 Jul 2013 16:16:11 +0000 (16:16 +0000)]
Fix parameter ordering bug in createDebugIRPass()
- Thanks to Ilia Filippov for pointing out the inconsistency!

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

11 years agoR600/SI: Expand vector fp <-> int conversions
Tom Stellard [Tue, 30 Jul 2013 14:31:03 +0000 (14:31 +0000)]
R600/SI: Expand vector fp <-> int conversions

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

11 years agoThis patch implements parsing of mips FCC register operands. The example instructions...
Vladimir Medic [Tue, 30 Jul 2013 10:12:14 +0000 (10:12 +0000)]
This patch implements parsing of mips FCC register operands. The example instructions have been added to test files.

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

11 years agoFix underscore to be the proper length.
Bill Wendling [Tue, 30 Jul 2013 08:26:24 +0000 (08:26 +0000)]
Fix underscore to be the proper length.

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

11 years ago[ARM] check bitwidth in PerformORCombine
Saleem Abdulrasool [Tue, 30 Jul 2013 04:43:08 +0000 (04:43 +0000)]
[ARM] check bitwidth in PerformORCombine

When simplifying a (or (and B A) (and C ~A)) to a (VBSL A B C) ensure that the
bitwidth of the second operands to both ands match before comparing the negation
of the values.

Split the check of the value of the second operands to the ands.  Move the cast
and variable declaration slightly higher to make it slightly easier to follow.

Bug-Id: 16700
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187404 91177308-0d34-0410-b5e6-96231b3b80d8

11 years agoRemove more dead documentation.
Rafael Espindola [Tue, 30 Jul 2013 04:06:06 +0000 (04:06 +0000)]
Remove more dead documentation.

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

11 years ago[Sparc] Use call's debugloc for the unimp instruction.
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

11 years ago[PowerPC] Skeletal FastISel support for 64-bit PowerPC ELF.
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

11 years ago[R600] Replicate old DAGCombiner behavior in target specific DAG combine.
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

11 years ago[DAGCombiner] insert_vector_elt: Avoid building a vector twice.
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

11 years agoMove file to X86 and add a triple to fix darwin bots for now.
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

11 years agoFix a truly egregious thinko in anonymous namespace check,
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

11 years agoMake sure we don't emit an ODR hash for types with no name and make
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

11 years agoClarify comments for types contained in anonymous namespaces and
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

11 years agoElaborate a bit on the type unit and ODR conditional code.
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

11 years agoMake file_status::getUniqueID const.
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

11 years agoDelete documentation for deleted options.
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

11 years agoInclude st_dev to make the result of getUniqueID actually unique.
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

11 years agoDebug Info: enable verifier for testing cases.
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

11 years ago[mips] Add comment and simplify function.
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

11 years agoAdd the C source code to the test to make it easier to update when debug info changes.
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

11 years agoSLPVectorier: update the debug location for the new instructions.
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

11 years agoDebug Info: update testing cases to pass verifier.
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

11 years agoUse proper section suffix for COFF weak symbols
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

11 years agoProper va_arg/va_copy lowering on win64
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

11 years agoRe-application of 187310. Re-enabling warning C4275 for MSVC 11 and up, but not...
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

11 years agoAdd support for the 's' operation to llvm-ar.
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

11 years agoMC: Support larger COFF string tables
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

11 years agoExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]
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

11 years agoSome Intel Penryn CPUs come with SSE4 disabled. Detect them as core 2.
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

11 years agoAllow generation of vmla.f32 instructions when targeting Cortex-A15. The patch also...
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

11 years agotest commit
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

11 years agoTeach the AllocaPromoter which is wrapped around the SSAUpdater
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

11 years agoDon't vectorize when the attribute NoImplicitFloat is used.
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

11 years agoFix -Wdocumentation warnings.
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

11 years agoUpdate comments for SSAUpdater to use the modern doxygen comment
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

11 years agoRemove use of sprintf added to X86 disassembler tablegen code. Send message with...
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

11 years agoPartial revert of 187310; it seems MSVC 10 still spits out this warning, but MSVC...
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

11 years agoTemporarily revert r187323 until I update SSAUpdater to match mem2reg.
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

11 years agofixed compilation issue
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

11 years agoAdded encoding prefixes for KNL instructions (EVEX).
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

11 years agoNow that mem2reg understands how to cope with a slightly wider set of
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

11 years agoThread DataLayout through the callers and into mem2reg. This will be
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

11 years ago[PowerPC] Add comment explaining preprocessor directive.
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

11 years agoRevert 187318
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

11 years ago[PowerPC] Remove unnecessary preprocessor checking.
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

11 years agoUpdate the comment
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

11 years ago[APFloat] Make all arithmetic operations with NaN produce positive NaNs.
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

11 years ago[APFloat] Move setting fcNormal in zeroSignificand() to calling code.
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

11 years ago[APFloat] Removed nextafter from missing operations since it is implemented in APFloa...
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

11 years agoRe-enabling some more MSVC warnings; all of these compile cleanly with no further...
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

11 years agoMinor code simplification suggested by Duncan
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

11 years agoDwarfDebug: MD5 is always little endian, bswap on big endian platforms.
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

11 years agoCreate a constant pool symbol for the GOT in the ARMCGBR the same way we
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

11 years agoFix yet another memory leak found by the vg-leak bot. Folks (including
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

11 years agoFix a memory leak in the debug emission by simply not allocating memory.
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

11 years agoFix a memory leak in the hexagon scheduler. We call initialize here more
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

11 years agoDon't use all the #ifdefs to hide the stats counters and instead rely on
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

11 years agoMerge the removal of dead instructions and lifetime markers with the
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

11 years agoRe-enabling a warning in MSVC mode now that r187292 fixed the only instance of the...
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

11 years agoSimplifyCFG: Add missing tests from r187278
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

11 years agoUpdate this CMakeLists.txt for r187283 too.
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

11 years agoDebug Info Verifier: verify SPs in llvm.dbg.sp.
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

11 years agoAlso update CMakeLists.txt for r187283.
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

11 years agoReimplement isPotentiallyReachable to make nocapture deduction much stronger.
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

11 years agoRe-enabling some more MSVC warnings; all of these compile cleanly with no further...
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

11 years agoSimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions
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

11 years agoMove the default back to pipefail. I accidentally reverted it before.
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

11 years agoPropagate pipefail when cloning.
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

11 years agoSLP Vectorier: Don't vectorize really short chains because they are already handled...
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

11 years agoSLP Vectorizer: Disable the vectorization of non power of two chains, such as <3...
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

11 years agoUse pipefail when available.
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

11 years agonext batch of -disable-debug-info-verifier
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

11 years agoRevert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."
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

11 years agoFix variable name.
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

11 years agoRe-enabling the C4065 warning for MSVC builds as it no longer fires due to tablegen.
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

11 years agoUse a non-c'tor for converting a boolean into a StringRef.
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

11 years agoWhen InstCombine tries to fold away (fsub x, (fneg y)) into (fadd x, y), it is
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

11 years ago[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.
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

11 years agoUse more parens to clarify assert.
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

11 years agoRemove addLetterToHash, no functional change.
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

11 years ago[mips] Implement llvm.trap intrinsic.
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