1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
Commit Graph

97243 Commits

Author SHA1 Message Date
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
Peter Zotov
d7002e4dd1 [OCaml] (PR10016) Add a few missing line in OCamlLangImpl2.rst
Original patch by Damien Schoof

llvm-svn: 194067
2013-11-05 12:14:04 +00:00
Reed Kotler
d0caa24ad9 Remove the word "thumb" from comments. Remove also an incorrect
command regarding the porting from the ARM version (was an old comment).

llvm-svn: 194066
2013-11-05 12:04:37 +00:00
Peter Zotov
09f34ca4b9 [OCaml] (PR16318) Add missing argument to Llvm.const_intcast
llvm-svn: 194065
2013-11-05 11:56:20 +00:00
Peter Zotov
118bf8ac38 [OCaml] (PR11717) Make declare_qualified_global respect address argument
Original patch by Jonathan Ragan-Kelley

llvm-svn: 194064
2013-11-05 11:56:13 +00:00
David Majnemer
ac56140f8a X86 Disassembler: remove unused bool typedef-name
llvm-svn: 194062
2013-11-05 10:34:42 +00:00
Alp Toker
b0735e3a67 Suppress OS crash dialog in llvm-rtdyld
All other tools have this -- it's needed to avoid hanging lit on Windows in
case of a crash.

llvm-svn: 194060
2013-11-05 09:33:43 +00:00
Peter Zotov
7bb25c41d3 [OCaml] Properly tag the custom operations of Llvm.llbuilder
All other custom operations tags have LLVM prefix.

llvm-svn: 194058
2013-11-05 09:13:46 +00:00
Peter Zotov
615991b419 [OCaml] Llvm_linker: do not use external in module interface
Workaround for an OCaml bug:
http://caml.inria.fr/mantis/view.php?id=4166

llvm-svn: 194057
2013-11-05 09:13:39 +00:00
Reed Kotler
787735b38c Fix r194019 as requested by Eric Christopher.
Submit the basic port of the rest of ARM constant islands code to Mips. 
Two test cases are added which reflect the next level of functionality:
constants getting moved to water areas that are out of range from the
initial placement at the end of the function and basic blocks being split to
create water when none exists that can be used. There is a bunch of this
code that is not complete and has been marked with IN_PROGRESS. I will
finish cleaning this all up during the next week or two and submit the
rest of the test cases. I have elminated some code for dealing with
inline assembly because to me it unecessarily complicates things and
some of the newer features of llvm like function attributies and builtin
assembler give me better tools to solve the alignment issues created
there. Also, for Mips16 I even have the option of not doing constant
islands in the present of inline assembler if I chose. When everything
has been completed I will summarize the port and notify people that
are knowledgable regarding the ARM Constant Islands code so they can
review it in it's entirety if they wish.

llvm-svn: 194053
2013-11-05 08:14:14 +00:00
Alp Toker
cbc0307300 Fix symbol defines in config.h.cmake
These were incorrectly pointing to HAVE_LOG despite being checked for
correctly in config-ix.cmake.

Patch by James Lyon!

llvm-svn: 194051
2013-11-05 07:27:18 +00:00
Craig Topper
8a08a00b6c Lift alignment restrictions on load folding for a significant portion of AVX instructions.
llvm-svn: 194048
2013-11-05 06:31:43 +00:00
Hao Liu
386d8dd5a6 Implement AArch64 post-index vector load/store multiple N-element structure class SIMD(lselem-post).
Including following 14 instructions:
4 ld1 insts: post-index load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: post-index load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: post-index store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: post-index store multiple N-element structure from sequential N registers (N = 2,3,4).

llvm-svn: 194043
2013-11-05 03:39:32 +00:00
Kevin Qin
63fa5c1ef6 Implemented aarch64 neon intrinsic vcopy_lane with float type.
llvm-svn: 194041
2013-11-05 02:03:59 +00:00
Yuchen Wu
2ca00e3a3d Revert "llvm-cov: Added command-line option to change dir."
This reverts commit d8acf0078cf363252727acff00f85ae8074f95b3.

llvm-svn: 194040
2013-11-05 01:56:29 +00:00
Yuchen Wu
198f42bf02 Revert "Added basic unit test for llvm-cov."
This reverts commit 9cacd131c22b888303cb88e9a3235b2d7b2f19a1.

llvm-svn: 194039
2013-11-05 01:56:26 +00:00
Yuchen Wu
3e6842afdb Added basic unit test for llvm-cov.
This test compares the output of llvm-cov against a coverage file
generated by gcov.

llvm-svn: 194038
2013-11-05 01:56:23 +00:00
Yuchen Wu
f41fb5a06a llvm-cov: Added command-line option to change dir.
This will allow for much easier testing when the input files are in a
different folder from the test script.

llvm-svn: 194034
2013-11-05 01:20:41 +00:00
Yuchen Wu
ed0b7b997b Support for reading run counts in llvm-cov.
This patch enables llvm-cov to correctly output the run count stored in
the GCDA file. GCOVProfiling currently does not generate this
information, so the GCDA run data had to be hacked on from a GCDA file
generated by gcc. This is corrected by a subsequent patch.

With the run and program data included, both llvm-cov and gcov produced
the same output.

llvm-svn: 194033
2013-11-05 01:11:58 +00:00
Rafael Espindola
4e1620cfb1 Fix MSVC build by not putting an error_code directly in a union.
llvm-svn: 194032
2013-11-05 01:07:06 +00:00
Rafael Espindola
334fa3d8a8 Simplify ErrorOr.
ErrorOr had quiet a bit of complexity and indirection to be able to hold a user
type with the error.

That feature is not used anymore. This patch removes it, it will live in svn
history if we ever need it again.

If we do need it again, IMHO there is one thing that should be done
differently: Holding extra info in the error is not a property a function also
returning a value or not. The ability to hold extra info should be in the error
type and ErrorOr templated over it so that we don't need the funny looking
ErrorOr<void>.

llvm-svn: 194030
2013-11-05 00:28:01 +00:00