Commit Graph

126553 Commits

Author SHA1 Message Date
Reid Kleckner
b866708ccd [codeview] Dump the file checksum substream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257910 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 18:06:25 +00:00
Chris Bieneman
9bbc2e7624 [CMake] Need to install VersionFromVCS.cmake as part of LLVM's CMake modules
This is required to support clang --version detecting the clang repository information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257909 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 17:49:46 +00:00
Hans Wennborg
f75308f366 test-release.sh: Fix clang-tools-extra symlink for CMake build
The CMake and Autoconf builds want the symlink set up differently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257905 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 17:04:45 +00:00
Rafael Espindola
40fe719b08 Add a test showing when ld64 can hide linkonce_odr symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257903 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 16:40:20 +00:00
James Y Knight
b707e2a85c Stop increasing alignment of externally-visible globals on ELF
platforms.

With ELF, the alignment of a global variable in a shared library will
get copied into an executables linked against it, if the executable even
accesss the variable. So, it's not possible to implicitly increase
alignment based on access patterns, or you'll break existing binaries.

This happened to affect libc++'s std::cout symbol, for example. See
thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311

(This is a re-commit of r257719, without the bug reported in
PR26144. I've tweaked the code to not assert-fail in
enforceKnownAlignment when computeKnownBits doesn't recurse far enough
to find the underlying Alloca/GlobalObject value.)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 16:33:06 +00:00
Rafael Espindola
457be9d75e Make sure this test is actually executed.
Before it was always unsupported.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 16:16:46 +00:00
Silviu Baranga
a9129eb900 Re-commit r257064, after it was reverted in r257340.
This contains a fix for the issue that caused the revert:
we no longer assume that we can insert instructions after the
instruction that produces the base pointer. We previously
assumed that this would be ok, because the instruction produces
a value and therefore is not a terminator. This is false for invoke
instructions. We will now insert these new instruction directly
at the location of the users.

Original commit message:

[InstCombine] Look through PHIs, GEPs, IntToPtrs and PtrToInts to expose more constants when comparing GEPs

Summary:
When comparing two GEP instructions which have the same base pointer
and one of them has a constant index, it is possible to only compare
indices, transforming it to a compare with a constant. This removes
one use for the GEP instruction with the constant index, can reduce
register pressure and can sometimes lead to removing the comparisson
entirely.

InstCombine was already doing this when comparing two GEPs if the base
pointers were the same. However, in the case where we have complex
pointer arithmetic (GEPs applied to GEPs, PHIs of GEPs, conversions to
or from integers, etc) the value of the original base pointer will be
hidden to the optimizer and this transformation will be disabled.

This change detects when the two sides of the comparison can be
expressed as GEPs with the same base pointer, even if they don't
appear as such in the IR. The transformation will convert all the
pointer arithmetic to arithmetic done on indices and all the relevant
uses of GEPs to GEPs with a common base pointer. The GEP comparison
will be converted to a comparison done on indices.

Reviewers: majnemer, jmolloy

Subscribers: hfinkel, jevinskie, jmolloy, aadg, llvm-commits

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257897 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 15:52:05 +00:00
Artur Pilipenko
69ba216e36 Change isSafeToLoadUnconditionally arguments order. Separated from http://reviews.llvm.org/D10920.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257894 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 15:27:46 +00:00
Joseph Tremoulet
df4beed8c8 [InstructionsTest] delete via unique_ptr (NFC)
Summary:
Simplify the memory management of mock IR in test AlterInvokeBundles.


Reviewers: dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 15:08:36 +00:00
Krzysztof Parzyszek
f76a0437da [Hexagon] Generate CONST64 when optimizing for size in copy-to-combine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 14:08:31 +00:00
Krzysztof Parzyszek
541a495b9b [Hexagon] Handle DBG_VALUE instructions in copy-to-combine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 13:55:57 +00:00
Matthew Simpson
df4b806e4d Revert "[SLP] Vectorize the index computations of getelementptr instructions."
This reverts commit r257800.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257888 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 13:10:46 +00:00
James Molloy
d6a317790e [CodeGenPrepare] Try and appease sanitizers
dupRetToEnableTailCallOpts(BB) can invalidate BB. It must run *after* we iterate across BB!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:36:01 +00:00
Bradley Smith
b11cc50c0b [ARM] Add DSP build attribute and extension targeting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257885 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:28:25 +00:00
Bradley Smith
837d08454e [ARM] Add new system registers to ARMv8-M Baseline/Mainline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257884 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:28:03 +00:00
Bradley Smith
bcfe6aa735 [ARM] Add ARMv8-M security extension instructions to ARMv8-M Baseline/Mainline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257883 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:27:14 +00:00
Bradley Smith
002a07ce70 [ARM] Add ARMv8-A semaphore/atomic instructions to ARMv8-M Baseline/Mainline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257882 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:26:51 +00:00
Bradley Smith
eab7e23bdd [ARM] Add B.W and CBZ instructions to ARMv8-M Baseline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:26:17 +00:00
Bradley Smith
2ff1a833df [ARM] Add SDIV/UDIV instructions to ARMv8-M Baseline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257880 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:25:35 +00:00
Bradley Smith
b7fd90158b [ARM] Add MOVW/MOVT instructions to ARMv8-M Baseline/Mainline
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257879 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:25:14 +00:00
Bradley Smith
0283decdee [ARM] Add ARMv8-M Baseline/Mainline LLVM targeting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257878 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:24:39 +00:00
Bradley Smith
355f698c42 [ARM] Split out ARMv8-A semaphores and atomics and ARMv7 clrex as separate features
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257877 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 10:23:46 +00:00
Simon Pilgrim
99eaa96cfa [X86][SSE] Added more exhaustive merge consecutive load tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 09:52:50 +00:00
James Molloy
cd54bb4874 [InstCombine] Rewrite bswap/bitreverse handling completely.
There are several requirements that ended up with this design;
  1. Matching bitreversals is too heavyweight for InstCombine and doesn't really need to be done so early.
  2. Bitreversals and byteswaps are very related in their matching logic.
  3. We want to implement support for matching more advanced bswap/bitreverse patterns like partial bswaps/bitreverses.
  4. Bswaps are best matched early in InstCombine.

The result of these is that a new utility function is created in Transforms/Utils/Local.h that can be configured to search for bswaps, bitreverses or both. InstCombine uses it to find only bswaps, CGP uses it to find only bitreversals.

We can then extend the matching logic in one place only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 09:20:19 +00:00
Jonas Paulsson
93703686d7 [SystemZ] Fix bad instruction name
SLGBR -> SLBGR

Reviewed by Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 07:12:09 +00:00
Kostya Serebryany
f1af856009 [libFuzzer] do mutations based on memcmp/strcmp interceptors under a separate flag (-use_memcmp, default=1)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257873 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 06:24:05 +00:00
Andrew Wilkins
01cb5fc688 [docs] Document LLVM_{BUILD,LINK}_LLVM_DYLIB
Summary:
Document the LLVM_BUILD_LLVM_DYLIB and LLVM_LINK_LLVM_DYLIB
CMake options, move BUILD_SHARED_LIBS out of frequently-used,
and add a note/warning to BUILD_SHARED_LIBS.

Reviewers: beanz, delcypher, mjacob

Subscribers: mjacob, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 03:33:35 +00:00
Pete Cooper
caa7445c2b Delete MCRelocationInfo::createExprForRelocation.
This method has no callers.

Also remove X86ELFRelocationInfo.cpp and X86MachORelocationInfo.cpp
which only existed to provide an implementation of that method.

Ok'd by Rafael and Jim.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257859 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 02:24:12 +00:00
NAKAMURA Takumi
23b9023663 lli: use llvm::utostr() instead of std::to_string().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257857 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 02:14:46 +00:00
NAKAMURA Takumi
f597c0b9ef [autoconf] Install VersionFromVCS.cmake, too. clang/CMakeLists.txt requires it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257856 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 02:13:04 +00:00
Keno Fischer
506b733a0b Once again revert debug info verifier changes
Yet another wave of buildbot failures (though fewer this time).
I'm only reverting the Verifier changes, as the test cases
will be fine without them as well, and touching them as often
just introduces unnecessary churn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257855 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 02:12:38 +00:00
Keno Fischer
621b821be3 Reapply r257105 "[Verifier] Check that debug values have proper size"
I originally reapplied this in 257550, but had to revert again due to bot
breakage. The only change in this version is to allow either the TypeSize
or the TypeAllocSize of the variable to be the one represented in debug info
(hopefully in the future we can figure out how to encode the difference).
Additionally, several bot failures following r257550, were due to
optimizer bugs now fixed in r257787 and r257795.

r257550 commit message was:

```
The follow extra changes were made to test cases:

Manually making the variable be the actual type instead of a pointer
to avoid pointer-size differences in generic code:

    LLVM :: DebugInfo/Generic/2010-03-24-MemberFn.ll
    LLVM :: DebugInfo/Generic/2010-04-06-NestedFnDbgInfo.ll
    LLVM :: DebugInfo/Generic/2010-05-03-DisableFramePtr.ll
    LLVM :: DebugInfo/Generic/varargs.ll

Delete sizing information from debug info for the same reason
(but the presence of the pointer was important to the test case):

    LLVM :: DebugInfo/Generic/restrict.ll
    LLVM :: DebugInfo/Generic/tu-composite.ll
    LLVM :: Linker/type-unique-type-array-a.ll
    LLVM :: Linker/type-unique-simple2.ll

Fixing an incorrect DW_OP_deref

    LLVM :: DebugInfo/Generic/2010-05-03-OriginDIE.ll

Fixing a missing DW_OP_deref

    LLVM :: DebugInfo/Generic/incorrect-variable-debugloc.ll

Additionally, clang should no longer complain during bootstrap should no
longer happen after r257534.

The original commit message was:
``
Summary:
Teach the Verifier to make sure that the storage size given to llvm.dbg.declare
or the value size given to llvm.dbg.value agree with what is declared in
DebugInfo. This is implicitly assumed in a number of passes (e.g. in SROA).
Additionally this catches a number of common mistakes, such as passing a
pointer when a value was intended or vice versa.

One complication comes from stack coloring which modifies the original IR when
it merges allocas in order to make sure that if AA falls back to the IR it gets
the correct result. However, given this new invariant, indiscriminately
replacing one alloca by a different (differently sized one) is no longer valid.
Fix this by just undefing out any use of the alloca in a dbg.declare in this
case.

Additionally, I had to fix a number of test cases. Of particular note:
- I regenerated dbg-changes-codegen-branch-folding.ll from the given source as
  it was affected by the bug fixed in r256077
- two-cus-from-same-file.ll was changed to avoid having a variable-typed debug
  variable as that would depend on the target, even though this test is
  supposed to be generic
- I had to manually declared size/align for reference type. See also the
  discussion for D14275/r253186.
- fpstack-debuginstr-kill.ll required changing `double` to `long double`
- most others were just a question of adding OP_deref
``

```

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257850 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:46:17 +00:00
Amaury Sechet
a0bd1626ca LLVMRunStaticConstructors can be called before object is finalized, #24028
Summary: Since you cannot call finalizeObject manually through the C-API and other functions from the C-API automatically call it, LLVMRunStaticConstructors should also call it or otherwise you cannot call it without first calling a workaround function (or call any other function from the C-API which implicitly finalizes the object).

Reviewers: dnovillo, spatel, bkramer, deadalnix, joker.eph, echristo, lhames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257849 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:23:34 +00:00
Kostya Serebryany
9039b1ff4e [libFuzzer] use custom stol; also introduce __libfuzzer_is_present so that users can check for its presence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257848 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:17:37 +00:00
Philip Reames
16b8b2d9ac [docs] Restructure description of records created by Statepoints
The previous text was hard to understand even for me and I wrote it.  Hopefully the new structure makes it a bit more clear what's going on.  If anyone has word smithing suggestion or clarification questions, please let me know.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257847 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:13:39 +00:00
Reid Kleckner
51e1c69050 [codeview] Translate file table offsets to filenames and print them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:11:21 +00:00
Sanjay Patel
961c852618 rangify; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:08:10 +00:00
Weiming Zhao
8f43bb43cc Fix AArch64ConditionOptimizer
Summary:
This pass may modify the Cmp operands. However, the flag reg may be used by both the branch and CSEL.
Modifying CMP will have side effect on CSEL.

Reviewers: t.p.northover

Subscribers: llvm-commits, aemerson, rengolin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-15 00:06:58 +00:00
Philip Reames
112e094b77 [docs] Update Statepoint docs to clarify format for recent changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257843 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:58:18 +00:00
David Blaikie
1215450590 Orc: Simplify some things with NSDMIs and some braced init.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:33:43 +00:00
Sanjay Patel
c66c94a7f2 remove duplicate documentation comments (already in the header file) ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257835 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:23:04 +00:00
Easwaran Raman
ec8106478b Refactor threshold computation for inline cost analysis
Differential Revision: http://reviews.llvm.org/D15401



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257832 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 23:16:29 +00:00
Chris Bieneman
92f6aec271 [CMake] Add support for populating LLVM_REPOSITORY from CMake.
Autoconf does this in the GetRepositoryPath script, CMake's VersionFromVCS does grab the SVN_REVISION, but doesn't populate the repository URL.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:44:29 +00:00
Keno Fischer
508bcbefca [Verifier] Check parentage of GVs in dbg metadata
Summary:
Before this the Verifier didn't complain if the GlobalVariable
referenced from a DIGlobalVariable was not in fact in the correct
module (it would crash while writing bitcode though). Fix this by
always checking parantage of GlobalValues while walking constant
expressions and changing the DIGlobalVariable visitor to also
visit the constant it contains.

Reviewers: rafael
Differential Revision: http://reviews.llvm.org/D16059

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257825 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:42:02 +00:00
Mike Aizatsky
a8f3371a07 [sancov] html report
Differential Revision: http://reviews.llvm.org/D16161

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257824 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:34:11 +00:00
Keno Fischer
14d9bbfba1 [Verifier] Verify that a GlobalValue is only used in this Module
Summary:
We already have the inverse verification that we only use globals
that are defined in this module. This essentially catches the
same mistake, but when verifying the module that contains the
definition.

Reviewers: rafael
Differential Revision: http://reviews.llvm.org/D15272

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257823 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:20:56 +00:00
Xinliang David Li
fc8577b821 [PGO] Move profile summary interface/impl into InstrProf.[*] /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257819 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:10:49 +00:00
Lang Hames
f881fc9fb9 [Orc] Add support for EH-frame registration to the Orc Remote Target utility
classes.

OrcRemoteTargetClient::RCMemoryManager will now register EH frames with the
server automatically. This allows remote-execution of code that uses exceptions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 22:02:03 +00:00
Krzysztof Parzyszek
002f6273d6 [Hexagon] Use S2_lsr_i_r instead of S2_extractu to obtain upper halfword
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257815 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:59:22 +00:00
Reid Kleckner
f94debb504 [codeview] Dump function callees and add more labels to inlinee info
I kept forgetting which number is the line delta and which is the code
delta.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257813 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-14 21:50:05 +00:00