Commit Graph

91084 Commits

Author SHA1 Message Date
Eli Bendersky
20680b045a Rewrite test/ExecutionEngine tests to use FileCheck instead of grep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179043 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 19:51:36 +00:00
Matt Arsenault
ed36a47867 Update documentation.
First feature is not CPU subtype anymore since r134127

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179038 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 18:52:58 +00:00
Eli Bendersky
c3d5c1cb33 Rewrite test/Verifier tests to use FileCheck instead of grep
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 18:33:51 +00:00
Arnold Schwaighofer
813456527e X86 cost model: Model cost for uitofp and sitofp on SSE2
The costs are overfitted so that I can still use the legalization factor.

For example the following kernel has about half the throughput vectorized than
unvectorized when compiled with SSE2. Before this patch we would vectorize it.

unsigned short A[1024];
double B[1024];
void f() {
  int i;
  for (i = 0; i < 1024; ++i) {
    B[i] = (double) A[i];
  }
}

radar://13599001

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179033 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 18:05:48 +00:00
Chad Rosier
6b369ceb58 [ms-inline asm] Add support for ImmDisp [ Symbol ] memory operands.
rdar://13521249


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179030 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 17:43:47 +00:00
Hal Finkel
5ee67e8e76 Generate PPC early conditional returns
PowerPC has a conditional branch to the link register (return) instruction: BCLR.
This should be used any time when we'd otherwise have a conditional branch to a
return. This adds a small pass, PPCEarlyReturn, which runs just prior to the
branch selection pass (and, importantly, after block placement) to generate
these conditional returns when possible. It will also eliminate unconditional
branches to returns (these happen rarely; most of the time these have already
been tail duplicated by the time PPCEarlyReturn is invoked). This is a nice
optimization for small functions that do not maintain a stack frame.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 16:24:03 +00:00
Alexey Samsonov
d6b89ef0fa DWARF parser: remove duplicated code and fix code style in DIE extractors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179023 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 14:37:16 +00:00
Rafael Espindola
9d55c099d6 Add all 4 MachO object types. Use the stored type to implement is64Bits().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179021 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 13:25:33 +00:00
Vincent Lejeune
bd7c634ab9 R600: Control Flow support for pre EG gen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179020 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 13:05:49 +00:00
Chandler Carruth
58852ecc1f Simplify the quoting here. Our lit emulator doesn't deal well with the
nested quoting schemes, and they're not important here...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179014 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 10:07:50 +00:00
Chandler Carruth
89ec385e5e Remove a global 'endl' variable from the other file as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:55:18 +00:00
Chandler Carruth
97034bb95d Clean up namespaces in obj2yaml.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179009 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:55:14 +00:00
Tim Northover
c966285995 Add ACLE link to ARM documentation sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:42:24 +00:00
Tim Northover
211ffd242d AArch64: remove barriers from AArch64 atomic operations.
I've managed to convince myself that AArch64's acquire/release
instructions are sufficient to guarantee C++11's required semantics,
even in the sequentially-consistent case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179005 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:40:41 +00:00
Chandler Carruth
724a7b145d Cleanup the formatting of obj2yaml.cpp.
I couldn't touch this file and not clean it up some. These reformattings
brought to you by clang-format, with some minor adjustments by me. More
spring cleaning to follow here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179004 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:39:59 +00:00
Chandler Carruth
bcff69a1e0 Don't define our own global 'endl' variable. While technically it had
internal linkage and so wasn't a patent bug, it doesn't make any sense
here. We can avoid even calling operator<< by just embedding the newline
in the string literals that were already being streamed out. It also
gives the impression of some line-ending agnosticisms which is not
present, and that flushing happens when it doesn't.

If we want to use std::endl, we could do that, but honestly it doesn't
seem remotely worth it. Using '\n' directly is much more clear when
working with raw_ostream.

It also happens to fix builds with old crufty GCC STL implementations
that include std::endl into the global namespace (or headers written to
be compatible with such atrocities).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179003 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:30:47 +00:00
Benjamin Kramer
7fba6cd3d0 ARM: Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179001 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 08:07:35 +00:00
Hal Finkel
59889f7f49 Cleanup and improve PPC fsel generation
First, we should not cheat: fsel-based lowering of select_cc is a
finite-math-only optimization (the ISA manual, section F.3 of v2.06, makes
this clear, as does a note in our own README).

This also adds fsel-based lowering of EQ and NE condition codes. As it turned
out, fsel generation was covered by a grand total of zero regression test
cases. I've added some test cases to cover the existing behavior (which is now
finite-math only), as well as the new EQ cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179000 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 22:11:09 +00:00
Arnold Schwaighofer
cd3d60c450 TargetLowering: Fix getTypeConversion handling of extended vector types
The code in getTypeConversion attempts to promote the element vector type
before it trys to split or widen the vector.
After it failed finding a legal vector type by promoting it would continue using
the promoted vector element type. Thereby missing legal splitted vector types.
For example the type v32i32 that has a legal split of 4 x v3i32 on x86/sse2
would be transformed to: v32i256 and from there on successively split to:
v16i256, v8i256, v1i256 and then finally ends up as an i64 type.
By resetting the vector element type to the original vector element type that
existed before the promotion the code will attempt to split the vector type to
smaller vector widths of the same type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178999 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 20:22:56 +00:00
Rafael Espindola
8764c8979c Make MachOObjectFile independent from MachOObject.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178998 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 20:01:29 +00:00
Rafael Espindola
f1cc8001fd Implement MachOObjectFile::getData directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178997 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 19:42:15 +00:00
Rafael Espindola
49698a1e69 Implement MachOObjectFile::is64Bit directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178996 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 19:38:15 +00:00
Rafael Espindola
c90cc18b6a Implement MachOObjectFile::getHeaderSize directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178995 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 19:31:49 +00:00
Rafael Espindola
433611bdf3 Implement MachOObjectFile::getHeader directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178994 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 19:26:57 +00:00
Jakob Stoklund Olesen
18fdb398ea Implement LowerCall_64 for the SPARC v9 64-bit ABI.
There is still no support for byval arguments (which I don't think are
needed) and varargs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178993 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 19:10:57 +00:00
Rafael Espindola
0f08eb1359 Implement MachOObjectFile::getHeaderSize and MachOObjectFile::getData.
These were the last missing forwarding functions. Also consistently use
the forwarding functions instead of using MachOObj directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178992 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 19:05:30 +00:00
Rafael Espindola
6ab85a81d7 Remove LoadCommandInfo now that we always have a pointer to the command.
LoadCommandInfo was needed to keep a command and its offset in the file. Now
that we always have a pointer to the command, we don't need the offset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178991 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 18:42:06 +00:00
Rafael Espindola
77638d9110 Add MachOObjectFile::LoadCommandInfo.
This avoids using MachOObject::getLoadCommandInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178990 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 18:08:12 +00:00
Rafael Espindola
f305127f0b Use getLoadCommandInfo instead of MachOObj->getLoadCommandInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178989 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 17:41:59 +00:00
Rafael Espindola
6f1f33915a Construct MachOObject in MachOObjectFile's constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178988 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 16:58:48 +00:00
Rafael Espindola
2c6f997290 Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178987 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 16:40:00 +00:00
Rafael Espindola
3eff318cba Remove MachOObjectFile::getObject.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178986 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 16:07:35 +00:00
Rafael Espindola
0be4eafd9c Remove two uses of getObject.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 15:46:05 +00:00
Rafael Espindola
1efa60453b Remove usage of InMemoryStruct in getSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178984 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 15:35:18 +00:00
Hal Finkel
6e43efe071 PPC Altivec load/store intrinsics can be marked IntrRead[Write]ArgMem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178983 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 15:32:40 +00:00
Hal Finkel
946a811ef1 PPC rotate instructions don't have unmodeled side effcts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178982 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 15:06:53 +00:00
Rafael Espindola
7ea2e48694 Remove a use of InMemoryStruct in llvm-readobj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178981 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 15:05:12 +00:00
Rafael Espindola
305b826f92 Make getObject const. Remove a const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178980 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 14:50:40 +00:00
Rafael Espindola
196abbffe9 Remove last use of InMemoryStruct in llvm-objdump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 14:40:18 +00:00
Hal Finkel
f0e3ca012b Most PPC M[TF]CR instructions do not have side effects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178978 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 14:33:13 +00:00
Rafael Espindola
13d297260f Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178977 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 14:30:21 +00:00
Rafael Espindola
eb721c0fbd Remove unused argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 14:25:39 +00:00
Chandler Carruth
05c7e7f99d Fix PR15674 (and PR15603): a SROA think-o.
The fix for PR14972 in r177055 introduced a real think-o in the *store*
side, likely because I was much more focused on the load side. While we
can arbitrarily widen (or narrow) a loaded value, we can't arbitrarily
widen a value to be stored, as that changes the width of memory access!
Lock down the code path in the store rewriting which would do this to
only handle the intended circumstance.

All of the existing tests continue to pass, and I've added a test from
the PR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178974 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 11:47:54 +00:00
Hal Finkel
3aea7cb7b2 PPC pre-increment load instructions do not have side effects
A few were missed in r178972.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 06:30:47 +00:00
Hal Finkel
fa1d102a05 PPC pre-increment load instructions do not have side effects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178972 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 05:46:58 +00:00
Hal Finkel
aecbe24268 PPC MCRF instruction does not have side effects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178971 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 05:16:57 +00:00
Hal Finkel
fa1cac2a1e PPC FMR instruction does not have side effects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178970 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 04:56:16 +00:00
Eric Christopher
9a9e73b47d DW_FORM_sec_offset should be a relocation on platforms that use
a relocation across sections. Do this for DW_AT_stmt list in the
skeleton CU and check the relocations in the debug_info section.

Add a FIXME for multiple CUs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178969 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 03:43:09 +00:00
Reid Kleckner
16f1969328 [cmake] Avoid rel+asserts warnings when passing -UNDEBUG
MSVC 2012 gives warning D9025, "overriding /D NDEBUG with -UNDEBUG".
Removing the original definition of NDEBUG silences this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178967 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-07 01:45:01 +00:00
Jakob Stoklund Olesen
53d4bcf35e Implement LowerReturn_64 for SPARC v9.
Integer return values are sign or zero extended by the callee, and
structs up to 32 bytes in size can be returned in registers.

The CC_Sparc64 CallingConv definition is shared between
LowerFormalArguments_64 and LowerReturn_64. Function arguments and
return values are passed in the same registers.

The inreg flag is also used for return values. This is required to handle
C functions returning structs containing floats and ints:

  struct ifp {
    int i;
    float f;
  };

  struct ifp f(void);

LLVM IR:

  define inreg { i32, float } @f() {
     ...
     ret { i32, float } %retval
  }

The ABI requires that %retval.i is returned in the high bits of %i0
while %retval.f goes in %f1.

Without the inreg return value attribute, %retval.i would go in %i0 and
%retval.f would go in %f3 which is a more efficient way of returning
%multiple values, but it is not ABI compliant for returning C structs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178966 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-06 23:57:33 +00:00