]> granicus.if.org Git - llvm/log
llvm
7 years ago[OCaml] Respect CMAKE_C_FLAGS for OCaml C files
Michal Gorny [Thu, 27 Jul 2017 21:13:19 +0000 (21:13 +0000)]
[OCaml] Respect CMAKE_C_FLAGS for OCaml C files

Pass the values of CMAKE_C_FLAGS and CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}
as -ccopt to ocamlc. This enforces the specific flags used for the LLVM
build to be used for OCaml bindings as well, notably -O and -march
flags.

This also solves the issue of the user being unable to force specific
flags for OCaml bindings builds. Gentoo needs this to enforce -DNDEBUG
consistently between the LLVM build and the split OCaml bindings build.

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

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

7 years agoAdd test to reject merging of empty manifest.
Eric Beckmann [Thu, 27 Jul 2017 19:58:12 +0000 (19:58 +0000)]
Add test to reject merging of empty manifest.

Reviewers: ruiu, rnk

Subscribers: llvm-commits

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

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

7 years ago[ARM] Add use-misched feature, to enable the MachineScheduler.
Florian Hahn [Thu, 27 Jul 2017 19:56:44 +0000 (19:56 +0000)]
[ARM] Add use-misched feature, to enable the MachineScheduler.

Summary:
This change makes it easier to experiment with the MachineScheduler in
the ARM backend and also makes it very explicit which CPUs use the
MachineScheduler (currently only swift and cyclone).

Reviewers: MatzeB, t.p.northover, javed.absar

Reviewed By: MatzeB

Subscribers: aemerson, kristof.beyls, llvm-commits

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

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

7 years agoChange prefix in vector-shuffle-combining-avx.patch to reduce test size.
Dinar Temirbulatov [Thu, 27 Jul 2017 19:47:35 +0000 (19:47 +0000)]
Change prefix in vector-shuffle-combining-avx.patch to reduce test size.

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

7 years ago[MergeFunctions] Remove alias support.
whitequark [Thu, 27 Jul 2017 19:36:13 +0000 (19:36 +0000)]
[MergeFunctions] Remove alias support.

The alias support was dead code since 2011. It was last touched
in r124182, where it was reintroduced after being removed
in r110434, and since then it was gated behind a HasGlobalAliases
flag that was permanently stuck as `false`.

It is also broken. I'm not sure if it bitrotted or was just broken
in the first place because it appears to have never been tested,
but the following IR results in a crash:

    define internal i32 @a(i32 %a, i32 %b) unnamed_addr {
      %c = add i32 %a, %b
      %d = xor i32 %a, %c
      ret i32 %c
    }

    define internal i32 @b(i32 %a, i32 %b) unnamed_addr {
      %c = add i32 %a, %b
      %d = xor i32 %a, %c
      ret i32 %c
    }

It seems safe to remove buggy untested code that no one cared about
for seven years.

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

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

7 years ago[lit] Fix TestRunner unit test on Windows
Brian Gesiak [Thu, 27 Jul 2017 19:27:10 +0000 (19:27 +0000)]
[lit] Fix TestRunner unit test on Windows

Summary:
Normally Python converts all newline characters, Windows or Unix,
to Unix newlines when opening a file. However, lit opens files in
binary mode, which does not perform this conversion. As a result,
trailing Windows newlines are not stripped from test input, which
caused a failure in the TestRunner unit test:

```
FAIL: test_custom (__main__.TestIntegratedTestKeywordParser)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\bgesiak\src\llvm\llvm\utils\lit\tests\unit\TestRunner.py", line 109, in test_custom
    self.assertItemsEqual(value, ['a', 'b', 'c'])
AssertionError: Element counts were not equal:
First has 1, Second has 0: 'c\r'
First has 0, Second has 1:  'c'
```

Fix the discrepancy in behavior across the two platforms by
manually stripping Windows newlines before yielding each line in
the test file.

Reviewers: echristo, beanz, ddunbar, delcypher, rnk

Reviewed By: rnk

Subscribers: mehdi_amini, llvm-commits

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

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

7 years agoUn-revert "Teach the CMake build system to run lit's test suite. These can be run"
Brian Gesiak [Thu, 27 Jul 2017 19:18:35 +0000 (19:18 +0000)]
Un-revert "Teach the CMake build system to run lit's test suite. These can be run"

Summary:
Depends on https://reviews.llvm.org/D35879.

This reverts rL257268, which in turn was a revert of rL257221.
https://reviews.llvm.org/D35879 marks the tests in the lit test suite
that fail on Windows as XFAIL, which should allow these tests to pass
on Windows-based buildbots.

Reviewers: delcypher, beanz, mgorny, jroelofs, rnk

Reviewed By: mgorny

Subscribers: rnk, ddunbar, george.karpenkov, llvm-commits

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

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

7 years ago[FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.
Davide Italiano [Thu, 27 Jul 2017 18:38:09 +0000 (18:38 +0000)]
[FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.

This change makes GCC7 happy again.

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

7 years ago[InstCombine] Simplify pointer difference subtractions (GEP-GEP) where GEPs have...
Hiroshi Yamauchi [Thu, 27 Jul 2017 18:27:11 +0000 (18:27 +0000)]
[InstCombine] Simplify pointer difference subtractions (GEP-GEP) where GEPs have other uses and one non-constant index

Summary:
Pointer difference simplifications currently happen only if input GEPs don't have other uses or their indexes are all constants, to avoid duplicating indexing arithmetic.

This patch enables cases with exactly one non-constant index among input GEPs to happen where there is no duplicated arithmetic or code size increase even if input GEPs have other uses.

For example, this patch allows "(&A[42][i]-&A[42][0])" --> "i", which didn't happen previously, if the input GEP(s) have other uses.

Reviewers: sanjoy, bkramer

Reviewed By: sanjoy

Subscribers: mcrosier, llvm-commits

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

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

7 years ago[PDB] Write public symbol records and the publics hash table
Reid Kleckner [Thu, 27 Jul 2017 18:25:59 +0000 (18:25 +0000)]
[PDB] Write public symbol records and the publics hash table

Summary:
MSVC link.exe records all external symbol names in the publics stream.
It provides similar functionality to an ELF .symtab.

Reviewers: zturner, ruiu

Subscribers: hiraditya, llvm-commits

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

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

7 years ago[SelectionDAG] Improve DAGTypeLegalizer::convertMask assertion (PR33960)
Simon Pilgrim [Thu, 27 Jul 2017 18:15:54 +0000 (18:15 +0000)]
[SelectionDAG] Improve DAGTypeLegalizer::convertMask assertion (PR33960)

Improve DAGTypeLegalizer::convertMask's isSETCCorConvertedSETCC assertion to properly check for any mixture of SETCC or BUILD_VECTOR of constants, or a logical mask op of them.

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

7 years ago[X86] SET0 to use XMM registers where possible PR26018 PR32862
Dinar Temirbulatov [Thu, 27 Jul 2017 17:47:01 +0000 (17:47 +0000)]
[X86] SET0 to use XMM registers where possible PR26018 PR32862

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

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

7 years agoRelax the matching in these tests
Adam Nemet [Thu, 27 Jul 2017 17:45:02 +0000 (17:45 +0000)]
Relax the matching in these tests

Looks like the template arguments are displayed differently depending on the
host compiler(?).  E.g.:

InnerAnalysisManagerProxy<CGSCCAnalysisManager
InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::LazyCallGraph::SCC, ...

Fix fallout after r309294

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

7 years ago[ICP] Migrate to OptimizationRemarkEmitter
Adam Nemet [Thu, 27 Jul 2017 16:54:15 +0000 (16:54 +0000)]
[ICP] Migrate to OptimizationRemarkEmitter

This is a module pass so for the old PM, we can't use ORE, the function
analysis pass.  Instead ORE is created on the fly.

A few notes:

- isPromotionLegal is folded in the caller since we want to emit the Function
in the remark but we can only do that if the symbol table look-up succeeded.

- There was good test coverage for remarks in this pass.

- promoteIndirectCall uses ORE conditionally since it's also used from
SampleProfile which does not use ORE yet.

Fixes PR33792.

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

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

7 years ago[OptRemark] Allow streaming of 64-bit integers
Adam Nemet [Thu, 27 Jul 2017 16:54:13 +0000 (16:54 +0000)]
[OptRemark] Allow streaming of 64-bit integers

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

7 years ago[lit] Fix order of checks in shtest-shell.py test
Brian Gesiak [Thu, 27 Jul 2017 16:50:40 +0000 (16:50 +0000)]
[lit] Fix order of checks in shtest-shell.py test

Summary:
An expectation in `utils/lit/tests/Inputs/shtest-shell/redirects.txt`
expects that first a string printed to stdout is seen, and then a
string printed to stderr. Add `flush()` calls to ensure that stdout is
printed before stderr, as expected.

Reviewers: rnk, mgorny, jroelofs

Reviewed By: rnk

Subscribers: llvm-commits

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

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

7 years agoAll libcalls should be considered to be GC-leaf functions.
Daniel Neilson [Thu, 27 Jul 2017 16:49:39 +0000 (16:49 +0000)]
All libcalls should be considered to be GC-leaf functions.

Summary:
It is possible for some passes to materialize a call to a libcall (ex: ldexp, exp2, etc),
but these passes will not mark the call as a gc-leaf-function. All libcalls are
actually gc-leaf-functions, so we change llvm::callsGCLeafFunction() to tell us that
available libcalls are equivalent to gc-leaf-function calls.

Reviewers: sanjoy, anna, reames

Reviewed By: anna

Subscribers: llvm-commits

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

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

7 years ago[TargetParser] Use enum classes for various ARM kind enums.
Florian Hahn [Thu, 27 Jul 2017 16:27:56 +0000 (16:27 +0000)]
[TargetParser] Use enum classes for various ARM kind enums.

Summary:
Using c++11 enum classes ensures that only valid enum values are used
for ArchKind, ProfileKind, VersionKind and ISAKind. This removes the
need for checks that the provided values map to a proper enum value,
allows us to get rid of AK_LAST and prevents comparing values from
different enums. It also removes a bunch of static_cast
from unsigned to enum values and vice versa, at the cost of introducing
static casts to access AArch64ARCHNames and ARMARCHNames by ArchKind.

FPUKind and ArchExtKind are the only remaining old-style enum in
TargetParser.h. I think it's beneficial to keep ArchExtKind as old-style
enum, but FPUKind can be converted too, but this patch is quite big, so
could do this in a follow-up patch. I could also split this patch up a
bit, if people would prefer that.

Reviewers: rengolin, javed.absar, chandlerc, rovka

Reviewed By: rovka

Subscribers: aemerson, kristof.beyls, llvm-commits

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

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

7 years ago[SLP] Outline code for the check that instruction users are part of
Alexey Bataev [Thu, 27 Jul 2017 15:48:44 +0000 (15:48 +0000)]
[SLP] Outline code for the check that instruction users are part of
vectorization tree, NFC.

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

7 years ago[SelectionDAG] Avoid repeated calls to getNumOperands in for loop. NFCI.
Simon Pilgrim [Thu, 27 Jul 2017 15:42:21 +0000 (15:42 +0000)]
[SelectionDAG] Avoid repeated calls to getNumOperands in for loop. NFCI.

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

7 years agoFix assert from r309278
David Blaikie [Thu, 27 Jul 2017 15:28:10 +0000 (15:28 +0000)]
Fix assert from r309278

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

7 years agoremove redundant check
Adrian Prantl [Thu, 27 Jul 2017 15:24:20 +0000 (15:24 +0000)]
remove redundant check

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

7 years agoThinLTO: Don't import aliases of any kind (even linkonce_odr)
David Blaikie [Thu, 27 Jul 2017 15:09:06 +0000 (15:09 +0000)]
ThinLTO: Don't import aliases of any kind (even linkonce_odr)

Summary:
Until a more advanced version of importing can be implemented for
aliases (one that imports an alias as an available_externally definition
of the aliasee), skip the narrow subset of cases that was possible but
came at a cost: aliases of linkonce_odr functions could be imported
because the linkonce_odr function could be safely duplicated from the
source module. This came/comes at the cost of not being able to 'home'
imported linkonce functions (they had to be emitted linkonce_odr in all
the destination modules (even if they weren't used by an alias) rather
than as available_externally - causing extra object size).

Tangentially, this also was the only reason ThinLTO would emit multiple
CUs in to the resulting DWARF - which happens to be a problem for
Fission (there's a fix for this in GDB but not released yet, etc).
(actually it's not the only reason - but I'm sending a patch to fix the
other reason shortly)

There's no reason to believe this particularly narrow alias importing
was especially/meaningfully important, only that it was /possible/ to
implement in this way. When a more general solution is done, it should
still satisfy the DWARF concerns above, since the import will still be
available_externally, and thus not create extra CUs.

Since now all aliases are treated the same, I removed/simplified some
test cases since they were testing corner cases where there are no
longer any corners.

Reviewers: tejohnson, mehdi_amini

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

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

7 years ago[SelectionDAG] Tidyup mask creation. NFCI.
Simon Pilgrim [Thu, 27 Jul 2017 15:08:53 +0000 (15:08 +0000)]
[SelectionDAG] Tidyup mask creation. NFCI.

Assign all concat elements to UNDEF and then just replace the first element, instead of copying everything individually.

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

7 years ago[ARM] Mark labels in skipAlignedDPRCS2Spills as fallthrough (NFC).
Florian Hahn [Thu, 27 Jul 2017 14:37:17 +0000 (14:37 +0000)]
[ARM] Mark labels in skipAlignedDPRCS2Spills as fallthrough (NFC).

The comment at the top of the switch statement indicates that the
fall-through behavior is intentional. By using LLVM_FALLTHROUGH,
-Wimplicit-fallthrough are silenced, which is enabled by default in GCC
7.

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

7 years agoAdded cost of ZEROALL and ZEROUPPER instrs in btver2 cpu.
Andrew V. Tischenko [Thu, 27 Jul 2017 13:12:08 +0000 (13:12 +0000)]
Added cost of ZEROALL and ZEROUPPER instrs in btver2 cpu.
Differential Revision https://reviews.llvm.org/D35834

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

7 years ago[InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost instead...
Evgeny Astigeevich [Thu, 27 Jul 2017 12:49:27 +0000 (12:49 +0000)]
[InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost instead of TTI::getGEPCost

Currently CallAnalyzer::isGEPFree uses TTI::getGEPCost to check if GEP is free.
TTI::getGEPCost cannot handle cases when GEPs participate in Def-Use dependencies
(see https://reviews.llvm.org/D31186 for example).
There is TTI::getUserCost which can calculate the cost more accurately by
taking dependencies into account.

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

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

7 years ago[globalisel][tablegen] Ensure MatchTable's are compile-time constants with constexpr...
Daniel Sanders [Thu, 27 Jul 2017 12:47:31 +0000 (12:47 +0000)]
[globalisel][tablegen] Ensure MatchTable's are compile-time constants with constexpr. NFC.

This should prevent any re-occurence of the problem where the table was
initialized at run-time.

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

7 years ago[X86][AVX] Regenerate shuffle tests with broadcast comments.
Simon Pilgrim [Thu, 27 Jul 2017 12:32:45 +0000 (12:32 +0000)]
[X86][AVX] Regenerate shuffle tests with broadcast comments.

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

7 years agoRe-commit: r309094 [globalisel][tablegen] Fuse the generated tables together.
Daniel Sanders [Thu, 27 Jul 2017 11:03:45 +0000 (11:03 +0000)]
Re-commit: r309094 [globalisel][tablegen] Fuse the generated tables together.

Summary:
Now that we have control flow in place, fuse the per-rule tables into a
single table. This is a compile-time saving at this point. However, this will
also enable the optimization of a table so that similar instructions can be
tested together, reducing the time spent on the matching the code.

This is NFC in terms of externally visible behaviour but some internals have
changed slightly. State.MIs is no longer reset between each rule that is
attempted because it's not necessary to do so. As a consequence of this the
restriction on the order that instructions are added to State.MIs has been
relaxed to only affect recorded instructions that require new elements to be
added to the vector. GIM_RecordInsn can now write to any element from 1 to
State.MIs.size() instead of just State.MIs.size().

The compile-time regressions from the last commit were caused by the ARM target
including a non-const variable (zero_reg) in the table and therefore generating
an initializer for it. That variable is now const.

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: kristof.beyls, igorb, llvm-commits

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

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

7 years ago[X86] Adding test cases for LEA factorization (PR32755 / D35014)
Simon Pilgrim [Thu, 27 Jul 2017 10:36:09 +0000 (10:36 +0000)]
[X86] Adding test cases for LEA factorization (PR32755 / D35014)

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

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

7 years ago[X86] Tidyup MaskedLoad/Store mask creation. NFCI.
Simon Pilgrim [Thu, 27 Jul 2017 10:29:04 +0000 (10:29 +0000)]
[X86] Tidyup MaskedLoad/Store mask creation. NFCI.

Assign all concat elements to zero and then just replace the first element, instead of setting them all to null and copying everything in.

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

7 years ago[TTI] fixing a bug in the isLegalMaskedScatter API
Mohammed Agabaria [Thu, 27 Jul 2017 10:28:16 +0000 (10:28 +0000)]
[TTI] fixing a bug in the isLegalMaskedScatter API

isLegalMaskedScatter called the Gather version which is a bug.
use test case is provided within the patch of AVX2 gathers at: https://reviews.llvm.org/D35772

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

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

7 years ago[PowerPC] enable optimizeCompareInstr for branch with static branch hint
Hiroshi Inoue [Thu, 27 Jul 2017 08:14:48 +0000 (08:14 +0000)]
[PowerPC] enable optimizeCompareInstr for branch with static branch hint

In optimizeCompareInstr, a compare instruction is eliminated by using a record form instruction if possible.
If the branch instruction that uses the result of the compare has a static branch hint, the optimization does not happen.
This patch makes this optimization happen regardless of the branch hint by splitting branch hint and branch condition before checking the predicate to identify the possible optimizations.

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

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

7 years agoRevert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""
Petr Hosek [Thu, 27 Jul 2017 06:02:05 +0000 (06:02 +0000)]
Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started""

This change is failing tests on Windows bots due to permissions.

This reverts commit r309249.

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

7 years agoReland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"
Petr Hosek [Thu, 27 Jul 2017 04:35:30 +0000 (04:35 +0000)]
Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"

As discussed on llvm-dev I've implemented the first basic steps towards
llvm-objcopy/llvm-objtool (name pending).

This change adds the ability to copy (without modification) 64-bit
little endian ELF executables that have SHT_PROGBITS, SHT_NOBITS,
SHT_NULL and SHT_STRTAB sections.

Patch by Jake Ehrlich

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

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

7 years ago[X86] Improve the unknown stepping support for Intel CPUs in getHostCPUName
Craig Topper [Thu, 27 Jul 2017 03:26:52 +0000 (03:26 +0000)]
[X86] Improve the unknown stepping support for Intel CPUs in getHostCPUName

This patch improves our guessing of unknown Intel CPUs to support Goldmont and skylake-avx512.

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

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

7 years ago[GISel]: Missed passing in a parameter to addUsesFromArgs
Aditya Nandakumar [Thu, 27 Jul 2017 02:15:34 +0000 (02:15 +0000)]
[GISel]: Missed passing in a parameter to addUsesFromArgs

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

7 years agoRemove check for i686.
Eric Beckmann [Thu, 27 Jul 2017 01:16:19 +0000 (01:16 +0000)]
Remove check for i686.

libxml2 is supported for 32 bit, so our build system should be checking
the target rather than native os when choosing shared libs.

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

7 years agoRe-enable libxml2 tests.
Eric Beckmann [Thu, 27 Jul 2017 01:11:53 +0000 (01:11 +0000)]
Re-enable libxml2 tests.

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

7 years ago[DWARF] Minor code style modification, no functionality change.
Spyridoula Gravani [Thu, 27 Jul 2017 00:59:33 +0000 (00:59 +0000)]
[DWARF] Minor code style modification, no functionality change.

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

7 years agoDebugInfo: Ensure imported entities at the top level of an inlined function don't...
David Blaikie [Thu, 27 Jul 2017 00:06:53 +0000 (00:06 +0000)]
DebugInfo: Ensure imported entities at the top level of an inlined function don't cause degenerate concrete definitions

Local imported entities at the top level of a subprogram were being
handled differently from those in nested scopes - that different
handling would cause pseudo concrete out-of-line definitions to be
created (but without any of their attributes, nor an abstract_origin) in
the case where there was no real concrete definition.

These local imported entities also only appeared in the concrete
definition where those imported entities in nested scopes appear in all
cases (abstract, concrete, and inlined). This change at least makes top
level case handle the same as the others - though there's a FIXME to
improve this to /only/ emit them into the abstract origin (though this
requires more plumbing - like the abstract subprogram and variable
handling that must defer population until the end of the unit to
discover if there is an abstract origin, or only a standalone concrete
definition).

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

7 years ago[Hexagon] Fix expensive checks build bot broken in r309230.
Eugene Zelenko [Wed, 26 Jul 2017 23:56:29 +0000 (23:56 +0000)]
[Hexagon] Fix expensive checks build bot broken in r309230.

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

7 years ago[CMake] Disable -Werror for CMake checks
Petr Hosek [Wed, 26 Jul 2017 23:49:18 +0000 (23:49 +0000)]
[CMake] Disable -Werror for CMake checks

-Werror may cause some of the CMake checks to fail, so we disable
it even if it's enabled for the build itself.

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

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

7 years ago[Hexagon] Partially revert r309230 which caused some build bots failures.
Eugene Zelenko [Wed, 26 Jul 2017 23:45:28 +0000 (23:45 +0000)]
[Hexagon] Partially revert r309230 which caused some build bots failures.

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

7 years ago[Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings...
Eugene Zelenko [Wed, 26 Jul 2017 23:20:35 +0000 (23:20 +0000)]
[Hexagon] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).

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

7 years agoSee if disabling libxml tests will pass the i686 bot.
Eric Beckmann [Wed, 26 Jul 2017 23:15:44 +0000 (23:15 +0000)]
See if disabling libxml tests will pass the i686 bot.

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

7 years ago[lit] Fix race between shtest-shell and max-failures tests
Reid Kleckner [Wed, 26 Jul 2017 22:57:32 +0000 (22:57 +0000)]
[lit] Fix race between shtest-shell and max-failures tests

Previously these tests would use the same Output directory leading to
flaky non-deterministic failures.

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

7 years ago[lit] Fix shtest-shell and max-failures lit tests on Windows
Reid Kleckner [Wed, 26 Jul 2017 22:21:25 +0000 (22:21 +0000)]
[lit] Fix shtest-shell and max-failures lit tests on Windows

Rewrite the write-to-stderr.sh and write-to-stdout-and-stderr.sh shell
scripts as python scripts and call python on them.

Fixes PR33940

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

7 years ago[lit] Fix shtest-output-printing.py on Windows by matching either / or \\
Reid Kleckner [Wed, 26 Jul 2017 22:11:30 +0000 (22:11 +0000)]
[lit] Fix shtest-output-printing.py on Windows by matching either / or \\

Fixes PR33938

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

7 years ago[lit] Fix discovery.py on Windows by matching backslashes when necessary
Reid Kleckner [Wed, 26 Jul 2017 22:00:38 +0000 (22:00 +0000)]
[lit] Fix discovery.py on Windows by matching backslashes when necessary

Fixes PR33932

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

7 years agoFix a comment (test commit).
Hiroshi Yamauchi [Wed, 26 Jul 2017 21:54:43 +0000 (21:54 +0000)]
Fix a comment (test commit).

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

7 years ago[lit] Un-XFAIL selecting.py test on Windows
Reid Kleckner [Wed, 26 Jul 2017 21:48:41 +0000 (21:48 +0000)]
[lit] Un-XFAIL selecting.py test on Windows

This passes locally for me, which fails the overall lit test suite. I
can't debug a passing test, but I will try to help debug the test when
we get some failing logs.

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

7 years ago[AMDGPU] Optimize SI_IF lowering for simple if regions
Stanislav Mekhanoshin [Wed, 26 Jul 2017 21:29:15 +0000 (21:29 +0000)]
[AMDGPU] Optimize SI_IF lowering for simple if regions

Currently SI_IF results in a s_and_saveexec_b64 followed by s_xor_b64.
The xor is used to extract only the changed bits. In case of a simple
if region where the only use of that value is in the SI_END_CF to
restore the old exec mask, we can omit the xor and perform an or of
the exec mask with the original exec value saved by the
s_and_saveexec_b64.

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

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

7 years ago[ARM] Minor cosmetic edits (NFC)
Evandro Menezes [Wed, 26 Jul 2017 21:28:20 +0000 (21:28 +0000)]
[ARM] Minor cosmetic edits (NFC)

Change the order of a case and the description for Exynos Mx processors.

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

7 years ago[AArch64] Adjust the cost model for Exynos M1 and M2
Evandro Menezes [Wed, 26 Jul 2017 21:28:15 +0000 (21:28 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2

Add the information for the scalar reciprocal square root approximation.

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

7 years agoClose if statement in config-ix.cmake while checking for i686 arch.
Eric Beckmann [Wed, 26 Jul 2017 21:20:24 +0000 (21:20 +0000)]
Close if statement in config-ix.cmake while checking for i686 arch.

Reapply "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

This reverts commit e7400d7cbc2b7539de3aa7a20adc8f4ee0cb7bef.

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

7 years agoRevert "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"
Eric Beckmann [Wed, 26 Jul 2017 21:11:07 +0000 (21:11 +0000)]
Revert "Set a different var for checking I686, because LLVM_NATIVE_ARCH is"

This reverts commit 38a6db6397364ee91b04afea2cdcb1b5b4d252bf.

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

7 years agoAMDGPU : Widen extending scalar loads to 32-bits.
Wei Ding [Wed, 26 Jul 2017 21:07:28 +0000 (21:07 +0000)]
AMDGPU : Widen extending scalar loads to 32-bits.

Differential Revision: http://reviews.llvm.org/D35146

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

7 years agoSet a different var for checking I686, because LLVM_NATIVE_ARCH is
Eric Beckmann [Wed, 26 Jul 2017 21:03:55 +0000 (21:03 +0000)]
Set a different var for checking I686, because LLVM_NATIVE_ARCH is
overwritten.

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

7 years ago[gold] Relax this tests a little more.
Davide Italiano [Wed, 26 Jul 2017 21:01:57 +0000 (21:01 +0000)]
[gold] Relax this tests a little more.

Thanks to Peter for the report!

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

7 years ago[gold] Relax tests to account for difference in layout across versions.
Davide Italiano [Wed, 26 Jul 2017 20:40:33 +0000 (20:40 +0000)]
[gold] Relax tests to account for difference in layout across versions.

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

7 years agoAMDGPU: Fix using SMRD instructions for argument loads in functions
Matt Arsenault [Wed, 26 Jul 2017 20:39:42 +0000 (20:39 +0000)]
AMDGPU: Fix using SMRD instructions for argument loads in functions

These are not actually uniform values except in kernels.

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

7 years ago[Dominators] Fix typos. NFC.
Jakub Kuderski [Wed, 26 Jul 2017 20:26:13 +0000 (20:26 +0000)]
[Dominators] Fix typos. NFC.

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

7 years agoDisable libxml on i686, because it is a 32 bit architecture and
Eric Beckmann [Wed, 26 Jul 2017 20:22:26 +0000 (20:22 +0000)]
Disable libxml on i686, because it is a 32 bit architecture and
libxml2.so is for 64 bit.

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

7 years agoAMDGPU/GlobalISel: Mark 32-bit G_OR as legal
Tom Stellard [Wed, 26 Jul 2017 20:00:53 +0000 (20:00 +0000)]
AMDGPU/GlobalISel: Mark 32-bit G_OR as legal

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, igorb, dstuttard, tpr, t-tye, llvm-commits

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

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

7 years ago[GISel]: Avoid zero length array when building Instrs that don't have
Aditya Nandakumar [Wed, 26 Jul 2017 19:58:03 +0000 (19:58 +0000)]
[GISel]: Avoid zero length array when building Instrs that don't have
uses.

Also splitting the buildSources part allows more overloads such as
adding MachineOperands directly in the arguments for buildInstr.

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

7 years agoChange CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.
Peter Collingbourne [Wed, 26 Jul 2017 19:15:29 +0000 (19:15 +0000)]
Change CallLoweringInfo::CS to be an ImmutableCallSite instead of a pointer. NFCI.

This was a use-after-free waiting to happen.

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

7 years agoMigrate SimplifyLibCalls to new OptimizationRemarkEmitter
Adam Nemet [Wed, 26 Jul 2017 19:03:18 +0000 (19:03 +0000)]
Migrate SimplifyLibCalls to new OptimizationRemarkEmitter

Summary:
This changes SimplifyLibCalls to use the new OptimizationRemarkEmitter
API.

In fact, as SimplifyLibCalls is only ever called via InstCombine,
(as far as I can tell) the OptimizationRemarkEmitter is added there,
and then passed through to SimplifyLibCalls later.

I have avoided changing any remark text.

This closes PR33787

Patch by Sam Elliott!

Reviewers: anemet, davide

Reviewed By: anemet

Subscribers: davide, mehdi_amini, eraman, fhahn, llvm-commits

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

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

7 years agoThis patch returns proper value to indicate the case when instruction throughput...
Andrew V. Tischenko [Wed, 26 Jul 2017 18:55:14 +0000 (18:55 +0000)]
This patch returns proper value to indicate the case when instruction throughput can't be calculated.
Differential revision https://reviews.llvm.org/D35831

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

7 years agoDo a better job at emitting prefrabricated skeleton CUs.
Adrian Prantl [Wed, 26 Jul 2017 18:48:32 +0000 (18:48 +0000)]
Do a better job at emitting prefrabricated skeleton CUs.

This is a better fix than r308708 for the problem introduced in
r304020. It restores the skeleton CU testcases modified by that commit
to their original form and most importantly ensures that
frontend-generated skeleton CUs (such as used to point to Clang
modules) come after the regular CUs. This broke for DICompileUnit
nodes that don't have any immediate children because they are now
constructed lazily instead of the order in which they are listed in
!llvm.dbg.cu. After this commit we still don't guarantee that order,
but we do guarantee that empty skeletons come last.

Shipping versions of LLDB are very sensitive to the ordering of
CUs. I'll track a fix for LLDB to be more permissive separately.
This fixes a test failure in the LLDB testsuite.

rdar://problem/33357252

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

7 years agoUnlink nodes instead of copying, to avoid memory problems.
Eric Beckmann [Wed, 26 Jul 2017 18:33:21 +0000 (18:33 +0000)]
Unlink nodes instead of copying, to avoid memory problems.

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

7 years ago[Dominators] Change Roots type to SmallVector
Jakub Kuderski [Wed, 26 Jul 2017 18:27:39 +0000 (18:27 +0000)]
[Dominators] Change Roots type to SmallVector

Summary: We can use the template parameter `IsPostDom` to pick an appropriate SmallVector size to store DomTree roots for dominators and postdominators. Before, the code would always allocate memory with `std::vector`.

Reviewers: dberlin, davide, sanjoy, grosser

Reviewed By: grosser

Subscribers: llvm-commits

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

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

7 years ago[Dominators] Move root-finding out of DomTreeBase and simplify it
Jakub Kuderski [Wed, 26 Jul 2017 18:07:40 +0000 (18:07 +0000)]
[Dominators] Move root-finding out of DomTreeBase and simplify it

Summary:
This patch moves root-finding logic from DominatorTreeBase to GenericDomTreeConstruction.h.
It makes the behavior simpler and more consistent by always adding a virtual root to PostDominatorTrees.

Reviewers: dberlin, davide, grosser, sanjoy

Reviewed By: dberlin

Subscribers: llvm-commits

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

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

7 years agoUn-XFAIL some internal lit tests on Windows, they pass for me locally
Reid Kleckner [Wed, 26 Jul 2017 18:04:18 +0000 (18:04 +0000)]
Un-XFAIL some internal lit tests on Windows, they pass for me locally

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

7 years agoDiffing against a file that is itself used in the test seems to be a bad
Eric Beckmann [Wed, 26 Jul 2017 17:47:44 +0000 (17:47 +0000)]
Diffing against a file that is itself used in the test seems to be a bad
idea, because it might get locked down and rendered unopenable.

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

7 years agoSimplify. NFC.
Rafael Espindola [Wed, 26 Jul 2017 17:27:27 +0000 (17:27 +0000)]
Simplify. NFC.

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

7 years agoFix LIT test breakage
George Karpenkov [Wed, 26 Jul 2017 17:19:36 +0000 (17:19 +0000)]
Fix LIT test breakage

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

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

7 years ago[X86][AVX512] Regenerated and cleaned up extension tests.
Simon Pilgrim [Wed, 26 Jul 2017 16:47:00 +0000 (16:47 +0000)]
[X86][AVX512] Regenerated and cleaned up extension tests.

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

7 years ago[X86] Regenerate setcc tests
Simon Pilgrim [Wed, 26 Jul 2017 16:45:57 +0000 (16:45 +0000)]
[X86] Regenerate setcc tests

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

7 years ago[X86][AVX512] Regenerate shuffle tests with broadcast comments.
Simon Pilgrim [Wed, 26 Jul 2017 16:41:18 +0000 (16:41 +0000)]
[X86][AVX512] Regenerate shuffle tests with broadcast comments.

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

7 years ago[X86] Regenerate memset tests
Simon Pilgrim [Wed, 26 Jul 2017 16:39:07 +0000 (16:39 +0000)]
[X86] Regenerate memset tests

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

7 years agoCorrectly enable the llvm-mt tests, now that build flags changed.
Eric Beckmann [Wed, 26 Jul 2017 16:35:44 +0000 (16:35 +0000)]
Correctly enable the llvm-mt tests, now that build flags changed.

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

7 years agoQuote '?' in llvm-rc test
Reid Kleckner [Wed, 26 Jul 2017 16:25:48 +0000 (16:25 +0000)]
Quote '?' in llvm-rc test

Summary:
Bash interperets the '?' character as matching an arbitrary character.
On systems that have a file or directory with exactly one character in
their root directory, '/?' gets reinterpreted into that pathname, which
fails to match the expected Help text for llvm-rc.
This patch quotes the '/?' to avoid that edge case.

Reviewers: mnbvmar, ecbeckmann, rnk

Reviewed By: rnk

Subscribers: dyung, ruiu, llvm-commits

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

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

7 years ago[Hexagon] Mark raise_relocation_error as NORETURN.
Florian Hahn [Wed, 26 Jul 2017 16:07:51 +0000 (16:07 +0000)]
[Hexagon] Mark raise_relocation_error as NORETURN.

Summary:
This silences a couple of implicit fallthrough warnings with GCC 7.1 in
this file.

Reviewers: colinl, kparzysz

Reviewed By: kparzysz

Subscribers: llvm-commits

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

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

7 years agoUpdate the assertion to meet with the changes in r309121. (NFC)
Dehao Chen [Wed, 26 Jul 2017 15:47:00 +0000 (15:47 +0000)]
Update the assertion to meet with the changes in r309121. (NFC)

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

7 years ago[X86] Add combineBT test failure because bits have multiple uses.
Simon Pilgrim [Wed, 26 Jul 2017 15:41:57 +0000 (15:41 +0000)]
[X86] Add combineBT test failure because bits have multiple uses.

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

7 years ago[lit] Mark several of lit's tests XFAIL on Windows
Brian Gesiak [Wed, 26 Jul 2017 15:10:50 +0000 (15:10 +0000)]
[lit] Mark several of lit's tests XFAIL on Windows

Summary:
rL257221 attempted to run lit's own test suite continuously, but that
commit was reverted because lit's test suite does not pass on Windows.
Because lit's tests do not run continuously, they often regress.

In order to un-revert rL257221, mark lit tests that fail as XFAIL for
Windows platforms.

Test Plan:
On a Windows development environment, follow the instructions in
utils/lit/README.txt to run lit's test suite:

```
utils/lit/lit.py \
    --path /path/to/your/llvm/build/bin \
    utils/lit/tests
```

Verify that the test suite is run and a successful exit code is
returned.

Reviewers: mgorny, rnk, delcypher, beanz

Reviewed By: rnk

Subscribers: llvm-commits

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

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

7 years ago[lit] Fix type error for parallelism groups
Brian Gesiak [Wed, 26 Jul 2017 15:02:05 +0000 (15:02 +0000)]
[lit] Fix type error for parallelism groups

Summary:
Whereas rL299560 and rL309071 call `parallelism_groups.items()`, under the
assumption that `parallelism_groups` is a `dict` type, the default
parameter for that attribute is a `list`. Change the default to a
`dict` for type correctness.

This regression in the unit tests would have been caught if the
unit tests were being run continously. It also would have been caught
if the lit project used a Python type checker such as `mypy`.

Test Plan:
As per the instructions in `utils/lit/README.txt`, run the lit unit
test suite:

```
utils/lit/lit.py \
    --path /path/to/your/llvm/build/bin \
    utils/lit/tests
```

Verify that the test `lit :: unit/TestRunner.py` fails before applying this
patch, but passes once this patch is applied.

Reviewers: mgorny, rnk, rafael

Reviewed By: mgorny

Subscribers: llvm-commits

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

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

7 years agoMake new PM honor -fdebug-info-for-profiling
Dehao Chen [Wed, 26 Jul 2017 15:01:20 +0000 (15:01 +0000)]
Make new PM honor -fdebug-info-for-profiling

Summary: The new PM needs to invoke add-discriminator pass when building with -fdebug-info-for-profiling.

Reviewers: chandlerc, davidxl

Reviewed By: chandlerc

Subscribers: sanjoy, llvm-commits

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

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

7 years agoRevert "[lit] Remove dead code not referenced in the LLVM SVN repo."
Brian Gesiak [Wed, 26 Jul 2017 14:59:36 +0000 (14:59 +0000)]
Revert "[lit] Remove dead code not referenced in the LLVM SVN repo."

Summary:
This reverts rL306623, which removed `FileBasedTest`, an abstract base class,
but did not also remove the usages of that class in the lit unit tests.
The revert fixes four test failures in the lit unit test suite.

Test plan:
As per the instructions in `utils/lit/README.txt`, run the lit unit
test suite:

```
utils/lit/lit.py \
    --path /path/to/your/llvm/build/bin \
    utils/lit/tests
```

Verify that the following tests fail before applying this patch, and
pass once the patch is applied:

```
lit :: test-data.py
lit :: test-output.py
lit :: xunit-output.py
```

In addition, run `check-llvm` to make sure the existing LLVM test suite
executes normally.

Reviewers: george.karpenkov, mgorny, dlj

Reviewed By: mgorny

Subscribers: llvm-commits

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

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

7 years ago[docs] change a few code-blocks to llvm from text
Nuno Lopes [Wed, 26 Jul 2017 14:11:23 +0000 (14:11 +0000)]
[docs] change a few code-blocks to llvm from text

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

7 years ago[NFC] test commit.
Stefan Pintilie [Wed, 26 Jul 2017 13:44:59 +0000 (13:44 +0000)]
[NFC] test commit.

Added a comment to explain how to add a PPCISD node.

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

7 years ago[Bash-autocompletion] Show HelpText with possible flags
Yuka Takahashi [Wed, 26 Jul 2017 13:36:58 +0000 (13:36 +0000)]
[Bash-autocompletion] Show HelpText with possible flags

Summary:
`clang --autocomplete=-std` will show
```
-std:   Language standard to compile for
-std=   Language standard to compile for
-stdlib=        C++ standard library to use
```
after this change.

However, showing HelpText with completion in bash seems super tricky, so
this feature will be used in other shells (fish, zsh...).

Reviewers: v.g.vassilev, teemperor, ruiu

Subscribers: cfe-commits, hiraditya

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

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

7 years agoRevert r309094: [globalisel][tablegen] Fuse the generated tables together.
Daniel Sanders [Wed, 26 Jul 2017 13:28:40 +0000 (13:28 +0000)]
Revert r309094: [globalisel][tablegen] Fuse the generated tables together.

The ARM bots have started failing and while this patch should be an improvement
for these bots, it's also the only suspect in the blamelist. Reverting while
Diana and I investigate the problem.

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

7 years agoDAGCombiner: Extend reduceBuildVecToTrunc to handle non-zero offset
Zvi Rackover [Wed, 26 Jul 2017 12:57:03 +0000 (12:57 +0000)]
DAGCombiner: Extend reduceBuildVecToTrunc to handle non-zero offset

Summary:
Adding support for combining power2-strided build_vector's where the
first build_vectori's operand is extracted from a non-zero index.

Example:

 v4i32 build_vector((extract_elt V, 1),
                    (extract_elt V, 3),
                    (extract_elt V, 5),
                    (extract_elt V, 7))
 -->
 v4i32 truncate (bitcast (shuffle<1,u,3,u,5,u,7,u> V, u) to v4i64)

Reviewers: delena, RKSimon, guyblank

Reviewed By: RKSimon

Subscribers: llvm-commits

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

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

7 years ago[X86] Regenerated BT tests
Simon Pilgrim [Wed, 26 Jul 2017 12:49:20 +0000 (12:49 +0000)]
[X86] Regenerated BT tests

Test on 32/64 bit targets where appropriate

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

7 years ago[COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations
Martin Storsjo [Wed, 26 Jul 2017 11:19:17 +0000 (11:19 +0000)]
[COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations

In COFF, a symbol offset can't be stored in the relocation (as is
done in ELF or MachO), but is stored as the immediate in the
instruction itself. The immediate in the ADRP thus is the symbol
offset in bytes, not in pages. For the PAGEOFFSET_12A/L relocations,
ignore any offset outside of the lowest 12 bits; they won't have any
effect on the ADD/LDR/STR instruction itself but only on the associated
ADRP.

This is similar to how the same issue is handled for MOVW/MOVT
instructions in ELF (see e.g. SVN r307713, and r307728 in lld).

This fixes "fixup out of range" errors while building larger object
files, where temporary symbols end up as a plain section symbol and
an offset, and fixes any cases where the symbol offset mean that
the actual target ended up on a different page than the symbol
itself.

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

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

7 years ago[X86] Add urem vector test for non-uniform pow2 constants
Simon Pilgrim [Wed, 26 Jul 2017 11:07:45 +0000 (11:07 +0000)]
[X86] Add urem vector test for non-uniform pow2 constants

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

7 years ago[X86] Regenerated urem pow2 tests on 32/64 bit targets
Simon Pilgrim [Wed, 26 Jul 2017 11:05:16 +0000 (11:05 +0000)]
[X86] Regenerated urem pow2 tests on 32/64 bit targets

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