Commit Graph

94714 Commits

Author SHA1 Message Date
Rafael Espindola
bcbb5dacbd Remove more dead documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187403 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 04:06:06 +00:00
Venkatraman Govindaraju
80cdaf35ab [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
2013-07-30 02:26:29 +00:00
Bill Schmidt
646cd7933b [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
2013-07-30 00:50:39 +00:00
Quentin Colombet
15d1b85094 [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
2013-07-30 00:27:16 +00:00
Quentin Colombet
75c9433b49 [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
2013-07-30 00:24:09 +00:00
Eric Christopher
3466fb11b7 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
2013-07-30 00:20:06 +00:00
Eric Christopher
86aa03d5f9 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
2013-07-29 23:53:08 +00:00
Eric Christopher
944aa2b784 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
2013-07-29 23:53:05 +00:00
Eric Christopher
407ec1422a 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
2013-07-29 23:53:01 +00:00
Eric Christopher
be48204a7b 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
2013-07-29 22:24:32 +00:00
Rafael Espindola
e0913798bc Make file_status::getUniqueID const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187383 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 21:55:38 +00:00
Rafael Espindola
1fde907244 Delete documentation for deleted options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187380 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 21:35:48 +00:00
Rafael Espindola
3ed45fe2be 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
2013-07-29 21:26:49 +00:00
Manman Ren
096880b590 Debug Info: enable verifier for testing cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187375 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 20:18:19 +00:00
Akira Hatanaka
c0fa31d51b [mips] Add comment and simplify function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187371 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 19:08:34 +00:00
Nadav Rotem
1aaa5cbab9 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
2013-07-29 18:47:36 +00:00
Nadav Rotem
79c6bee7a9 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
2013-07-29 18:18:46 +00:00
Manman Ren
d513b4033f 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
2013-07-29 18:12:58 +00:00
Nico Rieck
fdbea5107b 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
2013-07-29 13:58:39 +00:00
Nico Rieck
944061c4e1 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
2013-07-29 13:07:06 +00:00
Aaron Ballman
cc6933bd31 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
2013-07-29 13:02:08 +00:00
Rafael Espindola
cf48cf23de 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
2013-07-29 12:40:31 +00:00
Nico Rieck
c63dce3c59 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
2013-07-29 12:30:12 +00:00
NAKAMURA Takumi
c16babf693 ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 11:03:50 +00:00
Benjamin Kramer
9e036910f8 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
2013-07-29 11:02:08 +00:00
Silviu Baranga
fd79485dfa 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
2013-07-29 09:25:50 +00:00
Robert Lytton
3d906e9846 test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 09:23:13 +00:00
Chandler Carruth
e1361ec325 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
2013-07-29 09:06:53 +00:00
Nadav Rotem
3202f6cdb9 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
2013-07-29 05:13:00 +00:00
Rafael Espindola
15658b2908 Fix -Wdocumentation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187336 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 23:43:28 +00:00
Chandler Carruth
064a68682d 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
2013-07-28 22:00:33 +00:00
Craig Topper
d953bcd487 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
2013-07-28 21:28:02 +00:00
Aaron Ballman
7f817029d5 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
2013-07-28 18:04:26 +00:00
Chandler Carruth
65f12f1d05 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
2013-07-28 09:05:49 +00:00
Elena Demikhovsky
dc8a318f44 fixed compilation issue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187325 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 08:45:12 +00:00
Elena Demikhovsky
c18f4efc5d 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
2013-07-28 08:28:38 +00:00
Chandler Carruth
cea60aff34 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
2013-07-28 08:27:12 +00:00
Chandler Carruth
6c3a95dab5 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
2013-07-28 06:43:11 +00:00
Bill Schmidt
f5b9110ce1 [PowerPC] Add comment explaining preprocessor directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187320 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 03:23:32 +00:00
Bill Schmidt
eec21735b3 Revert 187318
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187319 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-28 02:13:24 +00:00
Bill Schmidt
8faa99081d [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
2013-07-28 02:08:13 +00:00
Nadav Rotem
1aaaf34154 Update the comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187316 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 23:28:47 +00:00
Michael Gottesman
ca4d2e60ea [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
2013-07-27 21:49:25 +00:00
Michael Gottesman
060d34b1cf [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
2013-07-27 21:49:21 +00:00
Michael Gottesman
7ffc854002 [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
2013-07-27 21:49:19 +00:00
Aaron Ballman
9df33cbbab 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
2013-07-27 20:20:28 +00:00
Matt Arsenault
fe655dc155 Minor code simplification suggested by Duncan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187309 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-27 19:22:28 +00:00
Benjamin Kramer
1faea8f086 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
2013-07-27 14:14:43 +00:00
Chandler Carruth
214de30d9d 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
2013-07-27 11:58:26 +00:00
Chandler Carruth
6c54b3dfb4 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
2013-07-27 11:23:08 +00:00