Commit Graph

173707 Commits

Author SHA1 Message Date
Easwaran Raman 9ea2e7f6a4 [Inliner] Assert that the computed inline threshold is non-negative.
Reviewers: chandlerc

Subscribers: haicheng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350751 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 19:26:17 +00:00
David Callahan 2e6a4a6f5c refactor BlockFrequencyInfo::view to take a title parameter
Summary: All a non-default title for the debugging this debugging aide

Reviewers: twoh, Kader, modocache

Reviewed By: twoh

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350749 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 19:12:38 +00:00
Aaron Ballman e9630c4986 Fix visualization of intrusive reference counted objects in MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350748 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 18:59:56 +00:00
Thomas Lively 6072588d96 [WebAssembly] Standardize order of SIMD bitselect arguments
Summary:
For some reason the backend assumed that the condition mask would be
the first argument to the LLVM intrinsic, but everywhere else the
condition mask is the third argument.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350746 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 18:13:11 +00:00
Sanjay Patel ab8c9a26cc [x86] use 'nounwind' to remove test noise; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350745 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 17:29:18 +00:00
Hubert Tong f740ffbc9a [unittests][Support] AIX: Skip sticky bit file tests
On AIX, attempting (without root) to set the sticky bit on a file with
the `chmod` utility will give:
```
chmod: not all requested changes were made to <file>
```

The same occurs when modifying other permission bits on a file with the
sticky bit already set.

It seems that the `chmod` function will report success despite failing
to set the sticky bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350735 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 16:00:39 +00:00
Aleksandar Beserminji 7a86fe03b5 [mips][micrompis] Emit 16bit NOPs by default
Emit 16bit NOPs by default.
Use 32bit NOPs in delay slots where necessary.

Differential https://reviews.llvm.org/D55323



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350733 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 15:58:02 +00:00
Alexey Bataev ddd93146ae [DEBUGINFO][NVPTX]Make tests more strict, NFC.
NVPTX format requires that no labels/label arithmetics is used in the
debug info sections. To avoid possible problems with the adding/modifying the debug info functionality, made these tests more strict.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350731 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 15:41:44 +00:00
Valery Pykhtin 8daf7f9815 Revert "[AMDGPU] Fix DPP combiner"
This reverts commit e3e2923a39, svn revision rL350721

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350730 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 15:21:53 +00:00
Kristof Beyls bac64e1575 Initial AArch64 SLH implementation.
This is an initial implementation for Speculative Load Hardening for
AArch64. It builds on top of the recently introduced
AArch64SpeculationHardening pass.
This doesn't implement (yet) some of the optimizations implemented for
the X86SpeculativeLoadHardening pass. I thought introducing the
optimizations incrementally in follow-up patches should make this easier
to review.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350729 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 15:13:34 +00:00
George Rimar 56b18a6bdf [llvm-objdump] - Print symbol addressed when dumping disassembly output (-d)
When GNU objdump dumps the input with -d it prints the symbol addresses,
for example:

0000000000000031 <foo>:
  31:	00 00                	add    %al,(%rax)
	...

llvm-objdump currently does not do that.
Patch changes the behavior to match the GNU objdump.

That is useful for implementing -z/--disassemble-zeroes (D56083),
it allows omitting first zero bytes and keep the information
about the symbol address in the output.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350726 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 14:43:33 +00:00
Nico Weber e83eaf0f94 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350725 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 14:20:20 +00:00
Simon Pilgrim 7d03bc32b0 [X86][SSE] Cleanup shuffle combining test check prefixes
Share prefixes whenever possible, use X86 instead of X32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350722 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 13:46:14 +00:00
Valery Pykhtin e3e2923a39 [AMDGPU] Fix DPP combiner
Fixed issue with identity values and other cases, f32/f16 identity values to be added later. fma/mac instructions is disabled for now.
Test is fully reworked, added comments. Other fixes:

1. dpp move with uses and old reg initializer should be in the same BB.
2. bound_ctrl:0 is only considered when bank_mask and row_mask are fully enabled (0xF). Othervise the old register value is checked for identity.
3. Added add, subrev, and, or instructions to the old folding function.
4. Kill flag is cleared for the src0 (DPP register) as it may be copied into more than one user.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350721 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 13:43:32 +00:00
Florian Hahn c547d68a56 Revert r350647: "[NewPM] Port tsan"
This patch breaks thread sanitizer on some macOS builders, e.g.
http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/52725/


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350719 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 13:32:16 +00:00
Simon Pilgrim 9024892e84 [X86] Enable combining shuffles to PACKSS/PACKUS for 256/512-bit vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350716 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 13:23:28 +00:00
Anton Korobeynikov 6a2a4f9b3e [MSP430] Optimize 'shl x, 8[+ N] -> swpb(zext(x)) [<< N]' for i16
Perform additional simplification to reduce shift amount.

Patch by Kristina Bessonova!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350712 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 13:03:01 +00:00
Nico Weber 7edabba9cf [gn build] Run git ls-files '*.gn' '*.gni' | xargs -n 1 gn format
Looks like I forgot to do that for the PowerPC target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350711 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 12:57:52 +00:00
Anton Korobeynikov 9ba9ef7b24 [MSP430] Fix crash while lowering llvm.stacksave/stackrestore
Perform the usual expansion of stacksave / restore intrinsics.
Patch by Kristina Bessonova!

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350710 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 12:52:15 +00:00
Nico Weber a5cdf514ea [gn build] Merge r350669
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350709 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 12:48:06 +00:00
Nico Weber fcd719b967 [gn build] Add a TODO.txt file
Differential Revision: https://reviews.llvm.org/D56420


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350708 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 12:46:04 +00:00
Simon Pilgrim 18381bbdce [X86] Add extra test coverage for combining shuffles to PACKSS/PACKUS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350707 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 12:34:10 +00:00
Diogo N. Sampaio efea7114d4 [AArch64] Move feature predctrl to predres
Follow up patch of rL350385, for adding predres
command line option. This patch renames the
feature as to keep it aligned with the option
passed by/to clang

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350702 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 11:24:15 +00:00
Simon Pilgrim 33b7d2ceb8 [X86] Fix gcc7 -Wunused-but-set-variable warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350701 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 11:18:49 +00:00
Alexander Kornienko 6e5b17e41a Make the write_cmake_config.py script python3-compatible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350700 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 10:49:44 +00:00
David Stenberg e81d719f14 [DebugInfo] Omit location list entries with empty ranges
Summary:
This fixes PR39710. In that case we emitted a location list looking like
this:

.Ldebug_loc0:
        .quad   .Lfunc_begin0-.Lfunc_begin0
        .quad   .Lfunc_begin0-.Lfunc_begin0
        .short  1                       # Loc expr size
        .byte   85                      # DW_OP_reg5
        .quad   .Lfunc_begin0-.Lfunc_begin0
        .quad   .Lfunc_end0-.Lfunc_begin0
        .short  1                       # Loc expr size
        .byte   85                      # super-register DW_OP_reg5
        .quad   0
        .quad   0

As seen, the first entry's beginning and ending addresses evalute to 0,
which meant that the entry inadvertently became an "end of list" entry,
resulting in the location list ending sooner than expected.

To fix this, omit all entries with empty ranges. Location list entries
with empty ranges do not have any effect, as specified by DWARF, so we
might as well drop them:

"A location list entry (but not a base address selection or end of list
 entry) whose beginning and ending addresses are equal has no effect
 because the size of the range covered by such an entry is zero."

Reviewers: davide, aprantl, dblaikie

Reviewed By: aprantl

Subscribers: javed.absar, JDevlieghere, llvm-commits

Tags: #debug-info

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350698 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 09:58:59 +00:00
Matt Arsenault 9550bf5c5c GlobalISel: Implement fewerElements for implicit_def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350697 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 07:51:52 +00:00
Matt Arsenault 1c5b3e2b34 GlobalISel: Implement widenScalar for implicit_def
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350695 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 07:34:14 +00:00
Max Kazantsev c80a38c134 [IPT] Drop cache less eagerly in GVN and LoopSafetyInfo
Current strategy of dropping `InstructionPrecedenceTracking` cache is to
invalidate the entire basic block whenever we change its contents. In fact,
`InstructionPrecedenceTracking` has 2 internal strictures: `OrderedInstructions`
that is needed to be invalidated whenever the contents changes, and the map
with first special instructions in block. This second map does not need an
update if we add/remove a non-special instuction because it cannot
affect the contents of this map.

This patch changes API of `InstructionPrecedenceTracking` so that it now
accounts for reasons under which we invalidate blocks. This should lead
to much less recalculations of the map and should save us some compile time
because in practice we don't typically add/remove special instructions.

Differential Revision: https://reviews.llvm.org/D54462
Reviewed By: efriedma


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350694 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 07:28:13 +00:00
Zi Xuan Wu bccca22e8c Revert "[PowerPC] Fix assert from machine verify pass that unmatched register class about fcmp selection in fast-isel"
This reverts commit r350685.

See compile assert in compiler-rt.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350693 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 06:12:24 +00:00
Hiroshi Inoue 7a9527e0eb [NFC] fix trivial typos in comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350690 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 05:11:10 +00:00
Peter Collingbourne e0e40d4131 gn build: Copy file permissions from input file in configure_file() emulation.
Most significantly, this makes bin/llvm-lit executable so that it
can be run in the usual way.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350688 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 04:39:29 +00:00
Craig Topper 04492321fc [X86] Correct the MaskVT for avx512 gather/scatter intrinsics to use the min of the number of index and data elements.
When the result type is v2i64/v2f64 and the index element size is i32, the index vector has two unused elements making the type v4i32. The mask VT should match the number of memory accesses that will be made.

This is consistent with the isel patterns used for the target independent gather/scatter intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350687 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 04:21:12 +00:00
Peter Collingbourne ca3d527084 gn build: Fix a Python2ism in write_vcsrevision.py.
Convert the output of "git rev-parse --short HEAD" to a string before
substituting it into the output file. Without this the output file
will look like this on Python 3:

 #define LLVM_REVISION "git-b'6a4895a025f'"

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350686 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 04:05:07 +00:00
Zi Xuan Wu 1a79f8b30a [PowerPC] Fix assert from machine verify pass that unmatched register class about fcmp selection in fast-isel
Bad machine code: Illegal virtual register for instruction

function: TestULE
basic block: %bb.0 entry (0x1000a39b158)
instruction: %2:crrc = FCMPUD %1:vsfrc, %3:f8rc
operand 1: %1:vsfrc

Fix assert about missing match between fcmp instruction and register class. 
We should use vsx related cmp instruction xvcmpudp instead of fcmpu when vsx is opened.

add -verifymachineinstrs option into related test cases to enable the verify pass.


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350685 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 02:31:10 +00:00
Stanislav Mekhanoshin 26652ec519 Remove check for single use in ShrinkDemandedConstant
This removes check for single use from general ShrinkDemandedConstant
to the BE because of the AArch64 regression after D56289/rL350475.

After several hours of experiments I did not come up with a testcase
failing on any other targets if check is not performed.

Moreover, direct call to ShrinkDemandedConstant is not really needed
and superceed by SimplifyDemandedBits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350684 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 02:24:22 +00:00
Matt Arsenault e25b508818 RegisterCoalescer: Assume CR_Replace for SubRangeJoin
Currently it's possible for following
check on V.WriteLanes (which is not really meaningful
during SubRangeJoin) to pass for one half of the pair,
and then fall through to to one of the impossible
or unresolved states. This then fails as inconsistent
on the other half.

During the main range join, the check between V.WriteLanes
and OtherV.ValidLanes must have passed, meaning this
should be a CR_Replace.

Fixes most of the testcases in bugs 39542 and 39602

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350678 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 23:22:18 +00:00
Matt Arsenault 533714cdc2 RegisterCoalescer: Defer clearing implicit_def lanes
We can't go back and recover the lanes if it turns
out the implicit_def really can't be erased.

Assume all lanes are valid if an unresolved conflict
is encountered. There aren't any tests where this
seems to matter either way, but this seems like a
safer option.

Fixes bug 39602

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350676 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 23:10:47 +00:00
Sanjay Patel 9c9345cd72 [InstCombine] remove stale comments; NFC
These changed with rL350672.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350674 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:52:08 +00:00
Rong Xu c445cab044 [llvm-profdata] add value-cutoff functionality in show command
This patch improves llvm-profdata show command:
(1) add -value-cutoff=<N> option: Show only those functions whose max count
    values are greater or equal to N.
(2) add -list-below-cutoff option: Only output names of functions whose max
    count value are below the cutoff.
(3) formats value-profile counts and prints out percentage.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350673 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:41:48 +00:00
Sanjay Patel 41d08309c8 [InstCombine] canonicalize another raw IR rotate pattern to funnel shift
This is matching the equivalent of the DAG expansion, 
so it should never end up with worse perf than the 
original code even if the target doesn't have a rotate
instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350672 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:39:55 +00:00
Rong Xu d7d79030fb [PGO] Use SourceFileName rather module name in PGOFuncName
In LTO or Thin-lto mode (though linker plugin), the module
names are of temp file names which are different for
different compilations. Using SourceFileName avoids the issue.
This should not change any functionality for current PGO as
all the current callers of getPGOFuncName() is before LTO.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350671 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:39:47 +00:00
Rong Xu 5f281ed0fc [PGO] Revert r350579 to fix commit message.
Will re-commit it using the correct commit message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350670 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:37:12 +00:00
Heejin Ahn f9a5bcde91 [WebAssembly] Rename StoreResults to MemIntrinsicResults
Summary:
StoreResults pass does not optimize store instructions anymore because
store instructions don't return results values anymore. Now this pass is
used solely for memory intrinsics, so update the pass name accordingly
and fix outdated pass descriptions as well.

This patch does not change any meaningful behavior, but not marked as
NFC because it changes a comment check line in a test case.

Reviewers: dschuff

Subscribers: mgorny, sbc100, jgravelle-google, sunfiish, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350669 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:35:18 +00:00
Rong Xu f9380afdb8 [PGO] Revert r350442 to fix commit message.
Will re-commit it using the correct commit message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350667 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:33:29 +00:00
Evandro Menezes f5b78899a0 [AArch64] Adjust the cost model for Exynos
Improve the modeling of ALU instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350663 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:29:58 +00:00
Evandro Menezes 68691047f3 [llvm-mca] Update the Exynos test cases (NFC)
Add more entropy to the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350662 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:29:56 +00:00
Evandro Menezes 6fbbd583d5 [llvm-mca] Improve debugging (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350661 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 22:29:38 +00:00
Jorge Gorbe Moya 8c244a62d8 Fix go bindings for r350647: missed a function rename
Differential Revision: https://reviews.llvm.org/D56452

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350657 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 21:45:42 +00:00
Zachary Turner f4448ba208 [llvm-undname] Add support for demangling msvc's noexcept types.
Starting in C++17, MSVC introduced a new mangling for function
parameters that are themselves noexcept functions.  This patch
makes llvm-undname properly demangle them.

Patch by Zachary Henkel
Differential Revision: https://reviews.llvm.org/D55769

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350656 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-08 21:05:51 +00:00