1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

91024 Commits

Author SHA1 Message Date
Nadav Rotem
c48b9d78aa Remove the confusing sentence.
llvm-svn: 179085
2013-04-09 04:48:40 +00:00
Nadav Rotem
fad36d8034 Revert 179071 because it is not the right way to support non standard new/new[] operators.
llvm-svn: 179084
2013-04-09 04:43:46 +00:00
Jakob Stoklund Olesen
6a275455ac Compute correct frame sizes for SPARC v9 64-bit frames.
The save area is twice as big and there is no struct return slot. The
stack pointer is always 16-byte aligned (after adding the bias).

Also eliminate the stack adjustment instructions around calls when the
function has a reserved stack frame.

llvm-svn: 179083
2013-04-09 04:37:47 +00:00
Rafael Espindola
99aef06cd8 More uses for SymbolTableEntryBase.
llvm-svn: 179076
2013-04-09 01:04:06 +00:00
Rafael Espindola
18c6f4c1eb Add a SymbolTableEntryBase.
Use it when we don't need to know if we have a 32 or 64 bit SymbolTableEntry.

llvm-svn: 179074
2013-04-09 00:22:58 +00:00
Joe Groff
36d7fb53e7 Fix PointerIntPair to be enum class compatible.
Some parts of PointerIntPair assumed that the IntType of the pair was implicitly
convertible to intptr_t, which is not the case for enum class values. Add a
static_cast<intptr_t> to make these conversions explicit and allow
PointerIntPair to be used with an enum class IntType. While we're here, rename
some of the argument values so we don't have variables named "Int" floating
around.

llvm-svn: 179073
2013-04-09 00:01:51 +00:00
Rafael Espindola
f3e0e85032 Add a SectionBase struct.
Use it to share code and when we don't need to know if we have a 32 or 64
bit Section.

llvm-svn: 179072
2013-04-08 23:57:13 +00:00
Nadav Rotem
e99e862deb c++ new operators are not malloc-like functions because they do not return uninitialized memory.
Users may overide new-operators and implement any function that they like.

llvm-svn: 179071
2013-04-08 23:40:47 +00:00
NAKAMURA Takumi
598c40d4a4 InstructionSimplify.cpp: Fix a ligature, "fi", to get rid of utf8 in comment.
llvm-svn: 179066
2013-04-08 23:05:21 +00:00
Shuxin Yang
cc126626e3 Redo the fix Benjamin Kramer committed in r178793 about iterator invalidation in Reassociate.
I brazenly think this change is slightly simpler than r178793 because: 
  - no "state" in functor
  - "OpndPtrs[i]" looks simpler than "&Opnds[OpndIndices[i]]" 

  While I can reproduce the probelm in Valgrind, it is rather difficult to come up
a standalone testing case. The reason is that when an iterator is invalidated,
the stale invalidated elements are not yet clobbered by nonsense data, so the
optimizer can still proceed successfully. 

  Thank Benjamin for fixing this bug and generously providing the test case.

llvm-svn: 179062
2013-04-08 22:00:43 +00:00
Nadav Rotem
cedc2f5e24 Update the docs about the fact that the loop vectorizer is enabled by default for -O3.
llvm-svn: 179060
2013-04-08 21:34:49 +00:00
Rafael Espindola
ad3e40ef0b Template the MachO types over the word size.
llvm-svn: 179051
2013-04-08 20:45:01 +00:00
Rafael Espindola
c6bdeafc97 Remove is64BitLoadCommand.
llvm-svn: 179048
2013-04-08 20:18:53 +00:00
Eli Bendersky
d65a755ddf Rewrite test/Integer tests to use FileCheck instead of grep
llvm-svn: 179047
2013-04-08 20:18:15 +00:00
Eli Bendersky
88f7dd304e Rewrite test/ExecutionEngine tests to use FileCheck instead of grep
llvm-svn: 179043
2013-04-08 19:51:36 +00:00
Matt Arsenault
90618a173a Update documentation.
First feature is not CPU subtype anymore since r134127

llvm-svn: 179038
2013-04-08 18:52:58 +00:00
Eli Bendersky
ea93ef7358 Rewrite test/Verifier tests to use FileCheck instead of grep
llvm-svn: 179036
2013-04-08 18:33:51 +00:00
Arnold Schwaighofer
3218da2403 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

llvm-svn: 179033
2013-04-08 18:05:48 +00:00
Chad Rosier
7583b0a3c3 [ms-inline asm] Add support for ImmDisp [ Symbol ] memory operands.
rdar://13521249

llvm-svn: 179030
2013-04-08 17:43:47 +00:00
Hal Finkel
0daaa8e2de 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.

llvm-svn: 179026
2013-04-08 16:24:03 +00:00
Alexey Samsonov
5a62adc696 DWARF parser: remove duplicated code and fix code style in DIE extractors.
llvm-svn: 179023
2013-04-08 14:37:16 +00:00
Rafael Espindola
3af5b962c2 Add all 4 MachO object types. Use the stored type to implement is64Bits().
llvm-svn: 179021
2013-04-08 13:25:33 +00:00
Vincent Lejeune
cbdacdc057 R600: Control Flow support for pre EG gen
llvm-svn: 179020
2013-04-08 13:05:49 +00:00
Chandler Carruth
c0d878f95e Simplify the quoting here. Our lit emulator doesn't deal well with the
nested quoting schemes, and they're not important here...

llvm-svn: 179014
2013-04-08 10:07:50 +00:00
Chandler Carruth
318107bf84 Remove a global 'endl' variable from the other file as well.
llvm-svn: 179010
2013-04-08 08:55:18 +00:00
Chandler Carruth
b5b620d914 Clean up namespaces in obj2yaml.cpp.
llvm-svn: 179009
2013-04-08 08:55:14 +00:00
Tim Northover
2384153a61 Add ACLE link to ARM documentation sections
llvm-svn: 179006
2013-04-08 08:42:24 +00:00
Tim Northover
8eb5637d73 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.

llvm-svn: 179005
2013-04-08 08:40:41 +00:00
Chandler Carruth
822ccb1509 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.

llvm-svn: 179004
2013-04-08 08:39:59 +00:00
Chandler Carruth
aeaa3e25f8 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).

llvm-svn: 179003
2013-04-08 08:30:47 +00:00
Benjamin Kramer
e546a3587f ARM: Remove unused variable.
llvm-svn: 179001
2013-04-08 08:07:35 +00:00
Hal Finkel
9af1fa0d50 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.

llvm-svn: 179000
2013-04-07 22:11:09 +00:00
Arnold Schwaighofer
16848bcf4a 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.

llvm-svn: 178999
2013-04-07 20:22:56 +00:00
Rafael Espindola
e56e7eefd9 Make MachOObjectFile independent from MachOObject.
llvm-svn: 178998
2013-04-07 20:01:29 +00:00
Rafael Espindola
dc06745581 Implement MachOObjectFile::getData directly.
llvm-svn: 178997
2013-04-07 19:42:15 +00:00
Rafael Espindola
6e5f665040 Implement MachOObjectFile::is64Bit directly.
llvm-svn: 178996
2013-04-07 19:38:15 +00:00
Rafael Espindola
f3433150f0 Implement MachOObjectFile::getHeaderSize directly.
llvm-svn: 178995
2013-04-07 19:31:49 +00:00
Rafael Espindola
9e1ac1d494 Implement MachOObjectFile::getHeader directly.
llvm-svn: 178994
2013-04-07 19:26:57 +00:00
Jakob Stoklund Olesen
658f7754a3 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.

llvm-svn: 178993
2013-04-07 19:10:57 +00:00
Rafael Espindola
80c526beb4 Implement MachOObjectFile::getHeaderSize and MachOObjectFile::getData.
These were the last missing forwarding functions. Also consistently use
the forwarding functions instead of using MachOObj directly.

llvm-svn: 178992
2013-04-07 19:05:30 +00:00
Rafael Espindola
583b0c9980 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.

llvm-svn: 178991
2013-04-07 18:42:06 +00:00
Rafael Espindola
d0f09e97b6 Add MachOObjectFile::LoadCommandInfo.
This avoids using MachOObject::getLoadCommandInfo.

llvm-svn: 178990
2013-04-07 18:08:12 +00:00
Rafael Espindola
1f97d757b6 Use getLoadCommandInfo instead of MachOObj->getLoadCommandInfo.
llvm-svn: 178989
2013-04-07 17:41:59 +00:00
Rafael Espindola
b10740ce9c Construct MachOObject in MachOObjectFile's constructor.
llvm-svn: 178988
2013-04-07 16:58:48 +00:00
Rafael Espindola
5700fcf335 Remove unused argument.
llvm-svn: 178987
2013-04-07 16:40:00 +00:00
Rafael Espindola
fcd60f68e0 Remove MachOObjectFile::getObject.
llvm-svn: 178986
2013-04-07 16:07:35 +00:00
Rafael Espindola
04cc447824 Remove two uses of getObject.
llvm-svn: 178985
2013-04-07 15:46:05 +00:00
Rafael Espindola
4af23ca748 Remove usage of InMemoryStruct in getSymbol.
llvm-svn: 178984
2013-04-07 15:35:18 +00:00
Hal Finkel
df94a6f10e PPC Altivec load/store intrinsics can be marked IntrRead[Write]ArgMem
llvm-svn: 178983
2013-04-07 15:32:40 +00:00
Hal Finkel
cb2d4ef2d5 PPC rotate instructions don't have unmodeled side effcts
llvm-svn: 178982
2013-04-07 15:06:53 +00:00