Commit Graph

138431 Commits

Author SHA1 Message Date
Vedant Kumar
61f5694c30 [llvm-cov] Hide instantiation views for unexecuted functions
Copying in the full text of the function doesn't help at all when we
already know that it's never executed. Just say that it's unexecuted --
the relevant source text has already been printed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281589 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 06:44:51 +00:00
Vedant Kumar
2fcbfcf470 [llvm-cov] Don't create 'jump to ...' links in nested views
Doing so is pointless, since the whole view is usually visible in a
small amount of space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281588 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 06:44:48 +00:00
Wei Mi
0bcb8fb950 Add some shortcuts in LazyValueInfo to reduce compile time of Correlated Value Propagation.
The patch is to partially fix PR10584. Correlated Value Propagation queries LVI
to check non-null for pointer params of each callsite. If we know the def of
param is an alloca instruction, we know it is non-null and can return early from
LVI. Similarly, CVP queries LVI to check whether pointer for each mem access is
constant. If the def of the pointer is an alloca instruction, we know it is not
a constant pointer. These shortcuts can reduce the cost of CVP significantly.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281586 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 06:28:34 +00:00
Jonas Hahnfeld
f158709ee5 [CMake] Fixing lit for runtimes directory
Copy variable LLVM_BUILD_MAIN_SRC_DIR from LLVMConfig.cmake to
LLVM_MAIN_SRC_DIR as it is named for in-tree builds. This ensures that
add_lit_target() can reliably find llvm-lit which is not necessarily
in the PATH.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281585 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 06:14:13 +00:00
Kostya Serebryany
577674bc4f [libFuzzer] disable test that requires debug info -- it fails on the bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281584 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 05:46:58 +00:00
Kostya Serebryany
3f6d6753de [libFuzzer] move the AFL driver build rule test into the uninstrumented dir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281583 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 05:17:39 +00:00
Vedant Kumar
7551d48f2f [llvm-cov] Make a method name more accurate (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281581 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 04:45:59 +00:00
Kostya Serebryany
7e2d153c71 [libFuzzer] fix print_pcs test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281580 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 04:43:06 +00:00
Vedant Kumar
90562cd08a [llvm-cov] Don't print a verbose title when looking at one file
Having the same title, timestamp, etc. occur repeatedly creates an
unnecessary distraction when paging through a report.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 04:41:39 +00:00
Vedant Kumar
5d97808700 [llvm-cov] Fix tests that aren't checking anything (NFC)
E.g the 'showProjectSummary' test contains some checks which can't fail
because they match themselves...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281578 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 04:41:37 +00:00
Kostya Serebryany
f0b5dd76ab [libFuzzer] implement print_pcs with trace-pc-guard. Change the trace-pc-guard heuristic for 8-bit counters to look more like in AFL (not that it's provable better, but the existin test preferes this heuristic)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281577 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 04:36:45 +00:00
Wei Mi
f09ca2fb88 Add a C++ unittest to test the fix for PR30213.
The test exercises the branch in scev expansion when the value in ValueOffsetPair
is a ptr and the offset is not divisible by the elem type size of value.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281575 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 04:06:44 +00:00
Justin Lebar
4574c11309 [doc] [CUDA] Add sections about STL support and differences between nvcc and clang to CompileCudaWithLLVM.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281573 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 02:04:32 +00:00
Sanjoy Das
81598633a4 [LangRef] Add a clarifying example for undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281570 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 01:56:58 +00:00
Kostya Serebryany
26586a8660 [libFuzzer] add 8-bit counters to trace-pc-guard handler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-15 01:30:18 +00:00
Sanjay Patel
0ebfb4ee10 [InstCombine] refactor eq/ne cases in foldICmpUsingKnownBits() ; NFCI
The pattern matching and transforms are identical; the cmp predicate just changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 23:38:56 +00:00
Zachary Turner
f5898c18e7 [pdb] Fix unit test compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281560 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 23:17:08 +00:00
Sanjay Patel
a18aa4cd29 [InstCombine] add vector tests for foldICmpUsingKnownBits()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281559 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 23:15:11 +00:00
Zachary Turner
b5689e754e [pdb] Get rid of Data and RawData in CVType.
The `CVType` had two redundant fields which were confusing and
error-prone to fill out.  By treating member records as a distinct
type from leaf records, we are able to simplify this quite a bit.

Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D24432

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281556 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 23:00:16 +00:00
Zachary Turner
a9d16c9445 [pdb] Write TPI hash values to the TPI stream.
This completes being able to write all the interesting
values of a PDB TPI stream.

Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D24370

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281555 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 23:00:02 +00:00
Reid Kleckner
a984fc7c9a [MC] Handle discardable COFF sections in assembly
Summary:
This fixes a dumpbin warning on objects produced by the MC assembler
when starting from text. All .debug$S sections are supposed to be marked
IMAGE_SCN_MEM_DISCARDABLE. The main, non-COMDAT .debug$S section had
this set, but any comdat ones were not being marked discardable because
there was no .section flag for it.

This change does two things:

- If the section name starts with .debug, implicitly mark the section as
  discardable. This means we do the same thing as gas on .s files with
  DWARF from GCC, which is important.

- Adds the 'D' flag to the .section directive on COFF to explicitly say
  a section is discardable. We only emit this flag if the section name
  does not start with .debug. This allows the user to explicitly tweak
  their section flags without worrying about magic section names.

The only thing you can't do in this scheme is to create a
non-discardable section with a name starting with ".debug", but
hopefully users don't need that.

Reviewers: majnemer, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281554 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 22:41:50 +00:00
Mehdi Amini
a364825f51 Fix auto-upgrade of TBAA tags in Bitcode Reader
If TBAA is on an intrinsic and it gets upgraded, it'll delete the call
instruction that we collected in a vector. Even if we were to use
WeakVH, it'll drop the TBAA and we'll hit the assert on the upgrade
path.

r263673 gave a shot to make sure the TBAA upgrade happens before
intrinsics upgrade, but failed to account for all cases.

Instead of collecting instructions in a vector, this patch makes it
just upgrade the TBAA on the fly, because metadata are always
already loaded at this point.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281549 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 22:29:59 +00:00
Reid Kleckner
86a6238dca Fix indentation in codeview code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281542 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 21:49:21 +00:00
Mehdi Amini
fd7afc4d38 [LTO] Move tests from test/tools to test/LTO, as they're testing the API functionalities (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281539 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 21:07:32 +00:00
Mehdi Amini
bdf517a05c [LTO] Fix commons handling
Previously the prevailing information was not honored, and commons
symbols could override a strong definition. This patch fixes it and
propose the following semantic for commons: the client should mark
as prevailing the commons that it expects the LTO implementation to
merge (i.e. take the maximum size and alignment).
It implies that commons are allowed to have multiple prevailing
definitions.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 21:05:04 +00:00
Mehdi Amini
e0384663d6 [ThinLTO] Add an option to llvm-lto to print some basic statistics for the index
Differential Revision: https://reviews.llvm.org/D24290

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281537 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 21:04:59 +00:00
Matt Arsenault
93e6e5414d Finish renaming remaining analyzeBranch functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281535 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 20:43:16 +00:00
Sanjoy Das
9becdeed48 [Stackmap] Added callsite counts to emitted function information.
Summary:
It was previously not possible for tools to use solely the stackmap
information emitted to reconstruct the return addresses of callsites in
the map, which is necessary to use the information to walk a stack. This
patch adds per-function callsite counts when emitting the stackmap
section in order to resolve the problem. Note that this slightly alters
the stackmap format, so external tools parsing these maps will need to
be updated.

**Problem Details:**
Records only store their offset from the beginning of the function they
belong to. While these records and the functions are output in program
order, it is not possible to determine where the end of one function's
records are without the callsite count when processing the records to
compute return addresses.

Patch by Kavon Farvardin!

Reviewers: atrick, ributzka, sanjoy

Subscribers: nemanjai

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281532 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 20:22:03 +00:00
Sanjay Patel
0890bf3ed4 [x86] regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 20:21:28 +00:00
Sanjay Patel
421442ef63 [x86] regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281529 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 20:16:24 +00:00
Evgeniy Stepanov
eb967fb89e Revert "[ARM] Promote small global constants to constant pools"
Breaks Android tests by introducing text relocations to ARM binaries.

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/25362/steps/run%20asan%20lit%20tests%20%5Barm%2Fbullhead-userdebug%2FMTC20F%5D/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281526 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 20:02:30 +00:00
Sanjay Patel
4e8d86c037 [x86] regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281523 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 19:42:03 +00:00
Davide Italiano
d41f227035 [lib/LTO] Fix a typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281517 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 18:48:43 +00:00
Matt Arsenault
aceeb33943 Revert "AMDGPU: Use SOPK compare instructions"
Accidentally committed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281514 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 18:04:42 +00:00
Matt Arsenault
fff5113a50 AMDGPU: Use SOPK compare instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281513 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 18:03:53 +00:00
Adrian Prantl
50aa9109c6 Verifier: Mark orphaned DICompileUnits as a debug info failure.
This is a follow-up to r268778 that adds a couple of missing cases,
most notably orphaned compile units.

rdar://problem/28193346

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:30:37 +00:00
Matt Arsenault
b1a710d5f0 Make analyzeBranch family of instruction names consistent
analyzeBranch was renamed to use lowercase first, rename
the related set to match.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281506 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:24:15 +00:00
Matt Arsenault
ab302cda5e AArch64: Use TTI branch functions in branch relaxation
The main change is to return the code size from
InsertBranch/RemoveBranch.

Patch mostly by Tim Northover

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281505 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:23:48 +00:00
Sanjay Patel
b4dbf03541 [x86] fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281504 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:23:18 +00:00
Etienne Bergeron
24624732a0 [compiler-rt] Avoid instrumenting sanitizer functions
Summary:
Function __asan_default_options is called by __asan_init before the
shadow memory got initialized. Instrumenting that function may lead
to flaky execution.

As the __asan_default_options is provided by users, we cannot expect
them to add the appropriate function atttributes to avoid
instrumentation.

Reviewers: kcc, rnk

Subscribers: dberris, chrisha, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281503 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:18:37 +00:00
Simon Pilgrim
c348bc4aeb [X86][SSE] Improve recognition of i64 sitofp conversions that can be performed as i32 (PR29078)
Until AVX512DQ we only support i64/vXi64 sitofp conversion as scalars.

This patch sees if the sign bit extends far enough that we can truncate to a i32 type and then perform sitofp without loss of precision.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281502 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:15:26 +00:00
Chad Rosier
1e06f6cc99 [LoopInterchange] Typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281501 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:12:30 +00:00
Chad Rosier
1e694f09c9 [LoopInterchange] Add CL option to override cost threshold.
Mostly useful for getting consistent lit testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281500 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:07:13 +00:00
Simon Pilgrim
e65dbf0620 [X86][SSE] Don't use PSHUFD directly - lower with generic shuffle
Remove the last user of the old getTargetShuffleNode helpers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281499 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 17:04:22 +00:00
Sanjay Patel
47eb9d5b63 getValueType().getScalarSizeInBits() -> getScalarValueSizeInBits(), round 2 ; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281498 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 16:54:10 +00:00
Chad Rosier
fb1804be65 [LoopInterchange] Cleanup debug whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281497 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 16:43:19 +00:00
Sanjay Patel
c0a42ffc17 getVectorElementType().getSizeInBits() -> getScalarSizeInBits() ; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281495 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 16:37:15 +00:00
Sanjay Patel
a7c48ccd3f getValueType().getSizeInBits() -> getValueSizeInBits() ; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 16:05:51 +00:00
Etienne Bergeron
e9c64c5da5 Fix typo in comment [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281492 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 15:59:32 +00:00
Matt Arsenault
0f7125844e AMDGPU: Support folding FrameIndex operands
This avoids test regressions in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281491 91177308-0d34-0410-b5e6-96231b3b80d8
2016-09-14 15:51:33 +00:00