1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

93631 Commits

Author SHA1 Message Date
Rafael Espindola
f574b25abe Add missing getters. They will be used in llvm-ar.
llvm-svn: 185937
2013-07-09 12:49:24 +00:00
Rafael Espindola
a60439b0f2 Archive members cannot be larger than 4GB. Return a uint32_t.
llvm-svn: 185936
2013-07-09 12:45:11 +00:00
Rafael Espindola
2a3541dfc1 We never compare iterators from two archives. Assert that.
llvm-svn: 185934
2013-07-09 12:30:10 +00:00
Rafael Espindola
852db8570d Add getHeader helper and move ToHeader to the cpp file.
llvm-svn: 185933
2013-07-09 12:22:05 +00:00
Joey Gouly
1bf5e0fbf1 Add MC assembly/disassembly support for VRINT{A, N, P, M} to V8FP.
llvm-svn: 185929
2013-07-09 11:26:18 +00:00
Joey Gouly
9995bf31f9 Add MC assembly/disassembly support for VRINT{Z, X, R} to V8FP.
llvm-svn: 185926
2013-07-09 11:03:21 +00:00
Alexey Samsonov
ce8937f226 Document LLVM_USE_SANITIZER CMake option
llvm-svn: 185925
2013-07-09 10:56:13 +00:00
Ulrich Weigand
bf2db94897 [PowerPC] Support ".machine any"
The PowerPC assembler is supposed to provide a directive .machine
that allows switching the supported CPU instruction set on the fly.
Since we do not yet check CPU feature sets at all and always accept
any available instruction, this is not really useful at this point.

However, it makes sense to accept (and ignore) ".machine any" to
avoid spuriously rejecting existing assembler files that use this.

llvm-svn: 185924
2013-07-09 10:00:34 +00:00
Alexander Potapenko
9c55668f5b Revert r185872 - "Stop emitting weak symbols into the "coal" sections"
This patch broke `make check-asan` on Mac, causing ld warnings like the following one:

ld: warning: direct access in __GLOBAL__I_a to global weak symbol
___asan_mapping_scale means the weak symbol cannot be overridden at
runtime. This was likely caused by different translation units being
compiled with different visibility settings.

The resulting test binaries crashed with incorrect ASan warnings.

llvm-svn: 185923
2013-07-09 10:00:16 +00:00
Joey Gouly
7f5f52a614 Add MC assembly/disassembly support for VCVT{A, N, P, M} to V8FP.
llvm-svn: 185922
2013-07-09 09:59:04 +00:00
Richard Sandiford
03cd63553a [SystemZ] Use MVC for simple load/store pairs
Look for patterns of the form (store (load ...), ...) in which the two
locations are known not to partially overlap.  (Identical locations are OK.)
These sequences are better implemented by MVC unless either the load or
the store could use RELATIVE LONG instructions.

The testcase showed that we weren't using LHRL and LGHRL for extload16,
only sextloadi16.  The patch fixes that too.

llvm-svn: 185919
2013-07-09 09:46:39 +00:00
Richard Sandiford
9295f19189 [SystemZ] Use "STC;MVC" for memset
Use "STC;MVC" for memsets that are too big for two STCs or MV...Is yet
small enough for a single MVC.  As with memcpy, I'm leaving longer cases
till later.

The number of tests might seem excessive, but f33 & f34 from memset-04.ll
failed the first cut because I'd not added the "?:" on the calculation
of Size1.

llvm-svn: 185918
2013-07-09 09:32:42 +00:00
David Majnemer
f8f57aad0a InstCombine: Fix typo in comment for visitICmpInstWithInstAndIntCst
llvm-svn: 185916
2013-07-09 09:24:35 +00:00
David Majnemer
3bb8099e6d InstCombine: variations on 0xffffffff - x >= 4
The following transforms are valid if -C is a power of 2:
(icmp ugt (xor X, C), ~C) -> (icmp ult X, C)
(icmp ult (xor X, C), -C) -> (icmp uge X, C)

These are nice, they get rid of the xor.

llvm-svn: 185915
2013-07-09 09:20:58 +00:00
David Majnemer
ebf98e0163 InstCombine: X & -C != -C -> X <= u ~C
Tests were added in r185910 somehow.

llvm-svn: 185912
2013-07-09 08:09:32 +00:00
Ulrich Weigand
1926a433be [PowerPC] Support .llong and fix .word
This adds support for the .llong PowerPC-specifc assembler directive.
In doing so, I notices that .word is currently incorrect: it is
supposed to define a 2-byte data element, not a 4-byte one.

llvm-svn: 185911
2013-07-09 07:59:25 +00:00
David Majnemer
90d0b32c9e Commit r185909 was a misapplied patch, fix it
llvm-svn: 185910
2013-07-09 07:58:32 +00:00
David Majnemer
969e1f9c9f InstCombine: add more transforms
C1-X <u C2 -> (X|(C2-1)) == C1
C1-X >u C2 -> (X|C2) == C1
X-C1 <u C2 -> (X & -C2) == C1
X-C1 >u C2 -> (X & ~C2) == C1

llvm-svn: 185909
2013-07-09 07:50:59 +00:00
Hal Finkel
f972e31b6c PPC: Allocate RS spill slot for unaligned i64 load/store
This fixes another bug found by llvm-stress!

If we happen to be doing an i64 load or store into a stack slot that has less
than a 4-byte alignment, then the frame-index elimination may need to use an
indexed load or store instruction (because the offset may not be a multiple of
4, a requirement of the STD/LD instructions). The extra register needed to hold
the offset comes from the register scavenger, and it is possible that the
scavenger will need to use an emergency spill slot. As a result, we need to
make sure that a spill slot is allocated when doing an i64 load/store into a
less-than-4-byte-aligned stack slot.

Because test cases for things like this tend to be fairly fragile, I've
concatenated a few small bugpoint-reduced test cases together to form the
regression test.

llvm-svn: 185907
2013-07-09 06:34:51 +00:00
Rafael Espindola
0ba1fc3b7f Compute the size of an archive member in the constructor.
It is always computed the same way (by parsing the header). Doing it in the
constructor simplifies the callers a bit.

llvm-svn: 185905
2013-07-09 05:26:25 +00:00
Rafael Espindola
4cfe8ac4c5 Remove declare but not implemented methods.
llvm-svn: 185904
2013-07-09 05:09:08 +00:00
Rafael Espindola
3bc9c4c2cf Move some code out of line. No functionality change.
llvm-svn: 185901
2013-07-09 03:39:35 +00:00
Jim Grosbach
ddab8f15f7 X86: Add comment.
llvm-svn: 185900
2013-07-09 02:07:28 +00:00
Jim Grosbach
0b4150cda0 X86 fast-isel: Avoid explicit AH subreg reference for [SU]Rem.
Explicit references to %AH for an i8 remainder instruction can lead to
references to %AH in a REX prefixed instruction, which causes things to
blow up. Do the same thing in FastISel as we do for DAG isel and instead
shift %AX right by 8 bits and then extract the 8-bit subreg from that
result.

rdar://14203849
http://llvm.org/bugs/show_bug.cgi?id=16105

llvm-svn: 185899
2013-07-09 02:07:25 +00:00
Sean Silva
dbfeeb71d5 Make BinaryRef output correctly in case of empty data.
Previously, it would simply output nothing, but it should output an
empty string `""`.

llvm-svn: 185894
2013-07-09 00:54:46 +00:00
Stephen Lin
bf42692662 Style fixes: remove unnecessary braces for one-statement if blocks, no else after return, etc. No funcionality change.
llvm-svn: 185893
2013-07-09 00:44:49 +00:00
Eric Christopher
e42a65a9b8 Revert "DebugInfo: remove unused helper function getDICompositeType."
This reverts commit r185876 as the functions appear to still be used
by dragonegg.

llvm-svn: 185890
2013-07-09 00:16:56 +00:00
Eli Bendersky
438edca624 Fix comment
llvm-svn: 185888
2013-07-08 23:57:07 +00:00
Nadav Rotem
c43699ed15 This patch changes the saved IRBuilder insert point from BasicBlock::iterator to AssertingVH.
Commit 185883 fixes a bug in the IRBuilder that should fix the ASan bot. AssertingVH can help in exposing some RAUW problems.

Thanks Ben and Alexey!

llvm-svn: 185886
2013-07-08 23:31:13 +00:00
Michael Gottesman
fad65f0e88 [objc-arc] Fix assertion in EraseInstruction so that noop on null calls when passed null do not trigger the assert.
The specific case of interest is when objc_retainBlock is passed null.

llvm-svn: 185885
2013-07-08 23:30:23 +00:00
Nadav Rotem
edc4aa7d9e Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.
llvm-svn: 185883
2013-07-08 23:27:43 +00:00
Bill Wendling
7f4dc6001a Don't run internalize if we're outputing bit-code and not an object file.
The problem with running internalize before we're ready to output an object file
is that it may change a 'weak' symbol into an internal one, but that symbol
could be needed by an external object file --- e.g. with arclite.

<rdar://problem/14334895>

llvm-svn: 185882
2013-07-08 23:23:03 +00:00
Manman Ren
9e436c6bea DebugInfo: remove unused helper function getDICompositeType.
llvm-svn: 185876
2013-07-08 21:55:46 +00:00
Eric Christopher
55e48d4aa6 CEHCK->CHECK typo fix.
llvm-svn: 185875
2013-07-08 21:47:33 +00:00
Eric Christopher
042c0dfe7f Fix up whitespace.
llvm-svn: 185874
2013-07-08 21:47:31 +00:00
Bill Wendling
f81cb5b9ed Stop emitting weak symbols into the "coal" sections.
The Mach-O linker has been able to support the weak-def bit on any symbol for
quite a while now. The compiler however continued to place these symbols into a
"coal" section, which required the linker to map them back to the base section
name.

Replace the sections like this:

  __TEXT/__textcoal_nt   instead use  __TEXT/__text
  __TEXT/__const_coal    instead use  __TEXT/__const
  __DATA/__datacoal_nt   instead use  __DATA/__data

<rdar://problem/14265330>

llvm-svn: 185872
2013-07-08 21:34:52 +00:00
Eric Christopher
1165fae9d2 No ',' between programs.
llvm-svn: 185867
2013-07-08 21:18:54 +00:00
Eric Christopher
1931de8109 Update comment to avoid mentioning DbgValues which is an instance
variable later in the class.

llvm-svn: 185866
2013-07-08 21:16:18 +00:00
Manman Ren
2871bbf568 Revert r185852.
llvm-svn: 185861
2013-07-08 20:27:34 +00:00
Matt Arsenault
0a992db587 Find xdot or xdot.py.
Ubuntu installs this as xdot, so finding xdot.py would fail.

llvm-svn: 185860
2013-07-08 20:24:54 +00:00
Matt Arsenault
88d13ab2d1 Allow llvm_find_program to find alternate names
llvm-svn: 185859
2013-07-08 20:24:49 +00:00
Ulrich Weigand
cb20efc341 [PowerPC] Always use "assembler dialect" 1
A setting in MCAsmInfo defines the "assembler dialect" to use.  This is used
by common code to choose between alternatives in a multi-alternative GNU
inline asm statement like the following:

  __asm__ ("{sfe|subfe} %0,%1,%2" : "=r" (out) : "r" (in1), "r" (in2));

The meaning of these dialects is platform specific, and GCC defines those
for PowerPC to use dialect 0 for old-style (POWER) mnemonics and 1 for
new-style (PowerPC) mnemonics, like in the example above.

To be compatible with inline asm used with GCC, LLVM ought to do the same.
Specifically, this means we should always use assembler dialect 1 since
old-style mnemonics really aren't supported on any current platform.

However, the current LLVM back-end uses:
  AssemblerDialect = 1;           // New-Style mnemonics.
in PPCMCAsmInfoDarwin, and
  AssemblerDialect = 0;           // Old-Style mnemonics.
in PPCLinuxMCAsmInfo.

The Linux setting really isn't correct, we should be using new-style
mnemonics everywhere.  This is changed by this commit.

Unfortunately, the setting of this variable is overloaded in the back-end
to decide whether or not we are on a Darwin target.  This is done in
PPCInstPrinter (the "SyntaxVariant" is initialized from the MCAsmInfo
AssemblerDialect setting), and also in PPCMCExpr.  Setting AssemblerDialect
to 1 for both Darwin and Linux no longer allows us to make this distinction.

Instead, this patch uses the MCSubtargetInfo passed to createPPCMCInstPrinter
to distinguish Darwin targets, and ignores the SyntaxVariant parameter.
As to PPCMCExpr, this patch adds an explicit isDarwin argument that needs
to be passed in by the caller when creating a target MCExpr.  (To do so
this patch implicitly also reverts commit 184441.)

llvm-svn: 185858
2013-07-08 20:20:51 +00:00
Hal Finkel
c4d29e61ee PPC: Mark vector CC action for SETO and SETONE as Expand
Another bug found by llvm-stress! This fixes hitting
  llvm_unreachable("Invalid integer vector compare condition");
at the end of getVCmpInst in PPCISelDAGToDAG.

llvm-svn: 185855
2013-07-08 20:00:03 +00:00
Benjamin Kramer
f0b52f2712 IR headers moved to llvm/IR some aeons ago, update documentation.
llvm-svn: 185854
2013-07-08 19:59:35 +00:00
Joey Gouly
b4f59412fd Add a comment to this change, requested by Eric Christopher.
llvm-svn: 185853
2013-07-08 19:52:51 +00:00
Manman Ren
9e950598ce StringRef: add DenseMapInfo for StringRef.
Remove the implementation in include/llvm/Support/YAMLTraits.h.
Added a DenseMap type DITypeHashMap in DebugInfo.h:
  DenseMap<std::pair<StringRef, unsigned>, MDNode*>

llvm-svn: 185852
2013-07-08 19:17:48 +00:00
Argyrios Kyrtzidis
993565f337 [ADT/NullablePtr] Allow implicit conversion of NullablePtr<OtherT> -> NullablePtr<T> if OtherT is derived from T.
llvm-svn: 185851
2013-07-08 19:12:01 +00:00
Reid Kleckner
3e59a5ddfa Reland "Use Clang's __has_* macros in Compiler.h ..." with fixes
This reverts r185841 and relands r185831 without using
__has_attribute(const).

Clang prior to r161767 (between 3.1 and 3.2) does not accept
__has_attribute(const) due to rdar://10253857.  __const and __const__
are both keyword aliases of const, so they don't work either.

I was able to repro the buildbot failure using clang 3.1 and this patch
fixes it.  Various important versions of XCode use clang 2.9-ish, so
this workaround is necessary.

llvm-svn: 185850
2013-07-08 19:06:25 +00:00
Stephen Lin
5b387a98f3 Update docs to say that a FunctionPass should not inspect other functions than the one being processed.
Please let me know if you disagree with this assessment (no one has yet, after asking on llvm-commits and LLVMDev) and I will revert.

llvm-svn: 185848
2013-07-08 18:34:39 +00:00
Manman Ren
1da12e6b2b Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.

llvm-svn: 185847
2013-07-08 18:33:29 +00:00