OSDN Git Service

android-x86/external-llvm.git
7 years ago[EfficiencySanitizer] Using '$' instead of '#' for struct counter name
Sagar Thakur [Thu, 22 Sep 2016 08:33:06 +0000 (08:33 +0000)]
[EfficiencySanitizer] Using '$' instead of '#' for struct counter name

For MIPS '#' is the start of comment line. Therefore we get assembler errors if # is used in the structure names.

Differential: D24334
Reviewed by: zhaoqin

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

7 years agoFix revision 281960
Dorit Nuzman [Thu, 22 Sep 2016 07:56:23 +0000 (07:56 +0000)]
Fix revision 281960

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

7 years ago[AVX-512] Add support for commuting VPTERNLOG instructions.
Craig Topper [Thu, 22 Sep 2016 03:00:50 +0000 (03:00 +0000)]
[AVX-512] Add support for commuting VPTERNLOG instructions.

VPTERNLOG is a ternary instruction with an immediate specifying the logical operation to perform. For each bit position in the 3 source vectors the bit from each source is concatenated together and the resulting 3-bit value is used to select a bit in the immediate. This bit value is written to the result vector.

We can commute this by swapping operands and modifying the immediate. To modify the immediate we need to swap two pairs of bits. The pairs correspond to the locations in the immediate where the commuted operands bits have opposite values and the uncommuted operand has the same value. Bits 0 and 7 will never be swapped since the relevant bits from all sources are the same value.

This refactors and reuses parts of the FMA3 commuting code which is also a three operand instruction.

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

7 years ago[RegisterBankInfo] Move to statically allocated RegisterBank.
Quentin Colombet [Thu, 22 Sep 2016 02:10:37 +0000 (02:10 +0000)]
[RegisterBankInfo] Move to statically allocated RegisterBank.

This commit is basically the first step toward what will
RegisterBankInfo look when it gets TableGen'ed.

It introduces a XXXGenRegisterBankInfo.def file that is what TableGen
will issue at some point. Moreover, the RegBanks field in
RegisterBankInfo changed to reflect the static (compile time) aspect of
the information.

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

7 years ago[RegisterBankInfo] Take advantage of the extra argument of SmallVector::resize.
Quentin Colombet [Thu, 22 Sep 2016 02:10:32 +0000 (02:10 +0000)]
[RegisterBankInfo] Take advantage of the extra argument of SmallVector::resize.

When initializing an instance of OperandsMapper, instead of using
SmallVector::resize followed by std::fill, use the function that
directly does that in SmallVector.

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

7 years ago[libFuzzer] add 'features' to the corpus elements, allow mutations with Size > MaxSiz...
Kostya Serebryany [Thu, 22 Sep 2016 01:34:58 +0000 (01:34 +0000)]
[libFuzzer] add 'features' to the corpus elements, allow mutations with Size > MaxSize, fix sha1 in corpus stats; various refactorings

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

7 years ago[libFuzzer] one more test
Kostya Serebryany [Thu, 22 Sep 2016 00:57:29 +0000 (00:57 +0000)]
[libFuzzer] one more test

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

7 years ago[libFuzzer] add stats to the corpus; more refactoring
Kostya Serebryany [Wed, 21 Sep 2016 22:42:17 +0000 (22:42 +0000)]
[libFuzzer] add stats to the corpus; more refactoring

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

7 years ago=delete the StringRef(nullptr_t) constructor.
Zachary Turner [Wed, 21 Sep 2016 22:29:36 +0000 (22:29 +0000)]
=delete the StringRef(nullptr_t) constructor.

It's a guaranteed crash if you construct a StringRef with
nullptr, so might as well delete the constructor that allows
it.

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

7 years ago[libFuzzer] more refactoring; don't compute sha1sum every time we mutate a unit from...
Kostya Serebryany [Wed, 21 Sep 2016 21:41:48 +0000 (21:41 +0000)]
[libFuzzer] more refactoring; don't compute sha1sum every time we mutate a unit from the corpus, use the stored one.

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

7 years ago[libFuzzer] more refactoring
Kostya Serebryany [Wed, 21 Sep 2016 21:17:23 +0000 (21:17 +0000)]
[libFuzzer] more refactoring

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

7 years agoNext set of additional error checks for invalid Mach-O files for bad LC_UUID
Kevin Enderby [Wed, 21 Sep 2016 20:03:09 +0000 (20:03 +0000)]
Next set of additional error checks for invalid Mach-O files for bad LC_UUID
load commands.  Added a missing check and made the check for more than
one like other other “more than one” checks.  And of course added test cases.

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

7 years ago[LoopInterchange] Track all dependencies, not just anti dependencies.
Chad Rosier [Wed, 21 Sep 2016 19:16:47 +0000 (19:16 +0000)]
[LoopInterchange] Track all dependencies, not just anti dependencies.

Currently, we give up on loop interchange if we encounter a flow dependency
anywhere in the loop list. Worse yet, we don't even track output dependencies.

This patch updates the dependency matrix computation to track flow and output
dependencies in the same way we track anti dependencies.

This improves an internal workload by 2.2x.

Note the loop interchange pass is off by default and it can be enabled with
'-mllvm -enable-loopinterchange'

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

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

7 years ago[ThinLTO] Emit files for distributed builds for all modules
Teresa Johnson [Wed, 21 Sep 2016 19:12:05 +0000 (19:12 +0000)]
[ThinLTO] Emit files for distributed builds for all modules

With the new LTO API in r278338, we stopped emitting the individual
index files and imports files for some modules in the distributed backend
case (thinlto-index-only plugin option).

Specifically, this is when the linker decides not to include a module in the
link, because it was in an archive library and did not have a strong
reference to it. Not creating the expected output files makes the
distributed build system implementation more difficult, in terms of
checking for the expected outputs of the thin link, and scheduling the
backend jobs. To address this, the gold-plugin will write dummy empty
.thinlto.bc and .imports files for modules not included in the link
(which LTO never sees).

Augmented a gold v1.12+ test, since that version of gold has the handling
for notifying on modules not being included in the link.

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

7 years ago[MIRParser] Delete dead code. NFCI.
Davide Italiano [Wed, 21 Sep 2016 18:26:08 +0000 (18:26 +0000)]
[MIRParser] Delete dead code. NFCI.

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

7 years agorevert 281908 because 281909 got reverted
Nico Weber [Wed, 21 Sep 2016 18:25:43 +0000 (18:25 +0000)]
revert 281908 because 281909 got reverted

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

7 years agofix typo in comment [NFC]
Etienne Bergeron [Wed, 21 Sep 2016 17:15:23 +0000 (17:15 +0000)]
fix typo in comment [NFC]

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

7 years agoDisable tail calls if there is an swifterror argument
Arnold Schwaighofer [Wed, 21 Sep 2016 16:53:36 +0000 (16:53 +0000)]
Disable tail calls if there is an swifterror argument

ISel does not handle them correctly yet i.e we crash trying to emit tail call
code.

radar://28407842

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

7 years ago[LV] Don't emit unused scalars for uniform instructions
Matthew Simpson [Wed, 21 Sep 2016 16:50:24 +0000 (16:50 +0000)]
[LV] Don't emit unused scalars for uniform instructions

If we identify an instruction as uniform after vectorization, we know that we
should only use the value corresponding to the first vector lane of each unroll
iteration. However, when scalarizing such instructions, we still produce values
for the other vector lanes. This patch prevents us from generating the unused
scalars.

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

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

7 years ago[AMDGPU][mc] Add support for ds_add_[rtn_]f32.
Artem Tamazov [Wed, 21 Sep 2016 16:35:44 +0000 (16:35 +0000)]
[AMDGPU][mc] Add support for ds_add_[rtn_]f32.

Lit tests added.
Resolves https://github.com/RadeonOpenCompute/hcc/issues/122.

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

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

7 years agoChange the basic block weight calculation algorithm to use max instead of voting.
Dehao Chen [Wed, 21 Sep 2016 16:26:51 +0000 (16:26 +0000)]
Change the basic block weight calculation algorithm to use max instead of voting.

Summary: Now that we have more precise debug info, we should change back to use maximum to get basic block weight.

Reviewers: dnovillo

Subscribers: andreadb, llvm-commits

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

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

7 years ago[LV] Rename "Width" to "Lane" (NFC)
Matthew Simpson [Wed, 21 Sep 2016 16:09:23 +0000 (16:09 +0000)]
[LV] Rename "Width" to "Lane" (NFC)

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

7 years ago[AVX512] Fix return types on int_x86_avx512_gatherXXX_di intrinsics
Cameron McInally [Wed, 21 Sep 2016 16:06:10 +0000 (16:06 +0000)]
[AVX512] Fix return types on int_x86_avx512_gatherXXX_di intrinsics

The return type should match the pass through vector type.

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

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

7 years agoRevert r281895 "Add @llvm.dbg.value entries for the phi node created by -mem2reg"
Hans Wennborg [Wed, 21 Sep 2016 15:55:53 +0000 (15:55 +0000)]
Revert r281895 "Add @llvm.dbg.value entries for the phi node created by -mem2reg"

(And follow-up r281964.)

It caused PR30468.

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

7 years agoRevert r281715, it caused PR30475
Nico Weber [Wed, 21 Sep 2016 15:33:24 +0000 (15:33 +0000)]
Revert r281715, it caused PR30475

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

7 years agoDeadArgElim: Don't mark swifterror arguments as unused
Arnold Schwaighofer [Wed, 21 Sep 2016 15:29:08 +0000 (15:29 +0000)]
DeadArgElim: Don't mark swifterror arguments as unused

Replacing swifterror arguments with undef creates invalid IR.

rdar://28300490

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

7 years ago[LoopInterchange] Various cleanup. NFC.
Chad Rosier [Wed, 21 Sep 2016 13:28:41 +0000 (13:28 +0000)]
[LoopInterchange] Various cleanup. NFC.

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

7 years agoGlobalISel: produce correct code for signext/zeroext ABI flags.
Tim Northover [Wed, 21 Sep 2016 12:57:45 +0000 (12:57 +0000)]
GlobalISel: produce correct code for signext/zeroext ABI flags.

We still don't really have an equivalent of "AssertXExt" in DAG, so we don't
exploit the guarantees on the receiving side yet, but this should produce
conservatively correct code on iOS ABIs.

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

7 years agoGlobalISel: pass Function to lowerFormalArguments directly (NFC).
Tim Northover [Wed, 21 Sep 2016 12:57:35 +0000 (12:57 +0000)]
GlobalISel: pass Function to lowerFormalArguments directly (NFC).

The only implementation that exists immediately looks it up anyway, and the
information is needed to handle various parameter attributes (stored on the
function itself).

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

7 years ago[AMDGPU] Assembler: remove unused AMDGPUMCObjectWriter.
Sam Kolton [Wed, 21 Sep 2016 10:33:32 +0000 (10:33 +0000)]
[AMDGPU] Assembler: remove unused AMDGPUMCObjectWriter.

Summary: It is replaced by AMDGPUELFObjectWriter

Reviewers: tstellarAMD, vpykhtin, artem.tamazov

Subscribers: arsenm, kzhuravl, wdng, nhaehnle, yaxunl

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

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

7 years ago[mips] LLVM PR/30197 - Tail call incorrectly clobbers arguments for mips
Simon Dardis [Wed, 21 Sep 2016 09:43:40 +0000 (09:43 +0000)]
[mips] LLVM PR/30197 - Tail call incorrectly clobbers arguments for mips

The postRA scheduler performs alias analysis to determine if stores and loads
can moved past each other. When a function has more arguments than argument
registers for the calling convention used, excess arguments are spilled onto the
stack. LLVM by default assumes that argument slots are immutable, unless the
function contains a tail call. Without the knowledge of that a function contains
a tail call site, stores and loads to fixed stack slots may be re-ordered
causing the out-going arguments to clobber the incoming arguments before the
incoming arguments are supposed to be dead.

Reviewers: vkalintiris

Differential Review: https://reviews.llvm.org/D24077

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

7 years agoRevert "AArch64: Set shift bit of TLSLE HI12 add instruction"
Diana Picus [Wed, 21 Sep 2016 08:24:41 +0000 (08:24 +0000)]
Revert "AArch64: Set shift bit of TLSLE HI12 add instruction"

This reverts commit r282057 because it broke the buildbots - see e.g.
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12063

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

7 years agoAArch64: Set shift bit of TLSLE HI12 add instruction
Lei Liu [Wed, 21 Sep 2016 07:41:41 +0000 (07:41 +0000)]
AArch64: Set shift bit of TLSLE HI12 add instruction

Summary: AArch64 LLVM assembler emits add instruction without shift bit to calculate the higher 12-bit address of TLS variables in local exec model.  This generates wrong code sequence to access TLS variables with thread offset larger than 0x1000.

Reviewers: t.p.northover, peter.smith, rovka

Subscribers: salim.nasser, aemerson, llvm-commits, rengolin

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

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

7 years ago[AVX-512] Split the 3 different usages of the X86ISD::FSETCC opcode into 3 different...
Craig Topper [Wed, 21 Sep 2016 06:37:54 +0000 (06:37 +0000)]
[AVX-512] Split the 3 different usages of the X86ISD::FSETCC opcode into 3 different opcodes.

It turns out isel is really not robust against having different type profiles for the same opcode. It turns out that if you put an illegal rounding mode(i.e. not CUR_DIRECTION or NO_EXC) on a comiss intrinsic we would generate the FSETCC form with the rounding mode added, but then pattern match to an instruction with ROUND_CUR_DIRECTION.

We can probably get away with just one FSETCCM opcode that always contains the rounding mode and explicitly put ROUND_CUR_DIRECTION in the pattern, but I'll leave that for future work.

With this change the clang tests for the comiss intrinsics that used an incorrect rounding mode of 3 properly fail isel instead of silently doing the wrong thing. Those clang tests will be fixed in a follow up commit and I also plan to add rounding mode checking to clang.

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

7 years agollvm/test/CodeGen/NVPTX/zero-cs.ll: Relax an expression to match in -Asserts.
NAKAMURA Takumi [Wed, 21 Sep 2016 04:43:11 +0000 (04:43 +0000)]
llvm/test/CodeGen/NVPTX/zero-cs.ll: Relax an expression to match in -Asserts.

  LLVM ERROR: Cannot select: 0x3607bf0: i32 = ExternalSymbol'__powidf2'

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

7 years ago[AVX-512] Don't add an additional rounding mode operand to the avx512 vcvtps2ph intri...
Craig Topper [Wed, 21 Sep 2016 03:58:44 +0000 (03:58 +0000)]
[AVX-512] Don't add an additional rounding mode operand to the avx512 vcvtps2ph intrinsic lowering.

There was no way to control its value so it was always FROUND_CURRENT making it unnecessary. The true rounding mode is encoded in the immediate operand of the instruction.

This also removes the pattern from the rb form of the instructions since there is no way to specify the FROUND_NO_EXC rounding mode it required.

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

7 years ago[AVX-512] Simplify handling of INTR_TYPE_1OP_MASK_RM to remove support for the second...
Craig Topper [Wed, 21 Sep 2016 03:58:41 +0000 (03:58 +0000)]
[AVX-512] Simplify handling of INTR_TYPE_1OP_MASK_RM to remove support for the second opcode since its never used. This makes it consistent with INTR_TYPE_2OP_MASK_RM and INTR_TYPE_3OP_MASK_RM.

And even if it was used we were passing the same operands to both so it wouldn't make sense to have two opcodes.

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

7 years ago[libFuzzer] fix libc++ build
Kostya Serebryany [Wed, 21 Sep 2016 03:50:37 +0000 (03:50 +0000)]
[libFuzzer] fix libc++ build

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

7 years ago[LV] When reporting about a specific instruction without debug location use loop's
Adam Nemet [Wed, 21 Sep 2016 03:14:20 +0000 (03:14 +0000)]
[LV] When reporting about a specific instruction without debug location use loop's

This can occur for example if some optimization drops the debug location.

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

7 years ago[libFuzzer] more refactoring; NFC
Kostya Serebryany [Wed, 21 Sep 2016 02:05:39 +0000 (02:05 +0000)]
[libFuzzer] more refactoring; NFC

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

7 years ago[AVX-512] Don't lower avx512 vcvtps2ph/vcvtph2ps nodes to ISD::FP16_TO_FP/ISD::FP_TO_...
Craig Topper [Wed, 21 Sep 2016 02:05:22 +0000 (02:05 +0000)]
[AVX-512] Don't lower avx512 vcvtps2ph/vcvtph2ps nodes to ISD::FP16_TO_FP/ISD::FP_TO_FP16 with an extra x86 specific rounding mode operand. We should use a target specific ISD opcode.

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

7 years ago[NVPTX] Check if callsite is defined when computing argument allignment
Jacques Pienaar [Wed, 21 Sep 2016 01:57:57 +0000 (01:57 +0000)]
[NVPTX] Check if callsite is defined when computing argument allignment

Summary: In getArgumentAlignment check if the ImmutableCallSite pointer CS is non-null before dereferencing. If CS is 0x0 fall back to the ABI type alignment else compute the alignment as before.

Reviewers: eliben, jpienaar

Subscribers: jlebar, vchuravy, cfe-commits, jholewinski

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

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

7 years ago[libFuzzer] refactoring: split the large header into many; NFC
Kostya Serebryany [Wed, 21 Sep 2016 01:50:50 +0000 (01:50 +0000)]
[libFuzzer] refactoring: split the large header into many; NFC

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

7 years ago[libFuzzer] refactoring: move the Corpus into a separate class; delete two unused...
Kostya Serebryany [Wed, 21 Sep 2016 01:04:43 +0000 (01:04 +0000)]
[libFuzzer] refactoring: move the Corpus into a separate class; delete two unused experimental features

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

7 years agoRevert "TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC"
Justin Bogner [Wed, 21 Sep 2016 00:25:45 +0000 (00:25 +0000)]
Revert "TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC"

It turns out we iterate over this map a fair amount and the order
matters for clang to be deterministic. See:

  http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160919/391315.html

This reverts r279875.

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

7 years ago[InferAttributes] Don't access parameters that don't exist.
Michael Kuperstein [Tue, 20 Sep 2016 23:10:31 +0000 (23:10 +0000)]
[InferAttributes] Don't access parameters that don't exist.

Check for the correct number of parameters before querying their type.
This fixes PR30455.

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

7 years ago[ThinLTO] Always emit a summary when compiling in ThinLTO mode
Teresa Johnson [Tue, 20 Sep 2016 23:07:17 +0000 (23:07 +0000)]
[ThinLTO] Always emit a summary when compiling in ThinLTO mode

Summary:
Emit an empty summary section, instead of no summary section, when
there are no global variables in the index. This ensures that LTO
will treat these files as ThinLTO inputs, instead of as regular
LTO inputs.

In addition to not being what the user likely intended when
compiling with -flto=thin, the current behavior is problematic for
distributed build systems that expect to get ThinLTO index and imports
files back for each input compiled with -flto=thin. Combining into
a single regular LTO module also reduces the backend parallelism.
And in the case where the index was suppressed due to uses in
inline assembly, combining into a single LTO module could provoke
renaming of duplicates that we were trying to prevent by suppressing
the index.

This change required a couple of fixes to handle the empty summary
section.

Reviewers: mehdi_amini

Subscribers: mehdi_amini, llvm-commits, pcc

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

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

7 years agocode cleanup -- commoning IR travsersals
Xinliang David Li [Tue, 20 Sep 2016 22:39:47 +0000 (22:39 +0000)]
code cleanup -- commoning IR travsersals

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

7 years agoRemove the default subtarget from the x86 port as it isn't necessary (or
Eric Christopher [Tue, 20 Sep 2016 22:19:33 +0000 (22:19 +0000)]
Remove the default subtarget from the x86 port as it isn't necessary (or
correct) anymore.

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

7 years agoRevert "Remove extra argument used once on
Eric Christopher [Tue, 20 Sep 2016 22:03:28 +0000 (22:03 +0000)]
Revert "Remove extra argument used once on
TargetMachine::getNameWithPrefix and inline the result into the singular
caller." and "Remove more guts of TargetMachine::getNameWithPrefix and
migrate one check to the TLOF mach-o version." temporarily until I can
get the whole call migrated out of the TargetMachine as we could hit
places where TLOF isn't valid.

This reverts commits r281981 and r281983.

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

7 years ago[RS4GC] Refactor code for Rematerializing in presence of phi. NFC
Anna Thomas [Tue, 20 Sep 2016 21:36:02 +0000 (21:36 +0000)]
[RS4GC] Refactor code for Rematerializing in presence of phi. NFC

Summary:
This is an NFC refactoring change as a precursor to the actual fix for rematerializing in
presence of phi.
https://reviews.llvm.org/D24399

Pasted from review:
findRematerializableChainToBasePointer changed to return the root of the
chain. instead of true or false.
move the PHI matching logic into the caller by inspecting the root return value.
This includes an assertion that the alternate root is in the liveset for the
call.

Tested with current RS4GC tests.

Reviewers: reames, sanjoy

Subscribers: llvm-commits

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

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

7 years ago[CodeGen] stop short-circuiting the SSP code for sspstrong.
George Burgess IV [Tue, 20 Sep 2016 21:30:01 +0000 (21:30 +0000)]
[CodeGen] stop short-circuiting the SSP code for sspstrong.

This check caused us to skip adding layout information for calls to
alloca in sspreq/sspstrong mode. We check properly for sspstrong later
on (and add the correct layout info when doing so), so removing this
shouldn't hurt.

No test is included, since testing this using lit seems to require
checking for exact offsets in asm, which is something that the lit tests
for this avoid. If someone cares deeply, I'm happy to write a unittest
or something to cover this, but that feels like overkill.

Patch by Daniel Micay.

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

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

7 years ago[llvm-cov] Demangle names for hidden instantiation views
Vedant Kumar [Tue, 20 Sep 2016 21:27:48 +0000 (21:27 +0000)]
[llvm-cov] Demangle names for hidden instantiation views

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

7 years ago[Profile] dump ic value profile value/site-count histogram
Xinliang David Li [Tue, 20 Sep 2016 21:04:22 +0000 (21:04 +0000)]
[Profile] dump ic value profile value/site-count histogram

Differential Revision: http://reviews.google.com/D24783

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

7 years agoMark ELF sections whose name start with .note as note
Petr Hosek [Tue, 20 Sep 2016 20:21:13 +0000 (20:21 +0000)]
Mark ELF sections whose name start with .note as note

Previously, such section would be marked as SHT_PROGBITS which
makes it impossible to use an initialized C variable declaration
to emit an (allocated) ELF note. The new behavior is also consistent
with ELF assembly parser.

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

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

7 years ago[Profile] Do not annotate select insts not covered in profile.
Xinliang David Li [Tue, 20 Sep 2016 20:20:01 +0000 (20:20 +0000)]
[Profile] Do not annotate select insts not covered in profile.

Fixed PR/30466

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

7 years agoNext set of additional error checks for invalid Mach-O files for bad load commands
Kevin Enderby [Tue, 20 Sep 2016 20:14:14 +0000 (20:14 +0000)]
Next set of additional error checks for invalid Mach-O files for bad load commands
that use the Mach::dylib_command type for the load commands that are
currently used in the MachOObjectFile constructor.

This contains the missing checks for LC_ID_DYLIB, LC_ID_DYLIB, etc.
load commands and the fields for the Mach::dylib_command type.

Also checks that only an MH_DYLIB or MH_STUB_DYLIB has an
LC_ID_DYLIB load command (and others filetype don’t) and there
is not more than one of these load commands.

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

7 years ago[x86] split up tests, regenerate checks
Sanjay Patel [Tue, 20 Sep 2016 19:31:30 +0000 (19:31 +0000)]
[x86] split up tests, regenerate checks

Note that we fail to eliminate 'or' with 0!

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

7 years ago[Profile] code refactoring: make getStep a method in base class
Xinliang David Li [Tue, 20 Sep 2016 19:07:22 +0000 (19:07 +0000)]
[Profile] code refactoring: make getStep a method in base class

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

7 years agoRevert part of "AArch64: Do not test for CPUs, use SubtargetFeatures"
Evandro Menezes [Tue, 20 Sep 2016 19:02:09 +0000 (19:02 +0000)]
Revert part of "AArch64: Do not test for CPUs, use SubtargetFeatures"

This reverts part of commit 119e358d9635c8d1f3e7aee67e3ea3b8a62f8db6 by
removing FeatureUseRSqrt et al per request by Eric Christopher
<echristo@gmail.com> (v. http://bit.ly/2cmz6kW).

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

7 years agoRevert "[AArch64] Use the reciprocal estimation machinery"
Evandro Menezes [Tue, 20 Sep 2016 19:02:06 +0000 (19:02 +0000)]
Revert "[AArch64] Use the reciprocal estimation machinery"

This reverts commit b7d42b0048f65346e9fa37fb65defeea7ce8c337 per request by
Eric Christopher <echristo@gmail.com> (v. http://bit.ly/2cmz6kW).

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

7 years agoRevert "[AArch64] Properly validate the reciprocal estimation."
Evandro Menezes [Tue, 20 Sep 2016 19:02:02 +0000 (19:02 +0000)]
Revert "[AArch64] Properly validate the reciprocal estimation."

This reverts commit ad8ca1528242e2a4cb363e3779309e70eb7a430e per request by
Eric Christopher <echristo@gmail.com> (v. http://bit.ly/2cmz6kW).

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

7 years agoASAN: Don't drop debug info attachements for global variables.
Adrian Prantl [Tue, 20 Sep 2016 18:28:42 +0000 (18:28 +0000)]
ASAN: Don't drop debug info attachements for global variables.
This is a follow-up to r281284. Global Variables now can have
!dbg attachements, so ASAN should clone these when generating a
sanitized copy of a global variable.

<rdar://problem/24899262>

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

7 years agoFix syntactical nit from r281990.
Adrian McCarthy [Tue, 20 Sep 2016 17:42:13 +0000 (17:42 +0000)]
Fix syntactical nit from r281990.

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

7 years agoEmit S_COMPILE3 CodeView record
Adrian McCarthy [Tue, 20 Sep 2016 17:20:51 +0000 (17:20 +0000)]
Emit S_COMPILE3 CodeView record

CodeView has an S_COMPILE3 record to identify the compiler and source language of the compiland.  This record comes first in the debug$S section for the compiland. The debuggers rely on this record to know the source language of the code.

There was a little test fallout from introducing a new record into the symbols subsection.

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

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

7 years agoX86: loosen an overly aggressive MachO assertion
Saleem Abdulrasool [Tue, 20 Sep 2016 17:05:04 +0000 (17:05 +0000)]
X86: loosen an overly aggressive MachO assertion

We would assert that the FP setup CFI used esp/rsp always.  This held up in
practice when the code was generated from IR.  However, with the integrated
assembler, it is possible to have the input be user specified assembly.  In such
a case, we cannot assume that the function implementation has a compact unwind
representation.  Loosen the assertion into a check and bail if we cannot
represent the frame pointer in the compact unwinding.

Addresses PR30453!

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

7 years agoRemove more guts of TargetMachine::getNameWithPrefix and migrate one check to the...
Eric Christopher [Tue, 20 Sep 2016 16:05:02 +0000 (16:05 +0000)]
Remove more guts of TargetMachine::getNameWithPrefix and migrate one check to the TLOF mach-o version.

NFC intended.

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

7 years agoRemove a use of subtarget initialization in the X86 backend so we can get rid of...
Eric Christopher [Tue, 20 Sep 2016 16:04:59 +0000 (16:04 +0000)]
Remove a use of subtarget initialization in the X86 backend so we can get rid of the default subtarget.

NFC intended.

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

7 years agoRemove extra argument used once on TargetMachine::getNameWithPrefix and inline the...
Eric Christopher [Tue, 20 Sep 2016 16:04:50 +0000 (16:04 +0000)]
Remove extra argument used once on TargetMachine::getNameWithPrefix and inline the result into the singular caller.

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

7 years agoImprove the -debug output for Debug Range Extension (NFC)
Keith Walker [Tue, 20 Sep 2016 16:04:31 +0000 (16:04 +0000)]
Improve the -debug output for Debug Range Extension (NFC)

Include header messages and remove unnecessary blank lines.

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

7 years agoGlobalISel: split aggregates for PCS lowering
Tim Northover [Tue, 20 Sep 2016 15:20:36 +0000 (15:20 +0000)]
GlobalISel: split aggregates for PCS lowering

This should match the existing behaviour for passing complicated struct and
array types, in particular HFAs come through like that from Clang.

For C & C++ we still need to somehow support all the weird ABI flags, or at
least those that are present in the IR (signext, byval, ...), and stack-based
parameter passing.

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

7 years ago[X86][SSE] Regenerate multiple combine tests
Simon Pilgrim [Tue, 20 Sep 2016 14:42:45 +0000 (14:42 +0000)]
[X86][SSE] Regenerate multiple combine tests

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

7 years agomove variables closer to their uses; add FIXMEs; NFC
Sanjay Patel [Tue, 20 Sep 2016 14:36:14 +0000 (14:36 +0000)]
move variables closer to their uses; add FIXMEs; NFC

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

7 years ago[AMDGPU][mc] Add regression tests for Bug 28168
Artem Tamazov [Tue, 20 Sep 2016 11:58:40 +0000 (11:58 +0000)]
[AMDGPU][mc] Add regression tests for Bug 28168

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

7 years agoAVX-512: Fixed a bug in lowering saturated operations on KNL.
Elena Demikhovsky [Tue, 20 Sep 2016 11:02:26 +0000 (11:02 +0000)]
AVX-512: Fixed a bug in lowering saturated operations on KNL.

The generated code is still not optimal.

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

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

7 years ago[AMDGPU] Refactor VOP3 instruction TD definitions
Valery Pykhtin [Tue, 20 Sep 2016 10:41:16 +0000 (10:41 +0000)]
[AMDGPU] Refactor VOP3 instruction TD definitions

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

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

7 years agoMake llvm::ConvertDebugDeclareToDebugValue() be a void function (NFC)
Keith Walker [Tue, 20 Sep 2016 10:36:17 +0000 (10:36 +0000)]
Make llvm::ConvertDebugDeclareToDebugValue() be a void function (NFC)

The routines llvm::ConvertDebugDeclareToDebugValue() always returned
a true value which was never checked at the call site; change the
function return type to void.

This NFC cleanup was approved in the review https://reviews.llvm.org/D23715

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

7 years agoAMDGPU: Improve documentation.
Nikolay Haustov [Tue, 20 Sep 2016 09:04:51 +0000 (09:04 +0000)]
AMDGPU: Improve documentation.

Summary:
Add links to ISA manuals and ABI.
Add text about assembler syntax.
Add info about instructions operands.
Add instruction examples for each encoding.
Update directives section, add missing .amdgpu_hsa_kernel.

Reviewers: tstellarAMD, SamWot, vpykhtin

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, artem.tamazov, llvm-commits

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

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

7 years agoReverting revision 281960 due to test failures.
Dorit Nuzman [Tue, 20 Sep 2016 08:27:48 +0000 (08:27 +0000)]
Reverting revision 281960 due to test failures.

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

7 years ago[SROA] Preserve llvm.mem.parallel_loop_access metadata.
Dorit Nuzman [Tue, 20 Sep 2016 07:50:49 +0000 (07:50 +0000)]
[SROA] Preserve llvm.mem.parallel_loop_access metadata.

SROA doesn't preserve the llvm.mem.parallel_loop_access metadata when it
transforms loads/stores. This patch fixes a couple occurences of this
issue.

(Partially addresses PR28981).

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

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

7 years ago[AVX-512] Teach X86InstrInfo::copyPhysReg to use a 512-bit move if XMM16-XMM31 or...
Craig Topper [Tue, 20 Sep 2016 06:49:17 +0000 (06:49 +0000)]
[AVX-512] Teach X86InstrInfo::copyPhysReg to use a 512-bit move if XMM16-XMM31 or YMM16-YMM31 are the source or dest of the copy and VLX is not supported.

This can happen with SUBREG_TO_REG of ZMM16-ZMM31. Fixes PR30430.

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

7 years ago[AVX-512] Use 512-bit vcvtps2ph/vcvtph2ps to implement fp_to_f16/f16_to_fp when F16C...
Craig Topper [Tue, 20 Sep 2016 05:44:47 +0000 (05:44 +0000)]
[AVX-512] Use 512-bit vcvtps2ph/vcvtph2ps to implement fp_to_f16/f16_to_fp when F16C and VLX are not supported.

Fixes PR23941.

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

7 years agoBranchFolder: Fix invalid undef flags after merge.
Matthias Braun [Tue, 20 Sep 2016 01:14:42 +0000 (01:14 +0000)]
BranchFolder: Fix invalid undef flags after merge.

It is legal to merge instructions with different undef flags; However we
must drop the undef flag from the merged instruction if it isn't present
everywhere.

This fixes http://llvm.org/PR30199

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

7 years agoMachine{Instr|Operand}: Clarify some isIdenticalTo() subtleties.
Matthias Braun [Tue, 20 Sep 2016 01:14:39 +0000 (01:14 +0000)]
Machine{Instr|Operand}: Clarify some isIdenticalTo() subtleties.

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

7 years ago[RegisterBankInfo] Avoid heap allocation in InstructionMapping.
Quentin Colombet [Tue, 20 Sep 2016 00:48:44 +0000 (00:48 +0000)]
[RegisterBankInfo] Avoid heap allocation in InstructionMapping.

Use SmallVector instead of dynamically allocated arrays for the mapping of the
operands in the InstructionMapping. That way we avoid heap allocation for most
of the cases. Ultimately, we should not have to rely on such tricky, the
instances of InstructionMapping would be TableGen'ed.

This improves the compilation time of the RegBankSelect pass.

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

7 years ago[x86] fix variable names; NFC
Sanjay Patel [Tue, 20 Sep 2016 00:27:22 +0000 (00:27 +0000)]
[x86] fix variable names; NFC

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

7 years ago[sanitizer-coverage] add comdat to coverage guards if needed
Kostya Serebryany [Tue, 20 Sep 2016 00:16:54 +0000 (00:16 +0000)]
[sanitizer-coverage] add comdat to coverage guards if needed

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

7 years ago[x86] auto-generate checks
Sanjay Patel [Mon, 19 Sep 2016 23:44:50 +0000 (23:44 +0000)]
[x86] auto-generate checks

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

7 years ago[LCSSA] Cache LoopExits to avoid wasted work
Philip Reames [Mon, 19 Sep 2016 23:30:23 +0000 (23:30 +0000)]
[LCSSA] Cache LoopExits to avoid wasted work

When looking at the scribus_1.3 example from https://llvm.org/bugs/show_bug.cgi?id=10584, I noticed that we were spending a large amount of time computing loop exits in LCSSA. This code appears to be written with the assumption that LoopExits are stored in the Loop and thus cheap to query. This is not true, so we should cache the result across the potentially long running loop which tends to visit a small handful of Loops.

On the particular example from 10584, this change drops the time spent in LCSSA computation by about 80%.

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

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

7 years ago[RegisterBankInfo] Adapt call to std::fill due to use of SmallVector.
Quentin Colombet [Mon, 19 Sep 2016 23:18:47 +0000 (23:18 +0000)]
[RegisterBankInfo] Adapt call to std::fill due to use of SmallVector.

This was meant to be commited with my previous commit.

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

7 years agoMerge branch 'ADCE5'
David Callahan [Mon, 19 Sep 2016 23:17:58 +0000 (23:17 +0000)]
Merge branch 'ADCE5'

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

7 years ago[Kaleidoscope] Make Chapter 2 use llvm::make_unique, rather than a helper.
Lang Hames [Mon, 19 Sep 2016 23:00:27 +0000 (23:00 +0000)]
[Kaleidoscope] Make Chapter 2 use llvm::make_unique, rather than a helper.

This essentially reverts r251936, minimizing the difference between Chapter2
and Chapter 3, and making Chapter 2's code match the tutorial text.

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

7 years ago[x86] use getSignBit() to simplify code; NFCI
Sanjay Patel [Mon, 19 Sep 2016 22:07:27 +0000 (22:07 +0000)]
[x86] use getSignBit() to simplify code; NFCI

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

7 years agoMove the armv8.1-a ras test to a negative with noras test as ras is
Eric Christopher [Mon, 19 Sep 2016 21:55:04 +0000 (21:55 +0000)]
Move the armv8.1-a ras test to a negative with noras test as ras is
included in armv8.1-a by default and so we weren't testing anything.

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

7 years agoBitcodeWriter: fix emission of invoke when calling a var-arg function with operand...
Mehdi Amini [Mon, 19 Sep 2016 21:27:04 +0000 (21:27 +0000)]
BitcodeWriter: fix emission of invoke when calling a var-arg function with operand bundles

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

7 years agoMisleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.h
Evgeniy Stepanov [Mon, 19 Sep 2016 21:26:05 +0000 (21:26 +0000)]
Misleading comments of SplitBlockAndInsertIfThenElse in BasicBlockUtils.h

The comments of SplitBlockAndInsertIfThenElse say the SplitBefore instruction will stay in the old block.
But according to the implementation(split the block at SplitBefore by using splitBasicBlock), the SplitBefore will be moved to the new block.

This patch fixes the comments.

Patch by Zhe Yu Wu.

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

7 years ago[X86][SSE] Updated vector abs tests
Simon Pilgrim [Mon, 19 Sep 2016 20:50:35 +0000 (20:50 +0000)]
[X86][SSE] Updated vector abs tests

Renamed and added v2i64 / v4i64 tests

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

7 years ago[libFuzzer] use sleep() instead of std::this_thread::sleep_for to avoid coverage...
Kostya Serebryany [Mon, 19 Sep 2016 20:32:34 +0000 (20:32 +0000)]
[libFuzzer] use sleep() instead of  std::this_thread::sleep_for to  avoid coverage from instrumented libc++

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

7 years agoHandle early inline for hot callsites that reside in the same basic block.
Dehao Chen [Mon, 19 Sep 2016 18:38:14 +0000 (18:38 +0000)]
Handle early inline for hot callsites that reside in the same basic block.

Summary: Callsites in the same basic block should share the same hotness. This patch checks for the hottest callsite in the same basic block, and use the hotness for all callsites in that basic block for early inline decisions. It also fixes the test to add "-S" so theat the "CHECK-NOT" is actually checking the content.

Reviewers: dnovillo

Subscribers: llvm-commits

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

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

7 years ago[RegisterBankInfo] Avoid heap allocation in most cases.
Quentin Colombet [Mon, 19 Sep 2016 17:33:55 +0000 (17:33 +0000)]
[RegisterBankInfo] Avoid heap allocation in most cases.

The OperandsMapper class is used heavy in RegBankSelect and each
instantiation triggered a heap allocation for the array of operands.
Instead, use a SmallVector with a big enough size such that most of the
cases do not have to use dynamically allocated memory.

This improves the compile time of the RegBankSelect pass.

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