Commit Graph

237459 Commits

Author SHA1 Message Date
Krzysztof Parzyszek 047149f745 [RDF] Make the graph construction/use less expensive
- FuncNode::findBlock traverses the function every time. Avoid using it,
  and keep a cache of block addresses in DataFlowGraph instead.
- The operator[] in the map of definition stacks was very slow. Replace
  the map with unordered_map.

llvm-svn: 276429
2016-07-22 16:09:47 +00:00
Samuel Antao 71fef77dcb Replace enum types in variadic functions by build-in types.
Summary:
When compiling the runtime library with clang we get warnings like:
```
error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs]
    va_start( args, id );
                    ^
note: parameter of type 'kmp_i18n_id_t' (aka 'kmp_i18n_id') is declared here
    kmp_i18n_id_t id,
```
My understanding is that the va_start macro only gets the promoted type so it won't know what was the exact type of the argument, which can potentially not work for some targets given that the implementation of the the calling convention could not be done properly.

This patch fixes that by using a built-in type in the function signature.

Reviewers: tlwilmar, jlpeyton, AndreyChurbanov

Subscribers: arpith-jacob, carlo.bertolli, caomhin, openmp-commits

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

llvm-svn: 276428
2016-07-22 16:05:35 +00:00
Zachary Turner b383d628df [pdb] Move file layout header structs to RawTypes.h
This facilitates code reuse between the builder classes and the
"frozen" read only versions of the classes used for parsing
existing PDB files.

llvm-svn: 276427
2016-07-22 15:46:46 +00:00
Zachary Turner d218c26124 [pdb] Round-trip module & file info to/from YAML.
This implements support for writing compiland and compiland source
file info to a binary PDB.  This is tested by adding support for
dumping these fields from an existing PDB to yaml, reading them
back in, and dumping them again and verifying the values are as
expected.

llvm-svn: 276426
2016-07-22 15:46:37 +00:00
Anna Thomas b772151a17 test commit. update comment grammatically. NFC
llvm-svn: 276425
2016-07-22 15:37:56 +00:00
Jan Vesely 7846c9b8f0 ptx: Fix builtin names after clang r274770
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-By: Aaron Watry <awatry@gmail.com>
llvm-svn: 276423
2016-07-22 15:00:08 +00:00
Krzysztof Parzyszek d3d0a4bda3 [Hexagon] Use loop data prefetch on Hexagon
llvm-svn: 276422
2016-07-22 14:22:43 +00:00
Reid Kleckner db10b5009d Use INT64_MAX instead of LLONG_MAX
llvm-svn: 276419
2016-07-22 14:11:58 +00:00
Simon Pilgrim 2d8517303c [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128 with generic IR
As discussed on D22460, I've updated the vbroadcastf128 pd256/ps256 builtins to map directly to generic IR - load+splat a 128-bit vector to both lanes of a 256-bit vector.

Fix for PR28657.

llvm-svn: 276417
2016-07-22 13:58:56 +00:00
Simon Pilgrim ea0d4f9962 [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128 (reapplied)
As reported on PR26235, we don't currently make use of the VBROADCASTF128/VBROADCASTI128 instructions (or the AVX512 equivalents) to load+splat a 128-bit vector to both lanes of a 256-bit vector.

This patch enables lowering from subvector insertion/concatenation patterns and auto-upgrades the llvm.x86.avx.vbroadcastf128.pd.256 / llvm.x86.avx.vbroadcastf128.ps.256 intrinsics to match.

We could possibly investigate using VBROADCASTF128/VBROADCASTI128 to load repeated constants as well (similar to how we already do for scalar broadcasts).

Reapplied with fix for PR28657 - removed intrinsic definitions (clang companion patch to be be submitted shortly).

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

llvm-svn: 276416
2016-07-22 13:58:44 +00:00
Clement Courbet 22c9e93147 Revert "Revert "[clang-tidy] new cppcoreguidelines-slicing""
Second try for r276408

llvm-svn: 276415
2016-07-22 13:45:00 +00:00
Kirill Bobyrev a3432fa91c [clang-rename] introduce better symbol finding
This patch introduces:

* TypeLoc visiting, which helps a lot in renaming types
* NestedNameSpecifierLoc visiting (through getting them via ASTMatcher at the moment, though, because RecursiveASTVisitor<T>::VisitNestedNameSpecifierLoc isn't implemented), which helps to treat nested names correctly
* better code formatting and refactoring
* bunch of tests

Reviewers: alexfh

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

llvm-svn: 276414
2016-07-22 13:41:09 +00:00
Clement Courbet bd7aa358f0 Revert "[clang-tidy] new cppcoreguidelines-slicing"
Tests fail on clang-x64-ninja-win7 due to too narrow expectation.

llvm-svn: 276413
2016-07-22 13:33:51 +00:00
Tamas Berghammer d7d69f8083 Support loading files even when incorrect file name specified by the linker
"Incorrect" file name seen on Android whene the main executable is
called "app_process32" (or 64) but the linker specifies the package
name (e.g. com.android.calculator2). Additionally it can be present
in case of some linker bugs.

This CL adds logic to try to fetch the correct file name from the proc
file system based on the base address sepcified by the linker in case
we are failed to load the module by name.

Differential revision: http://reviews.llvm.org/D22219

llvm-svn: 276411
2016-07-22 12:55:35 +00:00
Ahmed Bougacha 29333c9de6 [FastISel] Ignore @llvm.assume.
llvm-svn: 276410
2016-07-22 12:54:53 +00:00
Ying Yi e59ee43cf1 [llvm-cov] - Add the coverage of lines in the summary report.
The llvm-cov ‘report' command displays a summary of the coverage of a binary file.
The summary report currently only includes covered regions and covered functions.
This patch adds the coverage of lines in the summary report.

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

llvm-svn: 276409
2016-07-22 12:46:13 +00:00
Clement Courbet f67fbfaa8c [clang-tidy] new cppcoreguidelines-slicing
Flags slicing of member variables or vtable. See:

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es63-dont-slice
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c145-access-polymorphic-objects-through-pointers-and-references

Differential revision:
http://reviews.llvm.org/D21974

llvm-svn: 276408
2016-07-22 12:42:19 +00:00
Benjamin Kramer a81f4728f3 [llvm-profdata] Bring back reading profile data from STDIN.
This feature was lost in r276197.

llvm-svn: 276407
2016-07-22 12:39:55 +00:00
Pavel Labath 4e6fad5760 Fixing layout of elf-core file related structures
Summary:
The binary layout of prstatus and prpsinfo was wrong.
Some of the member variables where not aligned properly
and others where with a wrong type (e.g. the time related
stuff in prstatus).

I used the structs defined in bfd in binutils to see what the layout
of the elf-core format in these section is.
(https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=bfd/hosts/x86-64linux.h;h=4e420a1f2081dd3b51f5d6b7a8e4093580f5cdb5;hb=master)
Note: those structures are only for x86 64 bit elf-core files

This shouldn't have any impact on the functionality, because
lldb actually uses only a few of the member variables of those structs
and they are with a correct type and alignment.

I found this while trying to add/fix the support for
i386 core files (https://llvm.org/bugs/show_bug.cgi?id=26947)

Reviewers: labath

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D22628
Author: Dimitar Vlahovski <dvlahovski@google.com>

llvm-svn: 276406
2016-07-22 12:18:45 +00:00
Benjamin Kramer 5ba0e20315 Revert "[X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128"
It caused PR28657.

This reverts commit r276281.

llvm-svn: 276405
2016-07-22 11:03:10 +00:00
Ying Yi 60a3da3f4c [llvm-cov] - Improve llvm-cov error message
Summary:

When giving the following command:
% llvm-cov report -instr-profile=default.profraw

llvm-cov will give the following error message:

>llvm-cov report: Not enough positional command line arguments specified!
>Must specify at least 1 positional arguments: See: orbis-llvm-cov report -help

This patch changes the error message from  '1 positional arguments'
to '1 positional argument'.

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

llvm-svn: 276404
2016-07-22 10:52:21 +00:00
Tamas Berghammer 0576ad6d35 Fix a crash when an ELF section symbol have no name
llvm-svn: 276403
2016-07-22 10:43:03 +00:00
Daniel Sanders aea8b553e3 [compiler-rt][cmake] Don't reset CAN_TARGET_${arch} on every cmake invocation.
Allowing this variable to be cached makes it possible to repair the MIPS
buildbots in lieu of either fixing the mips64 sanitizer issues or fixing the
detection of mips64 support (which I think was changed by r268977 but didn't
take effect on this buildbot until the last couple days) so that it returns to
not being built on these buildbots.

llvm-svn: 276402
2016-07-22 10:15:09 +00:00
Ying Yi 78db64e88c test commit
llvm-svn: 276401
2016-07-22 09:20:21 +00:00
Benjamin Kramer e0f35a57cd [include-fixer] Fix faulty sort predicate.
Note the == on the last line, this isn't a strict-weak ordering.

llvm-svn: 276400
2016-07-22 09:07:16 +00:00
Sjoerd Meijer 5c0ef83386 This refactoring of ARM machine block size computation creates two utility
functions so that the size computation is available not only in ConstantIslands
but in other passes as well.

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

llvm-svn: 276399
2016-07-22 08:39:12 +00:00
Eugene Leviant a31c91b150 [ELF] Support PROVIDE and PROVIDE_HIDDEN inside SECTIONS
llvm-svn: 276398
2016-07-22 07:38:40 +00:00
Hrvoje Varga 2db00ce4b6 [mips][microMIPS] Implement SLT, SLTI, SLTIU, SLTU microMIPS32r6 instructions
Differential Revision: https://reviews.llvm.org/D19906

llvm-svn: 276397
2016-07-22 07:18:33 +00:00
Tobias Grosser 74dc3cb431 GPGPU: Generate PTX assembly code for the kernel modules
Run the NVPTX backend over the GPUModule IR and write the resulting assembly
code in a string.

To work correctly, it is important to invalidate analysis results that still
reference the IR in the kernel module. Hence, this change clears all references
to dominators, loop info, and scalar evolution.

Finally, the NVPTX backend has troubles to generate code for various special
floating point types (not surprising), but also for uncommon integer types. This
commit does not resolve these issues, but pulls out problematic test cases into
separate files to XFAIL them individually and resolve them in future (not
immediate) changes one by one.

llvm-svn: 276396
2016-07-22 07:11:12 +00:00
Simon Atanasyan d2ae303eb0 [ELF][MIPS] Apply mask while reading implicit addend and writing result of R_MIPS_26 relocation.
llvm-svn: 276395
2016-07-22 05:56:43 +00:00
Craig Topper 52e2e8381b [AVX512] Add ExeDomain to vector extend and truncate instructions.
llvm-svn: 276394
2016-07-22 05:46:44 +00:00
Craig Topper f4151bea72 [AVX512] Add initial support for the Execution Domain fixing pass to change some EVEX instructions.
llvm-svn: 276393
2016-07-22 05:00:52 +00:00
Craig Topper 5ec33a9411 [AVX512] Fix the ExeDomain for some packed fp instructions.
llvm-svn: 276392
2016-07-22 05:00:42 +00:00
Craig Topper 0b90756b0a [AVX512] Add load folding for some AVX512VL logic and arithmetic instructions.
llvm-svn: 276391
2016-07-22 05:00:39 +00:00
Craig Topper ab13b33ded [AVX512] Update X86InstrInfo::foldMemoryOperandCustom to handle the EVEX encoded instructions too.
llvm-svn: 276390
2016-07-22 05:00:35 +00:00
David Majnemer 522a91181a Don't remove side effecting instructions due to ConstantFoldInstruction
Just because we can constant fold the result of an instruction does not
imply that we can delete the instruction.  It may have side effects.

This fixes PR28655.

llvm-svn: 276389
2016-07-22 04:54:44 +00:00
Xinliang David Li d382e9d82b Sync up InstrProfData.inc with compiler-rt with fixes to references
llvm-svn: 276388
2016-07-22 04:46:56 +00:00
Xinliang David Li 6e9dee999d Revert 276386
llvm-svn: 276387
2016-07-22 04:31:26 +00:00
Xinliang David Li a182e58265 Sync up InstrProfData.inc with compiler-rt
llvm-svn: 276386
2016-07-22 04:18:17 +00:00
Xinliang David Li f0e0a74f87 [Profile] cleanup: do not reference name directly of vars shared between rt and llvm
llvm-svn: 276385
2016-07-22 04:08:16 +00:00
Davide Italiano 246f681e0b [ELF/LinkerScript] Support ONLY_IF_{RO, RW} directive.
Differential Revision:   https://reviews.llvm.org/D22660

llvm-svn: 276384
2016-07-22 03:36:24 +00:00
Kostya Serebryany 5bc01c108d [sanitizer] refactor TransferBatch to hide the implementation. NFC
llvm-svn: 276383
2016-07-22 02:21:12 +00:00
Pete Cooper cadadaa1b3 Fix r276380 for targets without REALPATH.
This was a mistake in the layout of the code from r276380.  I moved the appropriate lines out of the #ifdef to fix it.

llvm-svn: 276382
2016-07-22 01:52:58 +00:00
Vitaly Buka 43efcced31 Fix test on windows, symbolizer returns invalid line
llvm-svn: 276381
2016-07-22 01:47:28 +00:00
Pete Cooper b2ba776aed Avoid dsymutil calls to getFileNameByIndex.
This change adds a hasFileAtIndex method. getChildDeclContext can first call this method, and if it returns true it knows it can then lookup the resolved path cache for the given file index. If we hit that cache then we don't even have to call getFileNameByIndex.

Running dsymutil against the swift executable built from github gives a 20% performance improvement without any change in the binary.

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

Reviewed by friss.

llvm-svn: 276380
2016-07-22 01:41:32 +00:00
Kostya Serebryany 8258686922 [asan] revert to using -std=c++11 on test/asan/TestCases/use-after-scope-capture.cc to fix Linux failures after r276332. This probably breaks the windows build, sorry, but returns to the earlier status quo.
llvm-svn: 276379
2016-07-22 01:34:32 +00:00
Vitaly Buka 60cb0b55c9 fix windows
llvm-svn: 276378
2016-07-22 01:34:12 +00:00
Kostya Serebryany bfd69e0580 [sanitizer] allocator: introduce kUseSeparateSizeClassForBatch (false by default). When true, it will cause all TransferBatches to be allocated on a separate dedicated size class, which improves security and may potentially simplify memory reclamation. However in the current state this may cause up to 3% extra memory usage. Subsequent changes should bring this overhead down
llvm-svn: 276377
2016-07-22 01:13:13 +00:00
Vitaly Buka be6328b078 Fix test on windows
llvm-svn: 276376
2016-07-22 01:12:04 +00:00
Vitaly Buka 0a3e932e1d Add test to check detection of stack-use-after-scope on various types
Summary:
Test for D22657

PR27453

Reviewers: kcc, eugenis

Subscribers: kubabrecka

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

llvm-svn: 276375
2016-07-22 00:58:06 +00:00