Ahmed Bougacha [Thu, 21 May 2015 00:08:35 +0000 (00:08 +0000)]
[MemCpyOpt] Pass Instruction to IRBuilder, no need for NextNode. NFC.
We're erasing the instructions anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237861
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 May 2015 00:06:38 +0000 (00:06 +0000)]
[opaque pointer type] Pass explicit pointee type in another case of GEP constant folding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237860
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 May 2015 23:58:44 +0000 (23:58 +0000)]
Fix build error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237859
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 20 May 2015 23:55:16 +0000 (23:55 +0000)]
[MemCpyOpt] Don't move the memset when optimizing memset+memcpy.
Fixes PR23599, another miscompile introduced by r235232: when there is
another dependency on the destination of the created memset (i.e., the
part of the original destination that the memcpy doesn't depend on)
between the memcpy and the original memset, we would insert the created
memset after the memcpy, and thus after the other dependency.
Instead, insert the created memset right after the old one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237858
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 May 2015 23:28:03 +0000 (23:28 +0000)]
Fix build warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237855
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 May 2015 23:22:24 +0000 (23:22 +0000)]
[WinEH] C++ EH state numbering fixes
Differential Revision: http://reviews.llvm.org/D9787
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237854
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 20 May 2015 23:08:04 +0000 (23:08 +0000)]
[WinEH] Store pointers to the LSDA in the exception registration object
We aren't yet emitting the LSDA yet, so this will still fail to
assemble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237852
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 22:51:27 +0000 (22:51 +0000)]
Don't generate comments in the DebugLocStream unless required. NFC.
The ByteStreamer here wasn't taking account of whether the asm streamer was text based and verbose. Only with that combination should we emit comments.
This change makes sure that we only actually convert a Twine to a string using Twine::str() if we need the comment. This saves about 10000 small allocations on a test case involving the verify-use_list-order bitcode going through llc with debug info.
Note, this is NFC as the comments would ultimately never be emitted unless required.
Reviewed by Duncan Exon Smith and David Blaikie.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237851
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 22:37:48 +0000 (22:37 +0000)]
Revert "Add bool to DebugLocDwarfExpression to control emitting comments."
This reverts commit
0037b6bcbc874aa1b93d7ce3ad8dba3753ee2d9d (r237827).
David Blaikie suggested some alternatives to this which are better. Reverting to apply a better solution later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237849
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 20 May 2015 22:31:55 +0000 (22:31 +0000)]
Revert r237828 "[X86] Remove unused node after morphing it from shr to and."
This caused assertions during DAG combine: PR23601.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237843
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Wed, 20 May 2015 22:04:06 +0000 (22:04 +0000)]
[doc] Update Lexicon with C++ unwinder acronyms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237840
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 May 2015 21:46:30 +0000 (21:46 +0000)]
[opaque pointer type] Pass explicit type to Load instruction creation in AutoUpgrade
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237838
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 20 May 2015 21:40:38 +0000 (21:40 +0000)]
[Target/ARM] Only enable OptimizeBarrierPass at -O1 and above.
Ideally this is going to be and LLVM IR pass (shared, among others
with AArch64), but for the time being just enable it if consumers
ask us for optimization and not unconditionally.
Discussed with Tim Northover on IRC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237837
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 20 May 2015 21:03:03 +0000 (21:03 +0000)]
[lib/Fuzzer] more docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237836
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Wed, 20 May 2015 20:41:27 +0000 (20:41 +0000)]
AsmParser: Require a terminating null character when creating memory buffer.
This commit modifies the memory buffer creation in the AsmParser library so
that it requires a terminating null character. The LLLexer in the AsmParser
library checks for EOF only when it sees a null character, thus it would
be best to require it when creating a memory buffer so that the memory
buffer constructor can verify that a terminating null character is indeed
present.
Reviewers: Duncan P. N. Exon Smith, Matthias Braun
Differential Revision: http://reviews.llvm.org/D9883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237833
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 May 2015 20:22:31 +0000 (20:22 +0000)]
[opaque pointer type] LoadInst: assert that the explicit type matches the implicit one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237830
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 20:18:16 +0000 (20:18 +0000)]
MC: Remove most remaining uses of MCSymbolData::getSymbol(), NFC
Remove most remaining calls to `MCSymbolData::getSymbol()`, instead
using the already available `MCSymbol` directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237829
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 20 May 2015 20:10:26 +0000 (20:10 +0000)]
[X86] Remove unused node after morphing it from shr to and.
In some cases it won't get cleaned up properly leading to crashes
downstream. PR23353.
Based on a patch by Davide Italiano.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237828
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 19:50:03 +0000 (19:50 +0000)]
Add bool to DebugLocDwarfExpression to control emitting comments.
DebugLocDwarfExpression::EmitOp was creating temporary strings by concatenating Twine's.
When emitting to object files, these comments are thrown away.
This commit adds a boolean to the constructor of the DwarfExpression to control whether it will actually emit
any comments. This prevents it from even generating the temporary comments which would have been thrown away anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237827
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 19:34:08 +0000 (19:34 +0000)]
MC: Stop using MCSymbolData::getSymbol() in WinCOFF, NFC
Move APIs over from `MCSymbolData` to `MCSymbol`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237826
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 19:12:14 +0000 (19:12 +0000)]
Use a SmallString buffer instead of a std::string for debug info path lookup. NFC.
This code appends the filename to the directory then looks that up in a StringMap. We should be using the existing Twine::toStringRef method instead of Twine::str() as most times we'll succeed in the lookup.
Its possible that we should also consider allowing StringMap to lookup a key using a Twine in addition to a StringRef but that would complicate the code with little known benefit above and beyond this change.
This saves 170k temporary allocations when running llc on the verify_use_list_order bitcode with debug info for x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237823
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 May 2015 18:54:02 +0000 (18:54 +0000)]
DAGCombiner: Continue combining if FoldConstantArithmetic() fails.
DAG.FoldConstantArithmetic() can fail even though both operands are
Constants if OpaqueConstants are involved. Continue trying other combine
possibilities in tis case.
Differential Revision: http://reviews.llvm.org/D6946
Somewhat related to PR21801 / rdar://
19211454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237822
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Wed, 20 May 2015 18:41:25 +0000 (18:41 +0000)]
Reapply r237539 with a fix for the Chromium build.
Make sure if we're truncating a constant that would then be sign extended
that the sign extension of the truncated constant is the same as the
original constant.
> Canonicalize min/max expressions correctly.
>
> This patch introduces a canonical form for min/max idioms where one operand
> is extended or truncated. This often happens when the other operand is a
> constant. For example:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = sext i32 %a to i64
> %3 = select i1 %1, i64 %2, i64 0
>
> Would now be canonicalized into:
>
> %1 = icmp slt i32 %a, i32 0
> %2 = select i1 %1, i32 %a, i32 0
> %3 = sext i32 %2 to i64
>
> This builds upon a patch posted by David Majenemer
> (https://www.marc.info/?l=llvm-commits&m=
143008038714141&w=2). That pass
> passively stopped instcombine from ruining canonical patterns. This
> patch additionally actively makes instcombine canonicalize too.
>
> Canonicalization of expressions involving a change in type from int->fp
> or fp->int are not yet implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237821
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 20 May 2015 18:40:06 +0000 (18:40 +0000)]
ARM: Fix comment and make it slightly more readable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237820
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 18:25:40 +0000 (18:25 +0000)]
MC: Use MCSymbol in LocalCommon, NFC
Switch from MCSymbolData to MCSymbol in LocalCommon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237816
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Wed, 20 May 2015 17:21:09 +0000 (17:21 +0000)]
Fix icmp lowering
Summary:
During icmp lowering it can happen that a constant value can be larger than expected (see the code around the change).
APInt::getMinSignedBits() must be checked again as the shift before can change the constant sign to positive.
I'm not sure it is the best fix possible though.
Test Plan: Regression test included.
Reviewers: resistor, chandlerc, spatel, hfinkel
Reviewed By: hfinkel
Subscribers: hfinkel, llvm-commits
Differential Revision: http://reviews.llvm.org/D9147
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237812
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 May 2015 17:16:39 +0000 (17:16 +0000)]
Change Function::getIntrinsicID() to return an Intrinsic::ID. NFC.
Now that Intrinsic::ID is a typed enum, we can forward declare it and so return it from this method.
This updates all users which were either using an unsigned to store it, or had a now unnecessary cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237810
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 20 May 2015 17:01:06 +0000 (17:01 +0000)]
Temporary delete the test while we're investigating crashes in LLVMObject it causes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237809
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 16:34:36 +0000 (16:34 +0000)]
MC: Add MCSymbolData back to MCAssembler dump
r237490 accidentally dropped MCSymbolData from the MCAssembler dump.
Add it back underneath the MCSymbol dump. Remove the MCSymbol dump from
MCSymbolData, since this would cause an infinite co-recursion, and
besides, that back pointer is going away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237807
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 16:02:11 +0000 (16:02 +0000)]
MC: Update MCAssembler to use MCSymbol, NFC
Use `MCSymbol` over `MCSymbolData` where both are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237803
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 20 May 2015 15:38:29 +0000 (15:38 +0000)]
[YAML] Make Node's destructor non-virtual.
Nodes aren't supposed to be destroyed polymorphically. Also make all subclasses
final to avoid non-virtual dtor warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237801
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 15:16:14 +0000 (15:16 +0000)]
MC: Use MCSymbol in MachObjectWriter, NFC
Replace uses of `MCSymbolData` with `MCSymbol` where both are needed, so
we can remove the backpointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237799
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 15:10:03 +0000 (15:10 +0000)]
MC: Use MCSymbol in MCObjectWriter::isWeak(), NFC
Continue to prefer `MCSymbol` when we need both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237798
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Wed, 20 May 2015 15:05:07 +0000 (15:05 +0000)]
Get Triple::getARMCPUForArch() to use TargetParser
First ARMTargetParser FIXME, conservatively changing the way we parse CPUs
in the back-end. Still not perfect, with a lot of special cases, but moving
towards a more generic solution.
Moving all logic to the target parser made some unwritten assumptions
about architectures in Clang to break. I've added a lot of architectures
required by Clang, and default to CPUs that Clang believes it should
(and I agree).
I've also added a lot of unit tests, with the correct CPU for each
architecture, and Clang seems to be working correctly, too.
It also became clear that using "unsigned ID" as the argument for the get
methods makes it hard to know what ID, so I also changed the argument names
to match the enum type names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237797
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Wed, 20 May 2015 14:57:43 +0000 (14:57 +0000)]
Unit tests for the getSwappedBytes(double) fix from r237673.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237795
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 20 May 2015 14:53:50 +0000 (14:53 +0000)]
Silencing a -Wsign-compare warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237794
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 20 May 2015 14:32:03 +0000 (14:32 +0000)]
AVX-512: fixed algorithm of building vectors of i1 elements
fixed extract-insert i1 element,
load i1, zextload i1 should be with "and $1, %reg" to prevent loading garbage.
added a bunch of new tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237793
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 20 May 2015 14:18:59 +0000 (14:18 +0000)]
Revert r237789 - [mips] The naming convention for private labels is ABI dependant.
It works, but I've noticed that I missed several callers of createMCAsmInfo()
and many don't have a TargetMachine to provide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237792
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 20 May 2015 13:19:19 +0000 (13:19 +0000)]
[mips] Fix ehframe-indirect.ll test.
Summary:
-check-prefix replaces the default CHECK prefix rather than adding to it and
must be explicitly re-added.
Also added the N32 cases.
Reviewers: petarj
Reviewed By: petarj
Subscribers: tberghammer, llvm-commits
Differential Revision: http://reviews.llvm.org/D9668
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237790
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Wed, 20 May 2015 13:16:42 +0000 (13:16 +0000)]
[mips] The naming convention for private labels is ABI dependant.
Summary:
For N32/N64, private labels begin with '.L' but for O32 they begin with '$'.
MCAsmInfo now has an initializer function which can be used to provide information from the TargetMachine to control the assembly syntax.
Reviewers: vkalintiris
Reviewed By: vkalintiris
Subscribers: jfb, sandeep, llvm-commits, rafael
Differential Revision: http://reviews.llvm.org/D9821
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237789
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Wed, 20 May 2015 11:37:25 +0000 (11:37 +0000)]
[StatepointLowering] Support of the gc.relocates for invoke statepoints.
This change implements support for lowering of the gc.relocates tied to the invoke statepoint.
This is acomplished by storing frame indices of the lowered values in "StatepointRelocatedValues" map inside FunctionLoweringInfo instead of storing them in per-basic block structure StatepointLowering.
After this change StatepointLowering is used only during "LowerStatepoint" call and it is not necessary to store it as a field in SelectionDAGBuilder anymore.
Differential Revision: http://reviews.llvm.org/D7798
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237786
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 20 May 2015 08:54:45 +0000 (08:54 +0000)]
[mips] [IAS] Factor out .set nomacro warning. NFC.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237780
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 May 2015 05:40:13 +0000 (05:40 +0000)]
[TableGen] Make some variable names consistent with their type names and just generally consistent across all of the overloads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237775
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 May 2015 05:40:09 +0000 (05:40 +0000)]
[TableGen] Fix a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237774
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 May 2015 05:40:06 +0000 (05:40 +0000)]
[TableGen] Don't override convertValue for some of the Init types when it does the same thing as the base class implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237773
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 20 May 2015 04:45:26 +0000 (04:45 +0000)]
[X86] Implement the local-exec TLS model for Windows targets
We know that _tls_index is zero for local-exec TLS variables because
they are always defined in the executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237772
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 04:39:01 +0000 (04:39 +0000)]
MC: Use MCSymbol in most of ELFObjectWriter, NFC
Stop using MCSymbolData where we also need MCSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237770
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 20 May 2015 02:44:14 +0000 (02:44 +0000)]
Support: Introduce LLVM_FALLTHROUGH macro.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237766
91177308-0d34-0410-b5e6-
96231b3b80d8
Swaroop Sridhar [Wed, 20 May 2015 01:07:23 +0000 (01:07 +0000)]
Add a GCStrategy for CoreCLR
This change adds a new GC strategy for supporting the CoreCLR runtime.
This strategy is currently identical to Statepoint-example GC,
but is necessary for several upcoming changes specific to CoreCLR, such as:
1. Base-pointers not explicitly reported for interior pointers
2. Different format for stack-map encoding
3. Location of Safe-point polls: polls are only needed before loop-back edges and before tail-calls (not needed at function-entry)
4. Runtime specific handshake between calls to managed/unmanaged functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237753
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Wed, 20 May 2015 00:20:26 +0000 (00:20 +0000)]
[bpf] fix build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237751
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Wed, 20 May 2015 00:02:39 +0000 (00:02 +0000)]
MC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC
Pass through an `MCSymbol` instead of an `MCSymbolData` so we can get
rid of the back pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237750
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Tue, 19 May 2015 23:53:20 +0000 (23:53 +0000)]
MC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFC
Continue to canonicalize on MCSymbol instead of MCSymbolData when both
are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237749
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 May 2015 23:40:11 +0000 (23:40 +0000)]
[PlaceSafepoints] Stop special casing some intrinsics
We were special casing a handful of intrinsics as not needing a safepoint before them. After running into another valid case - memset - I took a closer look and realized that almost no intrinsics need to have a safepoint poll before them. Restructure the code to make that apparent so that we stop hitting these bugs. The only intrinsics which need a safepoint poll before them are ones which can run arbitrary code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237744
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 19 May 2015 23:28:23 +0000 (23:28 +0000)]
Try to fix the build with MSVC 2015 by disabling sized deallocation
I can't actually test this properly because uninstalling MSVC 2015 CTP 6
and reinstalling the 2015 RC takes hours. I can only verify that this
doesn't mess up MSVC 2013 and 2015 CTP 6 builds, which is what I've
done.
Should fix PR23513.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237743
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 19 May 2015 23:06:30 +0000 (23:06 +0000)]
Revert r237539: "Reapply r237520 with another fix for infinite looping"
This caused PR23583.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237739
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 19 May 2015 22:26:33 +0000 (22:26 +0000)]
Remove a stale comment
The todo was implemented a while ago; I just forgot to remove the comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237736
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 19 May 2015 22:12:57 +0000 (22:12 +0000)]
[lib/Fuzzer] change the meaning of -timeout flag: now timeout is applied to every unit of work separately
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237735
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 19 May 2015 21:59:11 +0000 (21:59 +0000)]
Add a comment line that was accidentally dropped in r236671.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237734
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 19 May 2015 21:54:32 +0000 (21:54 +0000)]
[DWARF parser] Make DWARF parser more robust against missing compile/type units.
DWARF standard claims that each compilation/type unit header in
.debug_info/.debug_types section must be followed by corresponding
compile/type unit DIE, possibly with its children. Two situations
are possible:
* compile/type unit DIE is missing because DWARF producer failed to
emit it.
* DWARF parser failed to parse unit DIE correctly, for instance if it
contains some unsupported attributes (see r237721, for instance).
In either of these cases, the library, and the tools that use it
(llvm-dwarfdump, llvm-symbolizer) should not crash. Insert appropriate
checks to protect against this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237733
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 19 May 2015 21:47:12 +0000 (21:47 +0000)]
[opaque pointer type] Provide a convenience function for creating direct CallInsts to Functions in IRBuilder
Might need a similar convenience in CallInst's ctor too, but we'll
see/will add it when it becomes useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237731
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 19 May 2015 21:41:28 +0000 (21:41 +0000)]
Revert r237708 (MIR serialization) - incremental buildbots became unstable.
The incremental buildbots entered a pass-fail cycle where during the fail
cycle one of the tests from this commit fails for an unknown reason. I
have reverted this commit and will investigate the cause of this problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237730
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 19 May 2015 21:31:18 +0000 (21:31 +0000)]
[opaque pointer type] Provide the ability to pass an explicit type when creating a CallInst through IRBuilder
A use for this will be added to Clang shortly. I haven't hit the
specific cases I want to cleanup in LLVM just yet.
A utility that avoids the need for this in direct calls to
llvm::Functions will be added too - since in that case the type can be
retrieved from the llvm::Function directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237728
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 19 May 2015 21:22:20 +0000 (21:22 +0000)]
MachineInstr: Remove unused parameter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237726
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Tue, 19 May 2015 20:52:45 +0000 (20:52 +0000)]
[Speculation] NFC: more header comments
explaining how it differs from SpeculativeExecuteBB in SimplifyCFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237724
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 19 May 2015 20:51:48 +0000 (20:51 +0000)]
Fix MIR testcase committed in r237708 - remove target triple.
Remove the target specific triple and datalayout from the
llvm IR in the MIR testcase file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237723
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 19 May 2015 20:50:14 +0000 (20:50 +0000)]
Remove unnecessary cast. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237722
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 19 May 2015 20:29:28 +0000 (20:29 +0000)]
[DWARF parser] Add basic support for DWZ DWARF multifile extensions.
This change implements basic support for DWARF alternate sections
proposal: http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open
LLVM tools now understand new forms: DW_FORM_GNU_ref_alt and
DW_FORM_GNU_strp_alt, which are used as references to .debug_info and
.debug_str sections respectively, stored in a separate file, and
possibly shared between different executables / shared objects.
llvm-dwarfdump and llvm-symbolizer don't yet know how to access this
alternate debug file (usually pointed by .gnu_debugaltlink section),
but they can at lease properly parse and dump regular files, which
refer to it.
This change should fix crashes of llvm-dwarfdump and llvm-symbolizer on
files produced by running "dwz" tool. Such files are already installed
on some modern Linux distributions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237721
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 19 May 2015 20:10:19 +0000 (20:10 +0000)]
Dereferenceable, dereferenceable_or_null metadata for loads
Summary:
Introduce dereferenceable, dereferenceable_or_null metadata for loads
with the same semantic as corresponding attributes.
This patch depends on http://reviews.llvm.org/D9253
Patch by Artur Pilipenko!
Reviewers: hfinkel, sanjoy, reames
Reviewed By: sanjoy, reames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9365
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237720
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 May 2015 20:10:16 +0000 (20:10 +0000)]
use 'auto *' for pointers; clearer usage, no deep copying
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237719
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 19 May 2015 19:20:02 +0000 (19:20 +0000)]
Remove unused MCExpr.h include from MCELF.h. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237717
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 May 2015 19:10:57 +0000 (19:10 +0000)]
tidy up
1. remove duplicate local variable
2. add local variable with name to match comment
3. remove useless comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237715
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 19 May 2015 18:45:41 +0000 (18:45 +0000)]
Fix llc path in MIR testcases committed in r237708.
I've committed testcases with local llc path by mistake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237712
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 May 2015 18:24:33 +0000 (18:24 +0000)]
use range-based for-loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237711
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 19 May 2015 18:18:49 +0000 (18:18 +0000)]
Remove unused MCRelocationInfo.h include from MCDisassembler.h. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237710
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Tue, 19 May 2015 18:18:10 +0000 (18:18 +0000)]
Change a reachable unreachable to a fatal error.
Summary:
Also tagged a FIXME comment, and added information about why it breaks.
Bug found using AFL fuzz.
Reviewers: rafael, craig.topper
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9729
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237709
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 19 May 2015 18:17:39 +0000 (18:17 +0000)]
MIR Serialization: print and parse LLVM IR using MIR format.
This commit is the initial commit for the MIR serialization project.
It creates a new library under CodeGen called 'MIR'. This new
library adds a new machine function pass that prints out the LLVM IR
using the MIR format. This pass is then added as a last pass when a
'stop-after' option is used in llc. The new library adds the initial
functionality for parsing of MIR files as well. This commit also
extends the llc tool so that it can recognize and parse MIR input files.
Reviewers: Duncan P. N. Exon Smith, Matthias Braun, Philip Reames
Differential Revision: http://reviews.llvm.org/D9616
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237708
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 19 May 2015 17:59:09 +0000 (17:59 +0000)]
Remove unused MachineLocation.h include from MCAsmInfo.h. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237707
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 19 May 2015 17:52:32 +0000 (17:52 +0000)]
RegisterCoalescer: Improve a comment.
Explain the relation of the example to the variables in the code,
explain what bad behaviour the code avoids in this case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237706
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 19 May 2015 17:49:14 +0000 (17:49 +0000)]
use range-based for loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237705
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Tue, 19 May 2015 16:29:43 +0000 (16:29 +0000)]
[RewriteStatepointsForGC] Fix up naming in "relocationViaAlloca" and run it through clang-format.
Differential Revision: http://reviews.llvm.org/D9774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237703
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Tue, 19 May 2015 16:09:11 +0000 (16:09 +0000)]
Remove the InstructionSimplifierPass immediately after InstructionCombiningPass.
InstructionCombiningPass was added after LoopUnrollPass in r237395. Because
InstructionCombiningPass is strictly more powerful than InstructionSimplifierPass,
remove the unnecessary InstructionSimplifierPass.
Differential Revision: http://reviews.llvm.org/D9838
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237702
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Tue, 19 May 2015 15:59:05 +0000 (15:59 +0000)]
[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper to clone them after statepoint than to emit proper relocates for them. This change implements this logic. There is alredy similar optimization in CodeGenPrepare, but doing so during RewriteStatepointsForGC allows to capture more opprtunities such as relocates in loops and longer instruction chains.
Differential Revision: http://reviews.llvm.org/D9774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237701
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Tue, 19 May 2015 14:12:55 +0000 (14:12 +0000)]
[mips][microMIPSr6] Implement NOR, OR, ORI, XOR and XORI instructions
Differential Revision: http://reviews.llvm.org/D8800
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237697
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Tue, 19 May 2015 13:32:31 +0000 (13:32 +0000)]
[mips][microMIPSr6] Implement AND and ANDI instructions
Differential Revision: http://reviews.llvm.org/D8772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237696
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 19 May 2015 13:32:19 +0000 (13:32 +0000)]
Rangify for loop in Cleanup(), NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237695
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 19 May 2015 13:31:25 +0000 (13:31 +0000)]
Prevent Cleanup() from running more than once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237694
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 19 May 2015 12:59:23 +0000 (12:59 +0000)]
Use cat and not type Under MSYS, same as Cygwin.
type means something else under the MSYS shell.
Patch by Tzafrir Poupko!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237692
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 19 May 2015 12:24:52 +0000 (12:24 +0000)]
[mips] Correct and improve special-case shuffle instructions.
Summary:
The documentation writes vectors highest-index first whereas LLVM-IR writes
them lowest-index first. As a result, instructions defined in terms of
left_half() and right_half() had the halves reversed.
In addition to correcting them, they have been improved to allow shuffles
that use the same operand twice or in reverse order. For example, ilvev
used to accept masks of the form:
<0, n, 2, n+2, 4, n+4, ...>
but now accepts:
<0, 0, 2, 2, 4, 4, ...>
<n, n, n+2, n+2, n+4, n+4, ...>
<0, n, 2, n+2, 4, n+4, ...>
<n, 0, n+2, 2, n+4, 4, ...>
One further improvement is that splati.[bhwd] is now the preferred instruction
for splat-like operations. The other special shuffles are no longer used
for splats. This lead to the discovery that <0, 0, ...> would not cause
splati.[hwd] to be selected and this has also been fixed.
This fixes the enc-3des test from the test-suite on Mips64r6 with MSA.
Reviewers: vkalintiris
Reviewed By: vkalintiris
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237689
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 19 May 2015 11:46:27 +0000 (11:46 +0000)]
As r237678 was reverted, this is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237687
91177308-0d34-0410-b5e6-
96231b3b80d8
Zoran Jovanovic [Tue, 19 May 2015 11:21:37 +0000 (11:21 +0000)]
[mips][microMIPSr6] Implement DIV, DIVU, MOD and MODU instructions
Differential Revision: http://reviews.llvm.org/D8769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237685
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Tue, 19 May 2015 11:18:10 +0000 (11:18 +0000)]
Fix Visual C++ errors C2784, C2780, C2782 after r237678.
It does not like std::min(unsigned, uint32_t).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237683
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 19 May 2015 11:06:56 +0000 (11:06 +0000)]
[X86] ABI change for x86-32: pass 3 vector arguments in-register instead of 4, except on Darwin.
This changes the ABI used on 32-bit x86 for passing vector arguments.
Historically, clang passes the first 4 vector arguments in-register, and additional vector arguments on the stack, regardless of platform. That is different from the behavior of gcc, icc, and msvc, all of which pass only the first 3 arguments in-register.
The 3-register convention is documented, unofficially, in Agner's calling convention guide, and, officially, in the recently released version 1.0 of the i386 psABI.
Darwin is kept as is because the OS X ABI Function Call Guide explicitly documents the current (4-register) behavior.
This fixes PR21510
Differential revision: http://reviews.llvm.org/D9644
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237682
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Tue, 19 May 2015 10:51:24 +0000 (10:51 +0000)]
Revert "Avoid size_t -> unsigned conversion in MathExtras.h header. NFC".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237680
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Tue, 19 May 2015 10:35:32 +0000 (10:35 +0000)]
Avoid size_t -> unsigned conversion in MathExtras.h header. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237678
91177308-0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Tue, 19 May 2015 10:21:12 +0000 (10:21 +0000)]
Fix documentation for Set-Like Containers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237677
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Tue, 19 May 2015 08:44:15 +0000 (08:44 +0000)]
Fix getSwappedBytes for double.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237673
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 19 May 2015 06:50:19 +0000 (06:50 +0000)]
BrainF.cpp: Update CreateCall() according to r237624.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237669
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Tue, 19 May 2015 06:25:19 +0000 (06:25 +0000)]
Drop unnecessary ';' after namespace
The ';' was introduced in 237642. With it in place, we get a large number of
warnings in -pedantic mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237667
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 19 May 2015 01:40:21 +0000 (01:40 +0000)]
SelectionDAG: Cleanup and simplify FoldConstantArithmetic
This cleans up the FoldConstantArithmetic code by factoring out the case
of two ConstantSDNodes into an own function. This avoids unnecessary
complexity for many callers who already have ConstantSDNode arguments.
This also avoids an intermeidate SmallVector datastructure and a loop
over that datastructure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237651
91177308-0d34-0410-b5e6-
96231b3b80d8
Filipe Cabecinhas [Tue, 19 May 2015 01:21:06 +0000 (01:21 +0000)]
[BitcodeReader] Error out if we read an invalid function argument type
Bug found with AFL fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237650
91177308-0d34-0410-b5e6-
96231b3b80d8