Commit Graph

253530 Commits

Author SHA1 Message Date
Jason Molenda 9dd2ff4604 When I added the use of the new compression framework (present in
Mac OS X 10.11, El Capitan, released c. Oct 2015) I conditionalized
the use of the framework on "if sdk == macosx 10.11".  But since
macOS 10.12 has shipped this year, the framework was no longer being
built in.  I can either start listing every OS 10.11 and newer, or
remove the version check.

This will break building lldb with xcodebuild / Xcode for people 
running Mac OS X 10.10 or older.  If so, I'll back this change out.
I'm not sure if we have many people working on macs running the
older OSes on their build systems.

<rdar://problem/30159130> 

llvm-svn: 293742
2017-02-01 04:23:15 +00:00
Justin Bogner 05cfdb936a [sanitizer] Support SANITIZER_INTERCEPTOR_HOOKS on Darwin
This basically already worked other than weak symbols needing
definitions on darwin.

llvm-svn: 293741
2017-02-01 03:31:09 +00:00
Richard Smith 776e9c35b5 Remove apparently-unnecessary copy of constructor lookup result.
Contrary to the comment, DeclContext intends to guarantee that the lookup
results for a particular name will be stable across non-AST-mutating
operations, so a copy here should not be necessary. Further, if a copy *is*
necessary, the other four instances of this pattern within this file would also
be wrong, and we have no evidence of any problems with them; if this change
unearths problems, we should fix all the instances of this pattern.

llvm-svn: 293740
2017-02-01 03:28:59 +00:00
Evandro Menezes 455382ea22 [AArch64] Add new target feature to fuse literal generation
This feature enables the fusion of such operations on Cortex A57, as
recommended in its Software Optimisation Guide, sections 4.14 and 4.15.

Differential revision: https://reviews.llvm.org/D28698

llvm-svn: 293739
2017-02-01 02:54:42 +00:00
Evandro Menezes b21fb29c26 [AArch64] Add new subtarget feature to fuse AES crypto operations
This feature enables the fusion of such operations on Cortex A57, as
recommended in its Software Optimisation Guide, section 4.13, and on Exynos
M1.

Differential revision: https://reviews.llvm.org/D28491

llvm-svn: 293738
2017-02-01 02:54:39 +00:00
Evandro Menezes 94edf02923 [CodeGen] Move MacroFusion to the target
This patch moves the class for scheduling adjacent instructions,
MacroFusion, to the target.

In AArch64, it also expands the fusion to all instructions pairs in a
scheduling block, beyond just among the predecessors of the branch at the
end.

Differential revision: https://reviews.llvm.org/D28489

llvm-svn: 293737
2017-02-01 02:54:34 +00:00
Sanjoy Das 15e50b510e [ImplicitNullCheck] NFC isSuitableMemoryOp cleanup
Summary:
isSuitableMemoryOp method is repsonsible for verification
that instruction is a candidate to use in implicit null check.
Additionally it checks that base register is not re-defined before.
In case base has been re-defined it just returns false and lookup
is continued while any suitable instruction will not succeed this check
as well. This results in redundant further operations.

So when we found that base register has been re-defined we just
stop.

Patch by Serguei Katkov!

Reviewers: reames, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29119

llvm-svn: 293736
2017-02-01 02:49:25 +00:00
Hans Wennborg fd350a3b4f Follow-up to r293732: add a proper triple to the test
llvm-svn: 293735
2017-02-01 02:48:02 +00:00
Justin Bogner aded0f85e3 Remove XFAIL from the sanitizer guard test for darwin
This works as of "Support sanitizer guard section on darwin" in the
llvm repo.

llvm-svn: 293734
2017-02-01 02:38:42 +00:00
Justin Bogner 41e632bf6b SanitizerCoverage: Support sanitizer guard section on darwin
MachO's sections need a segment as well as a section name, and the
section start and end symbols are spelled differently than on ELF.

llvm-svn: 293733
2017-02-01 02:38:39 +00:00
Hans Wennborg 27dcc6c0e2 clang-cl: Evaluate arguments left-to-right in constructor call with initializer list (PR31831)
clang-cl would evaluate the arguments right-to-left (see PR), and for
non-Windows targets I suppose we only got it because we were already
emitting left-to-right in CodeGenFunction::EmitCallArgs.

Differential Revision: https://reviews.llvm.org/D29350

llvm-svn: 293732
2017-02-01 02:21:07 +00:00
Marcos Pividori e72c69bb0a [sancov] Move __sancov_default_options declaration outside the namespace __sancov
After this commint, we can include sancov_flags.h and refer to
__sancov_default_options without requiring the namespace prefix.

Differential Revision: https://reviews.llvm.org/D29167

llvm-svn: 293731
2017-02-01 01:36:19 +00:00
Matthias Braun 8d115a384c MCMacho: Allow __thread_ptr section after dwarf sections
Differential Revision: https://reviews.llvm.org/D29315

llvm-svn: 293730
2017-02-01 01:31:36 +00:00
Eugene Zelenko 926883e1c2 [Mips] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 293729
2017-02-01 01:22:51 +00:00
Stanislav Mekhanoshin 70c245e92d Fix regalloc assignment of overlapping registers
SplitEditor::defFromParent() can create a register copy.
If register is a tuple of other registers and not all lanes are used
a copy will be done on a full tuple regardless. Later register unit
for an unused lane will be considered free and another overlapping
register tuple can be assigned to a different value even though first
register is live at that point. That is because interference only look at
liveness info, while full register copy clobbers all lanes, even unused.

This patch fixes copy to only cover used lanes.

Differential Revision: https://reviews.llvm.org/D29105

llvm-svn: 293728
2017-02-01 01:18:36 +00:00
Davide Italiano 7343b9f340 [IPSCCP] Teach how to not propagate return values of naked functions.
Differential Revision:  https://reviews.llvm.org/D29360

llvm-svn: 293727
2017-02-01 01:01:22 +00:00
Matt Arsenault da7a656542 AMDGPU: Cleanup fmin/fmax legacy function
Use a more specific subtarget check and combine hasOneUse checks

llvm-svn: 293726
2017-02-01 00:42:40 +00:00
Dean Michael Berris da2673ce20 [XRay] Use std::errc::invalid_argument instead of std::errc::bad_message
This change should appease the mingw32 builds.

Follow-up to D29319.

llvm-svn: 293725
2017-02-01 00:22:20 +00:00
George Rokos 3de4cd1281 [OpenMP] Initial implementation of OpenMP offloading library - libomptarget plugins.
This is the patch upstreaming the plugins part of libomptarget (CUDA, generic-elf-64).

Differential Revision: https://reviews.llvm.org/D14253

llvm-svn: 293724
2017-02-01 00:14:41 +00:00
Matt Arsenault bdd59e6879 InferAddressSpaces: Handle select
This fails to handle some cases where one of the inputs is
a constant to be fixed in a later commit.

llvm-svn: 293723
2017-02-01 00:08:53 +00:00
Kostya Serebryany 5c76e3d034 [libFuzzer] increase the default size for shmem
llvm-svn: 293722
2017-02-01 00:07:47 +00:00
Dean Michael Berris 0e8ababf7d [XRay] Define the InstrumentationMap type
Summary:
This change implements the instrumentation map loading library which can
understand both YAML-defined instrumentation maps, and ELF 64-bit object
files that have the XRay instrumentation map section. We break it out
into a library on its own to allow for other applications to deal with
the XRay instrumentation map defined in XRay-instrumented binaries.

This type provides both raw access to the logical representation of the
instrumentation map entries as well as higher level functions for
converting a function ID into a function address.

At this point we only support ELF64 binaries and YAML-defined XRay
instrumentation maps. Future changes should extend this to support
32-bit ELF binaries, as well as other binary formats (like MachO).

As part of this change we also migrate all uses of the extraction logic
that used to be defined in tools/llvm-xray/ to use this new type and
interface for loading from files. We also remove the flag from the
`llvm-xray` tool that required users to specify the type of the
instrumentation map file being provided to instead make the library
auto-detect the file type.

Reviewers: dblaikie

Subscribers: mgorny, varno, llvm-commits

Differential Revision: https://reviews.llvm.org/D29319

llvm-svn: 293721
2017-02-01 00:05:29 +00:00
Matt Arsenault 864fbacb4a InferAddressSpaces: Remove dead declaration
llvm-svn: 293720
2017-01-31 23:57:20 +00:00
Matt Arsenault 517a290e4f InferAddressSpaces: Avoid double map lookup
llvm-svn: 293719
2017-01-31 23:48:44 +00:00
Matt Arsenault 2a46d81038 InferAddressSpaces: Fix broken casting of constants
llvm-svn: 293718
2017-01-31 23:48:40 +00:00
Matt Arsenault 1575cb893c AMDGPU: Fix warning
llvm-svn: 293717
2017-01-31 23:48:37 +00:00
Kyle Butt b15c06677c CodeGen: Allow small copyable blocks to "break" the CFG.
When choosing the best successor for a block, ordinarily we would have preferred
a block that preserves the CFG unless there is a strong probability the other
direction. For small blocks that can be duplicated we now skip that requirement
as well, subject to some simple frequency calculations.

Differential Revision: https://reviews.llvm.org/D28583

llvm-svn: 293716
2017-01-31 23:48:32 +00:00
Rafael Espindola a86be22230 Move more code to helper functions. NFC.
llvm-svn: 293715
2017-01-31 23:26:32 +00:00
Pavel Labath 23ccc29197 Open ELF core dumps with more than 64K sections
Summary:
Problem:

There are three filelds in the ELF header - e_phnum, e_shnum, and e_shstrndx -
that could be bigger than 64K and therefore do not fit in 16 bits reserved for
them in the header. If this happens, pretty often there is a special section at
index 0 which contains their real values for these fields in the section header
in the fields sh_info, sh_size, and sh_link respectively.

Fix:

- Rename original fields in the header declaration. We want to have them around
just in case.

- Reintroduce these fields as 32-bit members at the end of the header. By default
they are initialized from the header in Parse() method.

- In Parse(), detect the situation when the header might have been extended into
section info #0 and try to read it from the same data source.

- ObjectFileELF::GetModuleSpecifications accesses some of these fields but the
original parse uses too small data source. Re-parse the header if necessary
using bigger data source.

- ProcessElfCore::CreateInstance uses header with potentially sentinel values,
but it does not access these fields, so a comment here is enough.

Reviewers: labath

Reviewed By: labath

Subscribers: davidb, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D29095
Author: Eugene Birukov <eugenebi@hotmail.com>

llvm-svn: 293714
2017-01-31 23:09:46 +00:00
Justin Lebar 06fcea4cd9 [NVPTX] Compute approx sqrt as 1/rsqrt(x) rather than x*rsqrt(x).
x*rsqrt(x) returns NaN for x == 0, whereas 1/rsqrt(x) returns 0, as
desired.

Verified that the particular nvptx approximate instructions here do in
fact return 0 for x = 0.

llvm-svn: 293713
2017-01-31 23:08:57 +00:00
Rafael Espindola d9953d9dd2 Move some code to a helper function. NFC.
llvm-svn: 293712
2017-01-31 23:07:08 +00:00
Marcos Pividori 8789a5a9f6 [sanitizer] Fix interface tests when SANITIZER_CAN_USE_CXXABI is true.
We ignore `__ubsan_handle_dynamic_type_cache_miss*` symbols when
`SANITIZER_CAN_USE_CXXABI` is true. Because they are included in the
library but they are not included in the interface lists.

llvm-svn: 293711
2017-01-31 22:57:55 +00:00
Marcos Pividori 8dac0cede7 [sanitizer] Fix interface test on Darwin, failing after 293682.
The test was failing because we export the functions: "__sanitizer_mz*" but they
are not included in the general interface lists.
Also, weak undefined symbols are tagged with U by `nm -g` on Darwin.

Differential Revision: https://reviews.llvm.org/D29345

llvm-svn: 293710
2017-01-31 22:57:50 +00:00
Michael Kuperstein e18aad39ab Shut up GCC warning about operator precedence. NFC.
Technically, this is actually changes the expression and the original
assert was "wrong", but since the conjunction is with true, it doesn't
matter in this case.

llvm-svn: 293709
2017-01-31 22:48:45 +00:00
Daniel Berlin 97718e6081 NewGVN: Dead argument cleanup
llvm-svn: 293708
2017-01-31 22:32:03 +00:00
Daniel Berlin ff12c922fe NewGVN: Cleanup conditions to match reality
llvm-svn: 293707
2017-01-31 22:32:01 +00:00
Daniel Berlin c22aafe5b3 NewGVN: Add basic support for symbolic comparison evaluation
llvm-svn: 293706
2017-01-31 22:31:58 +00:00
Daniel Berlin 808e3ff8a2 NewGVN: Formatting cleanup after lookupOperandLeader change
llvm-svn: 293705
2017-01-31 22:31:56 +00:00
Daniel Berlin 203f47bbd8 NewGVN: Remove the unsued two arguments from lookupOperandLeader.
llvm-svn: 293704
2017-01-31 22:31:53 +00:00
Daniel Berlin 74d300361a NewGVN: Cleanup header files we are using.
llvm-svn: 293703
2017-01-31 22:31:50 +00:00
Chris Bieneman 3173c964da [CMake] [4/4] Update a batch of plugins
This is extending the updates from r293696 to more LLDB plugins.

llvm-svn: 293701
2017-01-31 22:31:38 +00:00
Chris Bieneman 81b8f12b42 [CMake] [3/4] Update a batch of plugins
This is extending the updates from r293696 to more LLDB plugins.

llvm-svn: 293700
2017-01-31 22:29:11 +00:00
Chris Bieneman 66a2d639ab [CMake] [2/4] Update a batch of plugins
This is extending the updates from r293696 to more LLDB plugins.

llvm-svn: 293699
2017-01-31 22:23:49 +00:00
Chris Bieneman 6847a3aba1 [CMake] [1/4] Update a batch of plugins
This is extending the updates from r293696 to more LLDB plugins.

llvm-svn: 293698
2017-01-31 22:21:19 +00:00
David Blaikie 0012dd5db1 Add a verbose/human readable mode to llvm-symbolizer to investigate discriminators and other line table/backtrace features
Patch by Simon Que!

Differential Revision: https://reviews.llvm.org/D29094

llvm-svn: 293697
2017-01-31 22:19:38 +00:00
Chris Bieneman cee3837eb8 [CMake] Add explicit dependencies to plugins
Summary:
This patch does two things. First it updates all the ABI plugins with accurate dependencies, and second it adds a tracking mechanism for add_lldb_library to denote plugin libraries, allowing us to build up a list of all the configured plugins.

This list of generated plugins will be used during generating liblldb so that we can link all the plugins into the library.

If this patch looks good I will update all the other plugins in subsequent patches.

Reviewers: labath, zturner

Subscribers: nemanjai, mgorny, lldb-commits, jgosnell

Differential Revision: https://reviews.llvm.org/D29348

llvm-svn: 293696
2017-01-31 22:12:59 +00:00
Daniel Berlin 9b254fdf6c ScopedHashTable lookup should be const
llvm-svn: 293695
2017-01-31 22:01:08 +00:00
Davide Italiano 116464a55d [NewGVN] Preserve TargetLibraryInfo analysis.
We can maybe preserve more but this is a first step.
Ack'ed by Danny on IRC.

llvm-svn: 293694
2017-01-31 21:53:18 +00:00
Dan Gohman 999a86ba88 [Utils] Update comment in vimrc
Fixed wrong paths in comments for *.vim files.

Patch By: Bruno Rosa (brunoalr)

Differential Revision: https://reviews.llvm.org/D29174

llvm-svn: 293693
2017-01-31 21:33:21 +00:00
David Blaikie 4d92301075 Fix modules codegen to be compatible with modules-ts
The Module::WithCodegen flag was only being set when the module was
parsed from a ModuleMap. Instead set it late, in the ASTWriter to match
the layer where the MODULAR_CODEGEN_DECLs list is determined (the
WithCodegen flag essentially means "are this module's decls in
MODULAR_CODEGEN_DECLs").

When simultaneous emission of AST file and modular object is implemented
this may need to change - the Module::WithCodegen flag will need to be
set earlier, and ideally the MODULAR_CODEGEN_DECLs gathering will
consult this flag (that's not possible right now since Decls destined
for an AST File don't have a Module - only if they're /read/ from a
Module is that true - I expect that would need to change as well).

llvm-svn: 293692
2017-01-31 21:28:19 +00:00