Colin LeMahieu [Wed, 27 Apr 2016 21:37:44 +0000 (21:37 +0000)]
[Hexagon] Merging nops in to previous packet rather than always creating a new one.
llvm-svn: 267798
Quentin Colombet [Wed, 27 Apr 2016 21:37:37 +0000 (21:37 +0000)]
[X86] Fix the lowering of TLS calls.
The callseq_end node must be glued with the TLS calls, otherwise,
the generic code will miss the uses of the returned value and will
mark it dead.
Moreover, TLSCall 64-bit pseudo must not set an implicit-use on RDI,
the pseudo uses the symbol address at this point not RDI and the
lowering will do the right thing.
llvm-svn: 267797
Colin LeMahieu [Wed, 27 Apr 2016 21:26:13 +0000 (21:26 +0000)]
[MCAssembler] Allow backend to finalize layout post-relaxation.
Differential revision: http://reviews.llvm.org/D19429
llvm-svn: 267796
Marcin Koscielnicki [Wed, 27 Apr 2016 21:24:24 +0000 (21:24 +0000)]
[MSan] [PowerPC] Dereference function descriptors when recording stack origins.
Differential Revision: http://reviews.llvm.org/D19543
llvm-svn: 267795
Marcin Koscielnicki [Wed, 27 Apr 2016 21:24:21 +0000 (21:24 +0000)]
[sanitizers] Get the proper symbol version when long double transition is involved.
On linux, some architectures had an ABI transition from 64-bit long double
(ie. same as double) to 128-bit long double. On those, glibc symbols
involving long doubles come in two versions, and we need to pass the
correct one to dlvsym when intercepting them.
A few more functions we intercept are also versioned (all printf, scanf,
strtold variants), but there's no need to fix these, as the REAL() versions
are never called.
Differential Revision: http://reviews.llvm.org/D19555
llvm-svn: 267794
Derek Bruening [Wed, 27 Apr 2016 21:20:46 +0000 (21:20 +0000)]
[sanitizer] Add early call handling to strchr + strrchr interceptors
Summary:
The strchr and strrchr interceptors are sometimes invoked too early
for their REAL() counterparts to be initialized. We have seen this in
hooks invoked from tcmalloc on the dlsym() used in initializing
interceptors. A special check is added to use internal_ routines for
this situation.
Reviewers: vitalybuka, aizatsky, filcab
Subscribers: filcab, llvm-commits, eugenis, kcc, zhaoqin, aizatsky, kubabrecka
Differential Revision: http://reviews.llvm.org/D19607
llvm-svn: 267793
Rong Xu [Wed, 27 Apr 2016 21:17:30 +0000 (21:17 +0000)]
[PGO] Prohibit address recording if the function is both internal and COMDAT
Differential Revision: http://reviews.llvm.org/D19515
llvm-svn: 267792
Matt Arsenault [Wed, 27 Apr 2016 21:05:08 +0000 (21:05 +0000)]
AMDGPU: Account for globals in AMDGPUPromoteAlloca pass
Patch by Bas Nieuwenhuizen
llvm-svn: 267791
Lang Hames [Wed, 27 Apr 2016 20:54:49 +0000 (20:54 +0000)]
[RuntimeDyld] Add missing include - <string> is requried for std::to_string.
This should fix the compile error that showed up in build:
http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/6754/
llvm-svn: 267790
Lang Hames [Wed, 27 Apr 2016 20:51:58 +0000 (20:51 +0000)]
[RuntimeDyld] Propagate Errors from findPPC64TOCSection.
llvm-svn: 267789
Peter Collingbourne [Wed, 27 Apr 2016 20:49:44 +0000 (20:49 +0000)]
Revert unnecessary tblgen change.
llvm-svn: 267788
Simon Pilgrim [Wed, 27 Apr 2016 20:43:32 +0000 (20:43 +0000)]
Wdocumentation fix
llvm-svn: 267786
Peter Collingbourne [Wed, 27 Apr 2016 20:39:53 +0000 (20:39 +0000)]
Rework interface for bitset-using features to use a notion of LTO visibility.
Bitsets, and the compiler features they rely on (vtable opt, CFI),
only have visibility within the LTO'd part of the linkage unit. Therefore,
only enable these features for classes with hidden LTO visibility. This
notion is based on object file visibility or (on Windows)
dllimport/dllexport attributes.
We provide the [[clang::lto_visibility_public]] attribute to override the
compiler's LTO visibility inference in cases where the class is defined
in the non-LTO'd part of the linkage unit, or where the ABI supports
calling classes derived from abstract base classes with hidden visibility
in other linkage units (e.g. COM on Windows).
If the cross-DSO CFI mode is enabled, bitset checks are emitted even for
classes with public LTO visibility, as that mode uses a separate mechanism
to cause bitsets to be exported.
This mechanism replaces the whole-program-vtables blacklist, so remove the
-fwhole-program-vtables-blacklist flag.
Because __declspec(uuid()) now implies [[clang::lto_visibility_public]], the
support for the special attr:uuid blacklist entry is removed.
Differential Revision: http://reviews.llvm.org/D18635
llvm-svn: 267784
Kevin Enderby [Wed, 27 Apr 2016 20:37:06 +0000 (20:37 +0000)]
Add a test case for the crash fixed with r267037. David Blaikie said it would be nice to have!
This was crashing llvm-objdump with -macho -objc-meta-data when trying dump a non-existent section.
So the test binary is simply created from an empty .s file compiled with: clang -arch armv7 empty.s -c
llvm-svn: 267782
Ahmed Bougacha [Wed, 27 Apr 2016 20:33:07 +0000 (20:33 +0000)]
[ARM] Set AddPristinesAndCSRs to expandCMP_SWAP LivePhysRegs.
We run after PEI.
Found via inspection; no obvious testcase.
Follow-up to r266679.
llvm-svn: 267781
Ahmed Bougacha [Wed, 27 Apr 2016 20:33:05 +0000 (20:33 +0000)]
[AArch64] Set AddPristinesAndCSRs to expandCMP_SWAP LivePhysRegs.
We run after PEI.
Found via inspection; no obvious testcase.
Follow-up to r266339.
llvm-svn: 267780
Ahmed Bougacha [Wed, 27 Apr 2016 20:33:02 +0000 (20:33 +0000)]
[AArch64] Set correct successors in CMPXCHG pseudo expansion.
transferSuccessors() would LoadCmpBB a successor of DoneBB,
whereas it should be a successor of the original MBB.
Follow-up to r266339.
Unfortunately, it's tricky to catch this in the verifier.
llvm-svn: 267779
Ahmed Bougacha [Wed, 27 Apr 2016 20:32:54 +0000 (20:32 +0000)]
[ARM] Set correct successors in CMPXCHG pseudo expansion.
transferSuccessors() would LoadCmpBB a successor of DoneBB, whereas
it should be a successor of the original MBB.
The testcase changes are caused by Thumb2SizeReduction, which
was previously confused by the broken CFG.
Follow-up to r266679.
Unfortunately, it's tricky to catch this in the verifier.
llvm-svn: 267778
Simon Pilgrim [Wed, 27 Apr 2016 20:25:34 +0000 (20:25 +0000)]
[InstCombine][AVX2] Add AVX2 per-element vector shift tests
At the moment we don't simplify PSRAV/PSRLV/PSLLV intrinsics to generic IR for constant shift amounts, but we could.
llvm-svn: 267777
Lang Hames [Wed, 27 Apr 2016 20:24:48 +0000 (20:24 +0000)]
[RuntimeDyld] Plumb Error/Expected through the internals of RuntimeDyld.
Also replaces a number of calls to report_fatal_error with Error returns.
The plumbing will make it easier to return errors originating in libObject.
Replacing report_fatal_errors with Error returns will give JIT clients the
opportunity to recover gracefully when the JIT is unable to produce/relocate
code, as well as providing meaningful error messages that can be used to file
bug reports.
llvm-svn: 267776
Peter Collingbourne [Wed, 27 Apr 2016 20:22:31 +0000 (20:22 +0000)]
ELF: Create .gnu.version and .gnu.version_r sections when linking against versioned DSOs.
Differential Revision: http://reviews.llvm.org/D19464
llvm-svn: 267775
Than McIntosh [Wed, 27 Apr 2016 20:07:02 +0000 (20:07 +0000)]
Fix build failure under NDEBUG.
llvm-svn: 267774
Kevin B. Smith [Wed, 27 Apr 2016 19:58:03 +0000 (19:58 +0000)]
[X86]: Quit promoting 16 bit loads to 32 bit.
Differential Revision: http://reviews.llvm.org/D19592
llvm-svn: 267773
Sunil Srivastava [Wed, 27 Apr 2016 19:53:03 +0000 (19:53 +0000)]
Set the default C standard to C99 when targeting the PS4.
Patch by Douglas Yung!
Differential Revision: http://reviews.llvm.org/D19003
llvm-svn: 267772
Kostya Serebryany [Wed, 27 Apr 2016 19:52:56 +0000 (19:52 +0000)]
[libFuzzer] disable leak detection if we have tried it for 1000 times w/o finding a leak [part 2]
llvm-svn: 267771
Kostya Serebryany [Wed, 27 Apr 2016 19:52:34 +0000 (19:52 +0000)]
[libFuzzer] disable leak detection if we have tried it for 1000 times w/o finding a leak
llvm-svn: 267770
Andrew Kaylor [Wed, 27 Apr 2016 19:39:32 +0000 (19:39 +0000)]
Add optimization bisect opt-in calls for PowerPC passes
Differential Revision: http://reviews.llvm.org/D19554
llvm-svn: 267769
Sean Callanan [Wed, 27 Apr 2016 19:37:42 +0000 (19:37 +0000)]
Added a testcase for the IR interpreter, ensuring that it behaves like the JIT.
<rdar://problem/
25785338>
llvm-svn: 267768
David Majnemer [Wed, 27 Apr 2016 19:36:38 +0000 (19:36 +0000)]
[CodeGenPrepare] Don't sink a cast past its user
The sink cast machinery is supposed to sink casts as close to their user
as possible. However, an EH pad is the first instruction in it's basic
block. Don't sink if the user is an EH pad.
This fixes PR27536.
llvm-svn: 267767
Than McIntosh [Wed, 27 Apr 2016 19:26:25 +0000 (19:26 +0000)]
Refactor debugging code, NFC.
Summary:
Refactor debugging routines to reduce code duplication. Remove a couple
of #include's that were not needed. Don't require MachineDominator as a
prereq for this pass (not needed).
These changes split off from http://reviews.llvm.org/D18827.
Reviewers: wmi, gbiv, qcolombet
Subscribers: llvm-commits, davidxl, jevinskie
Differential Revision: http://reviews.llvm.org/D18992
llvm-svn: 267766
Justin Lebar [Wed, 27 Apr 2016 19:13:37 +0000 (19:13 +0000)]
[NVPTX] Run NVVMReflect at the beginning of IR passes.
Summary:
Currently the NVVMReflect pass is run at the beginning of our backend
passes. But really, it should be run as early as possible, as it's
simply resolving an "if" statement in code. So copy it into
TargetMachine::addEarlyAsPossiblePasses.
We still run it at the beginning of the backend passes, since it's
needed for correctness when lowering to nvptx.
(Specifically, NVVMReflect changes each call to the __nvvm_reflect
function or llvm.nvvm.reflect intrinsic into an integer constant, based
on the pass's configuration. Clearly we miss many optimization
opportunities if we perform this transformation at the beginning of
codegen.)
Reviewers: rnk
Subscribers: tra, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D18616
llvm-svn: 267765
Justin Lebar [Wed, 27 Apr 2016 19:12:56 +0000 (19:12 +0000)]
Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.
Summary:
As of D18614, TargetMachine exposes a hook to add a set of passes that should
be run as early as possible. Invoke this hook from clang when setting up the
pass manager.
Reviewers: chandlerc
Subscribers: rnk, cfe-commits, tra
Differential Revision: http://reviews.llvm.org/D18617
llvm-svn: 267764
Justin Lebar [Wed, 27 Apr 2016 19:08:24 +0000 (19:08 +0000)]
Add TargetMachine::addEarlyAsPossiblePasses, and call it from opt.
Summary:
This is a hook to allow TargetMachine to install passes at the
EP_EarlyAsPossible PassManagerBuilder extension point.
Reviewers: chandlerc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18614
llvm-svn: 267763
Ahmed Bougacha [Wed, 27 Apr 2016 19:04:50 +0000 (19:04 +0000)]
[LIR] Set attributes on memset_pattern16.
"inferattrs" will deduce the attribute, but it will be too late for
many optimizations. Set it ourselves when creating the call.
Differential Revision: http://reviews.llvm.org/D17598
llvm-svn: 267762
Ahmed Bougacha [Wed, 27 Apr 2016 19:04:46 +0000 (19:04 +0000)]
[LIR] Reuse variable. NFCI.
llvm-svn: 267761
Ahmed Bougacha [Wed, 27 Apr 2016 19:04:43 +0000 (19:04 +0000)]
[InferAttrs] Mark memset_pattern16 params nocapture.
Differential Revision: http://reviews.llvm.org/D19471
llvm-svn: 267760
Ahmed Bougacha [Wed, 27 Apr 2016 19:04:40 +0000 (19:04 +0000)]
[TLI] Unify LibFunc attribute inference. NFCI.
Now the pass is just a tiny wrapper around the util. This lets us reuse
the logic elsewhere (done here for BuildLibCalls) instead of duplicating
it.
The next step is to have something like getOrInsertLibFunc that also
sets the attributes.
Differential Revision: http://reviews.llvm.org/D19470
llvm-svn: 267759
Ahmed Bougacha [Wed, 27 Apr 2016 19:04:35 +0000 (19:04 +0000)]
[TLI] Unify LibFunc signature checking. NFCI.
I tried to be as close as possible to the strongest check that
existed before; cleaning these up properly is left for future work.
Differential Revision: http://reviews.llvm.org/D19469
llvm-svn: 267758
Ahmed Bougacha [Wed, 27 Apr 2016 19:04:29 +0000 (19:04 +0000)]
[TLI] Fix indentation. NFC.
llvm-svn: 267757
Chris Bieneman [Wed, 27 Apr 2016 18:52:48 +0000 (18:52 +0000)]
[CMake] On Darwin bootstrap LTO builds set DYLD_LIBRARY_PATH instead of using llvm-ar
llvm-ar isn't really supported for Darwin, instead the host tools will load libLTO, so we can use the just-built libLTO.
This actually makes Darwin bootstrap builds a little faster because you don't need to build llvm-ar before starting the next stage.
llvm-svn: 267756
David Blaikie [Wed, 27 Apr 2016 18:47:45 +0000 (18:47 +0000)]
Fix a bunch of sign-compare warnings
llvm-svn: 267754
Sjoerd Meijer [Wed, 27 Apr 2016 18:35:02 +0000 (18:35 +0000)]
Clean up to avoid compiler warnings for casting away const qualifiers.
Differential Revision: http://reviews.llvm.org/D19598
llvm-svn: 267753
Chad Rosier [Wed, 27 Apr 2016 18:29:11 +0000 (18:29 +0000)]
Revert "[AMDGPU][llvm-mc] Add support of TTMP quads. Rework M0 exclusion for SMRD."
This reverts commit r267733 due to a -Werror,-Wunused-function error.
llvm-svn: 267752
Matthew Simpson [Wed, 27 Apr 2016 18:21:36 +0000 (18:21 +0000)]
[LV] Reallow positive-stride interleaved load groups with gaps
We previously disallowed interleaved load groups that may cause us to
speculatively access memory out-of-bounds (r261331). We did this by ensuring
each load group had an access corresponding to the first and last member.
Instead of bailing out for these interleaved groups, this patch enables us to
peel off the last vector iteration, ensuring that we execute at least one
iteration of the scalar remainder loop. This solution was proposed in the
review of the previous patch.
Differential Revision: http://reviews.llvm.org/D19487
llvm-svn: 267751
Mike Aizatsky [Wed, 27 Apr 2016 18:02:21 +0000 (18:02 +0000)]
[sanitizers] read/write page fault detection on mac.
Summary: Resubmit of http://reviews.llvm.org/D19495 enabled only on intel.
Subscribers: kubabrecka
Differential Revision: http://reviews.llvm.org/D19561
llvm-svn: 267750
Kate Stone [Wed, 27 Apr 2016 17:49:51 +0000 (17:49 +0000)]
Renamed system plugin directory to address https://bugs.swift.org/browse/SR-1093
llvm-svn: 267749
Arch D. Robison [Wed, 27 Apr 2016 17:46:25 +0000 (17:46 +0000)]
[SLPVectorizer] Refactor where MinVecRegSize and MaxVecRegSize live.
This is the first of two commits for extending SLP Vectorizer to deal with aggregates.
This commit merely refactors existing logic.
http://reviews.llvm.org/D14185
llvm-svn: 267748
Marcin Koscielnicki [Wed, 27 Apr 2016 17:42:00 +0000 (17:42 +0000)]
[sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143.
In short, CVE-2016-2143 will crash the machine if a process uses both >4TB
virtual addresses and fork(). ASan, TSan, and MSan will, by necessity, map
a sizable chunk of virtual address space, which is much larger than 4TB.
Even worse, sanitizers will always use fork() for llvm-symbolizer when a bug
is detected. Disable all three by aborting on process initialization if
the running kernel version is not known to contain a fix.
Unfortunately, there's no reliable way to detect the fix without crashing
the kernel. So, we rely on whitelisting - I've included a list of upstream
kernel versions that will work. In case someone uses a distribution kernel
or applied the fix themselves, an override switch is also included.
Differential Revision: http://reviews.llvm.org/D19576
llvm-svn: 267747
Paul Robinson [Wed, 27 Apr 2016 17:37:12 +0000 (17:37 +0000)]
PR21823: 'nodebug' attribute on global/static variables.
Make 'nodebug' on a global/static variable suppress all debug info
for the variable. Previously it would only suppress info for the
associated initializer function, if any.
Differential Revision: http://reviews.llvm.org/D19567
llvm-svn: 267746
Gerolf Hoflehner [Wed, 27 Apr 2016 17:27:16 +0000 (17:27 +0000)]
[DAGCombiner] Follow coding convention for function name (NFC)
llvm-svn: 267745
Nico Weber [Wed, 27 Apr 2016 17:26:08 +0000 (17:26 +0000)]
Revert r267691, it caused PR27535.
llvm-svn: 267744
Marcin Koscielnicki [Wed, 27 Apr 2016 17:21:49 +0000 (17:21 +0000)]
[Mips] Add support for llvm.thread.pointer intrinsic.
This will be used to implement __builtin_thread_pointer in clang.
Differential Revision: http://reviews.llvm.org/D19569
llvm-svn: 267743
Gerolf Hoflehner [Wed, 27 Apr 2016 17:19:54 +0000 (17:19 +0000)]
[InstCombine] Sharpended test case in pr21210.ll
llvm-svn: 267742
Francis Ricci [Wed, 27 Apr 2016 17:10:15 +0000 (17:10 +0000)]
Use absolute module path when possible if sent in svr4 packets
Summary:
If the remote uses svr4 packets to communicate library info,
the LoadUnload tests will fail, as lldb only used the basename
for modules, causing problems when two modules have the same basename.
Using absolute path as sent by the remote will ensure that lldb
locates the module from the correct directory when there are overlapping
basenames. When debugging a remote process, LoadModuleAtAddress will still
fall back to using basename and module_search_paths, so we don't
need to worry about using absolute paths in this case.
Reviewers: ADodds, jasonmolenda, clayborg, ovyalov
Subscribers: lldb-commits, sas
Differential Revision: http://reviews.llvm.org/D19557
llvm-svn: 267741
Adrian Prantl [Wed, 27 Apr 2016 17:06:22 +0000 (17:06 +0000)]
Module debugging: Fix the DWO filename for PCH in a relative path.
PCH in a relative location had a redundant relative path on the DWO
filename and the DW_AT_compilation_dir.
This patch fixes this and adds testcases for PCH in the same directory,
in a relative, and an absolute location.
rdar://problem/
25537947
llvm-svn: 267740
Benjamin Kramer [Wed, 27 Apr 2016 16:56:29 +0000 (16:56 +0000)]
[find-all-symbols] Also update unittest dependencies.
llvm-svn: 267739
Benjamin Kramer [Wed, 27 Apr 2016 16:50:17 +0000 (16:50 +0000)]
[find-all-symbols] Clean up dependencies, fixing cmake shared build.
llvm-svn: 267738
Reid Kleckner [Wed, 27 Apr 2016 16:46:33 +0000 (16:46 +0000)]
Silence a -Wdangling-else
llvm-svn: 267737
Haojian Wu [Wed, 27 Apr 2016 16:39:42 +0000 (16:39 +0000)]
Fix explain-check failure test on Windows.
llvm-svn: 267736
Reid Kleckner [Wed, 27 Apr 2016 16:38:03 +0000 (16:38 +0000)]
Un-XFAIL tests on Windows after fixing PR27492
Private symbols in PDBs do not have parameter types in their names so we
have to drop the parens from the lambda call operator.
llvm-svn: 267735
Matthew Simpson [Wed, 27 Apr 2016 16:25:04 +0000 (16:25 +0000)]
Add parentheses to silence buildbot warning
llvm-svn: 267734
Artem Tamazov [Wed, 27 Apr 2016 16:20:23 +0000 (16:20 +0000)]
[AMDGPU][llvm-mc] Add support of TTMP quads. Rework M0 exclusion for SMRD.
Added support of TTMP quads.
Reworked M0 exclusion machinery for SMRD and similar instructions
to enable usage of TTMP registers in those instructions as destinations.
Tests added.
Differential Revision: http://reviews.llvm.org/D19342
llvm-svn: 267733
Reid Kleckner [Wed, 27 Apr 2016 16:10:29 +0000 (16:10 +0000)]
[PDB] Fix function names for private symbols in PDBs
Summary:
llvm-symbolizer wants to get linkage names of functions for historical
reasons. Linkage names are only recorded in the PDB for public symbols,
and the linkage name is apparently stored separately in some "public
symbol" record. We had a workaround in PDBContext which would look for
such symbols when the user requested linkage names.
However, when given an address that was truly in a private function and
public funciton, we would accidentally find nearby public symbols and
return those function names. The fix is to look for both function
symbols and public symbols and only prefer the public symbol name if the
addresses of the symbols agree.
Fixes PR27492
Reviewers: zturner
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D19571
llvm-svn: 267732
Haojian Wu [Wed, 27 Apr 2016 16:09:34 +0000 (16:09 +0000)]
Don't search compilation database in explain-check, fixing buildbot test
failure.
llvm-svn: 267731
Dmitry Vyukov [Wed, 27 Apr 2016 15:55:05 +0000 (15:55 +0000)]
tsan: fix windows support
UnmapOrDie used to do MEM_DECOMMIT and so worked
on partial regions. But r263160 changed it to use
MEM_RELEASE and MEM_RELEASE can only work with
whole regions mapped by VirtualAlloc. This broke
windows as:
FATAL: ThreadSanitizer CHECK failed: gotsan.cc:8296 "((mbi.AllocationBase == addr && "Windows cannot unmap part of a previous mapping")) != (0)" (0x0, 0x0)
Restore the previous behavior.
llvm-svn: 267730
Nicolai Haehnle [Wed, 27 Apr 2016 15:46:01 +0000 (15:46 +0000)]
AMDGPU/SI: Add llvm.amdgcn.s.waitcnt.all intrinsic
Summary:
So it appears that to guarantee some of the ordering requirements of a GLSL
memoryBarrier() executed in the shader, we need to emit an s_waitcnt.
(We can't use an s_barrier, because memoryBarrier() may appear anywhere in
the shader, in particular it may appear in non-uniform control flow.)
Reviewers: arsenm, mareko, tstellarAMD
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D19203
llvm-svn: 267729
Michael Zuckerman [Wed, 27 Apr 2016 15:35:13 +0000 (15:35 +0000)]
[Clang][Builtin][AVX512] Adding intrisnics for the vpconflict{q|d} instruction set
Differential Revision: http://reviews.llvm.org/D19525
llvm-svn: 267728
Kuba Brecka [Wed, 27 Apr 2016 15:26:27 +0000 (15:26 +0000)]
Decorate TSan tests with "@skipUnlessThreadSanitizer" which skips the tests if the selected compiler can't compile with "-fsanitize=thread".
llvm-svn: 267726
Matthew Simpson [Wed, 27 Apr 2016 15:20:21 +0000 (15:20 +0000)]
[TTI] Add hook for vector extract with extension
This change adds a new hook for estimating the cost of vector extracts followed
by zero- and sign-extensions. The motivating example for this change is the
SMOV and UMOV instructions on AArch64. These instructions move data from vector
to general purpose registers while performing the corresponding extension
(sign-extend for SMOV and zero-extend for UMOV) at the same time. For these
operations, TargetTransformInfo can assume the extensions are free and only
report the cost of the vector extract. The SLP vectorizer has been updated to
make use of the new hook.
Differential Revision: http://reviews.llvm.org/D18523
llvm-svn: 267725
Artem Tamazov [Wed, 27 Apr 2016 15:17:03 +0000 (15:17 +0000)]
[AMDGPU][llvm-mc] s_getreg/setreg* - Support symbolic names of hardware registers.
Possibility to specify code of hardware register kept.
Disassemble to symbolic name, if name is known.
Tests updated/added.
Differential Revision: http://reviews.llvm.org/D19335
llvm-svn: 267724
Nico Weber [Wed, 27 Apr 2016 15:16:54 +0000 (15:16 +0000)]
Revert r267649, it caused PR27539.
llvm-svn: 267723
Kristof Beyls [Wed, 27 Apr 2016 15:03:09 +0000 (15:03 +0000)]
Remove size 1 from check as that isn't part of what the test is meant to be testing.
This test also runs on e.g. ARM-native builds when the X86 backend is also
built. This test produces code for the default instruction set, even though it
is in a "X86" sub-directory. Given that this test doesn't seem to be testing
anything architecture-specific, it seems it's best to adapt the check to not
check for an architecture-dependent value (the size of the function), rather
than hard-code the test to target x86.
llvm-svn: 267722
Benjamin Kramer [Wed, 27 Apr 2016 14:32:36 +0000 (14:32 +0000)]
Add missing dependency.
llvm-svn: 267721
Dmitry Vyukov [Wed, 27 Apr 2016 14:28:42 +0000 (14:28 +0000)]
tsan: fix darwin Go support
os_trace turns out to be a macro that creates static object.
Function-static objects use __cxa_atexit and __dso_handle
which are not present in Go runtime.
llvm-svn: 267720
Haojian Wu [Wed, 27 Apr 2016 14:27:05 +0000 (14:27 +0000)]
[include-fixer] Add a find-all-symbols tool for include-fixer.
Summary:
The find-all-symbols tool generates a yaml symbol database for
include-fixer.
The symbol matcher is originally written by Xiaoyi Liu.
Reviewers: bkramer, djasper
Subscribers: cfe-commits, klimek, ioeric
Differential Revision: http://reviews.llvm.org/D19482
llvm-svn: 267719
Benjamin Kramer [Wed, 27 Apr 2016 14:24:32 +0000 (14:24 +0000)]
Clean up the include fixer 'driver' a bit and make the database configurable.
Also add a test for it. The library is covered by unit tests, the driver
was not.
llvm-svn: 267718
Teresa Johnson [Wed, 27 Apr 2016 14:19:38 +0000 (14:19 +0000)]
[ThinLTO] Refine fix to avoid renaming of uses in inline assembly.
Summary:
Refine the workaround from r266877 that attempts to prevent
renaming of locals in inline assembly, so that in addition to looking
for a llvm.used local value, that there is at least one inline assembly
call in the module. Otherwise, debug functions added to the llvm.used
can block importing/exporting unnecessarily.
Reviewers: joker.eph
Subscribers: llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D19573
llvm-svn: 267717
Dmitry Vyukov [Wed, 27 Apr 2016 14:03:14 +0000 (14:03 +0000)]
tsan: fix windows Go support
Unmap can't unmap arbitrary regions on windows.
llvm-svn: 267716
Dmitry Vyukov [Wed, 27 Apr 2016 13:40:05 +0000 (13:40 +0000)]
tsan: fix darwin Go build
syslog_lock is not defined in Go build.
llvm-svn: 267714
Dmitry Vyukov [Wed, 27 Apr 2016 13:34:01 +0000 (13:34 +0000)]
tsan: make windows shadow mapping a bijection
CheckShadowMapping function started catching that
mem->shadow->mem mapping is not bijection.
Make it bijection.
llvm-svn: 267713
Teresa Johnson [Wed, 27 Apr 2016 13:28:35 +0000 (13:28 +0000)]
[ThinLTO] Use valueid instead of bitcode offsets in combined index file
Summary:
With the removal of support for lazy parsing of combined index summary
records (e.g. r267344), we no longer need to include the summary record
bitcode offset in the VST entries for definitions. Change the combined
index format to be similar to the per-module index format in using value
ids to cross-reference from the summary record to the VST entry (rather
than the summary record bitcode offset to cross-reference in the other
direction).
The visible changes are:
1) Add the value id to the combined summary records
2) Remove the summary offset from the combined VST records, which has
the following effects:
- No longer need the VST_CODE_COMBINED_GVDEFENTRY record, as all
combined index VST entries now only contain the value id and
corresponding GUID.
- No longer have duplicate VST entries in the case where there are
multiple definitions of a symbol (e.g. weak/linkonce), as they all
have the same value id and GUID.
An implication of #2 above is that in order to hook up an alias to the
correct aliasee based on the value id of the aliasee recorded in the
combined index alias record, we need to scan the entries in the index
for that GUID to find the one from the same module (i.e. the case where
there are multiple entries for the aliasee). But the reader no longer
has to maintain a special map to hook up the alias/aliasee.
Reviewers: joker.eph
Subscribers: joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D19481
llvm-svn: 267712
Haojian Wu [Wed, 27 Apr 2016 13:23:39 +0000 (13:23 +0000)]
Remove explain-config testcase that detect hard-coded check.
Remove it for now, we need to better way to figure out how to test it.
llvm-svn: 267711
Dmitry Vyukov [Wed, 27 Apr 2016 12:59:35 +0000 (12:59 +0000)]
tsan: fix build
error: implicit declaration of function 'abort' is invalid in C99
llvm-svn: 267710
Dmitry Vyukov [Wed, 27 Apr 2016 12:56:16 +0000 (12:56 +0000)]
tsan: fix darwin Go build
Ifdef out global variables with destructors.
This requires runtime support that is not provided by Go runtime
(in particular _dso_handle symbol).
llvm-svn: 267709
Artur Pilipenko [Wed, 27 Apr 2016 12:51:01 +0000 (12:51 +0000)]
NFC. Introduce Value::getPointerDerferecnceableBytes
Extract a part of isDereferenceableAndAlignedPointer functionality to Value::getPointerDerferecnceableBytes. Currently it's a NFC, but in future I'm going to accumulate all the logic about value dereferenceability in this function similarly to Value::getPointerAlignment function (D16144).
Reviewed By: reames
Differential Revision: http://reviews.llvm.org/D17572
llvm-svn: 267708
Johannes Doerfert [Wed, 27 Apr 2016 12:49:11 +0000 (12:49 +0000)]
[FIX] Propagate execution domain of invariant loads
If the base pointer of an invariant load is is loaded conditionally, that
condition needs to hold for the invariant load too. The structure of the
program will imply this for domain constraints but not for imprecisions in
the modeling. To this end we will propagate the execution context of base
pointers during code generation and thus ensure the derived pointer does
not access an invalid base pointer.
llvm-svn: 267707
Jonathan Coe [Wed, 27 Apr 2016 12:48:25 +0000 (12:48 +0000)]
Expose cxx constructor and method properties through libclang and python bindings.
Summary:
I have exposed the following function through libclang and the clang.cindex python bindings:
clang_CXXConstructor_isConvertingConstructor,
clang_CXXConstructor_isCopyConstructor,
clang_CXXConstructor_isDefaultConstructor,
clang_CXXConstructor_isMoveConstructor,
clang_CXXMethod_isDefaulted
I need (some of) these methods for a C++ code model I am building in Python to drive a code generator.
Reviewers: compnerd, skalinichev
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15469
llvm-svn: 267706
Rafael Espindola [Wed, 27 Apr 2016 12:47:30 +0000 (12:47 +0000)]
Reduce usage of isRelRelative.
It is now used only for relocations that only set the low bits inside a
page. Everything else is handled by getRelExpr.
I will send a another review renaming and better documenting
isRelRelative.
llvm-svn: 267705
Pavel Labath [Wed, 27 Apr 2016 12:43:37 +0000 (12:43 +0000)]
Remove flaky decorator from three tests on linux
The flakyness is no longer reproducible, and the tests seem to be passing reliably now.
llvm-svn: 267704
Dmitry Vyukov [Wed, 27 Apr 2016 12:30:48 +0000 (12:30 +0000)]
tsan: change tsan/Go interface for obtaining the current Processor
Current interface assumes that Go calls ProcWire/ProcUnwire
to establish the association between thread and proc.
With the wisdom of hindsight, this interface does not work
very well. I had to sprinkle Go scheduler with wire/unwire
calls, and any mistake leads to hard to debug crashes.
This is not something one wants to maintian.
Fortunately, there is a simpler solution. We can ask Go
runtime as to what is the current Processor, and that
question is very easy to answer on Go side.
Switch to such interface.
llvm-svn: 267703
Rafael Espindola [Wed, 27 Apr 2016 12:25:22 +0000 (12:25 +0000)]
Represent TOC relative relocations as GOTREL.
That way we only need to subtract the offset is relocateOne.
llvm-svn: 267702
Rafael Espindola [Wed, 27 Apr 2016 12:21:27 +0000 (12:21 +0000)]
Create a .got when PPC64 uses a TOC.
This simplifies the logic for computing the value of the toc base.
llvm-svn: 267701
Haojian Wu [Wed, 27 Apr 2016 12:17:04 +0000 (12:17 +0000)]
Fix a crash in cppcoreguidelines-pro-type-member-init when checking a type with a template parameter as a base class.
Summary: Fixed a crash in cppcoreguidelines-pro-type-member-init when encountering a type that uses one of its template parameters as a base when compiling for C++98.
Patch by Michael Miller!
Reviewers: aaron.ballman, alexfh, hokein
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D19539
llvm-svn: 267700
Simon Pilgrim [Wed, 27 Apr 2016 12:04:44 +0000 (12:04 +0000)]
[InstCombine][SSE] Regenerated vector shift tests
llvm-svn: 267699
Rafael Espindola [Wed, 27 Apr 2016 11:54:07 +0000 (11:54 +0000)]
Simplify handling of R_PPC64_TOC. NFC.
llvm-svn: 267698
Alexander Kornienko [Wed, 27 Apr 2016 11:45:14 +0000 (11:45 +0000)]
clang-tidy -list-checks should exit with non-zero code when no checks are enabled.
llvm-svn: 267697
Michael Zuckerman [Wed, 27 Apr 2016 11:43:14 +0000 (11:43 +0000)]
[Clang][BuiltIn][AVX512] Adding intrinsics without mask for VBROADCAST and VPBROADCAST instruction set .
Differential Revision: http://reviews.llvm.org/D19196
llvm-svn: 267696
Alexey Bataev [Wed, 27 Apr 2016 11:38:05 +0000 (11:38 +0000)]
[OPENMP] Fix crash on initialization of classes with no init clause in
declare reductions.
If reduction clause is applied to instance of class with user-defined
reduction operation without initialization clause, it may cause a crash.
Patch fixes this issue.
llvm-svn: 267695
Zlatko Buljan [Wed, 27 Apr 2016 11:31:44 +0000 (11:31 +0000)]
[mips][microMIPS] Add CodeGen support for SUBU16, SUB, SUBU, DSUB and DSUBU instructions
Differential Revision: http://reviews.llvm.org/D16676
llvm-svn: 267694
Zlatko Buljan [Wed, 27 Apr 2016 11:02:23 +0000 (11:02 +0000)]
[mips][microMIPS] Add CodeGen support for SLL16, SRL16, SLL, SLLV, SRA, SRAV, SRL and SRLV instructions
Differential Revision: http://reviews.llvm.org/D17989
llvm-svn: 267693