oota-llvm.git
8 years agoChange Function::getIntrinsicID() to return an Intrinsic::ID. NFC.
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

8 years agoTemporary delete the test while we're investigating crashes in LLVMObject it causes.
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

8 years agoMC: Add MCSymbolData back to MCAssembler dump
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

8 years agoMC: Update MCAssembler to use MCSymbol, NFC
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

8 years ago[YAML] Make Node's destructor non-virtual.
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

8 years agoMC: Use MCSymbol in MachObjectWriter, NFC
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

8 years agoMC: Use MCSymbol in MCObjectWriter::isWeak(), NFC
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

8 years agoGet Triple::getARMCPUForArch() to use TargetParser
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

8 years agoUnit tests for the getSwappedBytes(double) fix from r237673.
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

8 years agoSilencing a -Wsign-compare warning; NFC.
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

8 years agoAVX-512: fixed algorithm of building vectors of i1 elements
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

8 years agoRevert r237789 - [mips] The naming convention for private labels is ABI dependant.
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

8 years ago[mips] Fix ehframe-indirect.ll test.
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

8 years ago[mips] The naming convention for private labels is ABI dependant.
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

8 years ago[StatepointLowering] Support of the gc.relocates for invoke statepoints.
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

8 years ago[mips] [IAS] Factor out .set nomacro warning. NFC.
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

8 years ago[TableGen] Make some variable names consistent with their type names and just general...
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

8 years ago[TableGen] Fix a memory leak.
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

8 years ago[TableGen] Don't override convertValue for some of the Init types when it does the...
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

8 years ago[X86] Implement the local-exec TLS model for Windows targets
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

8 years agoMC: Use MCSymbol in most of ELFObjectWriter, NFC
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

8 years agoSupport: Introduce LLVM_FALLTHROUGH macro.
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

8 years agoAdd a GCStrategy for CoreCLR
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

8 years ago[bpf] fix build
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

8 years agoMC: Take MCSymbol in MachObjectWriter::getSymbolAddress(), NFC
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

8 years agoMC: Use MCSymbol in MCAsmLayout::getSymbolOffset(), NFC
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

8 years ago[PlaceSafepoints] Stop special casing some intrinsics
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

8 years agoTry to fix the build with MSVC 2015 by disabling sized deallocation
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

8 years agoRevert r237539: "Reapply r237520 with another fix for infinite looping"
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

8 years agoRemove a stale comment
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

8 years ago[lib/Fuzzer] change the meaning of -timeout flag: now timeout is applied to every...
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

8 years agoAdd a comment line that was accidentally dropped in r236671.
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

8 years ago[DWARF parser] Make DWARF parser more robust against missing compile/type units.
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

8 years ago[opaque pointer type] Provide a convenience function for creating direct CallInsts...
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

8 years agoRevert r237708 (MIR serialization) - incremental buildbots became unstable.
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

8 years ago[opaque pointer type] Provide the ability to pass an explicit type when creating...
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

8 years agoMachineInstr: Remove unused parameter.
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

8 years ago[Speculation] NFC: more header comments
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

8 years agoFix MIR testcase committed in r237708 - remove target triple.
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

8 years agoRemove unnecessary cast. NFC
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

8 years ago[DWARF parser] Add basic support for DWZ DWARF multifile extensions.
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

8 years agoDereferenceable, dereferenceable_or_null metadata for loads
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

8 years agouse 'auto *' for pointers; clearer usage, no deep copying
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

8 years agoRemove unused MCExpr.h include from MCELF.h. NFC
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

8 years agotidy up
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

8 years agoFix llc path in MIR testcases committed in r237708.
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

8 years agouse range-based for-loop
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

8 years agoRemove unused MCRelocationInfo.h include from MCDisassembler.h. NFC
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

8 years agoChange a reachable unreachable to a fatal error.
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

8 years agoMIR Serialization: print and parse LLVM IR using MIR format.
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

8 years agoRemove unused MachineLocation.h include from MCAsmInfo.h. NFC
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

8 years agoRegisterCoalescer: Improve a comment.
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

8 years agouse range-based for loop
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

8 years ago[RewriteStatepointsForGC] Fix up naming in "relocationViaAlloca" and run it through...
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

8 years agoRemove the InstructionSimplifierPass immediately after InstructionCombiningPass.
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

8 years ago[RewriteStatepointsForGC] For some values (like gep's and bitcasts) it's cheaper...
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

8 years ago[mips][microMIPSr6] Implement NOR, OR, ORI, XOR and XORI instructions
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

8 years ago[mips][microMIPSr6] Implement AND and ANDI instructions
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

8 years agoRangify for loop in Cleanup(), NFC.
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

8 years agoPrevent Cleanup() from running more than once.
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

8 years agoUse cat and not type Under MSYS, same as Cygwin.
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

8 years ago[mips] Correct and improve special-case shuffle instructions.
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

8 years agoAs r237678 was reverted, this is no longer needed.
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

8 years ago[mips][microMIPSr6] Implement DIV, DIVU, MOD and MODU instructions
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

8 years agoFix Visual C++ errors C2784, C2780, C2782 after r237678.
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

8 years ago[X86] ABI change for x86-32: pass 3 vector arguments in-register instead of 4, except...
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

8 years agoRevert "Avoid size_t -> unsigned conversion in MathExtras.h header. NFC".
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

8 years agoAvoid size_t -> unsigned conversion in MathExtras.h header. NFC.
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

8 years agoFix documentation for Set-Like Containers
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

8 years agoFix getSwappedBytes for double.
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

8 years agoBrainF.cpp: Update CreateCall() according to r237624.
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

8 years agoDrop unnecessary ';' after namespace
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

8 years agoSelectionDAG: Cleanup and simplify FoldConstantArithmetic
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

8 years ago[BitcodeReader] Error out if we read an invalid function argument type
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

8 years ago[lib/Fuzzer] more efficient reload logic; also don't spam git too much
Kostya Serebryany [Tue, 19 May 2015 01:06:07 +0000 (01:06 +0000)]
[lib/Fuzzer] more efficient reload logic; also don't spam git too much

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237649 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[BitcodeReader] It's a malformed block if CodeLenWidth is too big
Filipe Cabecinhas [Tue, 19 May 2015 00:34:17 +0000 (00:34 +0000)]
[BitcodeReader] It's a malformed block if CodeLenWidth is too big

Bug found with AFL fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237646 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Factor common pattern into isOneConstant() function. NFC
Matthias Braun [Tue, 19 May 2015 00:25:21 +0000 (00:25 +0000)]
DAGCombiner: Factor common pattern into isOneConstant() function. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Factor common pattern into isAllOnesConstant() function. NFC
Matthias Braun [Tue, 19 May 2015 00:25:20 +0000 (00:25 +0000)]
DAGCombiner: Factor common pattern into isAllOnesConstant() function. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237644 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Use isNullConstant() where possible
Matthias Braun [Tue, 19 May 2015 00:25:17 +0000 (00:25 +0000)]
DAGCombiner: Use isNullConstant() where possible

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237643 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoStore intrinsic ID by value in Function instead of a string lookup. NFC.
Pete Cooper [Tue, 19 May 2015 00:24:26 +0000 (00:24 +0000)]
Store intrinsic ID by value in Function instead of a string lookup.  NFC.

On 64-bit targets, Function has 4-bytes of padding in its struct layout.

This uses the space for the intrinsic ID. It is set and recalculated whenever the function name is set.  This is similar to the current behavior which clears the function from the intrinsic ID cache when its renamed.

The intrinsic cache itself is removed as the only purpose was to speedup calls to getIntrinsicID() which now just reading the new field in the struct.

Reviewed by Duncan.  http://reviews.llvm.org/D9836

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237642 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMove Function::lookupIntrinsicID to a static method. NFC
Pete Cooper [Tue, 19 May 2015 00:02:25 +0000 (00:02 +0000)]
Move Function::lookupIntrinsicID to a static method.  NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237641 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRe-land r237175: [X86] Always return the sret parameter in eax/rax ...
Reid Kleckner [Mon, 18 May 2015 23:35:09 +0000 (23:35 +0000)]
Re-land r237175: [X86] Always return the sret parameter in eax/rax ...

This reverts commit r237210.

Also fix X86/complex-fca.ll to match the code that we used to generate
on win32 and now generate everwhere to conform to SysV.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237639 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert accidental change in r237633
Matthias Braun [Mon, 18 May 2015 23:18:13 +0000 (23:18 +0000)]
Revert accidental change in r237633

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237635 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips][microMIPSr6] Implement LSA instruction
Jozef Kolek [Mon, 18 May 2015 23:12:10 +0000 (23:12 +0000)]
[mips][microMIPSr6] Implement LSA instruction

This patch implements LSA instruction using mapping.

Differential Revision: http://reviews.llvm.org/D8919

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237634 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Factor common pattern into isNullConstant() function. NFC
Matthias Braun [Mon, 18 May 2015 23:07:27 +0000 (23:07 +0000)]
DAGCombiner: Factor common pattern into isNullConstant() function. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237633 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that...
David Blaikie [Mon, 18 May 2015 22:40:13 +0000 (22:40 +0000)]
Revert "[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that accepts a Function without needing to take an explicit callee Type"

Creates ambiguity in Clang callers. Reverting while I figure it out.

This reverts commit r237627.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237629 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[BitcodeReader] Make sure the type of the inserted value matches the type of the...
Filipe Cabecinhas [Mon, 18 May 2015 22:27:11 +0000 (22:27 +0000)]
[BitcodeReader] Make sure the type of the inserted value matches the type of the aggregate at those indices

Bug found with AFL-fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237628 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that accepts...
David Blaikie [Mon, 18 May 2015 22:25:14 +0000 (22:25 +0000)]
[opaque pointer type] Provide a convenience for IRBuilder::CreateCall that accepts a Function without needing to take an explicit callee Type

The common case is a direct call, so don't make all those users have to
explicitly pass the result of llvm::Function::getFunctionType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSimplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only
David Blaikie [Mon, 18 May 2015 22:13:54 +0000 (22:13 +0000)]
Simplify IRBuilder::CreateCall* by using ArrayRef+initializer_list/braced init only

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237624 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago80-col fixup.
Eric Christopher [Mon, 18 May 2015 22:12:43 +0000 (22:12 +0000)]
80-col fixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237623 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix grammar in comments.
Eric Christopher [Mon, 18 May 2015 22:12:41 +0000 (22:12 +0000)]
Fix grammar in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237622 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: work around ld64 bug more aggressively.
Tim Northover [Mon, 18 May 2015 22:07:20 +0000 (22:07 +0000)]
AArch64: work around ld64 bug more aggressively.

ld64 currently mishandles internal pointer relocations (i.e.
ARM64_RELOC_UNSIGNED referred to by section & offset rather than symbol). The
existing __cfstring clause was an early discovery and workaround for this, but
the problem is wider and we should avoid such relocations wherever possible for
now.

This code should be reverted to allowing internal relocations as soon as
possible.

PR23437.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237621 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix some odd whitespace and formatting errors while making
Eric Christopher [Mon, 18 May 2015 21:49:02 +0000 (21:49 +0000)]
Fix some odd whitespace and formatting errors while making
changes in ConstantsContext.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237620 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoExtract the load/store type verification to a separate function.
Filipe Cabecinhas [Mon, 18 May 2015 21:48:55 +0000 (21:48 +0000)]
Extract the load/store type verification to a separate function.

Summary:
Added isLoadableOrStorableType to PointerType.

We were doing some checks in some places, occasionally assert()ing instead
of telling the caller. With this patch, I'm putting all type checking in
the same place for load/store type instructions, and verifying the same
thing every time.

I also added a check for load/store of a function type.

Applied extracted check to Load, Store, and Cmpxcg.

I don't have exhaustive tests for all of these, but all Error() calls in
TypeCheckLoadStoreInst are being tested (in invalid.test).

Reviewers: dblaikie, rafael

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9785

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237619 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[lib/Fuzzer] when -sync_command=<CMD> is given, periodically execute 'CMD CORPUS...
Kostya Serebryany [Mon, 18 May 2015 21:34:20 +0000 (21:34 +0000)]
[lib/Fuzzer] when -sync_command=<CMD> is given, periodically execute 'CMD CORPUS' to synchronize with other processes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237617 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[YAML] Plug a memory leak
Benjamin Kramer [Mon, 18 May 2015 21:11:27 +0000 (21:11 +0000)]
[YAML] Plug a memory leak

The destructor of BlockScalarNode is never called. Store the contained
string in BumpPtrAllocated memory instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237614 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMachineInstr: Change return value of getOpcode() to unsigned.
Matthias Braun [Mon, 18 May 2015 20:27:55 +0000 (20:27 +0000)]
MachineInstr: Change return value of getOpcode() to unsigned.

This was previously returning int. However there are no negative opcode
numbers and more importantly this was needlessly different from
MCInstrDesc::getOpcode() (which even is the value returned here) and
SDValue::getOpcode()/SDNode::getOpcode().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237611 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Verifier] Assert gc_relocate always return a pointer type
Chen Li [Mon, 18 May 2015 19:50:14 +0000 (19:50 +0000)]
[Verifier] Assert gc_relocate always return a pointer type

Summary: Add an assertion in verifier.cpp to make sure gc_relocate relocate a gc pointer, and its return type has the same address space with the relocated pointer.

Reviewers: reames, AndyAyers, sanjoy, pgavlin

Reviewed By: pgavlin

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9695

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237605 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PlaceSafepoints] Assertion on that gc_result can not have preceding phis should...
Chen Li [Mon, 18 May 2015 19:02:25 +0000 (19:02 +0000)]
[PlaceSafepoints] Assertion on that gc_result can not have preceding phis should only apply to invoke statepoint

Summary: When PlaceSafepoints pass replaces old return result with gc_result from statepoint, it asserts that gc_result can not have preceding phis in its parent block. This is only true on invoke statepoint, which terminates the block and puts its result at the beginning of the normal successor block. Call statepoint does not terminate the block and thus its result is in the same block with it. There should be no restriction on whether there are phis or not.

Reviewers: reames, igor-laevsky

Reviewed By: igor-laevsky

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D9803

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237597 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMC: clang-format MCContext. NFC.
Jim Grosbach [Mon, 18 May 2015 18:43:23 +0000 (18:43 +0000)]
MC: clang-format MCContext. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237595 91177308-0d34-0410-b5e6-96231b3b80d8