David Majnemer [Wed, 1 Jul 2015 05:37:57 +0000 (05:37 +0000)]
[SCCP] Turn loads of null into undef instead of zero initialized values
Surprisingly, this is a correctness issue: the mmx type exists for
calling convention purposes, LLVM doesn't have a zero representation for
them.
This partially fixes PR23999.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241142
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Wed, 1 Jul 2015 03:38:49 +0000 (03:38 +0000)]
[NaryReassociate] enhances nsw by leveraging @llvm.assume
Summary:
nsw are flaky and can often be removed by optimizations. This patch enhances
nsw by leveraging @llvm.assume in the IR. Specifically, NaryReassociate now
understands that
assume(a + b >= 0) && assume(a >= 0) ==> a +nsw b
As a result, it can split more sext(a + b) into sext(a) + sext(b) for CSE.
Test Plan: nary-gep.ll
Reviewers: broune, meheff
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D10822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241139
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Wed, 1 Jul 2015 03:32:08 +0000 (03:32 +0000)]
Getting started docs: https, and check signature
Summary: Download should be over https, not insecure ftp at least for the signature and key files. The signature should also get verified.
Test Plan: None
Reviewers: chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241138
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 30 Jun 2015 23:11:45 +0000 (23:11 +0000)]
[SanitizerCoverage] Don't add instrumentation to unreachable blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241127
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Heffernan [Tue, 30 Jun 2015 22:48:51 +0000 (22:48 +0000)]
Fix several typos in LangRef.rst related to loop unrolling metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241126
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 30 Jun 2015 22:46:59 +0000 (22:46 +0000)]
[SEH] Add new intrinsics for recovering and restoring parent frames
The incoming EBP value established by the runtime is actually a pointer
to the end of the EH registration object, and not the true parent
function frame pointer. Clang doesn't need llvm.x86.seh.exceptioninfo
anymore because we know that the exception info pointer is at a fixed
offset from this incoming EBP.
The llvm.x86.seh.recoverfp intrinsic takes an EBP value provided by the
EH runtime and returns a pointer that is usable with llvm.framerecover.
The llvm.x86.seh.restoreframe intrinsic is inserted by the 32-bit
specific preparation pass in blocks targetted by the EH runtime. It
re-establishes any physical registers used by the parent function to
address the stack, such as the frame, base, and stack pointers.
Neither of these intrinsics correctly handle stack realignment prologues
yet, but it's possible to add that later.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D10848
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241125
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 30 Jun 2015 22:38:22 +0000 (22:38 +0000)]
[IRBuilder] Delete unused constructor and SetInsertPoint overload.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241124
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 30 Jun 2015 22:17:29 +0000 (22:17 +0000)]
Fix memory leak in unittest added in r241101.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241123
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 30 Jun 2015 22:14:01 +0000 (22:14 +0000)]
[Cloning] Teach CloneModule about personality functions
CloneModule didn't take into account that it needed to remap the value
using values in the module.
This fixes PR23992.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241122
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Tue, 30 Jun 2015 21:28:31 +0000 (21:28 +0000)]
[NVPTX] cleanups and refacotring in NVPTXFrameLowering.cpp
Summary: NFC
Test Plan: no regression
Reviewers: wengxt
Reviewed By: wengxt
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D10849
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241118
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 30 Jun 2015 21:22:32 +0000 (21:22 +0000)]
[FaultMaps] Let the frontend pre-select implicit null check candidates.
Summary:
This change introduces a !make.implicit metadata that allows the
frontend to pre-select the set of explicit null checks that will be
considered for transformation into implicit null checks.
The reason for not using profiling data instead of !make.implicit is
explained in the change to `FaultMaps.rst`.
Reviewers: atrick, reames, pgavlin, JosephTremoulet
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10824
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241116
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Tue, 30 Jun 2015 20:54:21 +0000 (20:54 +0000)]
Pack MCSymbol::HasName in to a spare bit in the section/fragment union.
This is part of an effort to pack the average MCSymbol down to 24 bytes.
The HasName bit was pushing the size of the bitfield over to another word,
so this change uses a PointerIntPair to fit in it to unused bits of a
PointerUnion.
Reviewed by Rafael EspĂndola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241115
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 20:32:26 +0000 (20:32 +0000)]
Use ErrorOr in getRelocationAdress.
We can probably do better in this method, but this is an improvement and
enables further ErrorOr cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241114
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 20:18:49 +0000 (20:18 +0000)]
Implement containsSymbol with other lower level methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241112
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 30 Jun 2015 20:01:16 +0000 (20:01 +0000)]
Modified a comment about the reason for the patch (removed commented code).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241110
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 19:58:10 +0000 (19:58 +0000)]
Remove Elf_Shdr_Iter. Diagnose files with invalid section header sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241109
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Tue, 30 Jun 2015 19:45:45 +0000 (19:45 +0000)]
Fixes a bug with __builtin_vsx_lxvdw4x on Little Endian systems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241108
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 19:24:51 +0000 (19:24 +0000)]
Use range loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241105
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 19:13:25 +0000 (19:13 +0000)]
Use range loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241104
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Tue, 30 Jun 2015 19:10:31 +0000 (19:10 +0000)]
COFF: Do not assign linker-weak symbols to selectany comdat sections.
It is mandatory to specify a comdat in order to receive comdat semantics
for a symbol. We were previously getting this wrong in -function-sections
mode; linker-weak symbols were being emitted in a selectany comdat. This
change causes such symbols to use a noduplicates comdat instead, fixing
the inconsistency.
Also correct an inaccuracy in the docs.
Differential Revision: http://reviews.llvm.org/D10828
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241103
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Tue, 30 Jun 2015 19:07:20 +0000 (19:07 +0000)]
[DebugInfo] Let IRBuilder::SetInsertPoint(BB::iterator) update current debug location.
IRBuilder::SetInsertPoint(BB, BB::iterator) is an older version of
IRBuilder::SetInsertPoint(Instruction). However, the latter updates
the current debug location of emitted instruction, while the former
doesn't, which is confusing.
Unify the behavior of these methods: now they both set current debug
location to the debug location of instruction at insertion point.
The callers of IRBuilder::SetInsertPoint(BB, BB::iterator) doesn't
seem to depend on the old behavior (keeping the original debug info
location). On the contrary, sometimes they (e.g. SCEV) *should* be
updating debug info location, but don't. I'll look at gdb bots after
the commit to check that we don't regress on debug info somewhere.
This change may make line table more fine-grained, thus increasing
debug info size. I haven't observed significant increase, though:
it varies from negligible to 0.3% on several binaries and self-hosted
Clang.
This is yet another change targeted at resolving PR23837.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241101
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 19:02:00 +0000 (19:02 +0000)]
Use range loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241100
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Tue, 30 Jun 2015 18:59:19 +0000 (18:59 +0000)]
[NVPTX] Fix issue introduced in D10321
Summary:
Really check if %SP is not used in other places, instead of checking only exact
one non-dbg use.
Patched by Xuetian Weng.
Test Plan:
@foo4 in test/CodeGen/NVPTX/local-stack-frame.ll, create a case that
SP will appear twice.
Reviewers: jholewinski, jingyue
Reviewed By: jingyue
Subscribers: llvm-commits, sfantao, jholewinski
Differential Revision: http://reviews.llvm.org/D10844
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241099
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Jun 2015 18:32:18 +0000 (18:32 +0000)]
Fix a fixme and make DICompileUnit a distinct node. Tested via clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241097
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jun 2015 18:32:02 +0000 (18:32 +0000)]
Fix compilation failure introduced in r241093.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241096
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 18:23:07 +0000 (18:23 +0000)]
Add a test of an elf file with an invalid section index.
We were already checking, but were missing a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241094
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jun 2015 18:16:42 +0000 (18:16 +0000)]
MIR Serialization: Serialize MBB successors.
This commit implements serialization of the machine basic block successors. It
uses a YAML flow sequence that contains strings that have the MBB references.
The MBB references in those strings use the same syntax as the MBB machine
operands in the machine instruction strings.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10699
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241093
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jun 2015 18:00:16 +0000 (18:00 +0000)]
MIR Printer: extract the code that prints MBB references into a new method. NFC.
This commit enables the MIR printer to reuse the code that prints MBB
references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241087
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jun 2015 17:55:00 +0000 (17:55 +0000)]
MIR Parser: refactor error reporting for machine instruction parser errors. NFC.
This commit extracts the code that reports an error that's produced by the
machine instruction parser into a new method that can be reused in other places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241086
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jun 2015 17:47:50 +0000 (17:47 +0000)]
MIR Parser: make the machine instruction parsing interface more consistent. NFC.
This commit refactors the interface for machine instruction parser. It adopts
the pattern of returning a bool and passing in the result in the first argument
that is used by the other parsing methods for the the method 'parse' and the
function 'parseMachineInstr'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241085
91177308-0d34-0410-b5e6-
96231b3b80d8
Samuel Antao [Tue, 30 Jun 2015 17:18:00 +0000 (17:18 +0000)]
Force relocation mode to be default, regardless of what is passed to the backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241081
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Tue, 30 Jun 2015 17:16:39 +0000 (17:16 +0000)]
[CMake] Make the CMake files (LLVMConfig.cmake and LLVMExports.cmake)
generated by the Autoconf/Makefile build system relocatable.
Previously the generated CMake files contained hardcoded paths which
prevented a binary installation from being relocated to a different
place in the file system. This problem was most noticeable in LLVM's
official binary releases which were completely unusable by a downstream
project trying to import the CMake targets.
Package maintainers who choose to modify the install location of the
CMake directory without using the ``PROJ_cmake`` Makefile variable
override will need to patch the generated``LLVMConfig.cmake`` so that
``LLVM_INSTALL_PREFIX`` and ``_LLVM_CMAKE_DIR`` variables are set
correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241080
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 30 Jun 2015 16:51:29 +0000 (16:51 +0000)]
MIR Parser: adopt the 'maybeLex...' pattern. NFC.
This commit refactors the machine instruction lexer so that the lexing
functions use the 'maybeLex...' pattern, where they determine if they
can lex the current token by themselves.
Reviewers: Sean Silva
Differential Revision: http://reviews.llvm.org/D10817
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241078
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 30 Jun 2015 16:30:22 +0000 (16:30 +0000)]
use range-based for loops; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241076
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 15:33:44 +0000 (15:33 +0000)]
Fix the name of the iterator functions to match the coding standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241074
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 14:59:20 +0000 (14:59 +0000)]
Report an error on invalid sh_entsize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241070
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 30 Jun 2015 14:38:57 +0000 (14:38 +0000)]
[X86] Fix a bug in WIN_FTOL_32/64 handling.
Duplicating an FP register "as itself" is a bad idea, since it violates the
invariant that every FP register is mapped to at most one FPU stack slot.
Use the scratch FP register instead.
This fixes PR23957.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241069
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 30 Jun 2015 13:46:03 +0000 (13:46 +0000)]
[mips] [IAS] Add support for the .module softfloat/hardfloat directives.
These directives are used to set the default value of the SoftFloat feature.
They have the same effect as setting -m{soft, hard}-float from the command line.
Differential Revision: http://reviews.llvm.org/D9073
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241066
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 30 Jun 2015 12:41:33 +0000 (12:41 +0000)]
[mips] [IAS] Make .module directives change AssemblerOptions->front().
Differential Revision: http://reviews.llvm.org/D10643
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241062
91177308-0d34-0410-b5e6-
96231b3b80d8
Ranjeet Singh [Tue, 30 Jun 2015 12:32:53 +0000 (12:32 +0000)]
Reverting r241058 because it's causing buildbot failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241061
91177308-0d34-0410-b5e6-
96231b3b80d8
Ranjeet Singh [Tue, 30 Jun 2015 11:30:42 +0000 (11:30 +0000)]
There are a few places where subtarget features are still
represented by uint64_t, this patch replaces these
usages with the FeatureBitset (std::bitset) type.
Differential Revision: http://reviews.llvm.org/D10542
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241058
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 30 Jun 2015 10:05:43 +0000 (10:05 +0000)]
Correct a typo for a LoopVectorize test
I forgot to specify the correct pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241054
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Tue, 30 Jun 2015 09:36:50 +0000 (09:36 +0000)]
[mips] [IAS] Add support for the .set oddspreg/nooddspreg directives.
Differential Revision: http://reviews.llvm.org/D10657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241052
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Tue, 30 Jun 2015 08:49:35 +0000 (08:49 +0000)]
[X86] Add FXSR intrinsics
Add intrinsics for the FXSR instructions (FXSAVE/FXSAVE64/FXRSTOR/FXRSTOR64)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241049
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 30 Jun 2015 05:59:13 +0000 (05:59 +0000)]
ELF.h: Prune obsolete comments removed in r240996. [-Wdocumentation]
FIXME: Should they be moved onto Elf_Sym_Impl::getNmae()?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241044
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 04:08:37 +0000 (04:08 +0000)]
Don't return error_code from a function that doesn't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241042
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Jun 2015 03:52:25 +0000 (03:52 +0000)]
Drop the OS from the WebAssembly target triple for now.
This unbreaks TripleTest.Normalization. We'll have to come up with a new
plan for the OS component of the target triple for WebAssembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241041
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 03:41:26 +0000 (03:41 +0000)]
Move function to the only file that uses it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241040
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 03:33:18 +0000 (03:33 +0000)]
Don't return error_code from a function that doesn't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241039
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Jun 2015 02:13:04 +0000 (02:13 +0000)]
Debug info: Add dwarf backend support for DIModule.
rdar://problem/
20965932
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241034
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 01:53:01 +0000 (01:53 +0000)]
Don't return error_code from a function that doesn't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241033
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 30 Jun 2015 00:56:48 +0000 (00:56 +0000)]
Fix LastArchType to point to the new last arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241030
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Jun 2015 00:33:59 +0000 (00:33 +0000)]
Cleanup getRelocationAddend.
Realistically, this will be returning ErrorOr for some time as refactoring the
user code to check once per section will take some time.
Given that, use it for checking if a relocation has addend or not.
While at it, add ELFRelocationRef to simplify the users.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241028
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 30 Jun 2015 00:33:44 +0000 (00:33 +0000)]
RegisterCoalescer: Cleanup empty subranges after shrinkToUses()
A call to removeEmptySubranges() is necessary after every operation that
potentially removes all segments from a subregister range; this case in
the register coalescer was missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241027
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 30 Jun 2015 00:25:41 +0000 (00:25 +0000)]
llvm-bcanalyzer: Add a field that was missed in r241016.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241026
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Tue, 30 Jun 2015 00:03:56 +0000 (00:03 +0000)]
Object/COFF: Define coff_symbol_generic.
If you only need Name and Value fields in the COFF symbol,
you don't need to distinguish 32 bit and 64 bit COFF symbols.
These fields start at the same offsets and have the same size.
This data strucutre is one pointer smaller than COFFSymbolRef
thus slightly efficient. I'll use this class in LLD as we create
millions of LLD symbol objects that currently contain COFFSymbolRef.
Shaving off 8 byte (or 4 byte on 32 bit) from that class actually
matters becasue of the number of objects we create in LLD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241024
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 23:55:05 +0000 (23:55 +0000)]
Use asserts for checks that should never fail.
If a section is not SHT_REL or SHT_RELA, we never create a valid iterator,
so the getRelocation* methods should always see a section with the correct type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241023
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 29 Jun 2015 23:51:55 +0000 (23:51 +0000)]
[WebAssembly] Initial WebAssembly backend
This WebAssembly backend is just a skeleton at this time and is not yet
functional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241022
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 23:29:12 +0000 (23:29 +0000)]
Don't return error_code from function that never fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241021
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 29 Jun 2015 23:09:12 +0000 (23:09 +0000)]
lto: Clean up C libLTO interfaces pertaining to linker flags.
Specifically, remove the dependent library interface and replace the existing
linker option interface with a new one that returns a single list of flags.
Differential Revision: http://reviews.llvm.org/D10820
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241018
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 29 Jun 2015 23:03:47 +0000 (23:03 +0000)]
Add a DIModule metadata node to the IR.
It is meant to be used to record modules @imported by the current
compile unit, so a debugger an import the same modules to replicate this
environment before dropping into the expression evaluator.
DIModule is a sibling to DINamespace and behaves quite similarly.
In addition to the name of the module it also records the module
configuration details that are necessary to uniquely identify the module.
This includes the configuration macros (e.g., -DNDEBUG), the include path
where the module.map file is to be found, and the isysroot.
The idea is that the backend will turn this into a DW_TAG_module.
http://reviews.llvm.org/D9614
rdar://problem/
20965932
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241017
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 29 Jun 2015 22:50:35 +0000 (22:50 +0000)]
bcanalyzer: Rewrite all the METADATA_ codes
Add all the new `Metadata` codes since LLVM 3.6, and at the same time
follow the precedent set in other blocks by removing the `METADATA_`
prefix from the string output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241016
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 29 Jun 2015 22:50:32 +0000 (22:50 +0000)]
bcanalyzer: Use a macro to decode bitcodes, NFC
I'm about to add a whack of missing names for metadata. Add a macro to
make this easier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241015
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Mon, 29 Jun 2015 22:16:39 +0000 (22:16 +0000)]
Reapply "Use gethostuuid() on Mac to identify hosts for LockFileManager"
Reapplies r241005 after fixing the build on non-Mac platforms. Original
commit message below.
The hostname can be very unstable when there are many machines on the
network competing for the same name. Using the hardware UUID makes it
less likely to have collisions or to consider files written by the
current host to be owned by a different one at a later time.
rdar://problem/
21512307
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241012
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Mon, 29 Jun 2015 22:04:09 +0000 (22:04 +0000)]
Teach LTOModule to emit linker flags for dllexported symbols, plus interface cleanup.
This change unifies how LTOModule and the backend obtain linker flags
for globals: via a new TargetLoweringObjectFile member function named
emitLinkerFlagsForGlobal. A new function LTOModule::getLinkerOpts() returns
the list of linker flags as a single concatenated string.
This change affects the C libLTO API: the function lto_module_get_*deplibs now
exposes an empty list, and lto_module_get_*linkeropts exposes a single element
which combines the contents of all observed flags. libLTO should never have
tried to parse the linker flags; it is the linker's job to do so. Because
linkers will need to be able to parse flags in regular object files, it
makes little sense for libLTO to have a redundant mechanism for doing so.
The new API is compatible with the old one. It is valid for a user to specify
multiple linker flags in a single pragma directive like this:
#pragma comment(linker, "/defaultlib:foo /defaultlib:bar")
The previous implementation would not have exposed
either flag via lto_module_get_*deplibs (as the test in
TargetLoweringObjectFileCOFF::getDepLibFromLinkerOpt was case sensitive)
and would have exposed "/defaultlib:foo /defaultlib:bar" as a single flag via
lto_module_get_*linkeropts. This may have been a bug in the implementation,
but it does give us a chance to fix the interface.
Differential Revision: http://reviews.llvm.org/D10548
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241010
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 29 Jun 2015 22:00:30 +0000 (22:00 +0000)]
[FaultMaps][Docs] Document the ImplicitNullChecks pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241009
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Mon, 29 Jun 2015 21:56:03 +0000 (21:56 +0000)]
Revert "Use gethostuuid() on Mac to identify hosts for LockFileManager"
Broke non-Mac builds.
This reverts commit r241005.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241007
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Mon, 29 Jun 2015 21:47:44 +0000 (21:47 +0000)]
Use gethostuuid() on Mac to identify hosts for LockFileManager
The hostname can be very unstable when there are many machines on the
network competing for the same name. Using the hardware UUID makes it
less likely to have collisions or to consider files written by the
current host to be owned by a different one at a later time.
rdar://problem/
21512307
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241005
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Jun 2015 21:42:16 +0000 (21:42 +0000)]
ARM: add correct kill flags when combining stm instructions
When the store sequence being combined actually stores the base register, we
should not mark it as killed until the end.
rdar://
21504262
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241003
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 29 Jun 2015 21:35:51 +0000 (21:35 +0000)]
X86: Rework inline asm integer register specification.
This is a new version of http://reviews.llvm.org/D10260.
It turned out that when you specify an integer register in inline asm on
x86 you get the register of the required type size back. That means that
X86TargetLowering::getRegForInlineAsmConstraint() has to accept any of
the integer registers and adapt its size to the given target size which
may be any 8/16/32/64 bit sized type. Surprisingly that means given a
constraint of "{ax}" and a type of MVT::F32 we need to return X86::EAX.
This change makes this face explicit, the previous code seemed like
working by accident because there it never returned an error once a
register was found. On the other hand this rewrite allows to actually
return errors for invalid situations like requesting an integer register
for an i128 type.
Related to rdar://
21042280
Differential Revision: http://reviews.llvm.org/D10813
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241002
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Mon, 29 Jun 2015 21:30:14 +0000 (21:30 +0000)]
[LoopSimplify] Set proper debug location in loop backedge blocks.
Set debug location for terminator instruction in loop backedge block
(which is an unconditional jump to loop header). We can't copy debug
location from original backedges, as there can be several of them,
with different debug info locations. So, we follow the approach of
SplitBlockPredecessors, and copy the debug info from first non-PHI
instruction in the header (i.e. destination block).
This is yet another change for PR23837.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240999
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 29 Jun 2015 21:27:36 +0000 (21:27 +0000)]
[FaultMaps] Fix test case.
implicit-null-check-negative.ll had a missing 2>&1. Fix this, and
remove an incorrect test case that this exposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240998
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 21:24:55 +0000 (21:24 +0000)]
Convert obj->getSymbolName to sym->getName.
I doesn't depend on the object anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240996
91177308-0d34-0410-b5e6-
96231b3b80d8
Pawel Bylica [Mon, 29 Jun 2015 20:28:47 +0000 (20:28 +0000)]
[DAGCombiner] Fix & simplify constant folding of sext/zext.
Summary: This patch fixes the cases of sext/zext constant folding in DAG combiner where constans do not fit 64 bits. The fix simply removes un$
Test Plan: New regression test included.
Reviewers: RKSimon
Reviewed By: RKSimon
Subscribers: RKSimon, llvm-commits
Differential Revision: http://reviews.llvm.org/D10607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240991
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 29 Jun 2015 20:21:55 +0000 (20:21 +0000)]
[MMI] Use TinyPtrVector instead of PointerUnion with vector.
Also simplify duplicated code a bit. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240990
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Mon, 29 Jun 2015 20:03:46 +0000 (20:03 +0000)]
Tidy comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240987
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Liew [Mon, 29 Jun 2015 18:45:56 +0000 (18:45 +0000)]
Fix bug #23967. The gtest and gtest_main targets were exported into the
CMake files and should not be by both build systems and also the targets
were also installed by the CMake build system which they should not be.
The problem was that
- the CMake build of LLVM installs and exports the gtest library
targets. We should not being doing this, these are not part of LLVM.
- the Autoconf/Makefile build of LLVM still had gtest libraries in the
installed LLVMConfig.cmake.
These problems would cause problems for an external project because when
calling llvm_map_components_to_libnames(XXX all) ${XXX} would to contain
LLVM's internal gtest libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240981
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 29 Jun 2015 17:43:26 +0000 (17:43 +0000)]
Simplify .gitignore: projects/* => projects/*/
Avoid listing inclusions (like `!projects/LLVMBuild.txt`) for files
directly underneath `projects/` in `.gitignore`. Instead, change the
`projects/*` exclusion to the more specific `projects/*/`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240973
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Mon, 29 Jun 2015 17:08:41 +0000 (17:08 +0000)]
Clean up unique lock files on signal and always release the lock
Make sure to remove the unique lock file, which is what the .lock
symlink points to, if there is a signal while the lock is held. This
will release the lock, since the symlink will point to nothing (already
tested in unit tests). For good measure, also clean up the unique lock
file if there is an error or signal before the lock is acquired.
I will add a clang test.
rdar://problem/
21512307
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240967
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 29 Jun 2015 16:57:06 +0000 (16:57 +0000)]
MIR Serialization: Serialize the register mask machine operands.
This commit implements serialization of the register mask machine
operands. This commit serializes only the call preserved register
masks that are defined by a target, it doesn't serialize arbitrary
register masks.
This commit also extends the TargetRegisterInfo class and TableGen so that
the users of TRI can get the list of all the call preserved register masks and
their names.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10673
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240966
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 29 Jun 2015 16:05:00 +0000 (16:05 +0000)]
[SymbolSize] Skip sorting by index, just assign by index.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240961
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 29 Jun 2015 15:18:48 +0000 (15:18 +0000)]
Upgrade JIT listeners for changes in the libObject API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240956
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Mon, 29 Jun 2015 14:42:48 +0000 (14:42 +0000)]
Move delinearization from SCEVAddRecExpr to ScalarEvolution
The expressions we delinearize do not necessarily have to have a SCEVAddRecExpr
at the outermost level. At this moment, the additional flexibility is not
exploited in LLVM itself, but in Polly we will soon soonish use this
functionality. For LLVM, this change should not affect existing functionality
(which is covered by test/Analysis/Delinearization/)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240952
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 14:39:25 +0000 (14:39 +0000)]
Factor out the checking of string tables.
This moves the error checking for string tables to getStringTable which returns
an ErrorOr<StringRef>.
This improves error checking, makes it uniform across all string tables and
makes it possible to check them once instead of once per name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240950
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 14:12:14 +0000 (14:12 +0000)]
Add a testcase for an invalid file.
We were already checking this, but had no tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240945
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 14:02:24 +0000 (14:02 +0000)]
Convert an assert that can fail into error checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240944
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Jun 2015 12:38:31 +0000 (12:38 +0000)]
Remove Elf_Sym_Iter.
It was a fairly broken concept for an ELF only class.
An ELF file can have two symbol tables, but they have exactly the same
format. There is no concept of a dynamic or a static symbol. Storing this
on the iterator also makes us do more work per symbol than necessary. To fetch
a name we would:
* Find if we had a static or a dynamic symbol.
* Look at the corresponding symbol table and find the string table section.
* Look at the string table section to fetch its contents.
* Compute the name as a substring of the string table.
All but the last step can be done per symbol table instead of per symbol. This
is a step in that direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240939
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 29 Jun 2015 12:14:24 +0000 (12:14 +0000)]
AVX-512: all forms of SCATTER instruction on SKX,
encoding, intrinsics and tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240936
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Mon, 29 Jun 2015 09:53:33 +0000 (09:53 +0000)]
[ARM]: Extend -mfpu options for half-precision and vfpv3xd
removing default label in switch as it results.
This is part of earlier commit http://reviews.llvm.org/D1064
Subscribers: llvm-commits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240932
91177308-0d34-0410-b5e6-
96231b3b80d8
Javed Absar [Mon, 29 Jun 2015 09:32:29 +0000 (09:32 +0000)]
[ARM]: Extend -mfpu options for half-precision and vfpv3xd
Some of the the permissible ARM -mfpu options, which are supported in GCC,
are currently not present in llvm/clang.This patch adds the options:
'neon-fp16', 'vfpv3-fp16', 'vfpv3-d16-fp16', 'vfpv3xd' and 'vfpv3xd-fp16.
These are related to half-precision floating-point and single precision.
Reviewers: rengolin, ranjeet.singh
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10645
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240930
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 29 Jun 2015 09:10:00 +0000 (09:10 +0000)]
AVX-512: Implemented missing encoding and intrinsics for FMA instructions
Added tests for DAG lowering ,encoding and intrinsics
Differential Revision: http://reviews.llvm.org/D10796
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240926
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Jun 2015 04:50:09 +0000 (04:50 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240924
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 28 Jun 2015 18:16:14 +0000 (18:16 +0000)]
AMDGPU/SI: Fix extra space when printing v_div_fmas_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240911
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Sun, 28 Jun 2015 17:45:05 +0000 (17:45 +0000)]
[SLSR] S's basis must have the same type as S
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240910
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Sun, 28 Jun 2015 14:30:39 +0000 (14:30 +0000)]
[x86][AVX512]
Add vscalef support
include encoding and intrinsics
review:
http://reviews.llvm.org/D10730
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240906
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 28 Jun 2015 10:53:29 +0000 (10:53 +0000)]
AVX-512: Added all SKX forms of GATHER instructions.
Added intrinsics.
Added encoding and tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240905
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sat, 27 Jun 2015 21:55:00 +0000 (21:55 +0000)]
Revert "Debug Info: One more bitfield bugfix. While yesterday's r240853 fixed"
This reverts commit 240890. Breaking the gdb buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240893
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Jun 2015 21:11:43 +0000 (21:11 +0000)]
Don't use %llc_dwarf for target-specific tests.
Should fix running them on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240892
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Jun 2015 20:33:26 +0000 (20:33 +0000)]
[SDAG] Now that we have a way to communicate the exact bit on sdiv use it to simplify sdiv by a constant.
We had a hack in SDAGBuilder in place to work around this but now we
can avoid that. Call BuildExactSDIV from BuildSDIV so DAGCombiner can
perform this trick automatically.
The added check in DAGCombiner is necessary to prevent exact sdiv by pow2
from regressing as the target-specific pow2 lowering is not aware of
exact bits yet.
This is mostly covered by existing tests. One side effect is that we
get the better lowering for exact vector sdivs now too :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240891
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Sat, 27 Jun 2015 20:12:43 +0000 (20:12 +0000)]
Debug Info: One more bitfield bugfix. While yesterday's r240853 fixed
the DW_AT_bit_offset computation, the byte offset is in fact also
endian-dependent as it needs to point to the storage unit containing the
most-significant bit of the the bitfield.
I'm so looking forward to emitting the endian-agnostic DWARF 3 version
instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240890
91177308-0d34-0410-b5e6-
96231b3b80d8