Lang Hames [Fri, 8 Nov 2013 22:14:49 +0000 (22:14 +0000)]
Add a method to get the object-file appropriate stack map section.
Thanks to Eric Christopher for the tips on the appropriate way to do this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194282
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 8 Nov 2013 19:58:21 +0000 (19:58 +0000)]
Remove dead code from LoopUnswitch
LoopUnswitch's code simplification routine has logic to convert conditional
branches into unconditional branches, after unswitching makes the condition
constant, and then remove any blocks that renders dead. Unfortunately, this
code is dead, currently broken, and furthermore, has never been alive (at least
as far back at 2006).
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194277
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Fri, 8 Nov 2013 18:19:19 +0000 (18:19 +0000)]
Revert "CalculateSpillWeights does not need to be a pass"
Temporarily revert my previous commit until I understand why it breaks 3 target tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194272
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 8 Nov 2013 18:14:17 +0000 (18:14 +0000)]
[VirtRegMap] Fix for PR17825. Do not ignore noreturn definitions when setting
isPhysRegUsed if the unwind information is required.
Indeed, the runtime may need a correct stack to be able to unwind the call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194271
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Fri, 8 Nov 2013 18:09:57 +0000 (18:09 +0000)]
Make PrintAsmOperand call to the superclass to handle 'n' and 'c' operand modifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194270
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Fri, 8 Nov 2013 17:56:29 +0000 (17:56 +0000)]
CalculateSpillWeights does not need to be a pass
Based on discussions with Lang Hames and Jakob Stoklund Olesen at the hacker's lab, and in the light of upcoming work on the PBQP register allocator, it was though that CalcSpillWeights does not need to be a pass. This change will enable to customize / tune the spill weight computation depending on the allocator.
Update the documentation style while there.
No functionnal change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194269
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 8 Nov 2013 17:23:49 +0000 (17:23 +0000)]
Add ImmutableSet profiling info for 'bool'.
Useful for tri-state maps: true, false, and "no data yet".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194266
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 8 Nov 2013 17:18:07 +0000 (17:18 +0000)]
ARM: fold prologue/epilogue sp updates into push/pop for code size
ARM prologues usually look like:
push {r7, lr}
sub sp, sp, #4
If code size is extremely important, this can be optimised to the single
instruction:
push {r6, r7, lr}
where we don't actually care about the contents of r6, but pushing it subtracts
4 from sp as a side effect.
This should implement such a conversion, predicated on the "minsize" function
attribute (-Oz) since I've yet to find any code it actually makes faster.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194264
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 8 Nov 2013 16:25:50 +0000 (16:25 +0000)]
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (Thumb encodings)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194263
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 8 Nov 2013 16:17:14 +0000 (16:17 +0000)]
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (ARM encodings)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194262
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 8 Nov 2013 16:16:30 +0000 (16:16 +0000)]
[ARM] Handling for coprocessor instructions that are undefined starting from ARMv8 (ARM encodings)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194261
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 8 Nov 2013 16:07:43 +0000 (16:07 +0000)]
Export MCDisassembler's SubtargetInfo, to allow architecture-aware disassembly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194260
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnaud A. de Grandmaison [Fri, 8 Nov 2013 15:13:05 +0000 (15:13 +0000)]
CalculateSpillWeights cleanup: remove unneeded includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194259
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Fri, 8 Nov 2013 14:55:31 +0000 (14:55 +0000)]
Test for microMIPS trap instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194258
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 8 Nov 2013 12:35:56 +0000 (12:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194257
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Fri, 8 Nov 2013 10:43:11 +0000 (10:43 +0000)]
[mips][msa] Update encoding of LDI instruction.
The encoding was updated in MSA r1.07.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194255
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 8 Nov 2013 09:16:31 +0000 (09:16 +0000)]
[ARM] In ARMAsmParser, MatchCoprocessorOperandName() permitted p10 and p11 as operands for coprocessor instructions, resulting in encodings that clash with FP/NEON instruction encodings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194253
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 8 Nov 2013 08:13:15 +0000 (08:13 +0000)]
Remove ^M from the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194251
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 7 Nov 2013 22:29:42 +0000 (22:29 +0000)]
IR: Properly canonicalize PointerType in ConstantExpr GEPs
No additional test was needed, Other/constant-fold-gep.ll detects this
just fine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194221
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 7 Nov 2013 22:15:53 +0000 (22:15 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194220
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 7 Nov 2013 20:18:21 +0000 (20:18 +0000)]
Run clang-format on file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194219
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 7 Nov 2013 20:14:51 +0000 (20:14 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194218
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Thu, 7 Nov 2013 14:35:24 +0000 (14:35 +0000)]
Support for microMIPS trap instructions 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194205
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 7 Nov 2013 13:54:24 +0000 (13:54 +0000)]
llvm-c/Support.h: Add a newline at eof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194203
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 7 Nov 2013 11:56:33 +0000 (11:56 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194201
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 7 Nov 2013 00:23:08 +0000 (00:23 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194183
91177308-0d34-0410-b5e6-
96231b3b80d8
Vincent Lejeune [Wed, 6 Nov 2013 17:36:04 +0000 (17:36 +0000)]
R600: Fix LowerUDIVREM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194153
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 6 Nov 2013 16:19:08 +0000 (16:19 +0000)]
[AArch64] Remove NEON from "generic" CPU target.
We can change this back when NEON support is complete and ready to become
enabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194152
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 6 Nov 2013 12:23:52 +0000 (12:23 +0000)]
Add DT_VERSYM dynamic table entry tag definition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194149
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 6 Nov 2013 12:16:02 +0000 (12:16 +0000)]
[SystemZ] Handle vectors in getSetCCResultType
I don't have a standalone testcase for this, but it should allow r193676
to be reapplied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194148
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 6 Nov 2013 11:55:41 +0000 (11:55 +0000)]
Add test case for PR12377, it was fixed by r194116.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194147
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 11:52:40 +0000 (11:52 +0000)]
[llvm-c] Add parameter names in Target.h for C99 compliance
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194146
91177308-0d34-0410-b5e6-
96231b3b80d8
Vladimir Medic [Wed, 6 Nov 2013 11:27:05 +0000 (11:27 +0000)]
Implement gpword directive for mips, test case added. Stype changes using clang-format are also included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194145
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 11:12:46 +0000 (11:12 +0000)]
Add newline at EOF in DynamicLibrary.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194144
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 10:25:18 +0000 (10:25 +0000)]
[llvm-c] Improve TargetMachine bindings
Original patch by Chris Wailes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194143
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:45:58 +0000 (09:45 +0000)]
[llvm-c] Specify explicit namespace in LLVMLoadLibraryPermanently
Presence of using namespace llvm depended on several #ifdef's, and
this broke the build on mswin32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194142
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:45:53 +0000 (09:45 +0000)]
[llvm-c] Correctly check for existence of native AsmParser, AsmPrinter, Disassembler
Also, properly name the functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194141
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:21:35 +0000 (09:21 +0000)]
[llvm-c] Add functions for initializing native AsmPrinter, AsmParser & Disassembler
Original patch by Chris Wailes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194140
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:21:31 +0000 (09:21 +0000)]
[llvm-c] Expose LLVMLoadLibraryPermanently
Original patch by Chris Wailes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194139
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:21:25 +0000 (09:21 +0000)]
[OCaml] Impement Llvm_irreader, bindings to LLVM assembly parser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194138
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:21:15 +0000 (09:21 +0000)]
[llvm-c] Expose IRReader interface
Original patch by Chris Wailes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194137
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:21:08 +0000 (09:21 +0000)]
[OCaml] Implement Llvm.string_of_llvalue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194136
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Wed, 6 Nov 2013 09:21:01 +0000 (09:21 +0000)]
[llvm-c] Implement LLVMPrintValueToString
Original patch by Chris Wailes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194135
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 6 Nov 2013 04:29:52 +0000 (04:29 +0000)]
Fix definition for Mips16 pc relative load word instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194126
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Wed, 6 Nov 2013 03:35:27 +0000 (03:35 +0000)]
Implement AArch64 Neon instruction set Perm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194123
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Wed, 6 Nov 2013 02:25:49 +0000 (02:25 +0000)]
Implement AArch64 Neon instruction set Bitwise Extract.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194118
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 6 Nov 2013 02:08:26 +0000 (02:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194116
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 23:41:57 +0000 (23:41 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194109
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 23:36:58 +0000 (23:36 +0000)]
Get rid of current calculation function and adjustment scheme
from MipsConstantIslands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194108
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Tue, 5 Nov 2013 22:44:04 +0000 (22:44 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194102
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 22:34:29 +0000 (22:34 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194101
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 21:39:57 +0000 (21:39 +0000)]
Cleanup getUserOffset. Issues related to inline assembler length and
alignment will be handled differently than in ARM constant islands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194096
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Tue, 5 Nov 2013 21:36:02 +0000 (21:36 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194094
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 5 Nov 2013 21:28:42 +0000 (21:28 +0000)]
Convert comments to documentation comments (// -> ///)
Patch by MathOnNapkins
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194093
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 19:36:34 +0000 (19:36 +0000)]
Use error_code in GVMaterializer.
They just propagate out the bitcode reader error, so we don't need a new enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194091
91177308-0d34-0410-b5e6-
96231b3b80d8
Jiangning Liu [Tue, 5 Nov 2013 17:42:05 +0000 (17:42 +0000)]
Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194085
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 17:16:08 +0000 (17:16 +0000)]
Convert FindFunctionInStream to return an error_code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194084
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Tue, 5 Nov 2013 16:02:40 +0000 (16:02 +0000)]
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194083
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 5 Nov 2013 13:57:34 +0000 (13:57 +0000)]
Provide a test input for opt
This was only working previously due to a quirk in the way lit
concatenates script commands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194078
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 5 Nov 2013 13:45:09 +0000 (13:45 +0000)]
Silence GCC warning about dropping off a fully covered switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194077
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 12:55:43 +0000 (12:55 +0000)]
[OCaml] (PR16190) Add ValueKinds for ConstantDataSequential and subclasses
Original patch by David Monniaux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194075
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 12:55:37 +0000 (12:55 +0000)]
[llvm-c] (PR16190) Add LLVMIsA* functions for ConstantDataSequential and subclasses
Original patch by David Monniaux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194074
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 12:14:04 +0000 (12:14 +0000)]
[OCaml] (PR10016) Add a few missing line in OCamlLangImpl2.rst
Original patch by Damien Schoof
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194067
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 12:04:37 +0000 (12:04 +0000)]
Remove the word "thumb" from comments. Remove also an incorrect
command regarding the porting from the ARM version (was an old comment).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194066
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 11:56:20 +0000 (11:56 +0000)]
[OCaml] (PR16318) Add missing argument to Llvm.const_intcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194065
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 11:56:13 +0000 (11:56 +0000)]
[OCaml] (PR11717) Make declare_qualified_global respect address argument
Original patch by Jonathan Ragan-Kelley
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194064
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 5 Nov 2013 10:34:42 +0000 (10:34 +0000)]
X86 Disassembler: remove unused bool typedef-name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194062
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 5 Nov 2013 09:33:43 +0000 (09:33 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194060
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 09:13:46 +0000 (09:13 +0000)]
[OCaml] Properly tag the custom operations of Llvm.llbuilder
All other custom operations tags have LLVM prefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194058
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Zotov [Tue, 5 Nov 2013 09:13:39 +0000 (09:13 +0000)]
[OCaml] Llvm_linker: do not use external in module interface
Workaround for an OCaml bug:
http://caml.inria.fr/mantis/view.php?id=4166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194057
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 5 Nov 2013 08:14:14 +0000 (08:14 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194053
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Tue, 5 Nov 2013 07:27:18 +0000 (07:27 +0000)]
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!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194051
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 5 Nov 2013 06:31:43 +0000 (06:31 +0000)]
Lift alignment restrictions on load folding for a significant portion of AVX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194048
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Tue, 5 Nov 2013 03:39:32 +0000 (03:39 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194043
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Tue, 5 Nov 2013 02:03:59 +0000 (02:03 +0000)]
Implemented aarch64 neon intrinsic vcopy_lane with float type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194041
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:56:29 +0000 (01:56 +0000)]
Revert "llvm-cov: Added command-line option to change dir."
This reverts commit
d8acf0078cf363252727acff00f85ae8074f95b3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194040
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:56:26 +0000 (01:56 +0000)]
Revert "Added basic unit test for llvm-cov."
This reverts commit
9cacd131c22b888303cb88e9a3235b2d7b2f19a1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194039
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:56:23 +0000 (01:56 +0000)]
Added basic unit test for llvm-cov.
This test compares the output of llvm-cov against a coverage file
generated by gcov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194038
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:20:41 +0000 (01:20 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194034
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Tue, 5 Nov 2013 01:11:58 +0000 (01:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194033
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 01:07:06 +0000 (01:07 +0000)]
Fix MSVC build by not putting an error_code directly in a union.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194032
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 5 Nov 2013 00:28:01 +0000 (00:28 +0000)]
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>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194030
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 5 Nov 2013 00:08:03 +0000 (00:08 +0000)]
Add a runtime unrolling parameter to the LoopUnroll pass constructor
As with the other loop unrolling parameters (the unrolling threshold, partial
unrolling, etc.) runtime unrolling can now also be controlled via the
constructor. This will be necessary for moving non-trivial unrolling late in
the pass manager (after loop vectorization).
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194027
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 4 Nov 2013 23:14:36 +0000 (23:14 +0000)]
Revert r194019 to r194021, "Submit the basic port of the rest of ARM constant islands code to Mips."
It broke -Asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194026
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Nov 2013 23:04:15 +0000 (23:04 +0000)]
ARM: remove unnecessary state-tracking during frame lowering.
ResolveFrameIndex had what appeared to be a very nasty hack for when the
frame-index referred to a callee-saved register. In this case it "adjusted" the
offset so that the address was correct if (and only if) the MachineInstr
immediately followed the respective push.
This "worked" for all forms of GPR & DPR but was only ever used to set the
frame pointer itself, and once this was put in a more sensible location the
entire state-tracking machinery it relied on became redundant. So I stripped
it.
The only wrinkle is that "add r7, sp, #0" might theoretically be slower (need
an actual ALU slot) compared to "mov r7, sp" so I added a micro-optimisation
that also makes emitARMRegUpdate and emitT2RegUpdate also work when NumBytes ==
0.
No test changes since there shouldn't be any functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194025
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 4 Nov 2013 23:04:07 +0000 (23:04 +0000)]
AArch64: use default asm operand printing when modifier inapplicable
If an inline assembly operand has multiple constraints (e.g. "Ir" for immediate
or register) and an operand modifier (E.g. "w" for "print register as wN") then
we need to decide behaviour when the modifier doesn't apply to the constraint.
Previousely produced some combination of an assertion failure and a fatal
error. GCC's behaviour appears to be to ignore the modifier and print the
operand in the default way. This patch should implement that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194024
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 4 Nov 2013 22:42:17 +0000 (22:42 +0000)]
Make sure we don't get a warning from this variable that is only used
when compiling with DEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194021
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 4 Nov 2013 22:13:41 +0000 (22:13 +0000)]
Add the test case that goes with the previous submission for constant
islands. I forgot to add it to svn on that patch. Ooops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194020
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 4 Nov 2013 22:11:25 +0000 (22:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194019
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Mon, 4 Nov 2013 21:44:01 +0000 (21:44 +0000)]
Remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194017
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 4 Nov 2013 21:41:21 +0000 (21:41 +0000)]
Check for both styles of clobbers, those produced by dragonegg and
those produced by clang for the inline asm bswap conversion.
Modified from a patch by Chris Smowton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194016
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 4 Nov 2013 21:34:55 +0000 (21:34 +0000)]
SLPVectorizer: Use properlyDominates to satisfy the irreflexivity of a strict weak ordering.
STL debug mode checks this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194015
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Nov 2013 20:46:52 +0000 (20:46 +0000)]
Fix another constant folding address space place I missed.
This fixes an assertion failure with a different sized address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194014
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 4 Nov 2013 20:36:06 +0000 (20:36 +0000)]
Scalarize select vector arguments when extracted.
When the elements are extracted from a select on vectors
or a vector select, do the select on the extracted scalars
from the input if there is only one use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194013
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 4 Nov 2013 19:43:36 +0000 (19:43 +0000)]
[docs] Add link to 32-bit ARM ELF supplement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194011
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 4 Nov 2013 19:22:50 +0000 (19:22 +0000)]
Use startswith_lower() where possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194007
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Mon, 4 Nov 2013 19:14:56 +0000 (19:14 +0000)]
Add support for AVX512 masked vector blend intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194006
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 4 Nov 2013 18:52:06 +0000 (18:52 +0000)]
Rename testing case to use - instead of _.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194001
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 4 Nov 2013 16:16:24 +0000 (16:16 +0000)]
Change BitcodeReader to use error_code instead of bool + string.
In order to create an ObjectFile implementation that uses bitcode files, we
need to propagate the bitcode errors to the ObjectFile interface, so we need
to convert it to use the same error handling as ObjectFile: error_code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193996
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Mon, 4 Nov 2013 14:53:22 +0000 (14:53 +0000)]
Support for microMIPS branch instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193992
91177308-0d34-0410-b5e6-
96231b3b80d8