]> granicus.if.org Git - llvm/log
llvm
6 years agoMove demangling function from llvm-objdump to Demangle library
James Henderson [Thu, 17 Jan 2019 15:18:44 +0000 (15:18 +0000)]
Move demangling function from llvm-objdump to Demangle library

This allows it to be used in an upcoming llvm-readobj change.

A small change in internal behaviour of the function is to always call
the microsoftDemangle function if the string does not have an itanium
encoding prefix, rather than only if it starts with '?'. This is
harmless because the microsoftDemangle function does the same check
already.

Reviewed by: grimar, erik.pilkington

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

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

6 years agobuild_llvm_package.bat: Run more tests
Hans Wennborg [Thu, 17 Jan 2019 13:11:15 +0000 (13:11 +0000)]
build_llvm_package.bat: Run more tests

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

6 years ago[LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling
Max Kazantsev [Thu, 17 Jan 2019 12:51:10 +0000 (12:51 +0000)]
[LoopSimplifyCFG] Form LCSSA when a parent loop becomes a sibling

During the transforms in LoopSimplifyCFG, when we remove a dead exiting edge, the
parent loop may stop being reachable from the child loop, and therefore they become
siblings. If the former child loop had uses of some values from its former parent loop,
now such uses will require LCSSA Phis, even if they weren't needed before. So we must
form LCSSA for all loops that stopped being ancestors of the current loop in this case.

Differential Revision: https://reviews.llvm.org/D56144
Reviewed By: fedor.sergeev

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

6 years ago[LoopSimplifyCFG] Fix order of deletion of complex dead subloops
Max Kazantsev [Thu, 17 Jan 2019 12:25:40 +0000 (12:25 +0000)]
[LoopSimplifyCFG] Fix order of deletion of complex dead subloops

Function `DeleteDeadBlock` requires that all predecessors of a block
being deleted have already been deleted, with the exception of a
single-block loop. When we use it for removal of dead subloops that
contain more than one block, we may not fulfull this requirement and
fail an assertion.

This patch replaces invocation of `DeleteDeadBlock` with a generalized
version `DeleteDeadBlocks` that is able to deal with multiple dead blocks,
even if they contain some cycles.

Differential Revision: https://reviews.llvm.org/D56121
Reviewed By: fedor.sergeev

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

6 years ago[X86][SSE] Add PR40340 test case
Simon Pilgrim [Thu, 17 Jan 2019 11:20:23 +0000 (11:20 +0000)]
[X86][SSE] Add PR40340 test case

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

6 years ago[X86] Add AVX512 test to insertps
Simon Pilgrim [Thu, 17 Jan 2019 11:11:15 +0000 (11:11 +0000)]
[X86] Add AVX512 test to insertps

Pre-commit for PR40340

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

6 years agoGlobalISel: Add comment to clarify G_BUILD_VECTOR
Matt Arsenault [Thu, 17 Jan 2019 10:50:07 +0000 (10:50 +0000)]
GlobalISel: Add comment to clarify G_BUILD_VECTOR

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

6 years agoAllow FP types for atomicrmw xchg
Matt Arsenault [Thu, 17 Jan 2019 10:49:01 +0000 (10:49 +0000)]
Allow FP types for atomicrmw xchg

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

6 years ago[MC] Remove unused variable
Benjamin Kramer [Thu, 17 Jan 2019 10:25:18 +0000 (10:25 +0000)]
[MC] Remove unused variable

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

6 years agoFix capitalization. NFC
Diana Picus [Thu, 17 Jan 2019 10:11:59 +0000 (10:11 +0000)]
Fix capitalization. NFC

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

6 years ago[ARM GlobalISel] Allow calls to varargs functions
Diana Picus [Thu, 17 Jan 2019 10:11:55 +0000 (10:11 +0000)]
[ARM GlobalISel] Allow calls to varargs functions

Allow varargs functions to be called, both in arm and thumb mode. This
boils down to choosing the correct calling convention, which we can
easily test by making sure arm_aapcscc is used instead of
arm_aapcs_vfpcc when the callee is variadic.

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

6 years ago[RISCV] Add codegen support for RV64A
Alex Bradbury [Thu, 17 Jan 2019 10:04:39 +0000 (10:04 +0000)]
[RISCV] Add codegen support for RV64A

In order to support codegen RV64A, this patch:
* Introduces masked atomics intrinsics for atomicrmw operations and cmpxchg
  that use the i64 type. These are ultimately lowered to masked operations
  using lr.w/sc.w, but we need to use these alternate intrinsics for RV64
  because i32 is not legal
* Modifies RISCVExpandPseudoInsts.cpp to handle PseudoAtomicLoadNand64 and
  PseudoCmpXchg64
* Modifies the AtomicExpandPass hooks in RISCVTargetLowering to sext/trunc as
  needed for RV64 and to select the i64 intrinsic IDs when necessary
* Adds appropriate patterns to RISCVInstrInfoA.td
* Updates test/CodeGen/RISCV/atomic-*.ll to show RV64A support

This ends up being a fairly mechanical change, as the logic for RV32A is
effectively reused.

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

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

6 years ago[ARM64][Windows] Share unwind codes between epilogues
Sanjin Sijaric [Thu, 17 Jan 2019 09:45:17 +0000 (09:45 +0000)]
[ARM64][Windows] Share unwind codes between epilogues

There are cases where we have multiple epilogues that have the exact same unwind
code sequence.  In that case, the epilogues can share the same unwind codes in
the .xdata section.  This should get us past the assert "SEH unwind data
splitting not yet implemented" in many cases.

We still need to add support for generating multiple .pdata/.xdata sections for
those functions that need to be split into fragments.

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

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

6 years ago[llvm-objdump] - Fix comment. NFC.
George Rimar [Thu, 17 Jan 2019 09:14:33 +0000 (09:14 +0000)]
[llvm-objdump] - Fix comment. NFC.

Forgot to address this one.

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

6 years ago[llvm-objdump] - Simplify the getRelocationValueString. NFCI.
George Rimar [Thu, 17 Jan 2019 09:13:17 +0000 (09:13 +0000)]
[llvm-objdump] - Simplify the getRelocationValueString. NFCI.

This refactors the getRelocationValueString method.
It is a bit overcomplicated and it is possible to reduce it without
losing the functionality it seems.

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

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

6 years ago[NFC] Factor out some local vars
Max Kazantsev [Thu, 17 Jan 2019 06:20:42 +0000 (06:20 +0000)]
[NFC] Factor out some local vars

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

6 years ago[WebAssembly] Parse llvm.ident into producers section
Thomas Lively [Thu, 17 Jan 2019 02:29:55 +0000 (02:29 +0000)]
[WebAssembly] Parse llvm.ident into producers section

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

6 years ago[MergeFunc] Prevent silent miscompile of vararg functions
Vedant Kumar [Thu, 17 Jan 2019 02:15:05 +0000 (02:15 +0000)]
[MergeFunc] Prevent silent miscompile of vararg functions

The function merging pass miscompiles identical vararg functions. The
forwarding thunk it emits doesn't forward the full variable-length list
of arguments. Disable merging for vararg functions for now.

I've filed llvm.org/PR40345 to track the issue.

rdar://47326238

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

6 years agoRevert "[WebAssembly] Parse llvm.ident into producers section"
Thomas Lively [Thu, 17 Jan 2019 00:39:49 +0000 (00:39 +0000)]
Revert "[WebAssembly] Parse llvm.ident into producers section"

This reverts commit eccdbba3a02a33e13b5262e92200a33e2ead873d.

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

6 years ago[X86] Remove GCCBuiltin from deprecated avx512 scatter intrinsics that use scalar...
Craig Topper [Thu, 17 Jan 2019 00:34:04 +0000 (00:34 +0000)]
[X86] Remove GCCBuiltin from deprecated avx512 scatter intrinsics that use scalar integers for mask.

We will custom emit these builtins in clang using the new intrinsics that take a vXi1 mask.

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

6 years ago[docs] Fix formatting.
Eli Friedman [Thu, 17 Jan 2019 00:31:35 +0000 (00:31 +0000)]
[docs] Fix formatting.

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

6 years ago[FunctionComparator] Consider tail call kinds
Vedant Kumar [Thu, 17 Jan 2019 00:29:14 +0000 (00:29 +0000)]
[FunctionComparator] Consider tail call kinds

Essentially, do not treat `call` and `musttail call` as the same thing.

As a drive-by, fold CallInst and InvokeInst handling together using the
CallSite helper.

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

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

6 years ago[SEH] [ARM64] Retrieve the frame pointer from SEH funclets
Sanjin Sijaric [Thu, 17 Jan 2019 00:24:38 +0000 (00:24 +0000)]
[SEH] [ARM64] Retrieve the frame pointer from SEH funclets

The Windows ARM64 runtime passes the establisher frame to funclets as the first
argument.

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

6 years ago[docs] Add more ARM/AArch64 links to CompilerWriterInfo.rst .
Eli Friedman [Thu, 17 Jan 2019 00:21:08 +0000 (00:21 +0000)]
[docs] Add more ARM/AArch64 links to CompilerWriterInfo.rst .

Also, fix a few existing links so they don't require registration.

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

6 years ago[WebAssembly] Parse llvm.ident into producers section
Thomas Lively [Wed, 16 Jan 2019 23:46:14 +0000 (23:46 +0000)]
[WebAssembly] Parse llvm.ident into producers section

Summary:
Everything before the word "version" is the tool, and everything after
the word "version" is the version.

Reviewers: aheejin, dschuff

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

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

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

6 years agoFix a mistake in rL351392.
Wei Mi [Wed, 16 Jan 2019 23:31:40 +0000 (23:31 +0000)]
Fix a mistake in rL351392.

PGOInstrGen should be initialized to "" instead of false.

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

6 years ago[AsmPrinter] Collapse .loc 0 0 directives
Jonas Devlieghere [Wed, 16 Jan 2019 23:26:29 +0000 (23:26 +0000)]
[AsmPrinter] Collapse .loc 0 0 directives

Currently we do not always collapse subsequent .loc 0 0 directives. The
reason is that we were checking for a PrevInstLoc which is not set when
we emit a line-0 record. We should only check the LastAsmLine, which
seems to be created exactly for this purpose.

  // When we emit a line-0 record, we don't update PrevInstLoc; so look at
  // the last line number actually emitted, to see if it was line 0.
  unsigned LastAsmLine =
    Asm->OutStreamer->getContext().getCurrentDwarfLoc().getLine();

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

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

6 years ago[PGO] Make pgo related options in opt more consistent.
Wei Mi [Wed, 16 Jan 2019 23:19:02 +0000 (23:19 +0000)]
[PGO] Make pgo related options in opt more consistent.

Currently we have pgo options defined in PassManagerBuilder.cpp only for
instrument pgo, but not for sample pgo. We also have pgo options defined
in NewPMDriver.cpp in opt only for new pass manager and for all kinds of
pgo. They have some inconsistency.

To make the options more consistent and make tests writing easier, the
patch let old pass manager to share the same pgo options with new pass
manager in opt, and removes the options in PassManagerBuilder.cpp.

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

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

6 years ago[X86] Remove GCCBuiltin from deprecated gather builtins in preparation for custom...
Craig Topper [Wed, 16 Jan 2019 22:34:24 +0000 (22:34 +0000)]
[X86] Remove GCCBuiltin from deprecated gather builtins in preparation for custom handling in clang.

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

6 years ago[WebAssembly] Remove expected failure from known_gcc_test_failures.txt. NFC.
Sam Clegg [Wed, 16 Jan 2019 22:26:59 +0000 (22:26 +0000)]
[WebAssembly] Remove expected failure from known_gcc_test_failures.txt.  NFC.

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

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

6 years ago[NFC] Factor out + document build requirements
JF Bastien [Wed, 16 Jan 2019 22:22:38 +0000 (22:22 +0000)]
[NFC] Factor out + document build requirements

Summary: This change factors out compiler checking / warning, and documents LLVM_FORCE_USE_OLD_TOOLCHAIN. It doesn't introduce any functional changes nor policy changes, these will come late.

Subscribers: mgorny, jkorous, dexonsmith, llvm-commits

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

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

6 years ago[TSan] Fix comment. NFC.
Philip Pfaffe [Wed, 16 Jan 2019 22:08:42 +0000 (22:08 +0000)]
[TSan] Fix comment. NFC.

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

6 years ago[X86] Sink complex MCU CC helper to .cpp file from .h file, NFC
Reid Kleckner [Wed, 16 Jan 2019 22:05:36 +0000 (22:05 +0000)]
[X86] Sink complex MCU CC helper to .cpp file from .h file, NFC

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

6 years ago[X86] Add X86ISD::VSHLV and X86ISD::VSRLV nodes for psllv and psrlv
Craig Topper [Wed, 16 Jan 2019 21:46:32 +0000 (21:46 +0000)]
[X86] Add X86ISD::VSHLV and X86ISD::VSRLV nodes for psllv and psrlv

Previously we used ISD::SHL and ISD::SRL to represent these in SelectionDAG. ISD::SHL/SRL interpret an out of range shift amount as undefined behavior and will constant fold to undef. While the intrinsics are defined to return 0 for out of range shift amounts. A previous patch added a special node for VPSRAV to produce all sign bits.

This was previously believed safe because undefs frequently get turned into 0 either from the constant pool or a desire to not have a false register dependency. But undef is treated specially in some optimizations. For example, its ignored in detection of vector splats. So if the ISD::SHL/SRL can be constant folded and all of the elements with in bounds shift amounts are the same, we might fold it to single element broadcast from the constant pool. This would not put 0s in the elements with out of bounds shift amounts.

We do have an existing InstCombine optimization to use shl/lshr when the shift amounts are all constant and in bounds. That should prevent some loss of constant folding from this change.

Patch by zhutianyang and Craig Topper

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

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

6 years ago[X86] Use X86ISD::BLENDV for blendv intrinsics. Replace vselect with blendv just...
Craig Topper [Wed, 16 Jan 2019 21:46:28 +0000 (21:46 +0000)]
[X86] Use X86ISD::BLENDV for blendv intrinsics. Replace vselect with blendv just before isel table lookup. Remove vselect isel patterns.

This cleans up the duplication we have with both intrinsic isel patterns and vselect isel patterns. This should also allow the intrinsics to get SimplifyDemandedBits support for the condition.

I've switched the canonical pattern in isel to use the X86ISD::BLENDV node instead of VSELECT. Since it always seemed weird to move from BLENDV with its relaxed rules on condition bits to VSELECT which has strict rules about all bits of the condition element being the same. Its more correct to go from VSELECT to BLENDV.

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

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

6 years agoAMDGPU: Adjust the chain for loads writing to the HI part of a register.
Changpeng Fang [Wed, 16 Jan 2019 21:32:53 +0000 (21:32 +0000)]
AMDGPU: Adjust the chain for loads writing to the HI part of a register.

Summary:
  For these loads that write to the HI part of a register, we should chain them to the op that writes to the LO part
of the register to maintain the appropriate order.

Reviewers:
  rampitec, arsenm

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

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

6 years ago[X86] Add a one use check to the setcc inversion code in combineVSelectWithAllOnesOrZeros
Craig Topper [Wed, 16 Jan 2019 21:29:29 +0000 (21:29 +0000)]
[X86] Add a one use check to the setcc inversion code in combineVSelectWithAllOnesOrZeros

If we're going to generate a new inverted setcc, we should make sure we will be able to remove the old setcc.

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

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

6 years ago[X86] Add test case for D56765. NFC
Craig Topper [Wed, 16 Jan 2019 21:29:26 +0000 (21:29 +0000)]
[X86] Add test case for D56765. NFC

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

6 years ago[X86] Add additional saturating add/sub vector tests; NFC
Nikita Popov [Wed, 16 Jan 2019 20:53:23 +0000 (20:53 +0000)]
[X86] Add additional saturating add/sub vector tests; NFC

Additional tests for vNi32 and vNi64. I've added these for
usub.sat before, this covers uadd.sat, ssub.sat and sadd.sat.

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

6 years agoFix most of LLVM's tests with LLVM_ENABLE_PIC=OFF
Nico Weber [Wed, 16 Jan 2019 20:44:36 +0000 (20:44 +0000)]
Fix most of LLVM's tests with LLVM_ENABLE_PIC=OFF

Lots of tests rely on llvm-lto being present, but LLVM_ENABLE_PIC=OFF currently
disables building that executable.

There's no reason for not building llvm-lto with LLVM_ENABLE_PIC=OFF so just
build it. r191042 moved it into a "if (!WIN)" block at the time, and then
211852 made that "if(NOT CYGWIN AND LLVM_ENABLE_PIC)" -- but that's only needed
for LTO (the ld64 plugin), not for the llvm-lto binary.

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

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

6 years ago[COFF, ARM64] Implement support for SEH extensions __try/__except/__finally
Mandeep Singh Grang [Wed, 16 Jan 2019 19:52:59 +0000 (19:52 +0000)]
[COFF, ARM64] Implement support for SEH extensions __try/__except/__finally

Summary:
This patch supports MS SEH extensions __try/__except/__finally. The intrinsics localescape and localrecover are responsible for communicating escaped static allocas from the try block to the handler.

We need to preserve frame pointers for SEH. So we create a new function/property HasLocalEscape.

Reviewers: rnk, compnerd, mstorsjo, TomTan, efriedma, ssijaric

Reviewed By: rnk, efriedma

Subscribers: smeenai, jrmuizel, alex, majnemer, ssijaric, ehsan, dmajor, kristina, javed.absar, kristof.beyls, chrib, llvm-commits

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

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

6 years ago[Hexagon] Do not promote terminator instructions in Hexagon loop idioms
Krzysztof Parzyszek [Wed, 16 Jan 2019 19:40:27 +0000 (19:40 +0000)]
[Hexagon] Do not promote terminator instructions in Hexagon loop idioms

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

6 years agogn build: Add headers to compiler-rt build files.
Peter Collingbourne [Wed, 16 Jan 2019 18:45:12 +0000 (18:45 +0000)]
gn build: Add headers to compiler-rt build files.

Also fix sort order in llvm/lib/CodeGen/GlobalISel/BUILD.gn.

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

6 years ago[X86][BtVer2] Update latency of horizontal operations.
Andrea Di Biagio [Wed, 16 Jan 2019 18:18:01 +0000 (18:18 +0000)]
[X86][BtVer2] Update latency of horizontal operations.

On Jaguar, horizontal adds/subs have local forwarding disable.
That means, we pay a compulsory extra cycle of write-back stage, and the value
is not available until the end of that stage.

This patch changes the latency of horizontal operations by adding an extra
cycle. With this patch, latency numbers now match what is reported by perf.

I plan to send another patch to also 'fix' the latency of shuffle operations (on
Jaguar, local forwarding is disabled for vector shuffles too).

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

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

6 years ago[X86] getFauxShuffleMask - bail for non-byte aligned shuffle types
Simon Pilgrim [Wed, 16 Jan 2019 18:15:31 +0000 (18:15 +0000)]
[X86] getFauxShuffleMask - bail for non-byte aligned shuffle types

Remove the existing assertion and just return false for unexpected shuffle value types (<X x i1> mainly....).

Found while updating combineX86ShufflesRecursively to run within SimplifyDemandedVectorElts/SimplifyDemandedBits.

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

6 years ago[X86] Regenerate test
Simon Pilgrim [Wed, 16 Jan 2019 18:00:09 +0000 (18:00 +0000)]
[X86] Regenerate test

Split check-prefixes to support a future commit

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

6 years ago[elfabi] Add support for reading DT_SONAME from binaries
Armando Montanez [Wed, 16 Jan 2019 17:47:16 +0000 (17:47 +0000)]
[elfabi] Add support for reading DT_SONAME from binaries

This change gives the llvm-elfabi tool the ability to read DT_SONAME from a binary ELF file into an ELFStub.

Added:

 - DynamicEntries struct for storing dynamic entries that are relevant to elfabi.
 - terminatedSubstr() retrieves a null-terminated substring from a StringRef.
 - appendToError() appends a string to an error, allowing more specific error messages.

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

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

6 years ago[DebugInfo] Allow creation of DBG_VALUEs in blocks where the operand is not used
Jeremy Morse [Wed, 16 Jan 2019 17:25:27 +0000 (17:25 +0000)]
[DebugInfo] Allow creation of DBG_VALUEs in blocks where the operand is not used

dbg.value intrinsics can appear in blocks where their operand is not used,
meaning the operand never receives an SDNode, and thus no DBG_VALUE will
be created. Get around this by looking to see whether the operand has already
been allocated a virtual register. This allows dbg.values of Phi node and
Values that are used across basic blocks to successfully be translated into
DBG_VALUEs.

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

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

6 years agoRemove misleading line about git's lack of revision numbers.
Erich Keane [Wed, 16 Jan 2019 16:59:11 +0000 (16:59 +0000)]
Remove misleading line about git's lack of revision numbers.

Change-Id: I8a22cb4b4bef9bceee1f43381435d664c2cfd770

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

6 years ago[llvm-readobj] Set correct offset when dumping hex section output.
Sid Manning [Wed, 16 Jan 2019 16:17:19 +0000 (16:17 +0000)]
[llvm-readobj] Set correct offset when dumping hex section output.

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

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

6 years ago[x86] add tests for extracted scalar casts (PR39974); NFC
Sanjay Patel [Wed, 16 Jan 2019 16:11:30 +0000 (16:11 +0000)]
[x86] add tests for extracted scalar casts (PR39974); NFC

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

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

6 years ago[X86] Add combineX86ShufflesRecursively helper. NFCI.
Simon Pilgrim [Wed, 16 Jan 2019 16:01:42 +0000 (16:01 +0000)]
[X86] Add combineX86ShufflesRecursively helper. NFCI.

combineX86ShufflesRecursively is pretty cumbersome with a lot of arguments that only matter later in recursion.

This commit adds a wrapper version that only takes the initial root Op to simplify calls that don't need to worry about these.

An early, cleanup step towards merging combineX86ShufflesRecursively into SimplifyDemandedVectorElts/SimplifyDemandedBits.

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

6 years agoAMDGPU: Add llvm.amdgcn.ds.ordered.add & swap
Marek Olsak [Wed, 16 Jan 2019 15:43:53 +0000 (15:43 +0000)]
AMDGPU: Add llvm.amdgcn.ds.ordered.add & swap

Reviewers: arsenm, nhaehnle

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

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

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

6 years ago[SLP] Fix PR40310: The reduction nodes should stay scalar.
Alexey Bataev [Wed, 16 Jan 2019 15:39:52 +0000 (15:39 +0000)]
[SLP] Fix PR40310: The reduction nodes should stay scalar.

Summary:
Sometimes the SLP vectorizer tries to vectorize the horizontal reduction
nodes during regular vectorization. This may happen inside of the loops,
when there are some vectorizable PHIs. Patch fixes this by checking if
the node is the reduction node and thus it must not be vectorized, it must
be gathered.

Reviewers: RKSimon, spatel, hfinkel, fedor.sergeev

Subscribers: llvm-commits

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

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

6 years ago[llvm-nm] Allow --size-sort to print symbols with only Symbol size
Saurabh Badhwar [Wed, 16 Jan 2019 14:38:22 +0000 (14:38 +0000)]
[llvm-nm] Allow --size-sort to print symbols with only Symbol size

Summary:
When llvm-nm is passed only the --size-sort option for an object file, there is no output generated.
The commit modifies the behavior to print the symbols sorted and their size which is also inline with
the output of the GNU nm tool.

Signed-off-by: Saurabh Badhwar <sbsaurabhbadhwar9@gmail.com>
Reviewers: enderby, rupprecht

Reviewed By: rupprecht

Subscribers: llvm-commits

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

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

6 years ago[x86] lower shuffle of extracts to AVX2 vperm instructions
Sanjay Patel [Wed, 16 Jan 2019 14:15:18 +0000 (14:15 +0000)]
[x86] lower shuffle of extracts to AVX2 vperm instructions

I was trying to prevent shuffle regressions while matching more horizontal ops
and ended up here:
  shuf (extract X, 0), (extract X, 4), Mask --> extract (shuf X, undef, Mask'), 0

The affected tests were added for:
https://bugs.llvm.org/show_bug.cgi?id=34380

This patch won't change the examples in the bug report itself, but we should be
able to extend this to catch more types.

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

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

6 years ago[MSP430] Emit a separate section for every interrupt vector
Anton Korobeynikov [Wed, 16 Jan 2019 14:03:41 +0000 (14:03 +0000)]
[MSP430] Emit a separate section for every interrupt vector

This is LLVM part of D56663

Linker scripts shipped by TI require to have every
interrupt vector in a separate section with a specific name:

 SECTIONS
 {
   __interrupt_vector_XX   : { KEEP (*(__interrupt_vector_XX )) } > VECTXX
   ...
 }

Follow the requirement emit the section for every vector
which contain address of interrupt handler:

  .section  __interrupt_vector_XX,"ax",@progbits
  .word %isr%

Patch by Kristina Bessonova!

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

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

6 years ago[X86][SSE] Add additional PR40318 shuffle test cases
Simon Pilgrim [Wed, 16 Jan 2019 13:15:59 +0000 (13:15 +0000)]
[X86][SSE] Add additional PR40318 shuffle test cases

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

6 years agoRevert r351324 "Build LLVM-C.dll by default on windows and enable in release package"
Hans Wennborg [Wed, 16 Jan 2019 12:36:28 +0000 (12:36 +0000)]
Revert r351324 "Build LLVM-C.dll by default on windows and enable in release package"

This broke the build, ending up with too long command-lines when invoking gen-mscv-exports.py.

> As it says in the subject, should have gone long enough now that this
> should be safe. This will greatly simplify dealing with LLVM for people
> that just want to use the C API on windows. This is a follow up from
> D35077.
>
> Patch by Jakob Bornecrantz!
>
> Differential revision: https://reviews.llvm.org/D56774

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

6 years agoAssertion in isAllocaPromotable due to extra bitcast goes into lifetime marker
Gabor Buella [Wed, 16 Jan 2019 12:06:17 +0000 (12:06 +0000)]
Assertion in isAllocaPromotable due to extra bitcast goes into lifetime marker

For the given test SROA detects possible replacement and creates a correct alloca. After that SROA is adding lifetime markers for this new alloca. The function getNewAllocaSlicePtr is trying to deduce the pointer type based on the original alloca, which is split, to use it later in lifetime intrinsic.

For the test we ended up with such code (rA is initial alloca [10 x float], which is split, and rA.sroa.0.0 is a new split allocation)

```
%rA.sroa.0.0.rA.sroa_cast = bitcast i32* %rA.sroa.0 to [10 x float]*    <----- this one causing the assertion and is an extra bitcast
%5 = bitcast [10 x float]* %rA.sroa.0.0.rA.sroa_cast to i8*
call void @llvm.lifetime.start.p0i8(i64 4, i8* %5)
```

isAllocaPromotable code assumes that a user of alloca may go into lifetime marker through bitcast but it must be the only one bitcast to i8* type. In the test it's not a i8* type, return false and throw the assertion.

As we are creating a pointer, which will be used in lifetime markers only, the proposed fix is to create a bitcast to i8* immediately to avoid extra bitcast creation.

The test is a greatly simplified to just reproduce the assertion.

Author: Igor Tsimbalist <igor.v.tsimbalist@intel.com>

Reviewers: chandlerc, craig.topper

Reviewed By: chandlerc

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

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

6 years agoBuild LLVM-C.dll by default on windows and enable in release package
Hans Wennborg [Wed, 16 Jan 2019 11:47:56 +0000 (11:47 +0000)]
Build LLVM-C.dll by default on windows and enable in release package

As it says in the subject, should have gone long enough now that this
should be safe. This will greatly simplify dealing with LLVM for people
that just want to use the C API on windows. This is a follow up from
D35077.

Patch by Jakob Bornecrantz!

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

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

6 years ago[MSan] Apply the ctor creation scheme of TSan
Philip Pfaffe [Wed, 16 Jan 2019 11:14:07 +0000 (11:14 +0000)]
[MSan] Apply the ctor creation scheme of TSan

Summary: To avoid adding an extern function to the global ctors list, apply the changes of D56538 also to MSan.

Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan

Subscribers: hiraditya, bollu, llvm-commits

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

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

6 years agoBump the trunk version to 9.0.0svn
Hans Wennborg [Wed, 16 Jan 2019 10:57:02 +0000 (10:57 +0000)]
Bump the trunk version to 9.0.0svn

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

6 years ago[SelectionDAG] Update check in createOperands to reflect max() is a valid value.
Florian Hahn [Wed, 16 Jan 2019 10:06:04 +0000 (10:06 +0000)]
[SelectionDAG] Update check in createOperands to reflect max() is a valid value.

The value returned by max() is the last valid value, adjust the
comparison accordingly.

The code added in D55073 creates TokenFactors with max() operands.

Reviewers: aemerson, efriedma, RKSimon, craig.topper

Reviewed By: aemerson

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

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

6 years ago[Support] Remove error return value from one overload of fs::make_absolute
Pavel Labath [Wed, 16 Jan 2019 09:55:32 +0000 (09:55 +0000)]
[Support] Remove error return value from one overload of fs::make_absolute

Summary:
The version of make_absolute which accepted a specific directory to use
as the "base" for the computation could never fail, even though it
returned a std::error_code. The reason for that seems to be historical
-- the CWD flavour (which can fail due to failure to retrieve CWD) was
there first, and the new version was implemented by extending that.

This removes the error return value from the non-CWD overload and
reimplements the CWD version on top of that. This enables us to remove
some dead code where people were pessimistically trying to handle the
errors returned from this function.

Reviewers: zturner, sammccall

Subscribers: hiraditya, kristina, llvm-commits

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

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

6 years ago[NewPM][TSan] Reiterate the TSan port
Philip Pfaffe [Wed, 16 Jan 2019 09:28:01 +0000 (09:28 +0000)]
[NewPM][TSan] Reiterate the TSan port

Summary:
Second iteration of D56433 which got reverted in rL350719. The problem
in the previous version was that we dropped the thunk calling the tsan init
function. The new version keeps the thunk which should appease dyld, but is not
actually OK wrt. the current semantics of function passes. Hence, add a
helper to insert the functions only on the first time. The helper
allows hooking into the insertion to be able to append them to the
global ctors list.

Reviewers: chandlerc, vitalybuka, fedor.sergeev, leonardchan

Subscribers: hiraditya, bollu, llvm-commits

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

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

6 years ago[DAGCombine] Fix ReduceLoadWidth for shifted offsets
Sam Parker [Wed, 16 Jan 2019 08:40:12 +0000 (08:40 +0000)]
[DAGCombine] Fix ReduceLoadWidth for shifted offsets

ReduceLoadWidth can trigger using a shifted mask is used and this
requires that the function return a shl node to correct for the
offset. However, the way that this was implemented meant that the
returned result could be an existing node, which would be incorrect.
This fixes the method of inserting the new node and replacing uses.

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

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

6 years agoInclude lldb in Win snapshots again (PR37307)
Hans Wennborg [Wed, 16 Jan 2019 08:38:28 +0000 (08:38 +0000)]
Include lldb in Win snapshots again (PR37307)

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

6 years ago[llvm-rc] Support '--' for delimiting options from input paths
Martin Storsjo [Wed, 16 Jan 2019 08:09:22 +0000 (08:09 +0000)]
[llvm-rc] Support '--' for delimiting options from input paths

This allows avoiding conflicts between paths that begin with the same
chars as some llvm-rc options (which can be used with either slashes
or dashes).

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

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

6 years ago[llvm-symbolizer] Add -C as a short alias to -demangle
Dmitry Venikov [Wed, 16 Jan 2019 07:05:58 +0000 (07:05 +0000)]
[llvm-symbolizer] Add -C as a short alias to -demangle

Summary: Provides -C as alias to -demangle. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40069.

Reviewers: jhenderson, ruiu, rnk, fjricci

Reviewed By: jhenderson, ruiu

Subscribers: rupprecht, erik.pilkington, llvm-commits

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

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

6 years ago[WebAssembly] COWS has been renamed to WASI.
Dan Gohman [Wed, 16 Jan 2019 05:23:52 +0000 (05:23 +0000)]
[WebAssembly] COWS has been renamed to WASI.

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

6 years agoOnly promote args when function attributes are compatible
Tom Stellard [Wed, 16 Jan 2019 05:15:31 +0000 (05:15 +0000)]
Only promote args when function attributes are compatible

Summary:
Check to make sure that the caller and the callee have compatible
function arguments before promoting arguments.  This uses the same
TargetTransformInfo queries that are used to determine if attributes
are compatible for inlining.

The goal here is to avoid breaking ABI when a called function's ABI
depends on a target feature that is not enabled in the caller.

This is a very conservative fix for PR37358.  Ideally we would have a more
sophisticated check for ABI compatiblity rather than checking if the
attributes are compatible for inlining.

Reviewers: echristo, chandlerc, eli.friedman, craig.topper

Reviewed By: echristo, chandlerc

Subscribers: nikic, xbolva00, rkruppe, alexcrichton, llvm-commits

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

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

6 years ago[InstCombine]Avoid introduction of unaligned mem access
Serguei Katkov [Wed, 16 Jan 2019 04:36:26 +0000 (04:36 +0000)]
[InstCombine]Avoid introduction of unaligned mem access

InstCombine is able to transform mem transfer instrinsic to alone store or store/load pair.
It might result in generation of unaligned atomic load/store which later in backend
will be transformed to libcall. It is not an evident gain and it is better to keep intrinsic as is
and handle it at backend.

Reviewers: reames, anna, apilipenko, mkazantsev
Reviewed By: reames
Subscribers: t.p.northover, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D56582

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

6 years agogn build: Merge r351283.
Peter Collingbourne [Wed, 16 Jan 2019 02:27:12 +0000 (02:27 +0000)]
gn build: Merge r351283.

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

6 years ago[WebAssembly] Store section alignment as a power of 2
Sam Clegg [Wed, 16 Jan 2019 01:34:48 +0000 (01:34 +0000)]
[WebAssembly] Store section alignment as a power of 2

This change bumps for version number of the wasm object file
metadata.

See https://github.com/WebAssembly/tool-conventions/pull/92

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

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

6 years ago[GISel]: Add support for CSEing continuously during GISel passes.
Aditya Nandakumar [Wed, 16 Jan 2019 00:40:37 +0000 (00:40 +0000)]
[GISel]: Add support for CSEing continuously during GISel passes.

https://reviews.llvm.org/D52803

This patch adds support to continuously CSE instructions during
each of the GISel passes. It consists of a GISelCSEInfo analysis pass
that can be used by the CSEMIRBuilder.

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

6 years ago[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp
Mandeep Singh Grang [Wed, 16 Jan 2019 00:37:13 +0000 (00:37 +0000)]
[EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp

Summary:
Make recoverfp intrinsic target-independent so that it can be implemented for AArch64, etc.
Refer D53541 for the context. Clang counterpart D56748.

Reviewers: rnk, efriedma

Reviewed By: rnk, efriedma

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

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

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

6 years ago[LangRef] Fix typo adress->address. NFC
Craig Topper [Wed, 16 Jan 2019 00:21:59 +0000 (00:21 +0000)]
[LangRef] Fix typo adress->address. NFC

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

6 years ago[X86] Rename SHRUNKBLEND ISD node to BLENDV.
Craig Topper [Wed, 16 Jan 2019 00:20:30 +0000 (00:20 +0000)]
[X86] Rename SHRUNKBLEND ISD node to BLENDV.

That's really what it is. If we didn't use intrinsics for BLENDVPS/BLENDVPD/PBLENDVB all the way to isel, this is the node we would use.

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

6 years agogn build: Add check-hwasan target.
Peter Collingbourne [Wed, 16 Jan 2019 00:15:25 +0000 (00:15 +0000)]
gn build: Add check-hwasan target.

The Android sanitizer tests are currently some of the most difficult
to run correctly, requiring at least 3 build directories which have
to be configured in just the right way and built in the correct order
(see e.g. [1] and the functions that it calls).

This patch adds a check-hwasan target which greatly simplifies running
the hwasan tests for gn users, taking advantage of its support for
multiple toolchains. With this the tests can be run simply by setting
an NDK path and running "ninja check-hwasan" with a compatible Android
device connected. The Linux/x86_64 and Android/aarch64 targets are
tested in parallel.

[1] https://github.com/llvm/llvm-zorg/blob/master/zorg/buildbot/builders/sanitizers/buildbot_android.sh

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

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

6 years ago[X86] Add avx512 scatter intrinsics that use a vXi1 mask instead of a scalar integer.
Craig Topper [Tue, 15 Jan 2019 23:36:25 +0000 (23:36 +0000)]
[X86] Add avx512 scatter intrinsics that use a vXi1 mask instead of a scalar integer.

We're trying to have the vXi1 types in IR as much as possible. This prevents the need for bitcasts when the producer of the mask was already a vXi1 value like an icmp. The bitcasts can be subject to code motion and interfere with basic block at a time isel in bad ways.

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

6 years agoAMDGPU: Raise the priority of MAD24 in instruction selection.
Changpeng Fang [Tue, 15 Jan 2019 23:12:36 +0000 (23:12 +0000)]
AMDGPU: Raise the priority of MAD24 in instruction selection.

Summary:
  We have seen performance regression when v_add3 is generated. The major reason is that the v_mad pattern
is broken when v_add3 is generated. We also see the register pressure increased. While we could not properly
estimate register pressure during instruction selection, we can give mad a higher priority.

In this work, we raise the priority for mad24 in selection and resolve the performance regression.

Reviewers:
  rampitec

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

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

6 years ago[VFS] Add getter for mapping entries.
Jonas Devlieghere [Tue, 15 Jan 2019 22:36:56 +0000 (22:36 +0000)]
[VFS] Add getter for mapping entries.

When generating a reproducer in LLDB we build up the mapping but don't
immediately copy over the files on the file system.

Rather than keeping a separate data structure with real and virtual
paths, we might as well reuse the entries already stored in the
YAMLVFSWriter to lazily copy over the files when needed.

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

6 years ago[VFS] Move RedirectingFileSystem interface into header (NFC)
Jonas Devlieghere [Tue, 15 Jan 2019 22:36:41 +0000 (22:36 +0000)]
[VFS] Move RedirectingFileSystem interface into header (NFC)

This moves the RedirectingFileSystem into the header so it can be
extended. This is needed in LLDB we need a way to obtain the external
path to deal with FILE* and file descriptor APIs.

Discussion on the mailing list:
http://lists.llvm.org/pipermail/llvm-dev/2018-November/127755.html

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

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

6 years ago[libObject] Tweak expected error output from llvm-ar
Jordan Rupprecht [Tue, 15 Jan 2019 22:03:08 +0000 (22:03 +0000)]
[libObject] Tweak expected error output from llvm-ar

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

6 years agogn build: Add a stage2 host toolchain and make the hwasan runtime buildable on x86_64...
Peter Collingbourne [Tue, 15 Jan 2019 22:02:12 +0000 (22:02 +0000)]
gn build: Add a stage2 host toolchain and make the hwasan runtime buildable on x86_64 Linux.

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

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

6 years ago[llvm-ar] Resubmit recursive thin archive test with fix for full path names and bette...
Jordan Rupprecht [Tue, 15 Jan 2019 21:52:31 +0000 (21:52 +0000)]
[llvm-ar] Resubmit recursive thin archive test with fix for full path names and better error messages

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

6 years agogn build: Add a resource_dir.gni file.
Peter Collingbourne [Tue, 15 Jan 2019 21:44:59 +0000 (21:44 +0000)]
gn build: Add a resource_dir.gni file.

The path to the resource directory will end up being used in several
more places once the support for running check-hwasan lands. This
moves the definition to a central location so that it can be used
from those places.

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

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

6 years ago[X86] Add the GCCBuiltin name back to the deprecated avx512 gather intrinsics until...
Craig Topper [Tue, 15 Jan 2019 21:41:31 +0000 (21:41 +0000)]
[X86] Add the GCCBuiltin name back to the deprecated avx512 gather intrinsics until the clang side patch for the new versions is approved.

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

6 years agoX86DAGToDAGISel::matchBitExtract() with truncation (PR36419)
Roman Lebedev [Tue, 15 Jan 2019 21:31:18 +0000 (21:31 +0000)]
X86DAGToDAGISel::matchBitExtract() with truncation (PR36419)

Summary:
Previously in D54095 i have added support for extraction of `lshr` from `X` if we are to produce `BEXTR`.
That was good, but the fix was partial, there was still [[ https://bugs.llvm.org/show_bug.cgi?id=36419 | PR36419 ]].

That pattern can also appear, roughly, when you have a large (64-bit) storage, and the consume bits from it.
It will not be unexpected if you will be doing further computations in 32-bit width.
And then the current code breaks, as the tests show.

The basic idea/pattern here is following:
1. We have `i64` input
2. We perform `i64` right-shift on it.
3. We `trunc`ate that shifted value
4. We do all further work (masking) in `i32`

Since we see `trunc`ation and not `lshr`, we give up, and stop trying to extract that right-shift.
BUT. The mask is `i32`, therefore we can extend both of the operands of the masking (`and`) to `i64`
and truncate the result after masking: https://rise4fun.com/Alive/K4B
```
Name: @bextr64_32_b1 -> @bextr64_32_b0
  %shiftedval = lshr i64 %val, %numskipbits
  %truncshiftedval = trunc i64 %shiftedval to i32
  %widenumlowbits1 = zext i8 %numlowbits to i32
  %notmask1 = shl nsw i32 -1, %widenumlowbits1
  %mask1 = xor i32 %notmask1, -1
  %res = and i32 %truncshiftedval, %mask1
=>
  %shiftedval = lshr i64 %val, %numskipbits
  %widenumlowbits = zext i8 %numlowbits to i64
  %notmask = shl nsw i64 -1, %widenumlowbits
  %mask = xor i64 %notmask, -1
  %wideres = and i64 %shiftedval, %mask
  %res = trunc i64 %wideres to i32
```

Thus, we are again able to extract that `lshr` into `BEXTR`'s control.

Now, the perf (via `llvm-exegesis`) of the snippet suggests that it is not a good idea:
```
$ cat /tmp/old.s
# bextr64_32_b1
# LLVM-EXEGESIS-LIVEIN RSI
# LLVM-EXEGESIS-LIVEIN EDX
# LLVM-EXEGESIS-LIVEIN RDI
movq %rsi, %rcx
shrq %cl, %rdi
shll $8, %edx
bextrl %edx, %edi, %eax
$ cat /tmp/old.s | ./bin/llvm-exegesis -mode=latency -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-1e0082.o
---
mode:            latency
key:
  instructions:
    - 'MOV64rr RCX RSI'
    - 'SHR64rCL RDI RDI'
    - 'SHL32ri EDX EDX i_0x8'
    - 'BEXTR32rr EAX EDI EDX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: latency, value: 0.6638, per_snippet_value: 2.6552 }
error:           ''
info:            ''
assembled_snippet: 4889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C7C3
...
$ cat /tmp/old.s | ./bin/llvm-exegesis -mode=uops -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-43e346.o
---
mode:            uops
key:
  instructions:
    - 'MOV64rr RCX RSI'
    - 'SHR64rCL RDI RDI'
    - 'SHL32ri EDX EDX i_0x8'
    - 'BEXTR32rr EAX EDI EDX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: PdFPU0, value: 0, per_snippet_value: 0 }
  - { key: PdFPU1, value: 0, per_snippet_value: 0 }
  - { key: PdFPU2, value: 0, per_snippet_value: 0 }
  - { key: PdFPU3, value: 0, per_snippet_value: 0 }
  - { key: NumMicroOps, value: 1.2571, per_snippet_value: 5.0284 }
error:           ''
info:            ''
assembled_snippet: 4889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C74889F148D3EFC1E208C4E268F7C7C3
...
```
vs
```
$ cat /tmp/new.s
# bextr64_32_b1
# LLVM-EXEGESIS-LIVEIN RDX
# LLVM-EXEGESIS-LIVEIN SIL
# LLVM-EXEGESIS-LIVEIN RDI
shlq $8, %rdx
movzbl %sil, %eax
orq %rdx, %rax
bextrq %rax, %rdi, %rax
$ cat /tmp/new.s | ./bin/llvm-exegesis -mode=latency -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-8944f1.o
---
mode:            latency
key:
  instructions:
    - 'SHL64ri RDX RDX i_0x8'
    - 'MOVZX32rr8 EAX SIL'
    - 'OR64rr RAX RAX RDX'
    - 'BEXTR64rr RAX RDI RAX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: latency, value: 0.7454, per_snippet_value: 2.9816 }
error:           ''
info:            ''
assembled_snippet: 48C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C7C3
...
$ cat /tmp/new.s | ./bin/llvm-exegesis -mode=uops -snippets-file=-
Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-da403c.o
---
mode:            uops
key:
  instructions:
    - 'SHL64ri RDX RDX i_0x8'
    - 'MOVZX32rr8 EAX SIL'
    - 'OR64rr RAX RAX RDX'
    - 'BEXTR64rr RAX RDI RAX'
  config:          ''
  register_initial_values: []
cpu_name:        bdver2
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { key: PdFPU0, value: 0, per_snippet_value: 0 }
  - { key: PdFPU1, value: 0, per_snippet_value: 0 }
  - { key: PdFPU2, value: 0, per_snippet_value: 0 }
  - { key: PdFPU3, value: 0, per_snippet_value: 0 }
  - { key: NumMicroOps, value: 1.2571, per_snippet_value: 5.0284 }
error:           ''
info:            ''
assembled_snippet: 48C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C748C1E208400FB6C64809D0C4E2F8F7C7C3
...
```
^ latency increased (worse).

Except //maybe// not really.
Like with all synthetic benchmarks, they //may// be misleading.

Let's take a look on some actual real-world hotpath.
In this case it's 'my' [[ https://github.com/darktable-org/rawspeed | RawSpeed ]]'s `BitStream<>::peekBitsNoFill()`, in [[ https://github.com/darktable-org/rawspeed/blob/e3316dc85127c2c29baa40f998f198a7b278bf36/src/librawspeed/decompressors/VC5Decompressor.cpp#L814 | GoPro VC5 decompressor ]]:
```
raw.pixls.us-unique/GoPro/HERO6 Black$ /usr/src/googlebenchmark/tools/compare.py -a benchmarks ~/rawspeed/build-clangs1-{old,new}/src/utilities/rsbench/rsbench --benchmark_counters_tabular=true --benchmark_min_time=0.00000001 --benchmark_repetitions=128 GOPR9172.GPR
RUNNING: /home/lebedevri/rawspeed/build-clangs1-old/src/utilities/rsbench/rsbench --benchmark_counters_tabular=true --benchmark_min_time=0.00000001 --benchmark_repetitions=128 GOPR9172.GPR --benchmark_display_aggregates_only=true --benchmark_out=/tmp/tmplwbKEM
2018-12-22 21:23:03
Running /home/lebedevri/rawspeed/build-clangs1-old/src/utilities/rsbench/rsbench
Run on (8 X 4012.81 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
Load Average: 3.41, 2.41, 2.03
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                        Time           CPU Iterations  CPUTime,s CPUTime/WallTime     Pixels Pixels/CPUTime Pixels/WallTime Raws/CPUTime Raws/WallTime WallTime,s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_mean           40 ms         40 ms        128   0.322244          7.96974        12M       37.4457M        298.534M      3.12047       24.8778   0.040465
GOPR9172.GPR/threads:8/real_time_median         39 ms         39 ms        128   0.312606          7.99155        12M        38.387M        306.788M      3.19891       25.5656   0.039115
GOPR9172.GPR/threads:8/real_time_stddev          4 ms          3 ms        128  0.0271557         0.130575          0        2.4941M        21.3909M     0.207842       1.78257   3.81081m
RUNNING: /home/lebedevri/rawspeed/build-clangs1-new/src/utilities/rsbench/rsbench --benchmark_counters_tabular=true --benchmark_min_time=0.00000001 --benchmark_repetitions=128 GOPR9172.GPR --benchmark_display_aggregates_only=true --benchmark_out=/tmp/tmpWAkan9
2018-12-22 21:23:08
Running /home/lebedevri/rawspeed/build-clangs1-new/src/utilities/rsbench/rsbench
Run on (8 X 4013.1 MHz CPU s)
CPU Caches:
  L1 Data 16K (x8)
  L1 Instruction 64K (x4)
  L2 Unified 2048K (x4)
  L3 Unified 8192K (x1)
Load Average: 3.78, 2.50, 2.06
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                        Time           CPU Iterations  CPUTime,s CPUTime/WallTime     Pixels Pixels/CPUTime Pixels/WallTime Raws/CPUTime Raws/WallTime WallTime,s
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_mean           39 ms         39 ms        128   0.311533          7.97323        12M       38.6828M        308.471M      3.22356        25.706  0.0390928
GOPR9172.GPR/threads:8/real_time_median         38 ms         38 ms        128   0.304231          7.99005        12M       39.4437M        315.527M      3.28698        26.294  0.0380316
GOPR9172.GPR/threads:8/real_time_stddev          3 ms          3 ms        128  0.0229149         0.133814          0       2.26225M        19.1421M     0.188521       1.59517   3.13671m
Comparing /home/lebedevri/rawspeed/build-clangs1-old/src/utilities/rsbench/rsbench to /home/lebedevri/rawspeed/build-clangs1-new/src/utilities/rsbench/rsbench
Benchmark                                                 Time             CPU      Time Old      Time New       CPU Old       CPU New
--------------------------------------------------------------------------------------------------------------------------------------
GOPR9172.GPR/threads:8/real_time_pvalue                 0.0000          0.0000      U Test, Repetitions: 128 vs 128
GOPR9172.GPR/threads:8/real_time_mean                  -0.0339         -0.0316            40            39            40            39
GOPR9172.GPR/threads:8/real_time_median                -0.0277         -0.0274            39            38            39            38
GOPR9172.GPR/threads:8/real_time_stddev                -0.1769         -0.1267             4             3             3             3
```
I.e. this results in //roughly// -3% improvements in perf.

While this will help [[ https://bugs.llvm.org/show_bug.cgi?id=36419 | PR36419 ]], it won't address it fully.

Reviewers: RKSimon, craig.topper, andreadb, spatel

Reviewed By: craig.topper

Subscribers: courbet, llvm-commits

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

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

6 years agotreat invoke like call
David Callahan [Tue, 15 Jan 2019 21:26:51 +0000 (21:26 +0000)]
treat invoke like call

Summary:
InvokeInst should be treated like CallInst and
assigned a separate discriminator. This is particularly
import when an Invoke is converted to a Call
during compilation and so can invalidate sample profile
data collected wtih different link time optimizations

Reviewers: twoh, Kader, danielcdh, wmi

Reviewed By: wmi

Subscribers: llvm-commits

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

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

6 years agogn build: Move target flags from toolchain to a .gni file.
Peter Collingbourne [Tue, 15 Jan 2019 21:24:00 +0000 (21:24 +0000)]
gn build: Move target flags from toolchain to a .gni file.

While here, add a use_lld flag and default it to true when using
clang on non-mac.

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

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

6 years ago[SanitizerCoverage] Don't create comdat for interposable functions.
Matt Morehouse [Tue, 15 Jan 2019 21:21:01 +0000 (21:21 +0000)]
[SanitizerCoverage] Don't create comdat for interposable functions.

Summary:
Comdat groups override weak symbol behavior, allowing the linker to keep
the comdats for weak symbols in favor of comdats for strong symbols.

Fixes the issue described in:
https://bugs.chromium.org/p/chromium/issues/detail?id=918662

Reviewers: eugenis, pcc, rnk

Reviewed By: pcc, rnk

Subscribers: smeenai, rnk, bd1976llvm, hiraditya, llvm-commits

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

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

6 years agogn build: Add build files for compiler-rt/lib/{hwasan,interception,sanitizer_common...
Peter Collingbourne [Tue, 15 Jan 2019 21:08:21 +0000 (21:08 +0000)]
gn build: Add build files for compiler-rt/lib/{hwasan,interception,sanitizer_common,ubsan}.

This allows the hwasan runtime to be built for Android aarch64.

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

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

6 years agogn build: Merge r351216, r351228.
Peter Collingbourne [Tue, 15 Jan 2019 21:02:49 +0000 (21:02 +0000)]
gn build: Merge r351216, r351228.

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

6 years ago[SLP] Added test for PR40310, NFC.
Alexey Bataev [Tue, 15 Jan 2019 20:54:44 +0000 (20:54 +0000)]
[SLP] Added test for PR40310, NFC.

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

6 years agollvm-objdump -m -D should disassemble all text segments
Michael Trent [Tue, 15 Jan 2019 20:41:30 +0000 (20:41 +0000)]
llvm-objdump -m -D should disassemble all text segments

Summary:
When running llvm-objdump with the -macho option objdump will by default
disassemble only the __TEXT,__text section (or __TEXT_EXEC,__text when
disassembling MH_KEXT_BUNDLE files). The -disassemble-all option is
treated no diferently than -disassemble.

This change upates llvm-objdump's MachO parsing code to disassemble all
__text sections found in a file when -disassemble-all is specified. This
is useful for disassembling files with more than one __text section, or
when disassembling files whose __text section is not present in __TEXT.

I added a lit test case that verifies "llvm-objdump -m -d" and
"llvm-objdump -m -D" produce the expected results on a reference binary.
I also updated the CommandGuide documentation for llvm-objdump.rst and
verified it renders correctly as man and html.

rdar://42899338

Reviewers: ab, pete, lhames

Reviewed By: lhames

Subscribers: rupprecht, llvm-commits

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

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

6 years ago[X86] Add versions of the avx512 gather intrinsics that take the mask as a vXi1 vecto...
Craig Topper [Tue, 15 Jan 2019 20:12:33 +0000 (20:12 +0000)]
[X86] Add versions of the avx512 gather intrinsics that take the mask as a vXi1 vector instead of a scalar

In keeping with our general direction of having the vXi1 type present in IR, this patch converts the mask argument for avx512 gather to vXi1. This can avoid k-register to GPR to k-register transitions late in codegen.

I left the existing intrinsics behind because they have many out of tree users such as ISPC. They generate their own code and don't go through the autoupgrade path which only works for bitcode and ll parsing. Ideally we will get them to migrate to target independent intrinsics, but it might be easier for them to migrate to these new intrinsics.

I'll work on scatter and gatherpf/scatterpf next.

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

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

6 years ago[MSP430] Recognize '{' as a line separator
Anton Korobeynikov [Tue, 15 Jan 2019 20:10:46 +0000 (20:10 +0000)]
[MSP430] Recognize '{' as a line separator

msp430-as supports multiple assembly statements on the same line
separated by a '{' character.

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

6 years ago[Nios2] Remove Nios2 backend
Craig Topper [Tue, 15 Jan 2019 19:59:19 +0000 (19:59 +0000)]
[Nios2] Remove Nios2 backend

As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months.

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

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