]> granicus.if.org Git - llvm/log
llvm
5 years ago[obj2yaml] - Fix BB after r373315.
George Rimar [Tue, 1 Oct 2019 10:02:47 +0000 (10:02 +0000)]
[obj2yaml] - Fix BB after r373315.

The success return value for data extractor's cursor
should also be checked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373319 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReland "[utils] Implement the llvm-locstats tool"
Djordje Todorovic [Tue, 1 Oct 2019 09:59:15 +0000 (09:59 +0000)]
Reland "[utils] Implement the llvm-locstats tool"

The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373317 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[yaml2obj] - Allow specifying custom Link values for SHT_HASH section.
George Rimar [Tue, 1 Oct 2019 09:54:40 +0000 (09:54 +0000)]
[yaml2obj] - Allow specifying custom Link values for SHT_HASH section.

This allows setting any sh_link values for SHT_HASH sections.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373316 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[yaml2obj/obj2yaml] - Add support for SHT_HASH sections.
George Rimar [Tue, 1 Oct 2019 09:45:59 +0000 (09:45 +0000)]
[yaml2obj/obj2yaml] - Add support for SHT_HASH sections.

SHT_HASH specification is:
http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#hash

In short the format is the following: it has 2 uint32 fields
in its header: nbucket and nchain followed by (nbucket + nchain)
uint32 values.

This patch allows dumping and parsing such sections.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373315 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFixup r373278: Move test to X86 directory
Diana Picus [Tue, 1 Oct 2019 09:27:20 +0000 (09:27 +0000)]
Fixup r373278: Move test to X86 directory

...since it's using an x86 triple.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373314 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis][NFC] Refactor X86 tests fixtures into a base class.
Clement Courbet [Tue, 1 Oct 2019 09:20:36 +0000 (09:20 +0000)]
[llvm-exegesis][NFC] Refactor X86 tests fixtures into a base class.

Reviewers: gchatelet, a.sidorin

Subscribers: tschuett, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373313 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[OCaml] Handle nullptr in Llvm.global_initializer"
Dmitri Gribenko [Tue, 1 Oct 2019 08:29:07 +0000 (08:29 +0000)]
Revert "[OCaml] Handle nullptr in Llvm.global_initializer"

This reverts commit r373299. It broke tests:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18485

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373311 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "GlobalISel: Handle llvm.read_register"
Dmitri Gribenko [Tue, 1 Oct 2019 08:24:01 +0000 (08:24 +0000)]
Revert "GlobalISel: Handle llvm.read_register"

This reverts commit r373294. It broke Clang's
CodeGen/arm64-microsoft-status-reg.cpp:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18483

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373310 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][HardwareLoops] Update some iterators
Sam Parker [Tue, 1 Oct 2019 07:53:28 +0000 (07:53 +0000)]
[NFC][HardwareLoops] Update some iterators

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373309 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Consider isCodeGenOnly in the EVEX2VEX pass to make VMAXPD/PS map to the non...
Craig Topper [Tue, 1 Oct 2019 07:10:09 +0000 (07:10 +0000)]
[X86] Consider isCodeGenOnly in the EVEX2VEX pass to make VMAXPD/PS map to the non-commutable VEX instruction. Use EVEX2VEX override to fix the scalar instructions.

Previously the match was ambiguous and VMAXPS/PD and VMAXCPS/PD
were mapped to the same VEX instruction. But we should keep
the commutableness when change the opcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373303 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Make sure EH pads are preferred in sorting
Heejin Ahn [Tue, 1 Oct 2019 06:53:28 +0000 (06:53 +0000)]
[WebAssembly] Make sure EH pads are preferred in sorting

Summary:
In CFGSort, we try to make EH pads have higher priorities as soon as
they are ready to be sorted, to prevent creation of unwind destination
mismatches in CFGStackify. We did that by making priority queues'
comparison function  prefer EH pads, but it was possible for an EH pad
to be popped from `Preferred` queue and then not sorted immediately and
enter `Ready` queue instead in a certain condition. This patch makes
sure that special condition does not consider EH pads as its candidates.

Reviewers: dschuff

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373302 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Unstackify regs after fixing unwinding mismatches
Heejin Ahn [Tue, 1 Oct 2019 06:21:53 +0000 (06:21 +0000)]
[WebAssembly] Unstackify regs after fixing unwinding mismatches

Summary:
Fixing unwind mismatches for exception handling can result in splicing
existing BBs and moving some of instructions to new BBs. In this case
some of stackified def registers in the original BB can be used in the
split BB. For example, we have this BB and suppose %r0 is a stackified
register.
```
bb.1:
  %r0 = call @foo
  ... use %r0 ...
```

After fixing unwind mismatches in CFGStackify, `bb.1` can be split and
some instructions can be moved to a newly created BB:
```
bb.1:
  %r0 = call @foo

bb.split (new):
  ... use %r0 ...
```

In this case we should make %r0 un-stackified, because its use is now in
another BB.

When spliting a BB, this CL unstackifies all def registers that have
uses in the new split BB.

Reviewers: dschuff

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373301 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[OCaml] Handle nullptr in Llvm.global_initializer
Aditya Kumar [Tue, 1 Oct 2019 03:45:09 +0000 (03:45 +0000)]
[OCaml] Handle nullptr in Llvm.global_initializer

LLVMGetInitializer returns nullptr in case there is no
initializer. There is not much that can be done with nullptr in OCaml,
not even test if it is null. Also, there does not seem to be a C or
OCaml API to test if there is an initializer. So this diff changes
Llvm.global_initializer to return an option.

Differential Revision: https://reviews.llvm.org/D65195
Reviewed by: whitequark
Authored by: kren1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373299 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Select s1 src G_SITOFP/G_UITOFP
Matt Arsenault [Tue, 1 Oct 2019 02:23:20 +0000 (02:23 +0000)]
AMDGPU/GlobalISel: Select s1 src G_SITOFP/G_UITOFP

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373298 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRemove a undefined constructor introduced by r373244.
Yuanfang Chen [Tue, 1 Oct 2019 02:08:14 +0000 (02:08 +0000)]
Remove a undefined constructor introduced by r373244.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373297 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Add support for init.exec intrinsics
Matt Arsenault [Tue, 1 Oct 2019 02:07:25 +0000 (02:07 +0000)]
AMDGPU/GlobalISel: Add support for init.exec intrinsics

TThe existing wave32 behavior seems broken and incomplete, but this
reproduces it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373296 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Allow scc/vcc alternative mappings for s1 constants
Matt Arsenault [Tue, 1 Oct 2019 02:07:19 +0000 (02:07 +0000)]
AMDGPU/GlobalISel: Allow scc/vcc alternative mappings for s1 constants

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373295 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoGlobalISel: Handle llvm.read_register
Matt Arsenault [Tue, 1 Oct 2019 02:07:16 +0000 (02:07 +0000)]
GlobalISel: Handle llvm.read_register

SelectionDAG has a bunch of machinery to defer this to selection time
for some reason. Just directly emit a copy during IRTranslator. The
x86 usage does somewhat questionably check hasFP, which could depend
on the whole function being at minimum translated.

This does lose the convergent bit if the callsite had it, which may be
a problem. We also lose that in general for intrinsics, which may also
be a problem.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373294 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Avoid creating shift of 0 in arg lowering
Matt Arsenault [Tue, 1 Oct 2019 01:44:46 +0000 (01:44 +0000)]
AMDGPU/GlobalISel: Avoid creating shift of 0 in arg lowering

This is sort of papering over the fact that we don't run a combiner
anywhere, but avoiding creating 2 instructions in the first place is
easy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373293 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTLI: Remove DAG argument from getRegisterByName
Matt Arsenault [Tue, 1 Oct 2019 01:44:39 +0000 (01:44 +0000)]
TLI: Remove DAG argument from getRegisterByName

Replace with the MachineFunction. X86 is the only user, and only uses
it for the function. This removes one obstacle from using this in
GlobalISel. The other is the more tolerable EVT argument.

The X86 use of the function seems questionable to me. It checks hasFP,
before frame lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373292 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-readobj/llvm-readelf] Delete --arm-attributes (alias for --arch-specific)
Fangrui Song [Tue, 1 Oct 2019 01:31:15 +0000 (01:31 +0000)]
[llvm-readobj/llvm-readelf] Delete --arm-attributes (alias for --arch-specific)

D68110 added --arch-specific (supported by GNU readelf) and made
--arm-attributes an alias for it. The tests were later migrated to use
--arch-specific.

Note, llvm-readelf --arch-specific currently just uses llvm-readobj
style output for ARM attributes. The readelf-style output is not
implemented.

Reviewed By: compnerd, kongyi, rupprecht

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373291 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add test case to show missed opportunity to shrink a constant index to a gather...
Craig Topper [Tue, 1 Oct 2019 01:27:52 +0000 (01:27 +0000)]
[X86] Add test case to show missed opportunity to shrink a constant index to a gather in order to avoid splitting.

Also add a test case for an index that could be shrunk, but
would create a narrow type. We can go ahead and do it we just
need to be before type legalization.

Similar test cases for scatter as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373290 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Select G_UADDO/G_USUBO
Matt Arsenault [Tue, 1 Oct 2019 01:23:13 +0000 (01:23 +0000)]
AMDGPU/GlobalISel: Select G_UADDO/G_USUBO

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373288 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoGlobalISel: Implement widenScalar for G_SITOFP/G_UITOFP sources
Matt Arsenault [Tue, 1 Oct 2019 01:06:48 +0000 (01:06 +0000)]
GlobalISel: Implement widenScalar for G_SITOFP/G_UITOFP sources

Legalize 16-bit G_SITOFP/G_UITOFP for AMDGPU.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373287 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Legalize G_GLOBAL_VALUE
Matt Arsenault [Tue, 1 Oct 2019 01:06:43 +0000 (01:06 +0000)]
AMDGPU/GlobalISel: Legalize G_GLOBAL_VALUE

Handle other cases besides LDS. Mostly a straight port of the existing
handling, without the intermediate custom nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373286 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoDebugInfo: Add parsing support for debug_loc base address specifiers
David Blaikie [Tue, 1 Oct 2019 00:29:13 +0000 (00:29 +0000)]
DebugInfo: Add parsing support for debug_loc base address specifiers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373278 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SimplifyLibCalls] Define the value of the Euler number
Evandro Menezes [Mon, 30 Sep 2019 23:21:02 +0000 (23:21 +0000)]
[SimplifyLibCalls] Define the value of the Euler number

This patch fixes the build break on Windows hosts.

There must be a better way of accessing the equivalent POSIX math constant
`M_E`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373274 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoDebugInfo: Simplify section label caching/usage
David Blaikie [Mon, 30 Sep 2019 23:19:10 +0000 (23:19 +0000)]
DebugInfo: Simplify section label caching/usage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373273 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd partial bswap test to the X86 backend. NFC
Amaury Sechet [Mon, 30 Sep 2019 22:52:28 +0000 (22:52 +0000)]
Add partial bswap test to the X86 backend. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373271 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DAGCombiner] Clang format MatchRotate. NFC
Amaury Sechet [Mon, 30 Sep 2019 21:41:52 +0000 (21:41 +0000)]
[DAGCombiner] Clang format MatchRotate. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373269 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRemove else-after-return
David Blaikie [Mon, 30 Sep 2019 21:02:06 +0000 (21:02 +0000)]
Remove else-after-return

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373266 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[bugpoint] Update runPasses to take ArrayRef instead of a pointer (NFC)
Florian Hahn [Mon, 30 Sep 2019 21:00:50 +0000 (21:00 +0000)]
[bugpoint] Update runPasses to take ArrayRef instead of a pointer (NFC)

This makes it slightly easier to pass extra arguments to runPasses
and simplifies the code slightly.

Reviewers: efriedma, bogner, dblaikie, diegotf, hiraditya

Reviewed By: dblaikie, hiraditya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373265 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[globalisel][knownbits] Allow targets to call GISelKnownBits::computeKnownBitsImpl()
Daniel Sanders [Mon, 30 Sep 2019 20:55:53 +0000 (20:55 +0000)]
[globalisel][knownbits] Allow targets to call GISelKnownBits::computeKnownBitsImpl()

Summary:
It seems we missed that the target hook can't query the known-bits for the
inputs to a target instruction. Fix that oversight

Reviewers: aditya_nandakumar

Subscribers: rovka, hiraditya, volkan, Petar.Avramovic, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373264 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ConstantFolding] Fold constant calls to log2()
Evandro Menezes [Mon, 30 Sep 2019 20:53:23 +0000 (20:53 +0000)]
[ConstantFolding] Fold constant calls to log2()

Somehow, folding calls to `log2()` with a constant was missing.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373262 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] Expand the simplification of log()
Evandro Menezes [Mon, 30 Sep 2019 20:52:21 +0000 (20:52 +0000)]
[InstCombine] Expand the simplification of log()

Expand the simplification of special cases of `log()` to include `log2()`
and `log10()` as well as intrinsics and more types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373261 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DAGCombiner] Update MatchRotate so that it returns an SDValue. NFC
Amaury Sechet [Mon, 30 Sep 2019 20:47:23 +0000 (20:47 +0000)]
[DAGCombiner] Update MatchRotate so that it returns an SDValue. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373260 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LegacyPassManager] Deprecate the BasicBlockPass/Manager.
Alina Sbirlea [Mon, 30 Sep 2019 20:17:23 +0000 (20:17 +0000)]
[LegacyPassManager] Deprecate the BasicBlockPass/Manager.

Summary:
The BasicBlockManager is potentially broken and should not be used.
Replace all uses of the BasicBlockPass with a FunctionBlockPass+loop on
blocks.

Reviewers: chandlerc

Subscribers: jholewinski, sanjoy.google, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373254 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agobuild: serialise `LLVM_ENABLE_UNWIND_TABLES` into LLVMConfig
Saleem Abdulrasool [Mon, 30 Sep 2019 20:03:59 +0000 (20:03 +0000)]
build: serialise `LLVM_ENABLE_UNWIND_TABLES` into LLVMConfig

Serialize the value of the configuration option into the configuration so that
builds which integrate LLVM can identify the value of the flag that was used to
build the libraries.  This is intended to be used by Swift to control tests
which rely on the unwind information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373253 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FunctionAttrs] Added noalias for memccpy/mempcpy arguments
David Bolvansky [Mon, 30 Sep 2019 19:43:48 +0000 (19:43 +0000)]
[FunctionAttrs] Added noalias for memccpy/mempcpy arguments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373251 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine][NFC] visitShl(): call SimplifyQuery::getWithInstruction() once
Roman Lebedev [Mon, 30 Sep 2019 19:16:00 +0000 (19:16 +0000)]
[InstCombine][NFC] visitShl(): call SimplifyQuery::getWithInstruction() once

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373249 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][InstCombine] Redundant-left-shift-input-masking: add some more undef tests
Roman Lebedev [Mon, 30 Sep 2019 19:15:51 +0000 (19:15 +0000)]
[NFC][InstCombine] Redundant-left-shift-input-masking: add some more undef tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373248 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Mask off upper bits of splat element in LowerBUILD_VECTORvXi1 when forming...
Craig Topper [Mon, 30 Sep 2019 18:43:44 +0000 (18:43 +0000)]
[X86] Mask off upper bits of splat element in LowerBUILD_VECTORvXi1 when forming a SELECT.

The i1 scalar would have been type legalized to i8, but that
doesn't guarantee anything about the upper bits. If we're going
to use it as condition we need to make sure the upper bits are 0.

I've special cased ISD::SETCC conditions since that should
guarantee zero upper bits. We could go further and use
computeKnownBits, but we have no tests that would need that.

Fixes PR43507.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373246 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Address post-commit review from code I accidentally commited in r373136.
Craig Topper [Mon, 30 Sep 2019 18:43:27 +0000 (18:43 +0000)]
[X86] Address post-commit review from code I accidentally commited in r373136.

See https://reviews.llvm.org/D68167

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373245 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix build warning for r373240.
Yuanfang Chen [Mon, 30 Sep 2019 18:32:38 +0000 (18:32 +0000)]
Fix build warning for r373240.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373244 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[MC] Emit unused undefined symbol even if its binding is not set"
Nico Weber [Mon, 30 Sep 2019 18:13:48 +0000 (18:13 +0000)]
Revert "[MC] Emit unused undefined symbol even if its binding is not set"

This reverts r373168. It caused PR43511.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373242 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[PGO] Don't group COMDAT variables for compiler generated profile variables in ELF
Rong Xu [Mon, 30 Sep 2019 18:11:22 +0000 (18:11 +0000)]
[PGO] Don't group COMDAT variables for compiler generated profile variables in ELF

With this patch, compiler generated profile variables will have its own COMDAT
name for ELF format, which syncs the behavior with COFF. Tested with clang
PGO bootstrap. This shows a modest reduction in object sizes in ELF format.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373241 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NewPM] Port MachineModuleInfo to the new pass manager.
Yuanfang Chen [Mon, 30 Sep 2019 17:54:50 +0000 (17:54 +0000)]
[NewPM] Port MachineModuleInfo to the new pass manager.

Existing clients are converted to use MachineModuleInfoWrapperPass. The
new interface is for defining a new pass manager API in CodeGen.

Reviewers: fedor.sergeev, philip.pfaffe, chandlerc, arsenm

Reviewed By: arsenm, fedor.sergeev

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373240 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MCA] Use references to LSUnitBase in class Scheduler and add helper methods to acqui...
Andrea Di Biagio [Mon, 30 Sep 2019 17:24:25 +0000 (17:24 +0000)]
[MCA] Use references to LSUnitBase in class Scheduler and add helper methods to acquire/release LS queue entries. NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373236 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LegacyPassManager] Attempt to fix BasicBlockManager
Alina Sbirlea [Mon, 30 Sep 2019 17:23:49 +0000 (17:23 +0000)]
[LegacyPassManager] Attempt to fix BasicBlockManager

Temporarily fix BaiscBlockManager based on the code in the other
managers.
Replacement of all uses of the BasicBlockPass to follow.

Resolves PR42264.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373235 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add ANY_EXTEND to switch in ReplaceNodeResults, but just fall back to default...
Craig Topper [Mon, 30 Sep 2019 17:14:22 +0000 (17:14 +0000)]
[X86] Add ANY_EXTEND to switch in ReplaceNodeResults, but just fall back to default handling.

ANY_EXTEND of v8i8 is marked Custom on AVX512 for handling extends
from v8i8. But the type legalization infrastructure will call
ReplaceNodeResults for v8i8 results. We should just defer it the
default handling instead of asserting in the default of the switch.

Fixes PR43509.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373234 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][SVE] Implement punpk[hi|lo] intrinsics
Kerry McLaughlin [Mon, 30 Sep 2019 17:10:21 +0000 (17:10 +0000)]
[AArch64][SVE] Implement punpk[hi|lo] intrinsics

Summary:
Adds the following two intrinsics:
  - int_aarch64_sve_punpkhi
  - int_aarch64_sve_punpklo

This patch also contains a fix which allows LLVMHalfElementsVectorType
to forward reference overloadable arguments.

Reviewers: sdesmalen, rovka, rengolin

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, greened, cfe-commits, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373232 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[EarlyCSE] Pass preserves AA.
Alina Sbirlea [Mon, 30 Sep 2019 17:08:40 +0000 (17:08 +0000)]
[EarlyCSE] Pass preserves AA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373231 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] fold negate disguised as select+mul
Sanjay Patel [Mon, 30 Sep 2019 17:02:26 +0000 (17:02 +0000)]
[InstCombine] fold negate disguised as select+mul

  Name: negate if true
  %sel = select i1 %cond, i32 -1, i32 1
  %r = mul i32 %sel, %x
  =>
  %m = sub i32 0, %x
  %r = select i1 %cond, i32 %m, i32 %x

  Name: negate if false
  %sel = select i1 %cond, i32 1, i32 -1
  %r = mul i32 %sel, %x
  =>
  %m = sub i32 0, %x
  %r = select i1 %cond, i32 %x, i32 %m

https://rise4fun.com/Alive/Nlh

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373230 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix doc for t inline asm constraints for ARM/Thumb
Pablo Barrio [Mon, 30 Sep 2019 16:55:10 +0000 (16:55 +0000)]
Fix doc for t inline asm constraints for ARM/Thumb

Summary: The constraint goes up to regs d15 and q7, not d16 and q8.

Subscribers: kristof.beyls, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373228 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][GlobalISel] Support lowering variadic musttail calls
Jessica Paquette [Mon, 30 Sep 2019 16:49:13 +0000 (16:49 +0000)]
[AArch64][GlobalISel] Support lowering variadic musttail calls

This adds support for lowering variadic musttail calls. To do this, we have
to...

- Detect a musttail call in a variadic function before attempting to lower the
  call's formal arguments. This is done in the IRTranslator.
- Compute forwarded registers in `lowerFormalArguments`, and add copies for
  those registers.
- Restore the forwarded registers in `lowerTailCall`.

Because there doesn't seem to be any nice way to wrap these up into the outgoing
argument handler, the restore code in `lowerTailCall` is done separately.

Also, irritatingly, you have to make sure that the registers don't overlap with
any passed parameters. Otherwise, the scheduler doesn't know what to do with the
extra copies and asserts.

Add call-translator-variadic-musttail.ll to test this. This is pretty much the
same as the X86 musttail-varargs.ll test. We didn't have as nice of a test to
base this off of, but the idea is the same.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373226 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[mips] Fix code indentation. NFC
Simon Atanasyan [Mon, 30 Sep 2019 16:47:21 +0000 (16:47 +0000)]
[mips] Fix code indentation. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373225 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd tests for rotate with demanded bits. NFC
Amaury Sechet [Mon, 30 Sep 2019 16:26:09 +0000 (16:26 +0000)]
Add tests for rotate with demanded bits. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373223 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for negate disguised as mul; NFC
Sanjay Patel [Mon, 30 Sep 2019 15:43:27 +0000 (15:43 +0000)]
[InstCombine] add tests for negate disguised as mul; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373222 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago [AMDGPU] SIFoldOperands should not fold register acrocc the EXEC definition
Alexander Timofeev [Mon, 30 Sep 2019 15:31:17 +0000 (15:31 +0000)]
   [AMDGPU] SIFoldOperands should not fold register acrocc the EXEC definition

      Reviewers: rampitec

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373221 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SSP] [3/3] cmpxchg and addrspacecast instructions can now
Paul Robinson [Mon, 30 Sep 2019 15:11:23 +0000 (15:11 +0000)]
[SSP] [3/3] cmpxchg and addrspacecast instructions can now
trigger stack protectors.  Fixes PR42238.

Add test coverage for llvm.memset, as proxy for all llvm.mem*
intrinsics. There are two issues here: (1) they could be lowered to a
libc call, which could be intercepted, and do Bad Stuff; (2) with a
non-constant size, they could overwrite the current stack frame.

The test was mostly written by Matt Arsenault in r363169, which was
later reverted; I tweaked what he had and added the llvm.memset part.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373220 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SSP] [2/3] Refactor an if/dyn_cast chain to switch on opcode. NFC
Paul Robinson [Mon, 30 Sep 2019 15:08:38 +0000 (15:08 +0000)]
[SSP] [2/3] Refactor an if/dyn_cast chain to switch on opcode. NFC

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373219 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SSP] [1/3] Revert "StackProtector: Use PointerMayBeCaptured"
Paul Robinson [Mon, 30 Sep 2019 15:01:35 +0000 (15:01 +0000)]
[SSP] [1/3] Revert "StackProtector: Use PointerMayBeCaptured"
"Captured" and "relevant to Stack Protector" are not the same thing.

This reverts commit f29366b1f594f48465c5a2754bcffac6d70fd0b1.
aka r363169.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373216 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix breakage of sphinx builders. Sorry for leaving this broken over the
Kevin P. Neal [Mon, 30 Sep 2019 14:51:59 +0000 (14:51 +0000)]
Fix breakage of sphinx builders. Sorry for leaving this broken over the
weekend!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373215 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSupport MemoryLocation::UnknownSize in TargetLowering::IntrinsicInfo
Tamas Berghammer [Mon, 30 Sep 2019 14:44:24 +0000 (14:44 +0000)]
Support MemoryLocation::UnknownSize in TargetLowering::IntrinsicInfo

Summary:
Previously IntrinsicInfo::size was an unsigned what can't represent the
64 bit value used by MemoryLocation::UnknownSize.

Reviewers: jmolloy

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373214 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FileCheck] Remove implementation types from API
Thomas Preud'homme [Mon, 30 Sep 2019 14:12:03 +0000 (14:12 +0000)]
[FileCheck] Remove implementation types from API

Summary:
Remove use of FileCheckPatternContext and FileCheckString concrete types
from FileCheck API to allow moving it and the other implementation only
only declarations into a private header file.

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373211 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis][NFC] Move BenchmarkFailure to own file.
Clement Courbet [Mon, 30 Sep 2019 13:53:50 +0000 (13:53 +0000)]
[llvm-exegesis][NFC] Move BenchmarkFailure to own file.

Summary: And rename to exegesis::Failure, as it's used everytwhere.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373209 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)
Guillaume Chatelet [Mon, 30 Sep 2019 13:34:44 +0000 (13:34 +0000)]
[Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, arsenm, jvesely, nhaehnle, eraman, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373207 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ConstantRange] add helper function addWithNoWrap().
Chen Zheng [Mon, 30 Sep 2019 12:57:53 +0000 (12:57 +0000)]
[ConstantRange] add helper function addWithNoWrap().
Differential Revision: https://reviews.llvm.org/D67339

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373205 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r373202
GN Sync Bot [Mon, 30 Sep 2019 12:57:04 +0000 (12:57 +0000)]
gn build: Merge r373202

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373204 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-exegesis][NFC] Refactor snippet file reading out of tool main.
Clement Courbet [Mon, 30 Sep 2019 12:50:25 +0000 (12:50 +0000)]
[llvm-exegesis][NFC] Refactor snippet file reading out of tool main.

Summary: Add unit tests.

Reviewers: gchatelet

Subscribers: mgorny, tschuett, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373202 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "Reland "[utils] Implement the llvm-locstats tool""
Djordje Todorovic [Mon, 30 Sep 2019 11:19:11 +0000 (11:19 +0000)]
Revert "Reland "[utils] Implement the llvm-locstats tool""

This reverts commit rL373183.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373200 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] Adding a max function.
Guillaume Chatelet [Mon, 30 Sep 2019 09:59:31 +0000 (09:59 +0000)]
[Alignment][NFC] Adding a max function.

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373196 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Alignment][NFC] Remove LoadInst::setAlignment(unsigned)
Guillaume Chatelet [Mon, 30 Sep 2019 09:37:05 +0000 (09:37 +0000)]
[Alignment][NFC] Remove LoadInst::setAlignment(unsigned)

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, jdoerfert

Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373195 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][ARM][MVE] More tests
Sam Parker [Mon, 30 Sep 2019 08:49:42 +0000 (08:49 +0000)]
[NFC][ARM][MVE] More tests

Add some loop tests that cover different float operations and types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373192 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoNFC changes to SelectionDAGBuilder::visitBitTestHeader(), preparing for PR43129
Hans Wennborg [Mon, 30 Sep 2019 08:47:53 +0000 (08:47 +0000)]
NFC changes to SelectionDAGBuilder::visitBitTestHeader(), preparing for PR43129

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373191 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoPre-commit a test case for PR43129.
Hans Wennborg [Mon, 30 Sep 2019 08:47:46 +0000 (08:47 +0000)]
Pre-commit a test case for PR43129.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373190 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-locstats] Fix the test for the Hexagon target
Djordje Todorovic [Mon, 30 Sep 2019 08:43:00 +0000 (08:43 +0000)]
[llvm-locstats] Fix the test for the Hexagon target

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373189 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][MVE] Change VCTP operand
Sam Parker [Mon, 30 Sep 2019 08:03:23 +0000 (08:03 +0000)]
[ARM][MVE] Change VCTP operand

The VCTP instruction will calculate the predicate masked based upon
the number of elements that need to be processed. I had inserted the
sub before the vctp intrinsic and supplied it as the operand, but
this is incorrect as the phi should directly feed the vctp. The sub
is calculating the value for the next iteration.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373188 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TargetLowering] Simplify expansion of S{ADD,SUB}O
Roger Ferrer Ibanez [Mon, 30 Sep 2019 07:58:50 +0000 (07:58 +0000)]
[TargetLowering] Simplify expansion of S{ADD,SUB}O

ISD::SADDO uses the suggested sequence described in the section ยง2.4 of
the RISCV Spec v2.2. ISD::SSUBO uses the dual approach but checking for
(non-zero) positive.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373187 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][CGP] Allow signext arguments
Sam Parker [Mon, 30 Sep 2019 07:52:10 +0000 (07:52 +0000)]
[ARM][CGP] Allow signext arguments

As we perform a zext on any arguments used in the promoted tree, it
doesn't matter if they're marked as signext. The only permitted
user(s) in the tree which would interpret the sign bits are signed
icmps. For these instructions, their promoted operands are truncated
before the icmp uses them.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373186 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[SCEV] add no wrap flag for SCEVAddExpr."
Tim Northover [Mon, 30 Sep 2019 07:46:52 +0000 (07:46 +0000)]
Revert "[SCEV] add no wrap flag for SCEVAddExpr."

This reverts r366419 because the analysis performed is within the context of
the loop and it's only valid to add wrapping flags to "global" expressions if
they're always correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373184 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReland "[utils] Implement the llvm-locstats tool"
Djordje Todorovic [Mon, 30 Sep 2019 07:35:17 +0000 (07:35 +0000)]
Reland "[utils] Implement the llvm-locstats tool"

The tool reports verbose output for the DWARF debug location coverage.
The llvm-locstats for each variable or formal parameter DIE computes what
percentage from the code section bytes, where it is in scope, it has
location description. The line 0 shows the number (and the percentage) of
DIEs with no location information, but the line 100 shows the number (and
the percentage) of DIEs where there is location information in all code
section bytes (where the variable or parameter is in the scope). The line
50..59 shows the number (and the percentage) of DIEs where the location
information is in between 50 and 59 percentage of its scope covered.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373183 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SystemZ] Add SystemZPostRewrite in addPostRegAlloc() instead at -O0.
Jonas Paulsson [Mon, 30 Sep 2019 07:29:54 +0000 (07:29 +0000)]
[SystemZ]  Add SystemZPostRewrite in addPostRegAlloc() instead at -O0.

SystemZPostRewrite needs to be run before (it may emit COPYs) the Post-RA
pseudo pass also at -O0, so it should be added in addPostRegAlloc().

Review: Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373182 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove some redundant isel patterns. NFCI
Craig Topper [Mon, 30 Sep 2019 06:47:03 +0000 (06:47 +0000)]
[X86] Remove some redundant isel patterns. NFCI

These are all also implemented in avx512_logical_lowering_types
with support for masking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373181 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU/GlobalISel: Fix select for v2s16 and/or/xor
Matt Arsenault [Mon, 30 Sep 2019 06:31:30 +0000 (06:31 +0000)]
AMDGPU/GlobalISel: Fix select for v2s16 and/or/xor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373180 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[test] Change llvm-readobj --arm-attributes to --arch-specific after r373125
Fangrui Song [Mon, 30 Sep 2019 04:45:14 +0000 (04:45 +0000)]
[test] Change llvm-readobj --arm-attributes to --arch-specific after r373125

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373179 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Split v16i32/v8i64 bitreverse on avx512f targets without avx512bw to enable...
Craig Topper [Mon, 30 Sep 2019 03:14:38 +0000 (03:14 +0000)]
[X86] Split v16i32/v8i64 bitreverse on avx512f targets without avx512bw to enable the use of vpshufb on the 256-bit halves.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373177 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoUndef the macros after their use
Aditya Kumar [Mon, 30 Sep 2019 02:46:56 +0000 (02:46 +0000)]
Undef the macros after their use

Summary:

Reviewers:
t.p.northover

Subscribers:

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373176 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r373174
Fangrui Song [Mon, 30 Sep 2019 02:06:23 +0000 (02:06 +0000)]
[X86] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after r373174

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373175 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove -x86-experimental-vector-widening-legalization command line flag
Craig Topper [Sun, 29 Sep 2019 23:32:37 +0000 (23:32 +0000)]
[X86] Remove -x86-experimental-vector-widening-legalization command line flag

This was added back to allow some performance regressions to be
investigated. The main perf issue was fixed shortly after adding
this back and no other major issues have been reported. So I
think its safe to remove this again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373174 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops.
Craig Topper [Sun, 29 Sep 2019 18:43:08 +0000 (18:43 +0000)]
[X86] Add custom isel logic to match VPTERNLOG from 2 logic ops.

There's room from improvement here, but this is a decent
starting point.

There are a few minor regressions in the vector-rotate tests,
where we are now forming a vpternlog from an and before we get
a chance to form it for a bitselect that we were matching
previously. This results in an AND and an ANDN feeding the
vpternlog where previously we just had an AND after the
vpternlog. I think we can probably DAG combine the AND with
the bitselect to get back to similar codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373172 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd test case peeking through vector concat when combining insert into shuffles. NFC
Amaury Sechet [Sun, 29 Sep 2019 17:54:03 +0000 (17:54 +0000)]
Add test case peeking through vector concat when combining insert into shuffles. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373171 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM-C][Ocaml] Add MergeFunctions and DCE pass
Aditya Kumar [Sun, 29 Sep 2019 16:06:22 +0000 (16:06 +0000)]
[LLVM-C][Ocaml] Add MergeFunctions and DCE pass

MergeFunctions and DCE pass are missing from OCaml/C-api. This patch
adds them.

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

Reviewers: whitequark, hiraditya, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

Tags: #llvm

Authored by: kren1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373170 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Moves article links to new pages
DeForest Richards [Sun, 29 Sep 2019 15:31:52 +0000 (15:31 +0000)]
[Docs] Moves article links to new pages

Moves existing article links on the Programming, Subsystem, and Reference documentation pages to new locations. Also moves Github Repository and Publications links to the sidebar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373169 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MC] Emit unused undefined symbol even if its binding is not set
Fangrui Song [Sun, 29 Sep 2019 15:26:12 +0000 (15:26 +0000)]
[MC] Emit unused undefined symbol even if its binding is not set

For the following two cases, we currently suppress the symbols. This
patch emits them (compatible with GNU as).

* `test2_a = undef`: if `undef` is otherwise unused.
* `.hidden hidden`: if `hidden` is unused. This is the main point of the
  patch, because omitting the symbol would cause a linker semantic
  difference.

It causes a behavior change that is not compatible with GNU as:

.weakref foo1, bar1

When neither foo1 nor bar1 is used, we now emit bar1, which is arguably
more consistent.

Another change is that we will emit .TOC. for .TOC.@tocbase .  For this
directive, suppressing .TOC. can be seen as a size optimization, but we
choose to drop it for simplicity and consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373168 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs] Don't assert that we won't ever get expanded-form rem pairs in differen...
Roman Lebedev [Sun, 29 Sep 2019 15:25:24 +0000 (15:25 +0000)]
[DivRemPairs] Don't assert that we won't ever get expanded-form rem pairs in different BB's (PR43500)

If we happen to have the same div in two basic blocks,
and in one of those we also happen to have the rem part,
we'd match the div-rem pair, but the wrong ones.
So let's drop overly-ambiguous assert.

Fixes https://bugs.llvm.org/show_bug.cgi?id=43500

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373167 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAdd...
Alexey Bataev [Sun, 29 Sep 2019 14:18:06 +0000 (14:18 +0000)]
[SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")

Initially SLP vectorizer replaced all going-to-be-vectorized
instructions with Undef values. It may break ScalarEvaluation and may
cause a crash.
Reworked SLP vectorizer so that it does not replace vectorized
instructions by UndefValue anymore. Instead vectorized instructions are
marked for deletion inside if BoUpSLP class and deleted upon class
destruction.

Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel

Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373166 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[PowerPC] Fix conditions of assert in PPCAsmPrinter
Jinsong Ji [Sun, 29 Sep 2019 12:43:46 +0000 (12:43 +0000)]
[PowerPC] Fix conditions of assert in PPCAsmPrinter

Summary:
g++ build emits warning:

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:667:77: error: suggest parentheses around ?&&? within ?||? [-Werror=parentheses]
     assert(MO.isGlobal() || MO.isCPI() || MO.isJTI() || MO.isBlockAddress() &&
                                                         ~~~~~~~~~~~~~~~~~~~~^~
            "Unexpected operand type for LWZtoc pseudo.");

I believe the intension is to assert all different types,
so we should add a parentheses to include all '||'.

Reviewers: #powerpc, sfertile, hubert.reinterpretcast, Xiangling_L

Reviewed By: Xiangling_L

Subscribers: wuzish, nemanjai, hiraditya, kbarton, MaskRay, shchenz, steven.zhang, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373164 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM] Cortex-M4 schedule additions
David Green [Sun, 29 Sep 2019 08:38:48 +0000 (08:38 +0000)]
[ARM] Cortex-M4 schedule additions

This is an attempt to fill in some of the missing instructions from the
Cortex-M4 schedule, and make it easier to do the same for other ARM cpus.

- Some instructions are marked as hasNoSchedulingInfo as they are pseudos or
  otherwise do not require scheduling info
- A lot of features have been marked not supported
- Some WriteRes's have been added for cvt instructions.
- Some extra instruction latencies have been added, notably by relaxing the
  regex for dsp instruction to catch more cases, and some fp instructions.

This goes a long way to get the CompleteModel working for this CPU. It does not
go far enough as to get all scheduling info for all output operands correct.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373163 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Adds sections for Command Line and LibFuzzer articles
DeForest Richards [Sun, 29 Sep 2019 02:16:38 +0000 (02:16 +0000)]
[Docs] Adds sections for Command Line and LibFuzzer articles

Adds sections for Command Line and Libfuzzer articles on Programming Documentation page.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373158 91177308-0d34-0410-b5e6-96231b3b80d8