OSDN Git Service

android-x86/external-llvm.git
7 years ago[CodeGen] Rename DEBUG_TYPE to match passnames
Evandro Menezes [Tue, 11 Jul 2017 22:08:28 +0000 (22:08 +0000)]
[CodeGen] Rename DEBUG_TYPE to match passnames

Rename missing DEBUG_TYPE "machine-scheduler" from backend files, which were
absent from https://reviews.llvm.org/rL303921.

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

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

7 years ago[x86] auto-generate full checks; NFC
Sanjay Patel [Tue, 11 Jul 2017 22:04:36 +0000 (22:04 +0000)]
[x86] auto-generate full checks; NFC

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

7 years ago[mips][mt] Correct spelling error in comment. NFCI.
Simon Dardis [Tue, 11 Jul 2017 21:36:58 +0000 (21:36 +0000)]
[mips][mt] Correct spelling error in comment. NFCI.

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

7 years ago[mips][mt][2/7] Implement .module and .set directives for the MT ASE.
Simon Dardis [Tue, 11 Jul 2017 21:28:36 +0000 (21:28 +0000)]
[mips][mt][2/7] Implement .module and .set directives for the MT ASE.

This patch implements the .module and .set directives for the MT ASE,
notably that .module sets the relevant flags in .MIPS.abiflags and .set
doesn't.

Reviewers: slthakur, atanasyan

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

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

7 years ago[ARM, ELF] Don't shift movt relocation offsets
Martin Storsjo [Tue, 11 Jul 2017 21:07:10 +0000 (21:07 +0000)]
[ARM, ELF] Don't shift movt relocation offsets

For ELF, a movw+movt pair is handled as two separate relocations.
If an offset should be applied to the symbol address, this offset is
stored as an immediate in the instruction (as opposed to stored as an
offset in the relocation itself).

Even though the actual value stored in the movt immediate after linking
is the top half of the value, we need to store the unshifted offset
prior to linking. When the relocation is made during linking, the offset
gets added to the target symbol value, and the upper half of the value
is stored in the instruction.

This makes sure that movw+movt with offset symbols get properly
handled, in case the offset addition in the lower half should be
carried over to the upper half.

This makes the output from the additions to the test case match
the output from GNU binutils.

For COFF and MachO, the movw/movt relocations are handled as a pair,
and the overflow from the lower half gets carried over to the movt,
so they should keep the shifted offset just as before.

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

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

7 years ago [AArch64] Remove unused IsDarwin & IsNotDarwin predicates (NFCI).
Florian Hahn [Tue, 11 Jul 2017 20:56:24 +0000 (20:56 +0000)]
 [AArch64] Remove unused IsDarwin & IsNotDarwin predicates (NFCI).

Reviewers: t.p.northover, rengolin

Reviewed By: t.p.northover

Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls

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

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

7 years ago[LoopUnrollRuntime] NFC: Add some debugging trace messages for why loop wasn't unrolled.
Anna Thomas [Tue, 11 Jul 2017 20:44:37 +0000 (20:44 +0000)]
[LoopUnrollRuntime] NFC: Add some debugging trace messages for why loop wasn't unrolled.

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

7 years ago[ProfileData] Add new option to dump topn hottest functions
Xinliang David Li [Tue, 11 Jul 2017 20:30:43 +0000 (20:30 +0000)]
[ProfileData] Add new option to dump topn hottest functions

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

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

7 years ago[NewGVN] Check for congruency of memory accesses.
Davide Italiano [Tue, 11 Jul 2017 19:49:12 +0000 (19:49 +0000)]
[NewGVN] Check for congruency of memory accesses.

This is fine as nothing in the code relies on leader and memory
leader being the same for a given congruency class. Ack'ed by
Dan.

Fixes PR33720.

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

7 years agoreverting 307677.
Michael Zuckerman [Tue, 11 Jul 2017 19:46:11 +0000 (19:46 +0000)]
reverting 307677.

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

7 years ago[NewGVN] Fix an innocent typo I found while debugging PR33720.
Davide Italiano [Tue, 11 Jul 2017 19:19:45 +0000 (19:19 +0000)]
[NewGVN] Fix an innocent typo I found while debugging PR33720.

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

7 years ago[NewGVN] Clarify the function invariants formatting them properly.
Davide Italiano [Tue, 11 Jul 2017 19:15:36 +0000 (19:15 +0000)]
[NewGVN] Clarify the function invariants formatting them properly.

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

7 years ago[PPC] Fix one test case regression for patch https://reviews.llvm.org/D34337.
Tony Jiang [Tue, 11 Jul 2017 19:07:10 +0000 (19:07 +0000)]
[PPC] Fix one test case regression for patch https://reviews.llvm.org/D34337.

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

7 years ago[LibFuzzer] Fix `-Wcomment` warning emitted by GCC.
Dan Liew [Tue, 11 Jul 2017 18:27:52 +0000 (18:27 +0000)]
[LibFuzzer] Fix `-Wcomment` warning emitted by GCC.

```
./FuzzerIOWindows.cpp:185:1: warning: multi-line comment [-Wcomment]
 // Parse a directory ending in separator, like: SomeDir\
 ^
./FuzzerIOWindows.cpp:200:1: warning: multi-line comment [-Wcomment]
 // Parse a servername and share, like: SomeServer\SomeShare\
 ^
```

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

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

7 years ago[LibFuzzer] Fix `-Wpedantic` warning reported by Eric Christopher.
Dan Liew [Tue, 11 Jul 2017 18:27:48 +0000 (18:27 +0000)]
[LibFuzzer] Fix `-Wpedantic` warning reported by Eric Christopher.

The warning is reproducible with GCC 4.8. Thanks to David Blaikie for
the suggested fix.

The reported warning was

```
/usr/local/google/home/echristo/sources/llvm/lib/Fuzzer/FuzzerExtFunctions.def:29:10: warning: ISO C++ forbids casting between pointer-to-function and pointer-to-object [-Wpedantic]
 EXT_FUNC(__lsan_enable, void, (), false);
          ^
/usr/local/google/home/echristo/sources/llvm/lib/Fuzzer/FuzzerExtFunctionsWeak.cpp:44:24: note: in definition of macro ‘EXT_FUNC’
   CheckFnPtr((void *)::NAME, #NAME, WARN);
                        ^
```

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

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

7 years ago[msan] Only check shadow memory for operands that are sized.
Evgeniy Stepanov [Tue, 11 Jul 2017 18:13:52 +0000 (18:13 +0000)]
[msan] Only check shadow memory for operands that are sized.

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

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

Patch by Matt Morehouse.

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

7 years ago[mips][mt][1/7] Add the MT ASE as a subtarget feature.
Simon Dardis [Tue, 11 Jul 2017 18:03:20 +0000 (18:03 +0000)]
[mips][mt][1/7] Add the MT ASE as a subtarget feature.

Preparatory work for adding the MIPS MT (multi-threading) ASE instructions.

Reviewers: slthakur, atanasyan

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

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

7 years agoRevert "AMDGPU: Do not test for SI in getIsaVersion"
Konstantin Zhuravlyov [Tue, 11 Jul 2017 17:57:41 +0000 (17:57 +0000)]
Revert "AMDGPU: Do not test for SI in getIsaVersion"

This reverts commit r307573.

This breaks downstream test.

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

7 years ago[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Michael Zuckerman [Tue, 11 Jul 2017 17:17:49 +0000 (17:17 +0000)]
[X86][LLVM]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess.
Base test for avx512
adding new base test to trunk befor commit change on the test

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

7 years ago[LoopUnrollRuntime] Avoid multi-exit nested loop with epilog generation
Anna Thomas [Tue, 11 Jul 2017 17:16:33 +0000 (17:16 +0000)]
[LoopUnrollRuntime] Avoid multi-exit nested loop with epilog generation

The loop structure for the outer loop does not contain the epilog
preheader when we try to unroll inner loop with multiple exits and
epilog code is generated. For now, we just bail out in such cases.
Added a test case that shows the problem. Without this bailout, we would
trip on assert saying LCSSA form is incorrect for outer loop.

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

7 years ago[Hexagon] Do not rely on callee-saved info in hasFP
Krzysztof Parzyszek [Tue, 11 Jul 2017 17:11:54 +0000 (17:11 +0000)]
[Hexagon] Do not rely on callee-saved info in hasFP

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

7 years ago[Support] - Add bad alloc error handler for handling allocation malfunctions
Reid Kleckner [Tue, 11 Jul 2017 16:45:30 +0000 (16:45 +0000)]
[Support] - Add bad alloc error handler for handling allocation malfunctions

Summary:
Patch by Klaus Kretzschmar

We would like to introduce a new type of llvm error handler for handling
bad alloc fault situations.  LLVM already provides a fatal error handler
for serious non-recoverable error situations which by default writes
some error information to stderr and calls exit(1) at the end (functions
are marked as 'noreturn').

For long running processes (e.g. a server application), exiting the
process is not an acceptable option, especially not when the system is
in a temporary resource bottleneck with a good chance to recover from
this fault situation. In such a situation you would rather throw an
exception to stop the current compilation and try to overcome the
resource bottleneck. The user should be aware of the problem of throwing
an exception in bad alloc situations, e.g. you must not do any
allocations in the unwind chain. This is especially true when adding
exceptions in existing unfamiliar code (as already stated in the comment
of the current fatal error handler)

So the new handler can also be used to distinguish from general fatal
error situations where recovering is no option.  It should be used in
cases where a clean unwind after the allocation is guaranteed.

This patch contains:
- A report_bad_alloc function which calls a user defined bad alloc
  error handler. If no user handler is registered the
  report_fatal_error function is called. This function is not marked as
  'noreturn'.
- A install/restore_bad_alloc_error_handler to install/restore the bad
  alloc handler.
- An example (in Mutex.cpp) where the report_bad_alloc function is
  called in case of a malloc returns a nullptr.

If this patch gets accepted we would create similar patches to fix
corresponding malloc/calloc usages in the llvm code.

Reviewers: chandlerc, greened, baldrick, rnk

Reviewed By: rnk

Subscribers: llvm-commits, MatzeB

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

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

7 years ago[PPC] Fix two bugs in frame lowering.
Tony Jiang [Tue, 11 Jul 2017 16:42:20 +0000 (16:42 +0000)]
[PPC] Fix two bugs in frame lowering.

1. The available program storage region of the red zone to compilers is 288
 bytes rather than 244 bytes.
2. The formula for negative number alignment calculation should be
y = x & ~(n-1) rather than y = (x + (n-1)) & ~(n-1).

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

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

7 years ago[Hexagon] Add support for nontemporal loads and stores on HVX
Krzysztof Parzyszek [Tue, 11 Jul 2017 16:39:33 +0000 (16:39 +0000)]
[Hexagon] Add support for nontemporal loads and stores on HVX

Patch by Michael Wu.

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

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

7 years ago[lit] Fix import StringIO errors in Python 3
Reid Kleckner [Tue, 11 Jul 2017 16:12:53 +0000 (16:12 +0000)]
[lit] Fix import StringIO errors in Python 3

Remove the cStringIO micro-optimization, as it isn't portable to Python
3.

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

7 years ago[lit] Implement non-pipelined echo commands internally
Reid Kleckner [Tue, 11 Jul 2017 16:05:50 +0000 (16:05 +0000)]
[lit] Implement non-pipelined echo commands internally

Summary:
This speeds up the LLD test suite on Windows by 3x. Most of the time is
spent on lld/test/ELF/linkerscript/diagnostics.s, which repeatedly
constructs linker scripts with appending echo commands.

Reviewers: dlj, zturner, modocache

Subscribers: llvm-commits

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

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

7 years ago[SLPVectorizer] Revert change in cancelScheduling with referencing to FirstInBundle...
Dinar Temirbulatov [Tue, 11 Jul 2017 15:54:50 +0000 (15:54 +0000)]
[SLPVectorizer] Revert change in cancelScheduling with referencing to FirstInBundle, NFCI.

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

7 years ago[IR] Remove unnecessary const_casts from ConstantDataSequential and it's subclasses.
Craig Topper [Tue, 11 Jul 2017 15:52:21 +0000 (15:52 +0000)]
[IR] Remove unnecessary const_casts from ConstantDataSequential and it's subclasses.

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

7 years agofix formatting; NFC
Hiroshi Inoue [Tue, 11 Jul 2017 15:41:31 +0000 (15:41 +0000)]
fix formatting; NFC

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

7 years ago[globalisel][tablegen] Change method of squashing unused variable warnings following...
Daniel Sanders [Tue, 11 Jul 2017 14:23:14 +0000 (14:23 +0000)]
[globalisel][tablegen] Change method of squashing unused variable warnings following post-commit comments.

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

7 years ago[SystemZ] Minor fixing in SystemZScheduleZ13.td
Jonas Paulsson [Tue, 11 Jul 2017 14:07:55 +0000 (14:07 +0000)]
[SystemZ]  Minor fixing in SystemZScheduleZ13.td

Some minor corrections for the recently added instructions.

Review: Ulrich Weigand

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

7 years ago[ARM] GlobalISel: Tighten G_FCMP selection test. NFC
Diana Picus [Tue, 11 Jul 2017 12:34:33 +0000 (12:34 +0000)]
[ARM] GlobalISel: Tighten G_FCMP selection test. NFC

Use CHECK-NEXT for the comparison sequence, to make sure we don't get
any unexpected instructions in the middle of our flag manipulation
efforts.

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

7 years ago[DWARF] - Add testcase for checking message about broken relocations.
George Rimar [Tue, 11 Jul 2017 12:29:07 +0000 (12:29 +0000)]
[DWARF] - Add testcase for checking message about broken relocations.

Addresses comments for r306677, which fixed error message itself.

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

7 years ago[X86][AVX512] regenerate avx512-insert-extract.ll
Guy Blank [Tue, 11 Jul 2017 11:51:49 +0000 (11:51 +0000)]
[X86][AVX512] regenerate avx512-insert-extract.ll

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

7 years ago[ARM] GlobalISel: Add reg mapping for s64 G_FCMP
Diana Picus [Tue, 11 Jul 2017 11:47:45 +0000 (11:47 +0000)]
[ARM] GlobalISel: Add reg mapping for s64 G_FCMP

Map the result into GPR and the operands into FPR.

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

7 years ago[PM] Another post-commit fix in NewPMDriver
Philip Pfaffe [Tue, 11 Jul 2017 11:17:44 +0000 (11:17 +0000)]
[PM] Another post-commit fix in NewPMDriver

There were two errors in the parsing of opt's command line options for
extension point pipelines. The EP callbacks are not supposed to return a
value. To check the pipeline text for correctness, I now try to parse it
into a temporary PM object, and print a message on failure. This solves
the compile time error for the lambda return type, as well as correctly
handles unparsable pipelines now.

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

7 years ago[ARM] GlobalISel: Tighten legalizer tests. NFC
Diana Picus [Tue, 11 Jul 2017 10:52:08 +0000 (10:52 +0000)]
[ARM] GlobalISel: Tighten legalizer tests. NFC

Make sure that all the legalizer tests where the original instruction
needs to be removed check for the removal. We do this by adding
CHECK-NOT lines before and after the replacement sequence. This won't
catch pathological cases where the instruction remains somewhere in the
middle of the instruction sequence that's supposed to replace it, but
hopefully that won't occur in practice (since ideally we'd be setting
the insert point for the new instruction sequence either before or after
the original instruction and not fiddle with it while building the
sequence).

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

7 years ago[globalisel][tablegen] Fix an multi-insn match bug where ComplexPattern is used on...
Daniel Sanders [Tue, 11 Jul 2017 10:40:18 +0000 (10:40 +0000)]
[globalisel][tablegen] Fix an multi-insn match bug where ComplexPattern is used on multiple insns.

In each rule, each use of ComplexPattern is assigned an element in the Renderers
array. The matcher then collects renderer functions in this array and they are
used to render instructions. This works well for a single instruction but a
bug in the allocation mechanism causes the elements to be assigned on a
per-instruction basis rather than a per-rule basis.

So in the case of:
  (set GPR32:$dst, (Op complex:$src1, complex:$src2))
tablegen currently assigns elements 0 and 1 to $src1 and $src2 respectively,
but for:
  (set GPR32:$dst, (Op complex:$src1, (Op complex:$src2)))
it currently assigned both $src1 and $src2 the same element (0). This results in
one complex operand being rendered twice and the other being forgotten.
This patch corrects the allocation such that $src1 and $src2 are still allocated
different elements in this case.

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

7 years ago[ARM] ldr pc,=expression should be allowed in Thumb2
Peter Smith [Tue, 11 Jul 2017 09:47:12 +0000 (09:47 +0000)]
[ARM] ldr pc,=expression should be allowed in Thumb2

This change allows the pc to be used as a destination register for the
pseudo instruction LDR pc,=expression . The pseudo instruction must not be
transformed into a MOV, but it can use the Thumb2 LDR (literal) instruction
to a constant pool entry. See (A7.7.43 from ARMv7M ARM ARM).

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

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

7 years ago[ARM] GlobalISel: Fix oversight in G_FCMP legalization
Diana Picus [Tue, 11 Jul 2017 09:43:51 +0000 (09:43 +0000)]
[ARM] GlobalISel: Fix oversight in G_FCMP legalization

We used to forget to erase the original instruction when replacing a
G_FCMP true/false. Fix this bug and make sure the tests check for it.

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

7 years ago[globalisel][tablegen] Correct matching of intrinsic ID's.
Daniel Sanders [Tue, 11 Jul 2017 08:57:29 +0000 (08:57 +0000)]
[globalisel][tablegen] Correct matching of intrinsic ID's.

TreePatternNode considers them to be plain integers but MachineInstr considers
them to be a distinct kind of operand.

The tweak to AArch64InstrInfo.td to produce a simple test case is a NFC for
everything except GlobalISelEmitter (confirmed by diffing the tablegenerated
files). GlobalISelEmitter is currently unable to infer the type of operands in
the Dst pattern from the operands in the Src pattern.

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

7 years ago[ARM] GlobalISel: Legalize s64 G_FCMP
Diana Picus [Tue, 11 Jul 2017 08:50:01 +0000 (08:50 +0000)]
[ARM] GlobalISel: Legalize s64 G_FCMP

Same as the s32 version, for both hard and soft float.

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

7 years agoRevert Revert [MBP] do not rotate loop if it creates extra branch
Serguei Katkov [Tue, 11 Jul 2017 08:34:58 +0000 (08:34 +0000)]
Revert Revert [MBP] do not rotate loop if it creates extra branch

This is a second attempt to land this patch.

The first one resulted in a crash of clang sanitizer buildbot.
The fix is here and regression test is added.

This is a last fix for the corner case of PR32214. Actually this is not really corner case in general.

We should not do a loop rotation if we create an additional branch due to it.
Consider the case where we have a loop chain H, M, B, C , where
H is header with viable fallthrough from pre-header and exit from the loop
M - some middle block
B - backedge to Header but with exit from the loop also.
C - some cold block of the loop.

Let's H is determined as a best exit. If we do a loop rotation M, B, C, H we can introduce the extra branch.
Let's compute the change in number of branches:
+1 branch from pre-header to header
-1 branch from header to exit
+1 branch from header to middle block if there is such
-1 branch from cold bock to header if there is one

So if C is not a predecessor of H then we introduce extra branch.

This change actually prohibits rotation of the loop if both true
  Best Exit has next element in chain as successor.
  Last element in chain is not a predecessor of first element of chain.

Reviewers: iteratee, xur, sammccall, chandlerc
Reviewed By: iteratee
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34745

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

7 years ago[GlobalISel][X86] Use correct AND instructions.
Igor Breger [Tue, 11 Jul 2017 08:04:51 +0000 (08:04 +0000)]
[GlobalISel][X86] Use correct AND instructions.

AND8ri8 not supported in 64bit.

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

7 years ago[CGP] Relax a bit restriction for optimizeMemoryInst to extend scope
Serguei Katkov [Tue, 11 Jul 2017 06:24:44 +0000 (06:24 +0000)]
[CGP] Relax a bit restriction for optimizeMemoryInst to extend scope

CodeGenPrepare::optimizeMemoryInst contains a check that we do nothing
if all instructions combining the address for memory instruction is in the same
block as memory instruction itself.

However if any of these instruction are placed after memory instruction then
address calculation will not be folded to memory instruction.

The added test case shows an example.

Reviewers: loladiro, spatel, efriedma
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34862

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

7 years agofix typos in comments; NFC
Hiroshi Inoue [Tue, 11 Jul 2017 06:04:59 +0000 (06:04 +0000)]
fix typos in comments; NFC

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

7 years ago[PM/ThinLTO] Fix PR33536, a bug where the ThinLTO bitcode writer was
Chandler Carruth [Tue, 11 Jul 2017 05:39:20 +0000 (05:39 +0000)]
[PM/ThinLTO] Fix PR33536, a bug where the ThinLTO bitcode writer was
querying for analysis results on a function declaration rather than
a definition.

The only reason this worked previously is by chance -- because the way
we got alias analysis results with the legacy PM, we happened to not
compute a dominator tree and so we happened to not hit an assert even
though it didn't make any real sense. Now we bail out before trying to
compute alias analysis so that we don't hit these asserts.

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

7 years ago[PowerPC] fix latency for simple integer instructions in POWER9 scheduler
Hiroshi Inoue [Tue, 11 Jul 2017 05:37:16 +0000 (05:37 +0000)]
[PowerPC] fix latency for simple integer instructions in POWER9 scheduler

In the POWER9 instruction scheduler, SchedWriteRes for the simple integer instructions are misconfigured to use that of (costly) DFU instructions.
This results in surprisingly long instruction latency estimation and causes misbehavior in some optimizers such as if-conversion.

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

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

7 years ago[PowerPC] avoid redundant analysis while lowering an immediate; NFC
Hiroshi Inoue [Tue, 11 Jul 2017 05:28:26 +0000 (05:28 +0000)]
[PowerPC] avoid redundant analysis while lowering an immediate; NFC

This patch reduces compilation time by avoiding redundant analysis while selecting instructions to create an immediate.
If the instruction count required to create the input number without rotate is 2, we do not need further analysis to find a shorter instruction sequence with rotate; rotate + load constant cannot be done by 1 instruction (i.e. getInt64CountDirectnever return 0).
This patch should not change functionality.

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

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

7 years ago[AVR] Remove a few very old TODOs that don't have enough context to understand
Dylan McKay [Tue, 11 Jul 2017 05:14:40 +0000 (05:14 +0000)]
[AVR] Remove a few very old TODOs that don't have enough context to understand

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

7 years ago[InstCombine] Add test case for PR33721.
Craig Topper [Tue, 11 Jul 2017 05:12:52 +0000 (05:12 +0000)]
[InstCombine] Add test case for PR33721.

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

7 years ago[AVR] Rename 'ZREGS' to 'ZREG'
Dylan McKay [Tue, 11 Jul 2017 04:53:43 +0000 (04:53 +0000)]
[AVR] Rename 'ZREGS' to 'ZREG'

It will only ever contain one register.

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

7 years ago[AVR] Rename 'AVRTiny' to 'Tiny'
Dylan McKay [Tue, 11 Jul 2017 04:45:15 +0000 (04:45 +0000)]
[AVR] Rename 'AVRTiny' to 'Tiny'

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

7 years ago[AVR] Use the generic branch relaxer
Dylan McKay [Tue, 11 Jul 2017 04:17:13 +0000 (04:17 +0000)]
[AVR] Use the generic branch relaxer

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

7 years agoWhitespace.
NAKAMURA Takumi [Tue, 11 Jul 2017 02:31:54 +0000 (02:31 +0000)]
Whitespace.

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

7 years agoRevert r307581, "Avoid doing conservative phi checks in aliasSameBasePointerGEPs...
NAKAMURA Takumi [Tue, 11 Jul 2017 02:31:51 +0000 (02:31 +0000)]
Revert r307581, "Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet."

It broke stage2 tests in selfhosting.

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

7 years ago[WebAssembly] Fix use of cast vs dyn_cast
Sam Clegg [Tue, 11 Jul 2017 02:21:57 +0000 (02:21 +0000)]
[WebAssembly] Fix use of cast vs dyn_cast

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

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

7 years ago[llvm-cov] Disable threading in a test. NFC.
Vedant Kumar [Tue, 11 Jul 2017 01:42:12 +0000 (01:42 +0000)]
[llvm-cov] Disable threading in a test. NFC.

PR30735 reports an issue where llvm-cov hangs with a worker thread
waiting on a condition, and the main thread waiting to join() the
workers. While this doesn't appear to be a bug in llvm-cov or the
ThreadPool implementation, it would be helpful to disable the use of
threading in the llvm-cov tests where no test coverage is added.

More context: https://bugs.llvm.org/show_bug.cgi?id=30735

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

7 years ago[llvm-cov] Add a cl::opt to control the number of threads
Vedant Kumar [Tue, 11 Jul 2017 01:23:29 +0000 (01:23 +0000)]
[llvm-cov] Add a cl::opt to control the number of threads

When an output directory is specified, llvm-cov spawns some threads to
speed up the process of writing out file reports. Add an option which
allows users to control how many threads llvm-cov uses.

A CommandGuide.rst update + test is included.

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

7 years agollvm-profdata: Improve memory usage by tuning SmallDenseMap size
David Blaikie [Tue, 11 Jul 2017 01:18:28 +0000 (01:18 +0000)]
llvm-profdata: Improve memory usage by tuning SmallDenseMap size

This takes memory usage from 5.1GB to 970MB - it could go further by
using a small size of 2 instead of the default of 4, but given the
rather high cost of going over this limit by much, I figured a little
slosh would be worth the ~130MB of memory usage.

& this'll might not be such a big deal if we use a custom slab allocator
for the DenseMaps here anyway

While the vast majority (99.9%) of records use only 1 entry, the tuning
parameter to SmallDenseMap is the the number of buckets, not the number
of entries - so a small size of 1 wasn't useful, even for 1 element, it
would tip over into allocating (much, 64 slots worth) more space - none
of them ended up small.

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

7 years ago[cmake] Check for Haiku when setting LIB_NAMES for GNU ld
Andrew Wilkins [Tue, 11 Jul 2017 01:17:44 +0000 (01:17 +0000)]
[cmake] Check for Haiku when setting LIB_NAMES for GNU ld

Haiku uses GNU ld for linking, but is not captured in the
conditional when setting LIB_NAMES. This causes a shared
library with no symbols on Haiku. This patch simply adds
a check for whether the CMake system name is Haiku in
addition to the existing checks.

Patch by Jérôme Duval.

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

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

7 years agoRemove circular dependency from runtimes/CMakeLists
George Karpenkov [Tue, 11 Jul 2017 00:48:00 +0000 (00:48 +0000)]
Remove circular dependency from runtimes/CMakeLists

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

7 years ago[lld/pdb] Create an empty public symbol record stream.
Zachary Turner [Mon, 10 Jul 2017 22:40:20 +0000 (22:40 +0000)]
[lld/pdb] Create an empty public symbol record stream.

This is part of the continuing effort to increase parity between
LLD and MSVC PDBs.  link still doesn't like our PDBs, so the most
obvious thing to check was whether adding an empty publics stream
would get it to do something else.  It still fails in the same way
but at least this removes one more variable from the equation.
The next logical step would be to try creating an empty globals
stream.

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

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

7 years agoDoxygen formatting. NFCI
Joel Jones [Mon, 10 Jul 2017 22:11:50 +0000 (22:11 +0000)]
Doxygen formatting. NFCI

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

7 years agoInstrProf: Fix unit test which accidentally used a duplicate name
Vedant Kumar [Mon, 10 Jul 2017 21:44:43 +0000 (21:44 +0000)]
InstrProf: Fix unit test which accidentally used a duplicate name

This unit test constructed some profile records incorrectly. One of the
records had a duplicate name: adding that record into the writer caused
an error unrelated to what needed to be tested.

Reported by David Blaikie!

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

7 years ago[lld/pdb] Add some basic linker module symbols.
Zachary Turner [Mon, 10 Jul 2017 21:01:37 +0000 (21:01 +0000)]
[lld/pdb] Add some basic linker module symbols.

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

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

7 years agoRevert "[DAG] Improve Aliasing of operations to static alloca"
Matthias Braun [Mon, 10 Jul 2017 20:51:30 +0000 (20:51 +0000)]
Revert "[DAG] Improve Aliasing of operations to static alloca"

Reverting as it breaks tramp3d-v4 in the llvm test-suite. I added some
comments to https://reviews.llvm.org/D33345 about it.

This reverts commit r307546.

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

7 years ago[WebAssembly] Add more details to llvm-readobj for wasm files
Sam Clegg [Mon, 10 Jul 2017 20:47:12 +0000 (20:47 +0000)]
[WebAssembly] Add more details to llvm-readobj for wasm files

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

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

7 years ago[ConstantHoisting] Remove dupliate logic in constant hoisting
Leo Li [Mon, 10 Jul 2017 20:45:34 +0000 (20:45 +0000)]
[ConstantHoisting] Remove dupliate logic in constant hoisting

Summary:
As metioned in https://reviews.llvm.org/D34576, checkings in
`collectConstantCandidates` can be replaced by using
`llvm::canReplaceOperandWithVariable`.

The only special case is that `collectConstantCandidates` return false for
all `IntrinsicInst` but it is safe for us to collect constant candidates from
`IntrinsicInst`.

Reviewers: pirama, efriedma, srhines

Reviewed By: efriedma

Subscribers: llvm-commits, javed.absar

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

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

7 years ago[NewGVN] Simplify a lambda a little bit. NFCI.
Davide Italiano [Mon, 10 Jul 2017 20:45:00 +0000 (20:45 +0000)]
[NewGVN] Simplify a lambda a little bit. NFCI.

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

7 years ago[WebAssembly] Be consistent in generating trivial test input files
Sam Clegg [Mon, 10 Jul 2017 20:43:26 +0000 (20:43 +0000)]
[WebAssembly] Be consistent in generating trivial test input files

For each checked-in wasm file, make sure the there is
corresponding .ll file that can be used to regenerate it
if needed.

Add test/Object/Inputs/trivial-object-test.wasm to match other
formats and add some new wasm tests in test/Object.

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

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

7 years agoAdd DAG argument to canMergeStoresTo NFC.
Nirav Dave [Mon, 10 Jul 2017 20:25:54 +0000 (20:25 +0000)]
Add DAG argument to canMergeStoresTo NFC.

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

7 years ago[Hexagon] Convert typed ISD opcodes to generic ones, NFC
Krzysztof Parzyszek [Mon, 10 Jul 2017 20:16:44 +0000 (20:16 +0000)]
[Hexagon] Convert typed ISD opcodes to generic ones, NFC

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

7 years agoAvoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have...
Farhana Aleen [Mon, 10 Jul 2017 20:15:40 +0000 (20:15 +0000)]
Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet.

Reviewers: Daniel Berlin

Subscribers: llvm-commits

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

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

7 years ago[Hexagon] Remove unused ISD opcodes, NFC
Krzysztof Parzyszek [Mon, 10 Jul 2017 20:13:44 +0000 (20:13 +0000)]
[Hexagon] Remove unused ISD opcodes, NFC

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

7 years agoUse DenseMap instead std::map for GVSummaryMapTy.
Dehao Chen [Mon, 10 Jul 2017 20:12:54 +0000 (20:12 +0000)]
Use DenseMap instead std::map for GVSummaryMapTy.

Summary: This speeds-up thin-link by ~47% for large programs.

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: sanjoy, llvm-commits, mehdi_amini

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

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

7 years agoAMDGPU: Allow SIShrinkInstructions to fold FrameIndexes
Matt Arsenault [Mon, 10 Jul 2017 20:04:35 +0000 (20:04 +0000)]
AMDGPU: Allow SIShrinkInstructions to fold FrameIndexes

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

7 years agoAMDGPU: Allow SIShrinkInstructions to work in non-SSA
Matt Arsenault [Mon, 10 Jul 2017 19:53:57 +0000 (19:53 +0000)]
AMDGPU: Allow SIShrinkInstructions to work in non-SSA

Immediates can be folded as long as the immediate is a vreg.

Also undo commuting instructions if it didn't fold an immediate.

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

7 years agoAMDGPU: Remove unnecessary check for constant operands
Matt Arsenault [Mon, 10 Jul 2017 19:33:38 +0000 (19:33 +0000)]
AMDGPU: Remove unnecessary check for constant operands

An instruction that has an immediate operand can't reach
this point. This is only called for a freshly shrunk instruction,
which prevously couldn't have had a literal constant operand.
This was also not conservative enough since it woudl also have
had to filter other constant-like inputs like frame indexes.

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

7 years agoAMDGPU: Do not test for SI in getIsaVersion
Konstantin Zhuravlyov [Mon, 10 Jul 2017 19:24:05 +0000 (19:24 +0000)]
AMDGPU: Do not test for SI in getIsaVersion

SI is being tested by isa version in the first two if statements of the function.

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

7 years ago[CMake] Dependencies for tests in "runtimes"
George Karpenkov [Mon, 10 Jul 2017 19:23:28 +0000 (19:23 +0000)]
[CMake] Dependencies for tests in "runtimes"

Many of the test cases in the runtimes require LLVM's testing tools, to
facilitate this working as expected we need to have all the test targets
in the runtimes depend on all LLVM testing tools used in the runtimes.

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

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

7 years agoResubmit "Add pdb-diff test."
Zachary Turner [Mon, 10 Jul 2017 19:16:49 +0000 (19:16 +0000)]
Resubmit "Add pdb-diff test."

This was originally reverted because of two issues.
  1) Printing ANSI color escape codes even when outputting to
     a file
  2) Module name comparisons were failing when comparing a PDB
     generated on one machine to a PDB generated on another
     machine.

I attempted to fix #2 by adding command line options which let
you specify prefixes to strip from the beginning of embedded
paths, which effectively lets us specify a path to "base" each
PDB from and only compare the parts under the base.  But this is
tricky because PDB paths always use Windows path syntax, even
when they are created on non-Windows hosts.  A problem still
existed when constructing the prefix to strip, where we were
accidentally using a host-specific path separator instead of
a Windows path separator.

This resubmission fixes the issue on Linux (and I have verified
that the test now passes on Linux).

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

7 years ago[cmake] Remove obsolete unset in CMake.
George Karpenkov [Mon, 10 Jul 2017 18:58:05 +0000 (18:58 +0000)]
[cmake] Remove obsolete unset in CMake.

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

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

7 years ago[docs] Remove obsolete section in CMake documentation.
George Karpenkov [Mon, 10 Jul 2017 18:56:51 +0000 (18:56 +0000)]
[docs] Remove obsolete section in CMake documentation.

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

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

7 years ago[Hexagon] Fix check for HMOTF_ConstExtend operand flag
Krzysztof Parzyszek [Mon, 10 Jul 2017 18:38:52 +0000 (18:38 +0000)]
[Hexagon] Fix check for HMOTF_ConstExtend operand flag

This fixes https://llvm.org/PR33718.

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

7 years ago[WebAssembly] Use the correct size for MCFillFragment
Sam Clegg [Mon, 10 Jul 2017 18:36:34 +0000 (18:36 +0000)]
[WebAssembly] Use the correct size for MCFillFragment

Summary: When implementing MCFillFragment, use the size of the fragment,
rather than the size of the section.

Patch by Dan Gohman

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

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

7 years ago[Hexagon] Handle Hexagon-specific machine operand target flags in MIR
Krzysztof Parzyszek [Mon, 10 Jul 2017 18:31:02 +0000 (18:31 +0000)]
[Hexagon] Handle Hexagon-specific machine operand target flags in MIR

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

7 years ago[PPC CodeGen] Expand the bitreverse.i64 intrinsic.
Tony Jiang [Mon, 10 Jul 2017 18:11:23 +0000 (18:11 +0000)]
[PPC CodeGen] Expand the bitreverse.i64 intrinsic.

Differential Revision: https://reviews.llvm.org/D34908
Fix PR: https://bugs.llvm.org/show_bug.cgi?id=33093

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

7 years ago[Docs] Updating CMake docs to include LLVM_REVERSE_ITERATION
Mandeep Singh Grang [Mon, 10 Jul 2017 17:37:36 +0000 (17:37 +0000)]
[Docs] Updating CMake docs to include LLVM_REVERSE_ITERATION

Reviewers: beanz, mehdi_amini

Reviewed By: beanz

Subscribers: mgorny, llvm-commits

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

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

7 years agoRevert "Build fixes for pdb-diff test."
Zachary Turner [Mon, 10 Jul 2017 17:32:47 +0000 (17:32 +0000)]
Revert "Build fixes for pdb-diff test."

This reverts commit 180af3fdbdb17ec35b45ec1f925fd743b28d37e1.

This is still breaking due to linux-specific path differences.

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

7 years agoBuild fixes for pdb-diff test.
Zachary Turner [Mon, 10 Jul 2017 17:01:28 +0000 (17:01 +0000)]
Build fixes for pdb-diff test.

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

7 years agoFix pdb-diff test.
Zachary Turner [Mon, 10 Jul 2017 16:52:15 +0000 (16:52 +0000)]
Fix pdb-diff test.

A test was checked in on Friday that worked by checking in an
object file and PDB generated locally by MSVC, and then having
the test run lld-link on the object file and diffing LLD's PDB
against the checked in PDB.

This failed because part of the diffing algorithm involves
determining if two modules are the same, and if so drilling into
the module and diffing individual fields of the module.  The
only thing we can use to make this determination though is the
"name" of the module, which is a path to where the module (obj
file) was read from on the machine where it was linked.  This
fails for obvious reasons when comparing a PDB generated on one
machine to a PDB on another machine.

The fix employed here is to add two command line options to the
diff subcommand, which allow the user to specify a "binary root
path".  The bin root path, if specified, is stripped from the
beginning of any embedded PDB paths.  The test is updated to
specify the user's local test output directory for the left
PDB, and is hardcoded to the location where the original PDB
was created for the right PDB.  This way all the equivalence
comparisons should succeed.

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

7 years agoFix invalid cast in instcombine UMul/ZExt idiom
Serge Guelton [Mon, 10 Jul 2017 16:51:40 +0000 (16:51 +0000)]
Fix invalid cast in instcombine UMul/ZExt idiom

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

Do not assume IRBuilder creates Instruction where it can create Value.
Do not assume idiom operands are constant, leave generalisation ot the IRBuilder.

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

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

7 years ago[PowerPC] Reduce register pressure by not materializing a constant just for use as...
Lei Huang [Mon, 10 Jul 2017 16:44:45 +0000 (16:44 +0000)]
[PowerPC] Reduce register pressure by not materializing a constant just for use as an index register for X-Form loads/stores.

For this example:
float test (int *arr) {
    return arr[2];
}

We currently generate the following code:
  li r4, 8
  lxsiwax f0, r3, r4
  xscvsxdsp f1, f0

With this patch, we will now generate:
  addi r3, r3, 8
  lxsiwax f0, 0, r3
  xscvsxdsp f1, f0

Originally reported in: https://bugs.llvm.org/show_bug.cgi?id=27204
Differential Revision: https://reviews.llvm.org/D35027

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

7 years ago[X86] Model 256-bit AVX instructions in the AMD Jaguar scheduler Part-1 (PR28573).
Andrew V. Tischenko [Mon, 10 Jul 2017 16:36:03 +0000 (16:36 +0000)]
[X86] Model 256-bit AVX instructions in the AMD Jaguar scheduler Part-1 (PR28573).
The new version of the model is definitely faster.

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

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

7 years ago[LLVM] Get rid of white spaces in file names in a DebugInfo test. NFC
Eric Liu [Mon, 10 Jul 2017 16:05:18 +0000 (16:05 +0000)]
[LLVM] Get rid of white spaces in file names in a DebugInfo test. NFC

Summary: White spaces in file names are causing Phabricator/SVN to crash.

Reviewers: bkramer

Subscribers: llvm-commits

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

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

7 years ago[DAG] Improve Aliasing of operations to static alloca
Nirav Dave [Mon, 10 Jul 2017 15:39:41 +0000 (15:39 +0000)]
[DAG] Improve Aliasing of operations to static alloca

Memory accesses offset from frame indices may alias, e.g., we
may merge write from function arguments passed on the stack when they
are contiguous. As a result, when checking aliasing, we consider the
underlying frame index's offset from the stack pointer.

Static allocs are realized as stack objects in SelectionDAG, but its
offset is not set until post-DAG causing DAGCombiner's alias check to
consider access to static allocas to frequently alias. Modify isAlias
to consider access between static allocas and access from other frame
objects to be considered aliasing.

Many test changes are included here. Most are fixes for tests which
indirectly relied on our aliasing ability and needed to be modified to
preserve their original intent.

The remaining tests have minor improvements due to relaxed
ordering. The exception is CodeGen/X86/2011-10-19-widen_vselect.ll
which has a minor degradation dispite though the pre-legalized DAG is
improved.

Reviewers: rnk, mkuper, jonpa, hfinkel, uweigand

Reviewed By: rnk

Subscribers: sdardis, nemanjai, javed.absar, llvm-commits

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

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

7 years agoUse emplace_back to replace size() and resize().
Dehao Chen [Mon, 10 Jul 2017 15:31:53 +0000 (15:31 +0000)]
Use emplace_back to replace size() and resize().

Summary: This speeds-up thin-link for ~29% for large programs.

Reviewers: tejohnson

Reviewed By: tejohnson

Subscribers: grandinj, sanjoy, llvm-commits

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

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

7 years ago[LoopUnrollRuntime] Remove strict assert about VMap requirement
Anna Thomas [Mon, 10 Jul 2017 15:29:38 +0000 (15:29 +0000)]
[LoopUnrollRuntime] Remove strict assert about VMap requirement

When unrolling under multiple exits which is under off-by-default option,
the assert that checks for VMap entry in loop exit values is too strong.
(assert if VMap entry did not exist, the value should be a
constant). However, values derived from
constants or from values outside loop, does not have a VMap entry too.

Removed the assert and added a testcase showcasing the property for
non-constant values.

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

7 years ago[PM] Fix a warning.
Philip Pfaffe [Mon, 10 Jul 2017 13:54:23 +0000 (13:54 +0000)]
[PM] Fix a warning.

The DebugLogging argument was unused in the EP callbacks registration.

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