platform/upstream/llvm.git
6 years agoDon't pass ForDefinition_t in places it is redundant.
Rafael Espindola [Wed, 7 Feb 2018 19:04:41 +0000 (19:04 +0000)]
Don't pass ForDefinition_t in places it is redundant.

I found this while looking at the ppc failures caused by the dso_local
change.

The issue was that the patch would produce the wrong answer for
available_externally. Having ForDefinition_t available in places where
the code can just check the linkage is a bit of a foot gun.

This patch removes the ForDefiniton_t argument in places where the
linkage is already know.

llvm-svn: 324499

6 years ago[Driver] Add option to manually control discarding value names in LLVM IR.
Eric Fiselier [Wed, 7 Feb 2018 18:36:51 +0000 (18:36 +0000)]
[Driver] Add option to manually control discarding value names in LLVM IR.

Summary:
Currently, assertion-disabled Clang builds emit value names when generating LLVM IR. This is controlled by the `NDEBUG` macro, and is not easily overridable. In order to get IR output containing names from a release build of Clang, the user must manually construct the CC1 invocation w/o the `-discard-value-names` option. This is less than ideal.

For example, Godbolt uses a release build of Clang, and so when asked to emit LLVM IR the result lacks names, making it harder to read. Manually invoking CC1 on Compiler Explorer is not feasible.

This patch adds the driver options `-fdiscard-value-names` and `-fno-discard-value-names` which allow the user to override the default behavior. If neither is specified, the old behavior remains.

Reviewers: erichkeane, aaron.ballman, lebedev.ri

Reviewed By: aaron.ballman

Subscribers: bogner, cfe-commits

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

llvm-svn: 324498

6 years ago[X86] Regenerate test using update_mir_test_checks.py. NFC
Craig Topper [Wed, 7 Feb 2018 18:32:15 +0000 (18:32 +0000)]
[X86] Regenerate test using update_mir_test_checks.py. NFC

llvm-svn: 324497

6 years ago[asan] Fix filename size on linux platforms.
Yvan Roux [Wed, 7 Feb 2018 18:27:25 +0000 (18:27 +0000)]
[asan] Fix filename size on linux platforms.

This is a a fix for:
https://bugs.llvm.org/show_bug.cgi?id=35996

Use filename limits from system headers to be synchronized with what
LD_PRELOAD can handle.

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

llvm-svn: 324496

6 years ago[OpenMP][libomptarget] Add data sharing support in libomptarget
Gheorghe-Teodor Bercea [Wed, 7 Feb 2018 18:21:55 +0000 (18:21 +0000)]
[OpenMP][libomptarget] Add data sharing support in libomptarget

Summary: This patch extends the libomptarget functionality in patch D14254 with support for the data sharing scheme for supporting implicitly shared variables. The runtime therefore maintains a list of references to shared variables.

Reviewers: carlo.bertolli, ABataev, Hahnfeld, grokos, caomhin, hfinkel

Reviewed By: Hahnfeld, grokos

Subscribers: guansong, llvm-commits, openmp-commits

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

llvm-svn: 324495

6 years agoRevert "AMDGPU: Add 32-bit constant address space"
Rafael Espindola [Wed, 7 Feb 2018 18:09:35 +0000 (18:09 +0000)]
Revert "AMDGPU: Add 32-bit constant address space"

This reverts commit r324487.

It broke clang tests.

llvm-svn: 324494

6 years agoRevert dsymutil -update commits
Jonas Devlieghere [Wed, 7 Feb 2018 17:35:27 +0000 (17:35 +0000)]
Revert dsymutil -update commits

Revert "[dsymutil][test] Check the updated dSYM instead of companion file."
Revert "[dsymutil] Upstream update feature."

llvm-svn: 324493

6 years ago[test] Don't drop existing categories for methods.
Jonas Devlieghere [Wed, 7 Feb 2018 17:34:46 +0000 (17:34 +0000)]
[test] Don't drop existing categories for methods.

The change in r324488 dropped the existing category attribute in for
instance methods. This patch corrects that.

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

llvm-svn: 324492

6 years ago[SelectionDAG] More Aggressibly prune nodes in AddChains. NFCI.
Nirav Dave [Wed, 7 Feb 2018 17:12:34 +0000 (17:12 +0000)]
[SelectionDAG] More Aggressibly prune nodes in AddChains. NFCI.

Travel all chains paths to first non-tokenfactor node can be
exponential work. Add simple redundency check to avoid this.
Fixes PR36264.

llvm-svn: 324491

6 years ago[DebugInfo] Improvements to representation of enumeration types (PR36168)
Momchil Velikov [Wed, 7 Feb 2018 16:52:02 +0000 (16:52 +0000)]
[DebugInfo] Improvements to representation of enumeration types (PR36168)

This patch:

* fixes an incorrect sign-extension of unsigned values, when emitting
  debug info metadata for enumerators
* the enumerators metadata is created with a flag, which determines
  interpretation of the value bits (signed or unsigned)
* the enumerations metadata contains the underlying integer type and a
  flag, indicating whether this is a C++ "fixed enum"

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

llvm-svn: 324490

6 years ago[DebugInfo] Improvements to representation of enumeration types (PR36168)
Momchil Velikov [Wed, 7 Feb 2018 16:46:33 +0000 (16:46 +0000)]
[DebugInfo] Improvements to representation of enumeration types (PR36168)

This patch is the LLVM part of fixing the issues, described in
https://bugs.llvm.org/show_bug.cgi?id=36168

* The representation of enumerator values in the debug info metadata now
  contains a boolean flag isUnsigned, which determines how the bits of
  the value are interpreted.
* The DW_TAG_enumeration type DIE now always (for DWARF version >= 3)
  includes a DW_AT_type attribute, which refers to the underlying
  integer type, as suggested in DWARFv4 (5.7 Enumeration Type Entries).
* The debug info metadata for enumeration type contains (in flags)
  indication whether this is a C++11 "fixed enum".
* For C++11 enumeration with a fixed underlying type, the DIE also
  includes the DW_AT_enum_class attribute (for DWARF version >= 4).
* Encoding of enumerator constants uses DW_FORM_sdata for signed values
  and DW_FORM_udata for unsigned values, as suggested by DWARFv4 (7.5.4
  Attribute Encodings).

The changes should be backwards compatible:

* the isUnsigned attribute is optional and defaults to false.
* if the underlying type for the enumeration is not available, the
  enumerator values are considered signed.
* the FixedEnum flag defaults to clear.
* the bitcode format for DIEnumerator stores the unsigned flag bit #1 of
  the first record element, so the format does not change and the zero
  previously stored there is consistent with the false default for
  IsUnsigned.

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

llvm-svn: 324489

6 years ago[test] Enable setting category for inline tests.
Jonas Devlieghere [Wed, 7 Feb 2018 16:10:59 +0000 (16:10 +0000)]
[test] Enable setting category for inline tests.

Inlined tests have a test function that is actually an instance method,
which requires a slightly different approach when it comes to setting
the category attribute. The attribute must be set on the actual
function, rather than on a particular instance.

llvm-svn: 324488

6 years agoAMDGPU: Add 32-bit constant address space
Marek Olsak [Wed, 7 Feb 2018 16:01:00 +0000 (16:01 +0000)]
AMDGPU: Add 32-bit constant address space

Note: This is a candidate for LLVM 6.0, because it was planned to be
      in that release but was delayed due to a long review period.

Merge conflict in release_60 - resolution:
    Add "-p6:32:32" into the second (non-amdgiz) string.

Only scalar loads support 32-bit pointers. An address in a VGPR will
fail to compile. That's OK because the results of loads will only be used
in places where VGPRs are forbidden.

Updated AMDGPUAliasAnalysis and used SReg_64_XEXEC.
The tests cover all uses cases we need for Mesa.

Reviewers: arsenm, nhaehnle

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

llvm-svn: 324487

6 years agoAMDGPU: Remove the s_buffer workaround for GFX9 chips
Marek Olsak [Wed, 7 Feb 2018 16:00:40 +0000 (16:00 +0000)]
AMDGPU: Remove the s_buffer workaround for GFX9 chips

Summary:
I checked the AMD closed source compiler and the workaround is only
needed when x3 is emulated as x4, which we don't do in LLVM.

SMEM x3 opcodes don't exist, and instead there is a possibility to use x4
with the last component being unused. If the last component is out of
buffer bounds and falls on the next 4K page, the hw hangs.

Reviewers: arsenm, nhaehnle

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, llvm-commits, t-tye

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

llvm-svn: 324486

6 years ago[X86][AVX] Add PACKSSDW/PACKUSDW support for truncation of clamped values
Simon Pilgrim [Wed, 7 Feb 2018 15:48:44 +0000 (15:48 +0000)]
[X86][AVX] Add PACKSSDW/PACKUSDW support for truncation of clamped values

SSE and shorter vector sizes will have to wait until we can add support for general SMIN/SMAX matching.

llvm-svn: 324485

6 years ago[dsymutil][test] Check the updated dSYM instead of companion file.
Jonas Devlieghere [Wed, 7 Feb 2018 15:18:21 +0000 (15:18 +0000)]
[dsymutil][test] Check the updated dSYM instead of companion file.

This patch has llvm-dwarfdump check the whole dSYM, rather than the
hard-coded path to the Mach-O companion file. This might be what's
causing the Windows bot to fail.

llvm-svn: 324483

6 years ago[SLPVectorizer][NFC] Make a loop more readable.
Clement Courbet [Wed, 7 Feb 2018 14:26:43 +0000 (14:26 +0000)]
[SLPVectorizer][NFC] Make a loop more readable.

llvm-svn: 324482

6 years agoCorrect a bug in GetArgsAndEnv() for NetBSD
Kamil Rytarowski [Wed, 7 Feb 2018 14:05:57 +0000 (14:05 +0000)]
Correct a bug in GetArgsAndEnv() for NetBSD

Fix setting envp.

llvm-svn: 324481

6 years ago[dsymutil] Upstream update feature.
Jonas Devlieghere [Wed, 7 Feb 2018 13:51:29 +0000 (13:51 +0000)]
[dsymutil] Upstream update feature.

Now that dsymutil can generate accelerator tables, we can upstream the
update logic that, as the name implies, updates the accelerator tables
in an existing dSYM bundle. In combination with `-minimize` this can be
used to remove redundant .debug_(inlines|pubtypes|pubnames).

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

llvm-svn: 324480

6 years ago[X86] Regenerate atomic i32 tests
Simon Pilgrim [Wed, 7 Feb 2018 13:28:23 +0000 (13:28 +0000)]
[X86] Regenerate atomic i32 tests

llvm-svn: 324479

6 years ago[Orc] Pacify -pedantic.
Benjamin Kramer [Wed, 7 Feb 2018 12:55:01 +0000 (12:55 +0000)]
[Orc] Pacify -pedantic.

llvm-svn: 324478

6 years ago[mips] Support 'y' operand code to print exact log2 of the operand
Simon Atanasyan [Wed, 7 Feb 2018 12:36:39 +0000 (12:36 +0000)]
[mips] Support 'y' operand code to print exact log2 of the operand

llvm-svn: 324477

6 years ago[mips] Handle 'M' and 'L' operand codes for memory operands
Simon Atanasyan [Wed, 7 Feb 2018 12:36:33 +0000 (12:36 +0000)]
[mips] Handle 'M' and 'L' operand codes for memory operands

Both operand codes now work the same way in case of register or memory
operands. It print high-order or low-order word in a double-word
register or memory location.

llvm-svn: 324476

6 years ago[clangd] Do not precent-encode numbers in URI.
Eric Liu [Wed, 7 Feb 2018 12:12:06 +0000 (12:12 +0000)]
[clangd] Do not precent-encode numbers in URI.

Reviewers: ilya-biryukov

Subscribers: klimek, jkorous-apple, cfe-commits, sammccall

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

llvm-svn: 324475

6 years ago[BinaryFormat] Remove dangling declaration of DiscriminantString
Pavel Labath [Wed, 7 Feb 2018 11:19:29 +0000 (11:19 +0000)]
[BinaryFormat] Remove dangling declaration of DiscriminantString

The implementation of the function was deleted in r324426. This also
removes the declaration.

llvm-svn: 324474

6 years agoRe-enable "[SCEV] Make isLoopEntryGuardedByCond a bit smarter"
Max Kazantsev [Wed, 7 Feb 2018 11:16:29 +0000 (11:16 +0000)]
Re-enable "[SCEV] Make isLoopEntryGuardedByCond a bit smarter"

The failures happened because of assert which was overconfident about
SCEV's proving capabilities and is generally not valid.

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

llvm-svn: 324473

6 years agoRemove function DW_DSC_value_to_name
Pavel Labath [Wed, 7 Feb 2018 11:13:21 +0000 (11:13 +0000)]
Remove function DW_DSC_value_to_name

It is unused, and the underlying llvm function has been removed as well.

llvm-svn: 324472

6 years ago[clang-format] Fix ObjC message arguments formatting.
Jacek Olesiak [Wed, 7 Feb 2018 10:35:08 +0000 (10:35 +0000)]
[clang-format] Fix ObjC message arguments formatting.

Summary:
Fixes formatting of ObjC message arguments when inline block is a first
argument.

Having inline block as a first argument when method has multiple parameters is
discouraged by Apple:
"It’s best practice to use only one block argument to a method. If the
method also needs other non-block arguments, the block should come last"
(https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html#//apple_ref/doc/uid/TP40011210-CH8-SW7),
it should be correctly formatted nevertheless.

Current formatting:
```
[object blockArgument:^{
  a = 42;
}
    anotherArg:42];
```

Fixed (colon alignment):
```
[object
  blockArgument:^{
    a = 42;
  }
     anotherArg:42];
```

Test Plan: make -j12 FormatTests && tools/clang/unittests/Format/FormatTests

Reviewers: krasimir, benhamilton

Reviewed By: krasimir, benhamilton

Subscribers: benhamilton, klimek, cfe-commits

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

llvm-svn: 324469

6 years ago[ELF][MIPS] Mark the test as required MIPS target support. NFC
Simon Atanasyan [Wed, 7 Feb 2018 10:14:22 +0000 (10:14 +0000)]
[ELF][MIPS] Mark the test as required MIPS target support. NFC

llvm-svn: 324468

6 years ago[ELF][MIPS] Ignore incorrect version definition index for _gp_disp symbol
Simon Atanasyan [Wed, 7 Feb 2018 10:02:49 +0000 (10:02 +0000)]
[ELF][MIPS] Ignore incorrect version definition index for _gp_disp symbol

MIPS BFD linker puts _gp_disp symbol into DSO files and assigns zero
version definition index to it. This value means 'unversioned local
symbol' while _gp_disp is a section global symbol. We have to handle
this bug in the LLD because BFD linker is used for building MIPS
toolchain libraries.

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

llvm-svn: 324467

6 years ago[MergeICmps] Re-commit rL324317 "Enable the MergeICmps Pass by default."
Clement Courbet [Wed, 7 Feb 2018 09:58:55 +0000 (09:58 +0000)]
[MergeICmps] Re-commit rL324317 "Enable the MergeICmps Pass by default."

With fixes from rL324341.

Original commit message:

[MergeICmps] Enable the MergeICmps Pass by default.

Summary: Now that PR33325 is fixed, this should always improve the generated code.

Reviewers: spatel

Subscribers: llvm-commits

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

llvm-svn: 324465

6 years ago[ELF] - Fix BB after r324463.
George Rimar [Wed, 7 Feb 2018 09:41:14 +0000 (09:41 +0000)]
[ELF] - Fix BB after r324463.

Test requires arm, but specified x86.

llvm-svn: 324464

6 years ago[ELF] - Remove unused synthetic sections correctly.
George Rimar [Wed, 7 Feb 2018 09:11:07 +0000 (09:11 +0000)]
[ELF] - Remove unused synthetic sections correctly.

This is PR35740 which now crashes
because we remove unused synthetic sections incorrectly.

We can keep input section description and corresponding output
section live even if it must be empty and dead.
This results in a crash because SHF_LINK_ORDER handling code
tries to access first section which is nullptr in this case.

Patch fixes the issue.

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

llvm-svn: 324463

6 years agoRevert [SCEV] Make isLoopEntryGuardedByCond a bit smarter
Serguei Katkov [Wed, 7 Feb 2018 09:10:08 +0000 (09:10 +0000)]
Revert [SCEV] Make isLoopEntryGuardedByCond a bit smarter

Revert rL324453 commit which causes buildbot failures.

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

llvm-svn: 324462

6 years ago[ELF] - Make defsym to work correctly with reserved symbols.
George Rimar [Wed, 7 Feb 2018 09:00:34 +0000 (09:00 +0000)]
[ELF] - Make defsym to work correctly with reserved symbols.

Previously --defsym=foo2=etext+2 would produce incorrect value
for foo2 because expressions did not work correctly with
reserved symbols, section offset was calculated wrong for them.

Fixes PR35744.

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

llvm-svn: 324461

6 years ago[ELF] - Allow set CPU string with -plugin-opt=mcpu=<xxx>
George Rimar [Wed, 7 Feb 2018 08:50:36 +0000 (08:50 +0000)]
[ELF] - Allow set CPU string with -plugin-opt=mcpu=<xxx>

Previously we ignored -plugin-opt=mcpu=<xxx>
and the only way to set CPU string was to pass
-mllvm -mcpu=<xxx>
Though clang may pass it with use of plugin options:
-plugin-opt=mcpu=x86-64
Since we are trying to be compatible in command line
with gold plugin, seems we should support it too.

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

llvm-svn: 324459

6 years agoRevert r324455 "[ThinLTO] - Simplify code in ThinLTOBitcodeWriter."
George Rimar [Wed, 7 Feb 2018 08:46:36 +0000 (08:46 +0000)]
Revert r324455 "[ThinLTO] - Simplify code in ThinLTOBitcodeWriter."

It broke BB:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/23721

llvm-svn: 324458

6 years ago[ELF] - Add testcase for -debugger-tune=<value>
George Rimar [Wed, 7 Feb 2018 08:43:19 +0000 (08:43 +0000)]
[ELF] - Add testcase for -debugger-tune=<value>

In D42733 we supported different LTO command line
options, including -debugger-tune=<value>.

Initially debugger-tune support was needed to fix PR36035.
Patch adds testcase for this option to check we
don't simply ignore it.

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

llvm-svn: 324457

6 years ago[ARM] FP16 mov imm pattern
Sjoerd Meijer [Wed, 7 Feb 2018 08:37:17 +0000 (08:37 +0000)]
[ARM] FP16 mov imm pattern

This is a follow up of r324321, adding a match pattern for mov with a FP16
immediate (also fixing operand vfp_f16imm that wasn't even compiling).

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

llvm-svn: 324456

6 years ago[ThinLTO] - Simplify code in ThinLTOBitcodeWriter.
George Rimar [Wed, 7 Feb 2018 08:32:35 +0000 (08:32 +0000)]
[ThinLTO] - Simplify code in ThinLTOBitcodeWriter.

Recently introduced convertToDeclaration is very similar
to code used in filterModule function.
Patch reuses it to reduce duplication.

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

llvm-svn: 324455

6 years ago[Fuzzer] Use Zircon's public API on Fuchsia
Petr Hosek [Wed, 7 Feb 2018 08:22:58 +0000 (08:22 +0000)]
[Fuzzer] Use Zircon's public API on Fuchsia

The original libFuzzer Fuchsia port relied on convenience libraries,
but these are not exported as part of Fuchsia sysroot. This change
eliminates the use of these libraries and relies on public API only.

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

llvm-svn: 324454

6 years ago[SCEV] Make isLoopEntryGuardedByCond a bit smarter
Max Kazantsev [Wed, 7 Feb 2018 07:56:26 +0000 (07:56 +0000)]
[SCEV] Make isLoopEntryGuardedByCond a bit smarter

Sometimes `isLoopEntryGuardedByCond` cannot prove predicate `a > b` directly.
But it is a common situation when `a >= b` is known from ranges and `a != b` is
known from a dominating condition. Thia patch teaches SCEV to sum these facts
together and prove strict comparison via non-strict one.

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

llvm-svn: 324453

6 years agoThe xfailed test from r324448 passed on one of the bots: remove it entirely for now.
Michael Zolotukhin [Wed, 7 Feb 2018 06:54:11 +0000 (06:54 +0000)]
The xfailed test from r324448 passed on one of the bots: remove it entirely for now.

llvm-svn: 324451

6 years ago[LoopPrediction] Introduce utility function getLatchPredicateForGuard. NFC.
Serguei Katkov [Wed, 7 Feb 2018 06:53:37 +0000 (06:53 +0000)]
[LoopPrediction] Introduce utility function getLatchPredicateForGuard. NFC.

Factor out getting the predicate for latch condition in a guard to
utility function getLatchPredicateForGuard.

llvm-svn: 324450

6 years ago[x86/retpoline] Make the external thunk names exactly match the names
Chandler Carruth [Wed, 7 Feb 2018 06:16:24 +0000 (06:16 +0000)]
[x86/retpoline] Make the external thunk names exactly match the names
that happened to end up in GCC.

This is really unfortunate, as the names don't have much rhyme or reason
to them. Originally in the discussions it seemed fine to rely on aliases
to map different names to whatever external thunk code developers wished
to use but there are practical problems with that in the kernel it turns
out. And since we're discovering this practical problems late and since
GCC has already shipped a release with one set of names, we are forced,
yet again, to blindly match what is there.

Somewhat rushing this patch out for the Linux kernel folks to test and
so we can get it patched into our releases.

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

llvm-svn: 324449

6 years agoXfail the test added in r324445 until the underlying issue in LoopSink is fixed.
Michael Zolotukhin [Wed, 7 Feb 2018 06:11:50 +0000 (06:11 +0000)]
Xfail the test added in r324445 until the underlying issue in LoopSink is fixed.

llvm-svn: 324448

6 years ago[LegalizeDAG] Truncate condition operand of ISD::SELECT
Eugene Leviant [Wed, 7 Feb 2018 05:38:29 +0000 (05:38 +0000)]
[LegalizeDAG] Truncate condition operand of ISD::SELECT

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

llvm-svn: 324447

6 years agoAMDGPU/GlobalISel: Mark 32-bit G_FPTOUI as legal
Tom Stellard [Wed, 7 Feb 2018 04:47:59 +0000 (04:47 +0000)]
AMDGPU/GlobalISel: Mark 32-bit G_FPTOUI as legal

Reviewers: arsenm

Reviewed By: arsenm

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

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

llvm-svn: 324446

6 years agoFollow-up for r324429: "[LCSSAVerification] Run verification only when asserts are...
Michael Zolotukhin [Wed, 7 Feb 2018 04:24:44 +0000 (04:24 +0000)]
Follow-up for r324429: "[LCSSAVerification] Run verification only when asserts are enabled."

Before r324429 we essentially didn't have a verification of LCSSA, so
no wonder that it has been broken: currently loop-sink breaks it (the
attached test illustrates the failure).

It was detected during a stage2 RA build, so to unbreak it I'm disabling
the check for now.

llvm-svn: 324445

6 years ago[ThinLTO] Serialize WithGlobalValueDeadStripping index flag for distributed backends
Teresa Johnson [Wed, 7 Feb 2018 04:05:59 +0000 (04:05 +0000)]
[ThinLTO] Serialize WithGlobalValueDeadStripping index flag for distributed backends

Summary:
A recent fix to drop dead symbols (r323633) did not work for ThinLTO
distributed backends because we lose the WithGlobalValueDeadStripping
set on the index during the thin link. This patch adds a new flags
record to the bitcode format for the index, and serializes this flag
for the combined index (it would always be 0 for the per-module index
generated by the compile step, so no need to serialize the new flags
record there until/unless we add another flag that applies to the
per-module indexes).

Generally this flag should always be set for the distributed backends,
which are necessarily performed after the thin link. However, if we were
to simply set this flag on the index applied to the distributed backends
(invoked via clang), we would lose the ability to disable dead stripping
via -compute-dead=false for debugging purposes.

Reviewers: grimar, pcc

Subscribers: mehdi_amini, inglorion, eraman, llvm-commits

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

llvm-svn: 324444

6 years ago[WebAssembly] Add __data_end link-sythentic symbol.
Sam Clegg [Wed, 7 Feb 2018 03:04:53 +0000 (03:04 +0000)]
[WebAssembly] Add __data_end link-sythentic symbol.

This is similar to _end (See https://linux.die.net/man/3/edata for more)
but using our own unique name since our use cases will most likely be
different and we want to keep our options open WRT to memory layout.

This change will allow is to remove the DataSize from the linking
metadata section which is currently being used by emscripten to derive
the end of the data.

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

llvm-svn: 324443

6 years agoGlobalISel: Always check operand types when executing match table
Volkan Keles [Wed, 7 Feb 2018 02:44:51 +0000 (02:44 +0000)]
GlobalISel: Always check operand types when executing match table

Summary:
Some of the commands tries to get the register without checking
if the specified operands is a register and causing crash. All commands
should check the type of the operand first and reject if the type is
not expected.

Reviewers: dsanders, qcolombet

Reviewed By: qcolombet

Subscribers: qcolombet, rovka, kristof.beyls, llvm-commits

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

llvm-svn: 324442

6 years agotest: use target triple for the test
Saleem Abdulrasool [Wed, 7 Feb 2018 02:27:34 +0000 (02:27 +0000)]
test: use target triple for the test

Now that `pragma comment` is also used on ELF-ish targets with a
restricted set of options, we need to specify the full target here for
the test.

llvm-svn: 324441

6 years ago[AMDGPU] Suppress redundant waitcnt instrs.
Mark Searles [Wed, 7 Feb 2018 02:21:21 +0000 (02:21 +0000)]
[AMDGPU] Suppress redundant waitcnt instrs.

1. Run the memory legalizer prior to the waitcnt pass; keep the policy that the waitcnt pass does not remove any waitcnts within the incoming IR.

2. The waitcnt pass doesn't (yet) track waitcnts that exist prior to the waitcnt pass (it just skips over them); because the waitcnt pass is ignorant of them, it may insert a redundant waitcnt. To avoid this, check the prev instr. If it and the to-be-inserted waitcnt are the same, suppress the insertion. We keep the existing waitcnt under the assumption that whomever, e.g., the memory legalizer, inserted it knows what they were doing.

3. Follow-on work: teach the waitcnt pass to record the pre-existing waitcnts for better waitcnt production.

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

llvm-svn: 324440

6 years agoAST: support SwiftCC on MS ABI
Saleem Abdulrasool [Wed, 7 Feb 2018 01:55:08 +0000 (01:55 +0000)]
AST: support SwiftCC on MS ABI

Microsoft has reserved the identifier 'S' as the swift calling
convention.  Decorate the symbols appropriately.  This enables swift on
Windows.

llvm-svn: 324439

6 years agoSupport `#pragma comment(lib, "name")` in the frontend for ELF
Saleem Abdulrasool [Wed, 7 Feb 2018 01:46:46 +0000 (01:46 +0000)]
Support `#pragma comment(lib, "name")` in the frontend for ELF

This adds the frontend support required to support the use of the
comment pragma to enable auto linking on ELFish targets. This is a
generic ELF extension supported by LLVM. We need to change the handling
for the "dependentlib" in order to accommodate the previously discussed
encoding for the dependent library descriptor. Without the custom
handling of the PCK_Lib directive, the -l prefixed option would be
encoded into the resulting object (which is treated as a frontend
error).

llvm-svn: 324438

6 years agolldb running on an ios device is using the _dyld_get_all_image_infos()
Jason Molenda [Wed, 7 Feb 2018 01:28:29 +0000 (01:28 +0000)]
lldb running on an ios device is using the _dyld_get_all_image_infos()
SPI call to to find its own shared cache's UUID.  On newer sytems we
need to use the a new SPI which will return the UUID directly.

<rdar://problem/36625871>

llvm-svn: 324437

6 years ago[Mips][AMDGPU] Update test cases to not use vector lt/gt compares that can be simplif...
Craig Topper [Wed, 7 Feb 2018 00:51:37 +0000 (00:51 +0000)]
[Mips][AMDGPU] Update test cases to not use vector lt/gt compares that can be simplified to an equality/inequality or to always true/false.

For example 'ugt X, 0' can be simplified to 'ne X, 0'. Or 'uge X, 0' is always true.

We already simplify this for scalars in SimplifySetCC, but we don't currently for vectors in SimplifySetCC. D42948 proposes to change that.

llvm-svn: 324436

6 years agoDon't set dso_local flag in LTO resolutions for absolute symbols defined in ELF
Dmitry Mikulin [Wed, 7 Feb 2018 00:49:51 +0000 (00:49 +0000)]
Don't set dso_local flag in LTO resolutions for absolute symbols defined in ELF
objects, it confuses codegen into generating pc-rel relocations for those
symbols, which leads to linker errors.

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

llvm-svn: 324435

6 years agoMake sure that --no-check-sections doesn't print out warning messages.
Rui Ueyama [Wed, 7 Feb 2018 00:41:34 +0000 (00:41 +0000)]
Make sure that --no-check-sections doesn't print out warning messages.

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

llvm-svn: 324434

6 years ago[NFC] Change odd cast-through-unknown behavior to an Optional
Erich Keane [Wed, 7 Feb 2018 00:37:19 +0000 (00:37 +0000)]
[NFC] Change odd cast-through-unknown behavior to an Optional

This bit of code in the driver uses '~0U' as a sentinel value.
The result is an odd mishmash of casts just to work.  This replaces
it with an optional,  which is a little less crazy looking.
--ehis line, and those below, will be ignored--

M    lib/Driver/Driver.cpp

llvm-svn: 324433

6 years ago[clang-tidy] Update fuchsia-multiple-inheritance to check for templates
Julie Hockett [Wed, 7 Feb 2018 00:33:50 +0000 (00:33 +0000)]
[clang-tidy] Update fuchsia-multiple-inheritance to check for templates

Updating fuchsia-multiple-inheritance to not crash when a record
inherits a template.

Fixes PR36052.

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

llvm-svn: 324432

6 years agoAMDGPU: Select BFI patterns with 64-bit ints
Matt Arsenault [Wed, 7 Feb 2018 00:21:34 +0000 (00:21 +0000)]
AMDGPU: Select BFI patterns with 64-bit ints

llvm-svn: 324431

6 years ago[NFC] Correct a typo'ed comment and reworded, since it is awkward.
Erich Keane [Wed, 7 Feb 2018 00:19:58 +0000 (00:19 +0000)]
[NFC] Correct a typo'ed comment and reworded, since it is awkward.

llvm-svn: 324430

6 years ago[LCSSAVerification] Run verification only when asserts are enabled.
Michael Zolotukhin [Wed, 7 Feb 2018 00:13:08 +0000 (00:13 +0000)]
[LCSSAVerification] Run verification only when asserts are enabled.

llvm-svn: 324429

6 years agoSimplify libtool compatibility hack.
Rafael Espindola [Wed, 7 Feb 2018 00:13:01 +0000 (00:13 +0000)]
Simplify libtool compatibility hack.

I tested that if I remove "elf" from the message, building a program
that uses libtool prints

checking whether to build shared libraries... no

but with this patch it still prints

checking whether to build shared libraries... yes

llvm-svn: 324428

6 years ago[DAGCombiner][AMDGPU][X86] Turn cttz/ctlz into cttz_zero_undef/ctlz_zero_undef if...
Craig Topper [Tue, 6 Feb 2018 23:54:37 +0000 (23:54 +0000)]
[DAGCombiner][AMDGPU][X86] Turn cttz/ctlz into cttz_zero_undef/ctlz_zero_undef if we can prove the input is never zero

X86 currently has a late DAG combine after cttz/ctlz are turned into BSR+BSF+CMOV to detect this and remove the CMOV. But we should be able to do this much earlier and avoid creating the cmov all together.

For the changed AMDGPU test case it appears that previously the i8 cttz was type legalized to i16 which introduced an OR with 256 in order to limit the result to 8 on the widened type. At this point the result is known to never be zero, but nothing checked that. Then operation legalization is told to promote all i16 cttz to i32. This introduces an extend and a truncate and another OR with 65536 to limit the result to 16. With the DAG combiner change we are able to prevent the creation of the second OR since the opcode will have been changed to cttz_zero_undef after the first OR. I the lack of the OR caused the instruction to change to v_ffbl_b32_sdwa

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

llvm-svn: 324427

6 years agoAdd DWARF for discriminated unions
Adrian Prantl [Tue, 6 Feb 2018 23:45:59 +0000 (23:45 +0000)]
Add DWARF for discriminated unions

n Rust, an enum that carries data in the variants is, essentially, a
discriminated union. Furthermore, the Rust compiler will perform
space optimizations on such enums in some situations. Previously,
DWARF for these constructs was emitted using a hack (a magic field
name); but this approach stopped working when more space optimizations
were added in https://github.com/rust-lang/rust/pull/45225.

This patch changes LLVM to allow discriminated unions to be
represented in DWARF. It adds createDiscriminatedUnionType and
createDiscriminatedMemberType to DIBuilder and then arranges for this
to be emitted using DWARF's DW_TAG_variant_part and DW_TAG_variant.

Note that DWARF requires that a discriminated union be represented as
a structure with a variant part. However, as Rust only needs to emit
pure discriminated unions, this is what I chose to expose on
DIBuilder.

Patch by Tom Tromey!

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

llvm-svn: 324426

6 years ago[Sema][ObjC] Use SmallSetVector to fix a failing test on the reverse
Akira Hatanaka [Tue, 6 Feb 2018 23:44:40 +0000 (23:44 +0000)]
[Sema][ObjC] Use SmallSetVector to fix a failing test on the reverse
iteration bot.

This commit reverts r315639, which was causing clang to print
diagnostics that weren't printed before. Instead, it declares
OverrideSearch::Overridden as a SmallSetVector to fix the
non-deterministic behavior r315639 was trying to fix.

rdar://problem/36445528

llvm-svn: 324425

6 years agoPlace undefined globals in .bss instead of .data
Eli Friedman [Tue, 6 Feb 2018 23:22:14 +0000 (23:22 +0000)]
Place undefined globals in .bss instead of .data

Following up on the discussion from
http://lists.llvm.org/pipermail/llvm-dev/2017-April/112305.html, undef
values are now placed in the .bss as well as null values. This prevents
undef global values taking up potentially huge amounts of space in the
.data section.

The following two lines now both generate equivalent .bss data:

@vals1 = internal unnamed_addr global [20000000 x i32] zeroinitializer, align 4
@vals2 = internal unnamed_addr global [20000000 x i32] undef, align 4 ; previously unaccounted for

This is primarily motivated by the corresponding issue in the Rust
compiler (https://github.com/rust-lang/rust/issues/41315).

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

Patch by varkor!

llvm-svn: 324424

6 years agoRemove more of the std::experimental bits that are now in std::. All the _v type...
Marshall Clow [Tue, 6 Feb 2018 23:13:48 +0000 (23:13 +0000)]
Remove more of the std::experimental bits that are now in std::. All the _v type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html

llvm-svn: 324423

6 years ago[LivePhysRegs] Fix handling of return instructions.
Eli Friedman [Tue, 6 Feb 2018 23:00:17 +0000 (23:00 +0000)]
[LivePhysRegs] Fix handling of return instructions.

See D42509 for the original version of this.

Basically, there are two significant changes to behavior here:

- addLiveOuts always adds all pristine registers (even if a block has
no successors).
- addLiveOuts and addLiveOutsNoPristines always add all callee-saved
registers for return blocks (including conditional return blocks).

I cleaned up the functions a bit to make it clear these properties hold.

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

llvm-svn: 324422

6 years agoConvert a use of Config->Static.
Rafael Espindola [Tue, 6 Feb 2018 22:59:24 +0000 (22:59 +0000)]
Convert a use of Config->Static.

In lld this was the only use of Config->Static where it meant anything
else other than "use .a instead of .so".

If a program turns out to not use any dynamic libraries, we should
produce the same result with and without -static.

llvm-svn: 324421

6 years ago[Myriad] Define __ma2x5x and __ma2x8x
Walter Lee [Tue, 6 Feb 2018 22:39:47 +0000 (22:39 +0000)]
[Myriad] Define __ma2x5x and __ma2x8x

Summary: Add architecture defines for ma2x5x and ma2x8x.

Reviewers: jyknight

Subscribers: fedor.sergeev, MartinO

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

llvm-svn: 324420

6 years ago[Lex] Fix handling numerical literals ending with ' and signed exponent.
Volodymyr Sapsai [Tue, 6 Feb 2018 22:39:25 +0000 (22:39 +0000)]
[Lex] Fix handling numerical literals ending with ' and signed exponent.

For input `0'e+1` lexer tokenized as numeric constant only `0'e`. Later
NumericLiteralParser skipped 0 and ' as digits and parsed `e+1` as valid
exponent going past the end of the token. Because it didn't mark numeric
literal as having an error, it continued parsing and tried to expandUCNs
with StringRef of length -2.

The fix is not to parse exponent when we reached the end of token.

Discovered by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4588

rdar://problem/36076719

Reviewers: rsmith, t.p.northover

Reviewed By: rsmith

Subscribers: cfe-commits, jkorous-apple

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

llvm-svn: 324419

6 years agoStore just argv[0] in Config.
Rafael Espindola [Tue, 6 Feb 2018 22:37:05 +0000 (22:37 +0000)]
Store just argv[0] in Config.

Having the full argv there seems in conflict with the desire to parse
all command line options in the Driver.

llvm-svn: 324418

6 years ago[AArch64] Adjust the cost model for Exynos M3
Evandro Menezes [Tue, 6 Feb 2018 22:35:47 +0000 (22:35 +0000)]
[AArch64] Adjust the cost model for Exynos M3

Fix the modeling of long division and SIMD conversion from integer and
horizontal minimum and maximum.

llvm-svn: 324417

6 years agoAdd SelectionDAGDumper support for strict FP nodes
Andrew Kaylor [Tue, 6 Feb 2018 22:28:15 +0000 (22:28 +0000)]
Add SelectionDAGDumper support for strict FP nodes

Patch by Kevin P. Neal

llvm-svn: 324416

6 years agoAdd OrcJIT dependency for Kaleidoscope Chapter 9.
Lang Hames [Tue, 6 Feb 2018 22:22:10 +0000 (22:22 +0000)]
Add OrcJIT dependency for Kaleidoscope Chapter 9.

This should fix the error at
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-expensive/10421

llvm-svn: 324413

6 years agoFix a crash when emitting DIEs for variable-length arrays
Adrian Prantl [Tue, 6 Feb 2018 22:17:45 +0000 (22:17 +0000)]
Fix a crash when emitting DIEs for variable-length arrays

VLAs may refer to a previous DIE to express the DW_AT_count of their
type. Clang generates an artificial "vla_expr" variable for this. If
this DIE hasn't been created yet LLVM asserts. This patch fixes this
by sorting the local variables so that dependencies come before they
are needed. It also replaces the linear scan in DWARFFile with a
std::map, which can be faster.

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

llvm-svn: 324412

6 years ago[ORC] Use explicit constructor calls to fix a builder error at
Lang Hames [Tue, 6 Feb 2018 22:17:09 +0000 (22:17 +0000)]
[ORC] Use explicit constructor calls to fix a builder error at
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/17627

llvm-svn: 324411

6 years ago[ORC] Remove some unused lambda captures.
Lang Hames [Tue, 6 Feb 2018 21:52:46 +0000 (21:52 +0000)]
[ORC] Remove some unused lambda captures.

llvm-svn: 324410

6 years ago[X86] Add test cases that exercise the BSR/BSF optimization combineCMov.
Craig Topper [Tue, 6 Feb 2018 21:47:04 +0000 (21:47 +0000)]
[X86] Add test cases that exercise the BSR/BSF optimization combineCMov.

combineCmov tries to remove compares against BSR/BSF if we can prove the input to the BSR/BSF are never zero.

As far as I can tell most of the time codegenprepare despeculates ctlz/cttz and gives us a cttz_zero_undef/ctlz_zero_undef which don't use a cmov.

So the only way I found to trigger this code is to show codegenprepare an illegal type which it won't despeculate.

I think we should be turning ctlz/cttz into ctlz_zero_undef/cttz_zero_undef for these cases before we ever get to operation legalization where the cmov is created. But wanted to add these tests so we don't regress.

llvm-svn: 324409

6 years ago[x86] add tests to show demanded bits shortcoming; NFC
Sanjay Patel [Tue, 6 Feb 2018 21:43:57 +0000 (21:43 +0000)]
[x86] add tests to show demanded bits shortcoming; NFC

llvm-svn: 324408

6 years agoSupport special acronyms inside property names and allow plural forms
Yan Zhang [Tue, 6 Feb 2018 21:40:38 +0000 (21:40 +0000)]
Support special acronyms inside property names and allow plural forms

Reviewers: benhamilton, hokein

Reviewed By: benhamilton, hokein

Subscribers: klimek, cfe-commits

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

llvm-svn: 324407

6 years ago[docs] Add out-of-date warnings to the BuildingAJIT tutorial text.
Lang Hames [Tue, 6 Feb 2018 21:25:20 +0000 (21:25 +0000)]
[docs] Add out-of-date warnings to the BuildingAJIT tutorial text.

The text will be updated once the ORC API churn dies down.

llvm-svn: 324406

6 years ago[ORC] Start migrating ORC layers to use the new ORC Core.h APIs.
Lang Hames [Tue, 6 Feb 2018 21:25:11 +0000 (21:25 +0000)]
[ORC] Start migrating ORC layers to use the new ORC Core.h APIs.

In particular this patch switches RTDyldObjectLinkingLayer to use
orc::SymbolResolver and threads the requried changse (ExecutionSession
references and VModuleKeys) through the existing layer APIs.

The purpose of the new resolver interface is to improve query performance and
better support parallelism, both in JIT'd code and within the compiler itself.

The most visibile change is switch of the <Layer>::addModule signatures from:

Expected<Handle> addModule(std::shared_ptr<ModuleType> Mod,
                           std::shared_ptr<JITSymbolResolver> Resolver)

to:

Expected<Handle> addModule(VModuleKey K, std::shared_ptr<ModuleType> Mod);

Typical usage of addModule will now look like:

auto K = ES.allocateVModuleKey();
Resolvers[K] = createSymbolResolver(...);
Layer.addModule(K, std::move(Mod));

See the BuildingAJIT tutorial code for example usage.

llvm-svn: 324405

6 years ago[AArch64] add test to show sub-optimal isel; NFC
Sanjay Patel [Tue, 6 Feb 2018 21:25:02 +0000 (21:25 +0000)]
[AArch64] add test to show sub-optimal isel; NFC

llvm-svn: 324404

6 years ago[x86] add test to show missed BMI isel; NFC
Sanjay Patel [Tue, 6 Feb 2018 21:18:53 +0000 (21:18 +0000)]
[x86] add test to show missed BMI isel; NFC

llvm-svn: 324403

6 years ago[DSE] Upgrade uses of MemoryIntrinic::getAlignment() to new API. (NFC)
Daniel Neilson [Tue, 6 Feb 2018 21:18:33 +0000 (21:18 +0000)]
[DSE] Upgrade uses of MemoryIntrinic::getAlignment() to new API. (NFC)

Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
DeadStoreElimination pass to cease using the old getAlignment() API of MemoryIntrinsic
in favour of getting dest specific alignments through the new API.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384, rL324395 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference
   http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
   http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 324402

6 years ago[TargetLowering] use local variable to reduce duplication; NFCI
Sanjay Patel [Tue, 6 Feb 2018 21:09:42 +0000 (21:09 +0000)]
[TargetLowering] use local variable to reduce duplication; NFCI

llvm-svn: 324401

6 years agoRemove obsolete file
Adrian Prantl [Tue, 6 Feb 2018 21:04:06 +0000 (21:04 +0000)]
Remove obsolete file

llvm-svn: 324400

6 years agoMark P0777 as complete
Marshall Clow [Tue, 6 Feb 2018 21:00:58 +0000 (21:00 +0000)]
Mark P0777 as complete

llvm-svn: 324399

6 years agoImplement P0777: Treating unnecessay decay
Marshall Clow [Tue, 6 Feb 2018 20:56:55 +0000 (20:56 +0000)]
Implement P0777: Treating unnecessay decay

llvm-svn: 324398

6 years ago[TargetLowering] use local variables to reduce duplication; NFCI
Sanjay Patel [Tue, 6 Feb 2018 20:49:28 +0000 (20:49 +0000)]
[TargetLowering] use local variables to reduce duplication; NFCI

llvm-svn: 324397

6 years agoPass --build-dir to dotest in the Xcode project
Adrian Prantl [Tue, 6 Feb 2018 20:48:35 +0000 (20:48 +0000)]
Pass --build-dir to dotest in the Xcode project

llvm-svn: 324396

6 years ago[InferAddressSpaces] Update uses of IRBuilder memory intrinsic creation to new API
Daniel Neilson [Tue, 6 Feb 2018 20:33:36 +0000 (20:33 +0000)]
[InferAddressSpaces] Update uses of IRBuilder memory intrinsic creation to new API

Summary:
This change is part of step five in the series of changes to remove alignment argument from
memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the
InferAddressSpaces pass to cease using:
1) The old getAlignment() API of MemoryIntrinsic in favour of getting source & dest specific
alignments through the new API.
2) The old IRBuilder CreateMemCpy/CreateMemMove single-alignment APIs in favour of the new
API that allows setting source and destination alignments independently.

Steps:
Step 1) Remove alignment parameter and create alignment parameter attributes for
memcpy/memmove/memset. ( rL322965, rC322964, rL322963 )
Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing
source and dest alignments. ( rL323597 )
Step 3) Update Clang to use the new IRBuilder API. ( rC323617 )
Step 4) Update Polly to use the new IRBuilder API. ( rL323618 )
Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API,
and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment()
and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278,
rL324384 )
Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the
MemIntrinsicInst::[get|set]Alignment() methods.

Reference
   http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html
   http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html

llvm-svn: 324395

6 years ago[DWARFv5] Emit .debug_line_str (in a non-DWO file).
Paul Robinson [Tue, 6 Feb 2018 20:29:21 +0000 (20:29 +0000)]
[DWARFv5] Emit .debug_line_str (in a non-DWO file).

This should enable the linker to do string-pooling of path names.

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

llvm-svn: 324393

6 years ago[Hexagon] Extract HVX lowering and selection into HVX-specific files, NFC
Krzysztof Parzyszek [Tue, 6 Feb 2018 20:22:20 +0000 (20:22 +0000)]
[Hexagon] Extract HVX lowering and selection into HVX-specific files, NFC

llvm-svn: 324392

6 years ago[Hexagon] Lower concat of more than 2 vectors into build_vector
Krzysztof Parzyszek [Tue, 6 Feb 2018 20:18:58 +0000 (20:18 +0000)]
[Hexagon] Lower concat of more than 2 vectors into build_vector

llvm-svn: 324391