]> granicus.if.org Git - llvm/log
llvm
6 years agoRevert "AMDGPU/NFC: Cleanup subtarget predicates"
Konstantin Zhuravlyov [Fri, 22 Feb 2019 23:21:06 +0000 (23:21 +0000)]
Revert "AMDGPU/NFC: Cleanup subtarget predicates"

It breaks one of our downstream merges, so revert it
temporarily while investigating failures downstream

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

6 years ago[CGP] add tests for uaddo increment/decrement; NFC
Sanjay Patel [Fri, 22 Feb 2019 23:19:34 +0000 (23:19 +0000)]
[CGP] add tests for uaddo increment/decrement; NFC

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

6 years ago[WebAssembly] Remove unneeded MCSymbolRefExpr variants
Sam Clegg [Fri, 22 Feb 2019 22:29:34 +0000 (22:29 +0000)]
[WebAssembly] Remove unneeded MCSymbolRefExpr variants

We record the type of the symbol (event/function/data/global) in the
MCWasmSymbol and so it should always be clear how to handle a relocation
based on the symbol itself.

The exception is a function which still needs the special @TYPEINDEX
then the relocation contains the signature rather than the address
of the functions.

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

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

6 years ago[WebAssembly] MC: Handle aliases of aliases
Sam Clegg [Fri, 22 Feb 2019 21:41:42 +0000 (21:41 +0000)]
[WebAssembly] MC: Handle aliases of aliases

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

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

6 years ago[CMake] Honor LLVM_EXTERNAL_<proj>_SOURCE_DIR
David Greene [Fri, 22 Feb 2019 21:19:48 +0000 (21:19 +0000)]
[CMake] Honor LLVM_EXTERNAL_<proj>_SOURCE_DIR

When LLVM_ENABLE_PROJECTS is set, CMake assumes the project
directories are all side-by-side. This is not always the case and
there's no reason to expect it if LLVM_EXTERNAL_<proj>_SOURCE_DIR is
set. Honor that setting if it exists and allow the build configuration
to continue.

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

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

6 years agoRestore ability for C++ API users to Enable IPRA.
Daniel Sanders [Fri, 22 Feb 2019 20:59:07 +0000 (20:59 +0000)]
Restore ability for C++ API users to Enable IPRA.

Summary:
Prior to r310876 one of our out-of-tree targets was enabling IPRA by modifying
the TargetOptions::EnableIPRA. This no longer works on current trunk since the
useIPRA() hook overrides any values that are set in advance. This patch adjusts
the behaviour of the hook so that API users and useIPRA() can both enable it
but useIPRA() cannot disable it if the API user already enabled it.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: wdng, mgorny, llvm-commits

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

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

6 years ago[CGP] move overflow intrinsic insertion to common location; NFCI
Sanjay Patel [Fri, 22 Feb 2019 20:20:24 +0000 (20:20 +0000)]
[CGP] move overflow intrinsic insertion to common location; NFCI

We need to enhance the uaddo matching to handle special-cases
as seen in PR40486 and PR31754. That means we won't necessarily
have a def-use pattern, so we'll need to check dominance to
determine where to place the intrinsic (as we already do for
usubo). This preliminary patch is just rearranging the code,
so the planned follow-up to improve uaddo will be more clear.

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

6 years agoMIR: Preserve incoming frame index numbers
Matt Arsenault [Fri, 22 Feb 2019 19:30:38 +0000 (19:30 +0000)]
MIR: Preserve incoming frame index numbers

Don't skip incrementing the frame index number
if the object is dead. Instructions can still be
referencing the old frame index number, and this
doesn't attempt to remap those. The resulting
MIR then fails to load because the use instructions
use a higher frame index number than recorded
list of stack objects.

I'm not sure it's possible to craft a testcase
with the existing set of passes. It requires
selectively marking some stack objects
dead in an essentially random order.
StackSlotColoring condenses towards
the low indexes. This avoids a regression in a
future AMDGPU commit when some frame indexes
are lowered separately from PEI.

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

6 years agoCodeGen: Make RegAllocRegistry a template class
Matt Arsenault [Fri, 22 Feb 2019 19:16:52 +0000 (19:16 +0000)]
CodeGen: Make RegAllocRegistry a template class

Will allow re-using the machinery for independent
sets of register allocators.

This will allow AMDGPU to use separate command line
options for the allocator to use for SGPRs separate
from VGPRs.

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

6 years agoAMDGPU: Use removeAllRegUnitsForPhysReg
Matt Arsenault [Fri, 22 Feb 2019 19:03:36 +0000 (19:03 +0000)]
AMDGPU: Use removeAllRegUnitsForPhysReg

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

6 years agoLiveIntervals: Add removeAllRegUnitsForPhysReg
Matt Arsenault [Fri, 22 Feb 2019 19:03:31 +0000 (19:03 +0000)]
LiveIntervals: Add removeAllRegUnitsForPhysReg

Convenience wrapper for removing the reg units of
a physical register.

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

6 years ago[WebAssembly] Remove debug statement submitted in rL354657
Sam Clegg [Fri, 22 Feb 2019 19:00:03 +0000 (19:00 +0000)]
[WebAssembly] Remove debug statement submitted in rL354657

Subscribers: dschuff, jgravelle-google, hiraditya, aheejin, sunfish, llvm-commits

Tags: #llvm

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

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

6 years ago[GN] Updated build file to allow GN builds to succeed at ToT.
Mitch Phillips [Fri, 22 Feb 2019 18:45:41 +0000 (18:45 +0000)]
[GN] Updated build file to allow GN builds to succeed at ToT.

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

6 years ago[MBP] Factor out function hasViableTopFallthrough and enhancement
Guozhi Wei [Fri, 22 Feb 2019 18:04:37 +0000 (18:04 +0000)]
[MBP] Factor out function hasViableTopFallthrough and enhancement

This patch factor out the function hasViableTopFallthrough from rotateLoop. It is also enhanced. Original code checks only if there is a block can be placed before current loop top. This patch also checks if the loop top is the most possible successor of its predecessor. The attached test case shows its effect.

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

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

6 years agoDisable big-endian constant store merges from rL354676.
Nirav Dave [Fri, 22 Feb 2019 16:20:34 +0000 (16:20 +0000)]
Disable big-endian constant store merges from rL354676.

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

6 years ago[DAGCombine] Fold overlapping constant stores
Nirav Dave [Fri, 22 Feb 2019 16:00:19 +0000 (16:00 +0000)]
[DAGCombine] Fold overlapping constant stores

Fold a smaller constant store into larger constant stores immediately
preceeding it.

Reviewers: rnk, courbet

Subscribers: javed.absar, hiraditya, llvm-commits

Tags: #llvm

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

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

6 years ago[x86] allow narrowing of vector UINT_TO_FP
Sanjay Patel [Fri, 22 Feb 2019 15:47:45 +0000 (15:47 +0000)]
[x86] allow narrowing of vector UINT_TO_FP

As discussed in:
D56864
D58197

Always use the narrow (128-bit) instruction when possible.
We already had the signed int version of this transform.

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

6 years ago[x86] simplify code in combineExtractSubvector; NFC
Sanjay Patel [Fri, 22 Feb 2019 15:28:22 +0000 (15:28 +0000)]
[x86] simplify code in combineExtractSubvector; NFC

Only the 1st fold is attempted pre-legalization, but it requires
legal (simple) types too, so we don't need an EVT in any of the code.

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

6 years agoBreakCriticalEdges: Update PostDominatorTree
Matt Arsenault [Fri, 22 Feb 2019 15:01:41 +0000 (15:01 +0000)]
BreakCriticalEdges: Update PostDominatorTree

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

6 years ago[mips][micromips] fix filling delay slots for PseudoIndirectBranch_MM
Petar Jovanovic [Fri, 22 Feb 2019 14:53:58 +0000 (14:53 +0000)]
[mips][micromips] fix filling delay slots for PseudoIndirectBranch_MM

Filling a delay slot in 32bit jump instructions with a 16bit instruction
can cause issues. According to the documentation such an operation is
unpredictable.
This patch adds opcode Mips::PseudoIndirectBranch_MM alongside
Mips::PseudoIndirectBranch and other instructions that are expanded to jr
instruction and do not allow a 16bit instruction in their delay slots.

Patch by Mirko Brkusanin.

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

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

6 years ago[LowerSwitch][AMDGPU] Do not handle impossible values
Roman Tereshin [Fri, 22 Feb 2019 14:33:46 +0000 (14:33 +0000)]
[LowerSwitch][AMDGPU] Do not handle impossible values

This patch adds LazyValueInfo to LowerSwitch to compute the range of the
value being switched over and reduce the size of the tree LowerSwitch
builds to lower a switch.

Reviewed By: arsenm

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

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

6 years ago[DTU] Refine the interface and logic of applyUpdates
Chijun Sima [Fri, 22 Feb 2019 13:48:38 +0000 (13:48 +0000)]
[DTU] Refine the interface and logic of applyUpdates

Summary:
This patch separates two semantics of `applyUpdates`:
1. User provides an accurate CFG diff and the dominator tree is updated according to the difference of `the number of edge insertions` and `the number of edge deletions` to infer the status of an edge before and after the update.
2. User provides a sequence of hints. Updates mentioned in this sequence might never happened and even duplicated.

Logic changes:

Previously, removing invalid updates is considered a side-effect of deduplication and is not guaranteed to be reliable. To handle the second semantic, `applyUpdates` does validity checking before deduplication, which can cause updates that have already been applied to be submitted again. Then, different calls to `applyUpdates` might cause unintended consequences, for example,
```
DTU(Lazy) and Edge A->B exists.
1. DTU.applyUpdates({{Delete, A, B}, {Insert, A, B}}) // User expects these 2 updates result in a no-op, but {Insert, A, B} is queued
2. Remove A->B
3. DTU.applyUpdates({{Delete, A, B}}) // DTU cancels this update with {Insert, A, B} mentioned above together (Unintended)
```
But by restricting the precondition that updates of an edge need to be strictly ordered as how CFG changes were made, we can infer the initial status of this edge to resolve this issue.

Interface changes:
The second semantic of `applyUpdates`  is separated to `applyUpdatesPermissive`.
These changes enable DTU(Lazy) to use the first semantic if needed, which is quite useful in `transforms/utils`.

Reviewers: kuhar, brzycki, dmgreen, grosser

Reviewed By: brzycki

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

6 years ago[ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs
David Green [Fri, 22 Feb 2019 12:23:31 +0000 (12:23 +0000)]
[ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs

This adds a number of missing Thumb1 opcodes so that the peephole optimiser can
remove redundant CMP instructions.

Reapplying this after the first attempt broke non-thumb1 code as the t2ADDri
instruction can be used with frame indices. In thumb1 we use tADDframe.

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

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

6 years ago[ARM GlobalISel] Support floating point for Thumb2
Diana Picus [Fri, 22 Feb 2019 09:54:54 +0000 (09:54 +0000)]
[ARM GlobalISel] Support floating point for Thumb2

This is exactly the same as arm mode, so for the instruction selector
tests we just extract them to a new file and run with the same checks
for both arm and thumb mode.

For the legalizer we need to update the tests for soft float a bit, but
only because BL and tBL are slightly different. We could be pedantic and
check that we get a well-formed BL for arm mode and a tBL for thumb, but
for the purposes of the legalizer test it's sufficient to just skip over
the predicate operands in the checks. Also note that we have the
pedantic checks in the divmod test, so we're covered.

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

6 years agoFix BB after r354661
George Rimar [Fri, 22 Feb 2019 08:58:23 +0000 (08:58 +0000)]
Fix BB after r354661

Update 2 test cases after obj2yaml fix in r354661.

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

6 years ago[obj2yaml] - Do not miss section index for special symbols.
George Rimar [Fri, 22 Feb 2019 08:45:21 +0000 (08:45 +0000)]
[obj2yaml] - Do not miss section index for special symbols.

This fixes https://bugs.llvm.org/show_bug.cgi?id=40786
("obj2yaml symbol output missing section index for SHN_ABS and SHN_COMMON symbols")

Since SHN_ABS and SHN_COMMON symbols are special, we should preserve
the st_shndx for them. The patch does this for them and the other special symbols.

The test case is based on the test provided by James Henderson at the bug page!

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

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

6 years ago[MemorySSA] Update test with minimized one. NFCI
Alina Sbirlea [Fri, 22 Feb 2019 07:34:54 +0000 (07:34 +0000)]
[MemorySSA] Update test with minimized one. NFCI

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

6 years ago[WebAssembly] Remove getBottom function from CFGStackify (NFC)
Heejin Ahn [Fri, 22 Feb 2019 07:19:30 +0000 (07:19 +0000)]
[WebAssembly] Remove getBottom function from CFGStackify (NFC)

Summary:
This removes `getBottom` function and the bookeeping map of <begin
marker instruction, bottom BB>.

Reviewers: dschuff

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

Tags: #llvm

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

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

6 years ago[MemorySSA & LoopPassManager] Resolve PR40038.
Alina Sbirlea [Fri, 22 Feb 2019 07:18:37 +0000 (07:18 +0000)]
[MemorySSA & LoopPassManager] Resolve PR40038.

The correct edge being deleted is not to the unswitched exit block, but to the
original block before it was split. That's the key in the map, not the
value.
The insert is correct. The new edge is to the .split block.

The splitting turns OriginalBB into:
OriginalBB -> OriginalBB.split.
Assuming the orignal CFG edge: ParentBB->OriginalBB, we must now delete
ParentBB->OriginalBB, not ParentBB->OriginalBB.split.

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

6 years ago[LegalizeVectorOps] Improve the placement of ANDs in the ExpandLoad path for non...
Craig Topper [Fri, 22 Feb 2019 07:03:25 +0000 (07:03 +0000)]
[LegalizeVectorOps] Improve the placement of ANDs in the ExpandLoad path for non-byte-sized loads.

When we need to merge two adjacent loads the AND mask for the low piece was still sized for the full src element size. But we didn't have that many bits. The upper bits are already zero due to the SRL. So we can skip the AND if we're going to combine with the high bits.

We do need an AND to clear out any bits from the high part. We were anding the high part before combining with the low part, but it looks like ANDing after the OR gets better results.

So we can just emit the final AND after the optional concatentation is done. That will handling skipping before the OR and get rid of extra high bits after the OR.

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

6 years ago[LegalizeVectorOps] Simplify the non-byte sized load handling VectorLegalizer::Expand...
Craig Topper [Fri, 22 Feb 2019 06:18:33 +0000 (06:18 +0000)]
[LegalizeVectorOps] Simplify the non-byte sized load handling VectorLegalizer::ExpandLoad. NFCI

Remove an if that should always be true. Merge the body of another into the only block that could make the if true.

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

6 years ago[X86] Add test cases to cover the path in VectorLegalizer::ExpandLoad for non-byte...
Craig Topper [Fri, 22 Feb 2019 06:18:32 +0000 (06:18 +0000)]
[X86] Add test cases to cover the path in VectorLegalizer::ExpandLoad for non-byte sized loads where bits from two loads need to be concatenated.

If the scalar type doesn't divide evenly into the WideVT then the code will need to take some bits from adjacent scalar loads and combine them.

But most of our testing is for i1 element type which always divides evenly.

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

6 years ago[DTU] Deprecate insertEdge*/deleteEdge*
Chijun Sima [Fri, 22 Feb 2019 05:41:43 +0000 (05:41 +0000)]
[DTU] Deprecate insertEdge*/deleteEdge*

Summary: This patch converts all existing `insertEdge*/deleteEdge*` to `applyUpdates` and marks `insertEdge*/deleteEdge*` as deprecated.

Reviewers: kuhar, brzycki

Reviewed By: kuhar, brzycki

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

6 years agoFix a think-o in the disable-kaleidoscope-tests-on-windows predicate of r354646.
Lang Hames [Fri, 22 Feb 2019 03:56:50 +0000 (03:56 +0000)]
Fix a think-o in the disable-kaleidoscope-tests-on-windows predicate of r354646.

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

6 years agoDAG: Add helper for creating shifts with correct type
Matt Arsenault [Fri, 22 Feb 2019 03:38:47 +0000 (03:38 +0000)]
DAG: Add helper for creating shifts with correct type

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

6 years ago[X86] Add a DAG combine for (aext_vector_inreg (aext_vector_inreg X)) -> (aext_vector...
Craig Topper [Fri, 22 Feb 2019 01:49:53 +0000 (01:49 +0000)]
[X86] Add a DAG combine for (aext_vector_inreg (aext_vector_inreg X)) -> (aext_vector_inreg X) to fix a regression from my previous commit.

Type legalization is causing two nodes to be created here, but we can use a single node to extend from v8i16 to v2i64.

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

6 years ago[LegalizeTypes] When promoting the result of EXTRACT_SUBVECTOR, also check if the...
Craig Topper [Fri, 22 Feb 2019 01:49:50 +0000 (01:49 +0000)]
[LegalizeTypes] When promoting the result of EXTRACT_SUBVECTOR, also check if the input needs to be promoted. Use that to determine the element type to extract.

Otherwise we end up creating extract_vector_elts that then each need to have their input promoted. This can lead to truncates needing to be emitted for each of those.

But we already emitted any_extends when we legalized the extract_subvector. So now we have pairs of any_extend+trunc that partially cancel. But depending on how DAGCombiner visits them we can get weird results.

By promoting the input at the same time we can create only a single any_extend or truncate.

There's one regression in the vector-narrow-binop.ll case, but that looks easy to fix with a follow up patch.

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

6 years agoAdd 'Windows' to the disabled platforms list for the Kaleidoscope tests.
Lang Hames [Fri, 22 Feb 2019 01:44:23 +0000 (01:44 +0000)]
Add 'Windows' to the disabled platforms list for the Kaleidoscope tests.

Expands on the check from r354645.

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

6 years agoDisable Kaleidoscope tests on Win32 -- looks like they're still failing there.
Lang Hames [Fri, 22 Feb 2019 01:19:53 +0000 (01:19 +0000)]
Disable Kaleidoscope tests on Win32 -- looks like they're still failing there.

The Kaleidoscope tests were re-enabled in r354630, but are still failing on
Windows. This patch disables them on that platform until the failure can be
investigated.

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

6 years ago[X86] Fix some copy/paste mistakes that caused a VR128 to be used as the address...
Craig Topper [Fri, 22 Feb 2019 00:04:35 +0000 (00:04 +0000)]
[X86] Fix some copy/paste mistakes that caused a VR128 to be used as the address of a load in an isel pattern

This was introduced in r354511.

Fixes PR40811.

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

6 years ago[gn] Add LLVM_BUILD_EXAMPLES.
Evgeniy Stepanov [Thu, 21 Feb 2019 23:56:05 +0000 (23:56 +0000)]
[gn] Add LLVM_BUILD_EXAMPLES.

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

6 years agoAMDGPU: Remove debugger related subtarget features
Matt Arsenault [Thu, 21 Feb 2019 23:27:46 +0000 (23:27 +0000)]
AMDGPU: Remove debugger related subtarget features

As far as I know these aren't needed anymore.

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

6 years ago[Kaleidoscope] Re-enable Kaleidoscope tests.
Lang Hames [Thu, 21 Feb 2019 22:24:53 +0000 (22:24 +0000)]
[Kaleidoscope] Re-enable Kaleidoscope tests.

These were disabled in r246267 (back in 2015). I suspect that the Win32 issues
that caused them to be disabled at the time have been resovlved, but if not
we can disable them again while we sort those out.

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

6 years agoRevert "[asan] Fix vfork handling.", +1
Evgeniy Stepanov [Thu, 21 Feb 2019 22:02:24 +0000 (22:02 +0000)]
Revert "[asan] Fix vfork handling.", +1

Revert r354625, r354627 - multiple build failures.

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

6 years ago[X86] Remove hasSideEffects=1 from the X87 pseudos with folded load.
Craig Topper [Thu, 21 Feb 2019 22:00:15 +0000 (22:00 +0000)]
[X86] Remove hasSideEffects=1 from the X87 pseudos with folded load.

This was done in r321424 to prevent scheduling from reordering things. But now that we model FPCW as a dependency, I don't think the same scheduling we were trying to prevent can occur.

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

6 years ago[hwasan,asan] Intercept vfork.
Evgeniy Stepanov [Thu, 21 Feb 2019 21:32:24 +0000 (21:32 +0000)]
[hwasan,asan] Intercept vfork.

Summary: AArch64 only for now.

Reviewers: vitalybuka, pcc

Subscribers: srhines, kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, jdoerfert, #sanitizers, llvm-commits, kcc

Tags: #sanitizers, #llvm

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

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

6 years ago[MemorySSA & LoopPassManager] Update MemorySSA in formDedicatedExitBlocks.
Alina Sbirlea [Thu, 21 Feb 2019 21:13:34 +0000 (21:13 +0000)]
[MemorySSA & LoopPassManager] Update MemorySSA in formDedicatedExitBlocks.

MemorySSA is now updated when forming dedicated exit blocks.
Resolves PR40037.

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

6 years agoAMDGPU/NFC: Cleanup subtarget predicates
Konstantin Zhuravlyov [Thu, 21 Feb 2019 20:43:43 +0000 (20:43 +0000)]
AMDGPU/NFC: Cleanup subtarget predicates

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

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

6 years ago[x86] vectorize more cast ops in lowering to avoid register file transfers
Sanjay Patel [Thu, 21 Feb 2019 20:40:39 +0000 (20:40 +0000)]
[x86] vectorize more cast ops in lowering to avoid register file transfers

This is a follow-up to D56864.

If we're extracting from a non-zero index before casting to FP,
then shuffle the vector and optionally narrow the vector before doing the cast:

cast (extelt V, C) --> extelt (cast (extract_subv (shuffle V, [C...]))), 0

This might be enough to close PR39974:
https://bugs.llvm.org/show_bug.cgi?id=39974

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

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

6 years ago[gn] Add target flags to asmflags.
Evgeniy Stepanov [Thu, 21 Feb 2019 20:35:31 +0000 (20:35 +0000)]
[gn] Add target flags to asmflags.

Reviewers: pcc, thakis

Subscribers: llvm-commits

Tags: #llvm

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

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

6 years agoRe-land "[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR""
Amara Emerson [Thu, 21 Feb 2019 20:20:16 +0000 (20:20 +0000)]
Re-land "[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR""

Thanks to Richard Trieu for pointing out that the failures were due to a
use-after-free of an ArrayRef.

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

6 years ago[llvm] Fix typo: 's/ ot / to /' [NFC]
Mandeep Singh Grang [Thu, 21 Feb 2019 20:04:20 +0000 (20:04 +0000)]
[llvm] Fix typo: 's/ ot / to /' [NFC]

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

6 years ago[LoopSimplifyCFG] Update MemorySSA after r353911.
Alina Sbirlea [Thu, 21 Feb 2019 19:54:05 +0000 (19:54 +0000)]
[LoopSimplifyCFG] Update MemorySSA after r353911.

Summary:
MemorySSA is not properly updated in LoopSimplifyCFG after recent changes. Use SplitBlock utility to resolve that and clear all updates once handleDeadExits is finished.
All updates that follow are removal of edges which are safe to handle via the removeEdge() API.
Also, deleting dead blocks is done correctly as is, i.e. delete from MemorySSA before updating the CFG and DT.

Reviewers: mkazantsev, rtereshin

Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits

Tags: #llvm

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

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

6 years ago[EarlyCSE] Cleanup deadcode. [NFCI]
Alina Sbirlea [Thu, 21 Feb 2019 19:49:57 +0000 (19:49 +0000)]
[EarlyCSE] Cleanup deadcode. [NFCI]

Summary: Cleanup nop assignments.

Reviewers: george.burgess.iv, davide

Subscribers: sanjoy, jlebar, llvm-commits

Tags: #llvm

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

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

6 years ago[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
Krzysztof Parzyszek [Thu, 21 Feb 2019 19:42:39 +0000 (19:42 +0000)]
[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap

The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

This reapplies r354606 with a fix.

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

6 years agoRevert r354606, it breaks asan tests
Krzysztof Parzyszek [Thu, 21 Feb 2019 19:33:58 +0000 (19:33 +0000)]
Revert r354606, it breaks asan tests

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

6 years ago[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
Krzysztof Parzyszek [Thu, 21 Feb 2019 18:39:22 +0000 (18:39 +0000)]
[Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap

The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

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

6 years ago[AMDGPU] remove unused AssemblerPredicates
Mark Searles [Thu, 21 Feb 2019 18:19:54 +0000 (18:19 +0000)]
[AMDGPU] remove unused AssemblerPredicates

An internal build is hitting asserts complaining about too many subtarget
features:
  llvm/utils/TableGen/Types.cpp:42:
    const char* llvm::getMinimalTypeForEnumBitfield(uint64_t):
    Assertion `MaxIndex <= 64 && "Too many bits"' failed.

  llvm/utils/TableGen/AsmMatcherEmitter.cpp:1476:
    void {anonymous}::AsmMatcherInfo::buildInfo():
    Assertion `SubtargetFeatures.size() <= 64 && "Too many subtarget features!"'
    failed.

The short-term solution is to remove a few unused AssemblerPredicates to get
under the limit.

The long-term solution seems to be to revisit these asserts. E.g., rather than
hardcoded '64', use the standard sized std::bitset like the other places that
track subtarget features.

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

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

6 years ago[llvm-objcopy][NFC] Add std::move() to fix older BB
Jordan Rupprecht [Thu, 21 Feb 2019 17:24:55 +0000 (17:24 +0000)]
[llvm-objcopy][NFC] Add std::move() to fix older BB

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

6 years ago[llvm-objcopy][NFC] More error cleanup
Jordan Rupprecht [Thu, 21 Feb 2019 17:05:19 +0000 (17:05 +0000)]
[llvm-objcopy][NFC] More error cleanup

Summary:
This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAllUnhandledErrors()` is now the main way to print errors.

There are still a few uses from within the per-arch drivers, so we can't delete them yet... but almost!

Reviewers: jhenderson, alexshap, espindola

Reviewed By: jhenderson

Subscribers: emaste, arichardson, jakehehrlich, jdoerfert, llvm-commits

Tags: #llvm

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

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

6 years ago[WebAssembly] Don't create MSSymbolWasm object for non-symbols
Sam Clegg [Thu, 21 Feb 2019 17:05:19 +0000 (17:05 +0000)]
[WebAssembly] Don't create MSSymbolWasm object for non-symbols

`__linear_memory` and `__indirect_function_table` are both generated
as imports in wasm object files but are actually symbols and don't
appear in any symbols table or relocation entry.  Indeed we
don't have any symbol type to meaningfully represent either of them.

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

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

6 years ago[Kaleidoscope] Fix symbol resolver to search in reverse order.
Lang Hames [Thu, 21 Feb 2019 16:53:04 +0000 (16:53 +0000)]
[Kaleidoscope] Fix symbol resolver to search in reverse order.

This should allow more recent definitions of functions in the Kaleidoscope REPL
to override old ones, as the tutorial text promises.

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

6 years ago[llvm-objcopy] Make removeSectionReferences batched
Jordan Rupprecht [Thu, 21 Feb 2019 16:45:42 +0000 (16:45 +0000)]
[llvm-objcopy] Make removeSectionReferences batched

Summary:
Removing a large number of sections from a file with a lot of symbols can have abysmal (i.e. O(n^2)) performance, e.g. when running `--only-section` to extract one section out of a large file.

This comes from iterating over all symbols in the symbol table each time we remove a section, to remove references to the section we just removed.
Instead, do just one pass of symbol removal by passing a hash set of all the sections we'd like to remove references to.

This fixes a regression when running llvm-objcopy -j <one section> on an object file with many sections and symbols -- on my machine, running `objcopy -j .keep_me huge-input.o /tmp/foo.o` takes .3s with GNU objcopy, 1.3s with an updated llvm-objcopy, and 7+ minutes with llvm-objcopy prior to this patch.

Reviewers: MaskRay, jhenderson, jakehehrlich, alexshap, espindola

Reviewed By: MaskRay, jhenderson

Subscribers: echristo, emaste, arichardson, mgrang, jdoerfert, llvm-commits

Tags: #llvm

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

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

6 years ago[PPC] Add store merging testcase.
Nirav Dave [Thu, 21 Feb 2019 16:34:48 +0000 (16:34 +0000)]
[PPC] Add store merging testcase.

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

6 years ago[DAGCombiner] prevent infinite looping by truncating 'and' (PR40793)
Sanjay Patel [Thu, 21 Feb 2019 16:01:48 +0000 (16:01 +0000)]
[DAGCombiner] prevent infinite looping by truncating 'and' (PR40793)

This fold can occur during legalization, so it can fight with promotion
to the larger type. It apparently takes a special sequence and subtarget
to avoid more basic simplifications that would hide the problem.

But there's a bigger question raised here: why does distributeTruncateThroughAnd()
even exist? It duplicates functionality from a more minimal pattern that we
already have. But getting rid of this function requires some preliminary steps.

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

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

6 years agoAMDGPU/GlobalISel: Make phis legal
Matt Arsenault [Thu, 21 Feb 2019 15:48:13 +0000 (15:48 +0000)]
AMDGPU/GlobalISel: Make phis legal

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

6 years agoRegBankSelect: Allow targets to introduce control flow for mapping
Matt Arsenault [Thu, 21 Feb 2019 15:48:13 +0000 (15:48 +0000)]
RegBankSelect: Allow targets to introduce control flow for mapping

For AMDGPU, if an operand requires an SGPR but is only available as a
VGPR, a loop needs to be introduced to execute the instruction with
each unique combination of values across all lanes. The rest of the
instructions in the block will be moved to a new block following the
loop. Check if the next instruction's parent changed, and update the
iterators and insertion block if this happened.

Tests will be included in a future patch.

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

6 years agoFix missing C++ mode comments
Matt Arsenault [Thu, 21 Feb 2019 15:48:10 +0000 (15:48 +0000)]
Fix missing C++ mode comments

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

6 years ago[x86] regenerate checks; NFC
Sanjay Patel [Thu, 21 Feb 2019 15:30:28 +0000 (15:30 +0000)]
[x86] regenerate checks; NFC

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

6 years ago[X86] Fix copy-paste error in @ccz flag.
Nirav Dave [Thu, 21 Feb 2019 15:28:31 +0000 (15:28 +0000)]
[X86] Fix copy-paste error in @ccz flag.

@ccz operand should be equivalent to @cce.

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

6 years agoAMDGPU/GlobalISel: Fix bit count ops for non-power-of-2 types
Matt Arsenault [Thu, 21 Feb 2019 15:22:20 +0000 (15:22 +0000)]
AMDGPU/GlobalISel: Fix bit count ops for non-power-of-2 types

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

6 years ago[llvm-readobj] Weaken a check in the test added by r354567
Ilya Biryukov [Thu, 21 Feb 2019 14:51:17 +0000 (14:51 +0000)]
[llvm-readobj] Weaken a check in the test added by r354567

The check includes a substring, configurable by PACKAGE_NAME in CMake.
This leads to failures if PACKAGE_NAME is not the default.

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

6 years ago[RISCV][NFC] IsEligibleForTailCallOptimization -> isEligibleForTailCallOptimization
Alex Bradbury [Thu, 21 Feb 2019 14:31:41 +0000 (14:31 +0000)]
[RISCV][NFC] IsEligibleForTailCallOptimization -> isEligibleForTailCallOptimization

Also clang-format the modified hunks.

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

6 years ago[RISCV] Add implied zero offset load/store alias patterns
Alex Bradbury [Thu, 21 Feb 2019 14:09:34 +0000 (14:09 +0000)]
[RISCV] Add implied zero offset load/store alias patterns

Allow load/store instructions with implied zero offset for compatibility with
GNU assembler.

Differential Revision: https://reviews.llvm.org/D57141
Patch by James Clarke.

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

6 years ago[InferAddressSpaces] Fix fallthrough error
Joey Gouly [Thu, 21 Feb 2019 13:10:37 +0000 (13:10 +0000)]
[InferAddressSpaces] Fix fallthrough error

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

6 years ago[ARM GlobalISel] Support G_FRAME_INDEX for Thumb2
Diana Picus [Thu, 21 Feb 2019 13:00:02 +0000 (13:00 +0000)]
[ARM GlobalISel] Support G_FRAME_INDEX for Thumb2

Same as arm mode.

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

6 years agoRe-land part of r354244 "[DAGCombiner] Eliminate dead stores to stack."
Clement Courbet [Thu, 21 Feb 2019 12:59:36 +0000 (12:59 +0000)]
Re-land part of r354244 "[DAGCombiner] Eliminate dead stores to stack."

This part introduces the lifetime node.

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

6 years ago[llvm-readobj]Add testing for ELF symbol and section table printing for a wider range...
James Henderson [Thu, 21 Feb 2019 12:47:10 +0000 (12:47 +0000)]
[llvm-readobj]Add testing for ELF symbol and section table printing for a wider range of values

The existing ELF symbol and section table testing doesn't test many of
the corner-cases or valid values for various ELF properties, including
things like binding, visibility, section type and so on. This patch adds
a series of tests that test these and other related edge-cases.

Reviewed by: grimar, MaskRay

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

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

6 years ago[InferAddressSpaces] Fix crash on select of non-ptr operands
Joey Gouly [Thu, 21 Feb 2019 12:31:36 +0000 (12:31 +0000)]
[InferAddressSpaces] Fix crash on select of non-ptr operands

Check the operands of a select are pointers, to determine if it is an address
expression or not.

https://reviews.llvm.org/D58226

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

6 years ago[X86][SSE] combineX86ShufflesRecursively - moved to generic op input index lookup...
Simon Pilgrim [Thu, 21 Feb 2019 12:24:49 +0000 (12:24 +0000)]
[X86][SSE] combineX86ShufflesRecursively - moved to generic op input index lookup. NFCI.

We currently bail if the target shuffle decodes to more than 2 input vectors, this change alters the input index to work for any number of inputs for when we drop that requirement.

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

6 years ago[yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section.
George Rimar [Thu, 21 Feb 2019 12:21:43 +0000 (12:21 +0000)]
[yaml2obj][obj2yaml] - Support SHT_GNU_verdef (.gnu.version_d) section.

This patch adds support for parsing/dumping the .gnu.version section.

Description of the section is: https://refspecs.linuxfoundation.org/LSB_1.3.0/gLSB/gLSB/symverdefs.html

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

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

6 years ago[llvm-readobj] Change "SHT_MIPS_DWARF" to "MIPS_DWARF"
Fangrui Song [Thu, 21 Feb 2019 11:35:41 +0000 (11:35 +0000)]
[llvm-readobj] Change "SHT_MIPS_DWARF" to "MIPS_DWARF"

Summary:
This is to be consistent with the display of other MIPS section types.
This string is also used by binutils-gdb/binutils/readelf.c:get_mips_section_type_name

Since we are here, reorder the two enum constatns because SHT_MIPS_DWARF < SHT_MIPS_ABIFLAGS.

Reviewers: jhenderson, atanasyan

Reviewed By: jhenderson

Subscribers: aprantl, sdardis, arichardson, rupprecht, llvm-commits

Tags: #llvm

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

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

6 years agoRevert 354564: [ARM] Add some missing thumb1 opcodes to enable peephole optimisation...
David Green [Thu, 21 Feb 2019 11:03:13 +0000 (11:03 +0000)]
Revert 354564: [ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs

I believe it's causing bootstrap failures for A32 code. I'll take a look at
what's wrong.

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

6 years ago[llvm-readobj]Test basic command-line handling
James Henderson [Thu, 21 Feb 2019 11:00:29 +0000 (11:00 +0000)]
[llvm-readobj]Test basic command-line handling

There was no real testing for llvm-readobj/llvm-readelf's behaviour
under various bad inputs and command-line switches. This patch adds some
testing of this, along with basic testing of --version and --help.

Reviewed by: MaskRay, grimar

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

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

6 years ago[yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVE
James Henderson [Thu, 21 Feb 2019 10:57:15 +0000 (10:57 +0000)]
[yaml2obj]Allow symbol Index field to take values lower than SHN_LORESERVE

In order to test tool handling of invalid section indexes, I need to
create an object containing such an invalid section index. I could
create a hex-edited binary, but having the ability to use yaml2obj is
preferable. Prior to this change, yaml2obj would reject any explicit
section indexes less than SHN_LORESERVE. This patch changes it to allow
any value.

I had to change the test to use llvm-readelf instead of llvm-readobj,
because llvm-readobj does not like invalid section indexes. I've also
expanded the test to show that the most common SHN_* values are accepted
(SHN_UNDEF, SHN_ABS, SHN_COMMON).

Reviewed by: grimar, jakehehrlich

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

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

6 years ago[AArch64] Print instruction before atomic semantic annotations
David Spickett [Thu, 21 Feb 2019 10:42:49 +0000 (10:42 +0000)]
[AArch64] Print instruction before atomic semantic annotations

Commit r353303 added annotations when acquire semantics
were dropped from an instruction.

printAnnotation was called before printInstruction.
So if you didn't set a separate comment output stream
you got <comment><instr> instead of <instr><comment>
as expected.

To fix this move the new printAnnotation to after
the instruction is printed.

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

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

6 years ago[ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs
David Green [Thu, 21 Feb 2019 10:30:09 +0000 (10:30 +0000)]
[ARM] Add some missing thumb1 opcodes to enable peephole optimisation of CMPs

This adds a number of missing Thumb1 opcodes so that the peephole optimiser can
remove redundant CMP instructions.

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

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

6 years ago[ObjectYAML] Support SHT_MIPS_DWARF section type flag
Fangrui Song [Thu, 21 Feb 2019 10:19:08 +0000 (10:19 +0000)]
[ObjectYAML] Support SHT_MIPS_DWARF section type flag

Also reorder SHT_MIPS_DWARF and SHT_MIPS_ABIFLAGS in Object/ELF.cpp.
The test will be added by D58457.

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

6 years ago[NFC] Replace EOL in test file
Max Kazantsev [Thu, 21 Feb 2019 09:56:23 +0000 (09:56 +0000)]
[NFC] Replace EOL in test file

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

6 years ago[TEST] Add failing test that shows problems with MSSA update in LoopSimplifyCFG
Max Kazantsev [Thu, 21 Feb 2019 09:40:24 +0000 (09:40 +0000)]
[TEST] Add failing test that shows problems with MSSA update in LoopSimplifyCFG

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

6 years ago[ARM] Negative constants mishandled in ARM CGP
Sam Parker [Thu, 21 Feb 2019 09:33:18 +0000 (09:33 +0000)]
[ARM] Negative constants mishandled in ARM CGP

During type promotion, sometimes we convert negative an add with a
negative constant into a sub with a positive constant. The loop that
performs this transformation has two issues:
- it iterates over a set, causing non-determinism.
- it breaks, instead of continuing, when it finds the first
  non-negative operand.

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

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

6 years ago[DebugInfo] Prep llvm-dwarfdump for typed DW5 ops.
Markus Lavin [Thu, 21 Feb 2019 08:20:24 +0000 (08:20 +0000)]
[DebugInfo] Prep llvm-dwarfdump for typed DW5 ops.

Adds llvm-dwarfdump support for pretty printing Dwarf5 expressions ops
that reference a base type (right now only DW_OP_convert is added).
Includes verification to verify that the ops operand is actually a
DW_TAG_base_type DIE.

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

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

6 years agoFix file header issues in fuzzers. NFC
Fangrui Song [Thu, 21 Feb 2019 07:57:14 +0000 (07:57 +0000)]
Fix file header issues in fuzzers. NFC

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

6 years agoFix some include order and file headers issues. NFC
Fangrui Song [Thu, 21 Feb 2019 07:42:31 +0000 (07:42 +0000)]
Fix some include order and file headers issues. NFC

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

6 years ago[LoopSimplifyCFG] Add missing MSSA edge deletion
Max Kazantsev [Thu, 21 Feb 2019 05:51:29 +0000 (05:51 +0000)]
[LoopSimplifyCFG] Add missing MSSA edge deletion

When we create fictive switch in preheader, we should take
care about MSSA and delete edge between old preheader and
header.

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

6 years ago[WebAssembly] Default to something reasonable in WebAssemblyAddMissingPrototypes
Sam Clegg [Thu, 21 Feb 2019 03:27:00 +0000 (03:27 +0000)]
[WebAssembly] Default to something reasonable in WebAssemblyAddMissingPrototypes

Previously if we couldn't derive a prototype for a "no-prototype"
function from C we would leave it as is:

  void foo(...)

With this change we instead give is an empty signature and remove
the "no-prototype" attribute.

This fixes the current wasm waterfall test failure.

Tags: #llvm

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

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

6 years ago[AMDGPU] fix commuted case of sub combine
Stanislav Mekhanoshin [Thu, 21 Feb 2019 02:58:00 +0000 (02:58 +0000)]
[AMDGPU] fix commuted case of sub combine

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

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

6 years ago[Inliner] Pass nullptr for the ORE param of getInlineCost if RemarkEnabled
Wei Mi [Thu, 21 Feb 2019 02:57:52 +0000 (02:57 +0000)]
[Inliner] Pass nullptr for the ORE param of getInlineCost if RemarkEnabled
is false.

Right now for inliner and partial inliner, we always pass the address of a
valid ORE object to getInlineCost even if RemarkEnabled is false because of
no -Rpass is specified. Since ComputeFullInlineCost will be set to true if
ORE is non-null in getInlineCost, this introduces the problem that in
getInlineCost we cannot return early even if we already know the cost is
definitely higher than the threshold. It is a general problem for compile
time.

This patch fixes that by pass nullptr as the ORE argument if RemarkEnabled is
false.

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

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

6 years agoAdd skipFunction to PostRA machine sinking pass.
Xin Tong [Thu, 21 Feb 2019 02:11:06 +0000 (02:11 +0000)]
Add skipFunction to PostRA machine sinking pass.

Summary: Add skipFunction to PostRA machine sinking pass.

Reviewers: junbuml

Subscribers: arsenm, llvm-commits

Tags: #llvm

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

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

6 years ago[libFuzzer] fix the docs
Kostya Serebryany [Thu, 21 Feb 2019 00:43:46 +0000 (00:43 +0000)]
[libFuzzer] fix the docs

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