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

97313 Commits

Author SHA1 Message Date
Arnaud A. de Grandmaison
d2be63de4d CalculateSpillWeights cleanup: remove unneeded includes
llvm-svn: 194259
2013-11-08 15:13:05 +00:00
Zoran Jovanovic
291725e9c0 Test for microMIPS trap instructions.
llvm-svn: 194258
2013-11-08 14:55:31 +00:00
NAKAMURA Takumi
ad0df78440 llvm-ar: Let opening a directory failed in llvm-ar.
Linux cannot open directories with open(2), although cygwin and *bsd can.

Motivation: The test, Object/directory.ll, had been failing with --target=cygwin on Linux. XFAIL was improper for host issues.
llvm-svn: 194257
2013-11-08 12:35:56 +00:00
Matheus Almeida
bf40669589 [mips][msa] Update encoding of LDI instruction.
The encoding was updated in MSA r1.07.

llvm-svn: 194255
2013-11-08 10:43:11 +00:00
Artyom Skrobov
6b3d6a326b [ARM] In ARMAsmParser, MatchCoprocessorOperandName() permitted p10 and p11 as operands for coprocessor instructions, resulting in encodings that clash with FP/NEON instruction encodings
llvm-svn: 194253
2013-11-08 09:16:31 +00:00
Bill Wendling
9238d2a9f6 Remove ^M from the file.
llvm-svn: 194251
2013-11-08 08:13:15 +00:00
David Majnemer
1cc343770a IR: Properly canonicalize PointerType in ConstantExpr GEPs
No additional test was needed, Other/constant-fold-gep.ll detects this
just fine.

llvm-svn: 194221
2013-11-07 22:29:42 +00:00
David Majnemer
d1c4acb898 IR: Do not canonicalize constant GEPs into an out-of-bounds array access
Summary:
Consider a GEP of:
i8* getelementptr ({ [2 x i8], i32, i8, [3 x i8] }* @main.c, i32 0, i32 0, i64 0)

If we proceeded to GEP the aforementioned object by 8, would form a GEP of:
i8* getelementptr ({ [2 x i8], i32, i8, [3 x i8] }* @main.c, i32 0, i32 0, i64 8)

Note that we would go through the first array member, causing an
out-of-bounds accesses.  This is problematic because we might get fooled
if we are trying to evaluate loads using this GEP, for example, based
off of an object with a constant initializer where the array is zero.

This fixes PR17732.

Reviewers: nicholas, chandlerc, void

Reviewed By: void

CC: llvm-commits, echristo, void, aemerson

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

llvm-svn: 194220
2013-11-07 22:15:53 +00:00
Bill Wendling
62b2b2d29b Run clang-format on file.
llvm-svn: 194219
2013-11-07 20:18:21 +00:00
Bill Wendling
1824ef73c8 Move copying of global initializers below the cloning of functions.
The BlockAddress doesn't have access to the correct basic blocks until the
functions have been cloned. This causes the BlockAddress to point to the old
values. Just wait until the functions have been cloned before copying the
initializers.
PR13163

llvm-svn: 194218
2013-11-07 20:14:51 +00:00
Zoran Jovanovic
935364b314 Support for microMIPS trap instructions 1.
llvm-svn: 194205
2013-11-07 14:35:24 +00:00
NAKAMURA Takumi
f04d2f453e llvm-c/Support.h: Add a newline at eof.
llvm-svn: 194203
2013-11-07 13:54:24 +00:00
Reed Kotler
263b46d8ec Disable some code that is causing some warnings. It's in the process
of being converted and this path is not relevant to anything at this time
so I have just disabled it for a few days while I'm at the LLVM conference
and don't have time to complete it or properly fix it.

llvm-svn: 194201
2013-11-07 11:56:33 +00:00
Chandler Carruth
052823c572 Add the fact that we anticipate switching to use (some subset of) C++11
after the 3.4 release to the release notes. See the *lengthy* llvmdev
and cfe-dev threads on this subject. There will be more emails,
discussion and announcements, but I want to make noise in as many places
as I can to get everyone's concerns voiced and understood.

llvm-svn: 194183
2013-11-07 00:23:08 +00:00
Vincent Lejeune
5f1f106136 R600: Fix LowerUDIVREM
llvm-svn: 194153
2013-11-06 17:36:04 +00:00
Amara Emerson
5240ae1ac8 [AArch64] Remove NEON from "generic" CPU target.
We can change this back when NEON support is complete and ready to become
enabled by default.

llvm-svn: 194152
2013-11-06 16:19:08 +00:00
Simon Atanasyan
91378d6ec0 Add DT_VERSYM dynamic table entry tag definition.
llvm-svn: 194149
2013-11-06 12:23:52 +00:00
Richard Sandiford
593286d79d [SystemZ] Handle vectors in getSetCCResultType
I don't have a standalone testcase for this, but it should allow r193676
to be reapplied.

llvm-svn: 194148
2013-11-06 12:16:02 +00:00
Benjamin Kramer
b611fbe0fd Add test case for PR12377, it was fixed by r194116.
llvm-svn: 194147
2013-11-06 11:55:41 +00:00
Peter Zotov
a6f1bcb963 [llvm-c] Add parameter names in Target.h for C99 compliance
llvm-svn: 194146
2013-11-06 11:52:40 +00:00
Vladimir Medic
fac4b6d8bf Implement gpword directive for mips, test case added. Stype changes using clang-format are also included.
llvm-svn: 194145
2013-11-06 11:27:05 +00:00
Peter Zotov
cec55dccf3 Add newline at EOF in DynamicLibrary.cpp
llvm-svn: 194144
2013-11-06 11:12:46 +00:00
Peter Zotov
504c6118ce [llvm-c] Improve TargetMachine bindings
Original patch by Chris Wailes

llvm-svn: 194143
2013-11-06 10:25:18 +00:00
Peter Zotov
c7a90be2a4 [llvm-c] Specify explicit namespace in LLVMLoadLibraryPermanently
Presence of using namespace llvm depended on several #ifdef's, and
this broke the build on mswin32.

llvm-svn: 194142
2013-11-06 09:45:58 +00:00
Peter Zotov
7fd5406379 [llvm-c] Correctly check for existence of native AsmParser, AsmPrinter, Disassembler
Also, properly name the functions.

llvm-svn: 194141
2013-11-06 09:45:53 +00:00
Peter Zotov
6215c17f09 [llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler
Original patch by Chris Wailes

llvm-svn: 194140
2013-11-06 09:21:35 +00:00
Peter Zotov
3172738b1d [llvm-c] Expose LLVMLoadLibraryPermanently
Original patch by Chris Wailes

llvm-svn: 194139
2013-11-06 09:21:31 +00:00
Peter Zotov
fe15a570ea [OCaml] Impement Llvm_irreader, bindings to LLVM assembly parser
llvm-svn: 194138
2013-11-06 09:21:25 +00:00
Peter Zotov
23866d3902 [llvm-c] Expose IRReader interface
Original patch by Chris Wailes

llvm-svn: 194137
2013-11-06 09:21:15 +00:00
Peter Zotov
7e2a601991 [OCaml] Implement Llvm.string_of_llvalue
llvm-svn: 194136
2013-11-06 09:21:08 +00:00
Peter Zotov
105e3df898 [llvm-c] Implement LLVMPrintValueToString
Original patch by Chris Wailes

llvm-svn: 194135
2013-11-06 09:21:01 +00:00
Reed Kotler
6190822d53 Fix definition for Mips16 pc relative load word instructions.
llvm-svn: 194126
2013-11-06 04:29:52 +00:00
Jiangning Liu
9c0eb8e7ba Implement AArch64 Neon instruction set Perm.
llvm-svn: 194123
2013-11-06 03:35:27 +00:00
Jiangning Liu
1cdd311f06 Implement AArch64 Neon instruction set Bitwise Extract.
llvm-svn: 194118
2013-11-06 02:25:49 +00:00
Andrew Trick
b072cf7882 Rewrite SCEV's backedge taken count computation.
Patch by Michele Scandale!

Rewrite of the functions used to compute the backedge taken count of a
loop on LT and GT comparisons.

I decided to split the handling of LT and GT cases becasue the trick
"a > b == -a < -b" in some cases prevents the trip count computation
due to the multiplication by -1 on the two operands of the
comparison. This issue comes from the conservative computation of
value range of SCEVs: taking the negative SCEV of an expression that
have a small positive range (e.g. [0,31]), we would have a SCEV with a
fullset as value range.

Indeed, in the new rewritten function I tried to better handle the
maximum backedge taken count computation when MAX/MIN expression are
used to handle the cases where no entry guard is found.

Some test have been modified in order to check the new value correctly
(I manually check them and reasoning on possible overflow the new
values seem correct).

I finally added a new test case related to the multiplication by -1
issue on GT comparisons.

llvm-svn: 194116
2013-11-06 02:08:26 +00:00
Rafael Espindola
292e8533b8 Remove another unused, and IMHO, not very desirable feature of ErrorOr.
One of the uses of the IsValid flag is to support default constructing
a ErrorOr that is not a Error or a Value. There is not much value in
doing that IMHO. If ErrorOr was to have a default constructor, it
should be implemented by default constructing the value, but even that
looks unnecessary.

The other use is to avoid calling destructors on moved objects. This
looks wrong. If the data being moved has non trivial treatment of
moves (an std::vector for example), it is its destructor that should
handle it, not ~ErrorOr.

With this change ErrorOr becomes a fairly simple wrapper and should
always be better than using an error_code + value in an API.

llvm-svn: 194109
2013-11-05 23:41:57 +00:00
Reed Kotler
95d05a9330 Get rid of current calculation function and adjustment scheme
from MipsConstantIslands. 

llvm-svn: 194108
2013-11-05 23:36:58 +00:00
Andrew Trick
5a2a400cf1 Slightly change the way stackmap and patchpoint intrinsics are lowered.
MorphNodeTo is not safe to call during DAG building. It eagerly
deletes dependent DAG nodes which invalidates the NodeMap. We could
expose a safe interface for morphing nodes, but I don't think it's
worth it. Just create a new MachineNode and replaceAllUsesWith.

My understaning of the SD design has been that we want to support
early target opcode selection. That isn't very well supported, but
generally works. It seems reasonable to rely on this feature even if
it isn't widely used.

llvm-svn: 194102
2013-11-05 22:44:04 +00:00
Reed Kotler
48fa7b701b Get rid of all references to soimm in MipsConstantIslands pass because
we don't have such an operand.
Suprisingly enough, this is never actually accounted for in the 
ARM version when determining offset ranges. In both places there is the
comment:
-    // FIXME: Make use full range of soimm values.
(soimm = shift operand immediate).

llvm-svn: 194101
2013-11-05 22:34:29 +00:00
Reed Kotler
934454ceaf Cleanup getUserOffset. Issues related to inline assembler length and
alignment will be handled differently than in ARM constant islands.

llvm-svn: 194096
2013-11-05 21:39:57 +00:00
Tim Northover
d5ccdcd01b ARM: permit bare dmb/dsb/isb aliases on Cortex-M0
Cortex-M0 supports these 32-bit instructions despite being Thumb1 only
(mostly). We knew about that but not that the aliases without the default "sy"
operand were also permitted.

llvm-svn: 194094
2013-11-05 21:36:02 +00:00
Dmitri Gribenko
90966eb2ea Convert comments to documentation comments (// -> ///)
Patch by MathOnNapkins

llvm-svn: 194093
2013-11-05 21:28:42 +00:00
Rafael Espindola
1e9ee0e366 Use error_code in GVMaterializer.
They just propagate out the bitcode reader error, so we don't need a new enum.

llvm-svn: 194091
2013-11-05 19:36:34 +00:00
Jiangning Liu
59b8117b0b Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.
llvm-svn: 194085
2013-11-05 17:42:05 +00:00
Rafael Espindola
621d222e98 Convert FindFunctionInStream to return an error_code.
llvm-svn: 194084
2013-11-05 17:16:08 +00:00
Michael Gottesman
04ff2468f0 [objc-arc] Convert the one directional retain/release relation assert to a conditional check + fail.
Due to the previously added overflow checks, we can have a retain/release
relation that is one directional. This occurs specifically when we run into an
additive overflow causing us to drop state in only one direction. If that
occurs, we should bail and not optimize that retain/release instead of
asserting.

Apologies for the size of the testcase. It is necessary to cause the additive
cfg overflow to trigger.

rdar://15377890

llvm-svn: 194083
2013-11-05 16:02:40 +00:00
Alp Toker
c85bedbb15 Provide a test input for opt
This was only working previously due to a quirk in the way lit
concatenates script commands.

llvm-svn: 194078
2013-11-05 13:57:34 +00:00
Benjamin Kramer
35a0cecde9 Silence GCC warning about dropping off a fully covered switch.
llvm-svn: 194077
2013-11-05 13:45:09 +00:00
Peter Zotov
012a4ffd60 [OCaml] (PR16190) Add ValueKinds for ConstantDataSequential and subclasses
Original patch by David Monniaux

llvm-svn: 194075
2013-11-05 12:55:43 +00:00
Peter Zotov
7dcd58a3c6 [llvm-c] (PR16190) Add LLVMIsA* functions for ConstantDataSequential and subclasses
Original patch by David Monniaux

llvm-svn: 194074
2013-11-05 12:55:37 +00:00