]> granicus.if.org Git - llvm/log
llvm
9 years ago[AArch64] Combine callee-save and local stack SP adjustment instructions.
Geoff Berry [Fri, 6 May 2016 16:34:59 +0000 (16:34 +0000)]
[AArch64] Combine callee-save and local stack SP adjustment instructions.

Summary:
If a function needs to allocate both callee-save stack memory and local
stack memory, we currently decrement/increment the SP in two steps:
first for the callee-save area, and then for the local stack area.  This
changes the code to allocate them both at once at the very beginning/end
of the function.  This has two benefits:

1) there is one fewer sub/add micro-op in the prologue/epilogue

2) the stack adjustment instructions act as a scheduling barrier, so
moving them to the very beginning/end of the function increases post-RA
scheduler's ability to move instructions (that only depend on argument
registers) before any of the callee-save stores

This change can cause an increase in instructions if the original local
stack SP decrement could be folded into the first store to the stack.
This occurs when the first local stack store is to stack offset 0.  In
this case we are trading off one more sub instruction for one fewer sub
micro-op (along with benefits (2) and (3) above).

Reviewers: t.p.northover

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

9 years ago[AArch64] Decouple zero store promotion from narrow ld merge. NFC.
Jun Bum Lim [Fri, 6 May 2016 15:08:57 +0000 (15:08 +0000)]
[AArch64] Decouple zero store promotion from narrow ld merge. NFC.

Summary: This change refactors to decouple the zero store promotion from the narrow ld merge and add a flag (enable-narrow-ld-merge=true) to control the narrow ld merge optimization.

Reviewers: jmolloy, t.p.northover, mcrosier

Subscribers: aemerson, rengolin, mcrosier, llvm-commits

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

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

9 years agoRevert "AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2."
Nikolay Haustov [Fri, 6 May 2016 14:59:04 +0000 (14:59 +0000)]
Revert "AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2."

This reverts commit 47486d52454d60cdf6becc0b2efe533c73794380.

It broke calling OpenCL kernel from another kernel.

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

9 years ago[CostModel][X86] Added costmodel tests for vector ctpop/ctlz/cttz/bitreverse/bswap
Simon Pilgrim [Fri, 6 May 2016 14:38:14 +0000 (14:38 +0000)]
[CostModel][X86] Added costmodel tests for vector ctpop/ctlz/cttz/bitreverse/bswap

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

9 years ago[mips] Fix inconsistent .cprestore behaviour between direct object emission and assem...
Daniel Sanders [Fri, 6 May 2016 14:37:24 +0000 (14:37 +0000)]
[mips] Fix inconsistent .cprestore behaviour between direct object emission and assembling.

Summary:
Direct object emission has an initialization order problem where an
InitMCObjectFile is called after MipsTargetELFStreamer determines whether
PIC is enabled by default or not. There doesn't seem to be point that
initializes all cases so split the responsibility between
MipsTargetELFStreamer and MipsAsmPrinter.

Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

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

9 years ago[SimplifyCFG] Prefer a simplification based on a dominating condition.
Chad Rosier [Fri, 6 May 2016 14:25:14 +0000 (14:25 +0000)]
[SimplifyCFG] Prefer a simplification based on a dominating condition.

Rather than merge two branches with a common destination.
Differential Revision: http://reviews.llvm.org/D19743

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

9 years ago[mips] Correct the ordering of HI/LO pairs in the relocation table.
Daniel Sanders [Fri, 6 May 2016 13:49:25 +0000 (13:49 +0000)]
[mips] Correct the ordering of HI/LO pairs in the relocation table.

Summary:
There seems to have been a misunderstanding as to the meaning of 'offset' in
the rules laid down by our ABI. The previous code believed that 'offset' meant
the offset within the section that the relocation is applied to. However, it
should have meant the offset from the symbol used in the relocation expression.

This patch adds two fields to ELFRelocationEntry and uses them to correct the
order of relocations for MIPS. These fields contain:
* The original symbol before shouldRelocateWithSymbol() is considered. This
  ensures that R_MIPS_GOT16 is able to correctly distinguish between local and
  external symbols, allowing us to tell whether %got() requires a matching
  %lo() or not (local symbols require one, external symbols don't). It also
  prevents confusing cases where the fuzzy matching rules cause things like
  %hi(foo)/%lo(foo+3) and %hi(bar)/%lo(bar+1) to swap their %lo()'s.
* The original offset before shouldRelocateWithSymbol() is considered. The
  existing Addend field is always zero when the object uses in place addends
  (because it's already moved it to the encoding) but MIPS needs to use the
  original offset to ensure that the linker correctly calculates the carry-in
  bit for %hi() and %got().

IAS ensures that unmatchable %hi()/%got() relocations are placed at the end of
the table to ensure that the linker rejects the table (we're unable to report
such errors directly). The alternatives to this risk accidental matching
against inappropriate relocations which may silently compute incorrect values
due to an incorrect carry bit between the %lo() and %hi()/%got().

Reviewers: sdardis

Subscribers: dsanders, sdardis, rafael, llvm-commits

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

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

9 years ago[mips][mips16] Use isUnconditionalBranch() in AnalyzeBranch() and constant island...
Daniel Sanders [Fri, 6 May 2016 13:23:51 +0000 (13:23 +0000)]
[mips][mips16] Use isUnconditionalBranch() in AnalyzeBranch() and constant island pass.

Summary:
This stops it misidentifying unconditional branches as conditional branches
which fixes a -verify-machineinstrs error about exiting a function via fall through.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

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

9 years ago[mips][fastisel] Conditional moves do not have implicit operands.
Daniel Sanders [Fri, 6 May 2016 12:57:26 +0000 (12:57 +0000)]
[mips][fastisel] Conditional moves do not have implicit operands.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

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

9 years ago[TableGen] AsmMatcher: support for default values for optional operands
Sam Kolton [Fri, 6 May 2016 11:31:17 +0000 (11:31 +0000)]
[TableGen] AsmMatcher: support for default values for optional operands

Summary:
This change allows to specify "DefaultMethod" for optional operand (IsOptional = 1) in AsmOperandClass that return default value for operand. This is used in convertToMCInst to set default values in MCInst.
Previously if you wanted to set default value for operand you had to create custom converter method. With this change it is possible to use standard converters even when optional operands presented.

Reviewers: tstellarAMD, ab, craig.topper

Subscribers: jyknight, dsanders, arsenm, nhaustov, llvm-commits

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

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

9 years agoFix whitespace and line wrapping. NFC.
Ryan Govostes [Fri, 6 May 2016 11:22:11 +0000 (11:22 +0000)]
Fix whitespace and line wrapping. NFC.

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

9 years ago[asan] add option to set shadow mapping offset
Ryan Govostes [Fri, 6 May 2016 10:25:22 +0000 (10:25 +0000)]
[asan] add option to set shadow mapping offset

Allowing overriding the default ASAN shadow mapping offset with the
-asan-shadow-offset option, and allow zero to be specified for both offset and
scale.

Patch by Aaron Carroll <aaronc@apple.com>.

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

9 years ago[AVR] Add a majority of the backend code
Dylan McKay [Fri, 6 May 2016 10:12:31 +0000 (10:12 +0000)]
[AVR] Add a majority of the backend code

Summary: This adds the majority of the AVR backend.

Reviewers: hfinkel, dsanders, vkalintiris, arsenm

Subscribers: dylanmckay

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

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

9 years agoAttempt to fix the modules builder by declaring SCEV in LoopUtils.h
Silviu Baranga [Fri, 6 May 2016 09:37:14 +0000 (09:37 +0000)]
Attempt to fix the modules builder by declaring SCEV in LoopUtils.h

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

9 years ago AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2.
Nikolay Haustov [Fri, 6 May 2016 09:23:13 +0000 (09:23 +0000)]
AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2.

    Summary:
    Check calling convention in AMDGPUMachineFunction::isKernel

    This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.

    Also, in the future unused non-kernels may be optimized.

    Reviewers: tstellarAMD, arsenm

    Subscribers: arsenm, joker.eph, llvm-commits

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

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

9 years agoAMDGPU/SI: Add amdgpu_kernel calling convention. Part 1.
Nikolay Haustov [Fri, 6 May 2016 09:07:29 +0000 (09:07 +0000)]
AMDGPU/SI: Add amdgpu_kernel calling convention. Part 1.

Summary:
This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.

Also, in the future unused non-kernels may be optimized.

For now, also accept SPIR_KERNEL for HCC frontend.

Also, add bitcode compatibility tests for missing calling conventions
except AVR_BUILTIN which doesn't have parse code.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, joker.eph, llvm-commits

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

9 years agoThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper...
Mehdi Amini [Fri, 6 May 2016 08:25:33 +0000 (08:25 +0000)]
ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function

This test was crashing, and currently it breaks bootstrapping clang with debuginfo

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years ago[mips][microMIPS] Add CodeGen support for MUL* and DMUL* instructions
Zlatko Buljan [Fri, 6 May 2016 08:24:14 +0000 (08:24 +0000)]
[mips][microMIPS] Add CodeGen support for MUL* and DMUL* instructions
Differential Revision: http://reviews.llvm.org/D15744

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

9 years ago[TableGen] Fix a memory leak when creating SwitchOpcodeMatchers.
Craig Topper [Fri, 6 May 2016 06:56:14 +0000 (06:56 +0000)]
[TableGen] Fix a memory leak when creating SwitchOpcodeMatchers.

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

9 years ago[TableGen] Remove isSafeToReorderWithPatternPredicate from DAGISelMatchers as its...
Craig Topper [Fri, 6 May 2016 06:21:27 +0000 (06:21 +0000)]
[TableGen] Remove isSafeToReorderWithPatternPredicate from DAGISelMatchers as its not used anymore.

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

9 years ago[PM] port IR based PGO prof-gen pass to new pass manager
Xinliang David Li [Fri, 6 May 2016 05:49:19 +0000 (05:49 +0000)]
[PM] port IR based PGO prof-gen pass to new pass manager

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

9 years agoBitcodeWriter: Simplify. NFC.
Peter Collingbourne [Fri, 6 May 2016 02:41:23 +0000 (02:41 +0000)]
BitcodeWriter: Simplify. NFC.

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

9 years ago[TableGen] Remove getHash support from DAGISelMatcher. It hasn't been used for some...
Craig Topper [Fri, 6 May 2016 02:37:59 +0000 (02:37 +0000)]
[TableGen] Remove getHash support from DAGISelMatcher. It hasn't been used for some time.

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

9 years ago[TableGen] Remove SinkPatternPredicates from the DAG isel matcher optimizer.
Craig Topper [Fri, 6 May 2016 02:37:56 +0000 (02:37 +0000)]
[TableGen] Remove SinkPatternPredicates from the DAG isel matcher optimizer.

Pattern predicates already appear to be emitted as far down as they can be. The optimization was making no changes on any in-tree target.

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

9 years ago[profile] Remove another unneeded field in raw profile reader
Xinliang David Li [Fri, 6 May 2016 02:13:00 +0000 (02:13 +0000)]
[profile] Remove another unneeded field in raw profile reader

DataValueSize is now removed. The change is consolidated
with previous raw version bump.

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

9 years agodocument version change
Xinliang David Li [Fri, 6 May 2016 01:41:24 +0000 (01:41 +0000)]
document version change

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

9 years ago[EarlyCSE] Rename a variable for clarity [NFC]
Philip Reames [Fri, 6 May 2016 01:13:58 +0000 (01:13 +0000)]
[EarlyCSE] Rename a variable for clarity [NFC]

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

9 years ago[CodeGen] Round [SU]INT_TO_FP result when promoting from f16.
Ahmed Bougacha [Fri, 6 May 2016 00:58:00 +0000 (00:58 +0000)]
[CodeGen] Round [SU]INT_TO_FP result when promoting from f16.

If we don't, values that aren't precisely representable in f16 could
be used as-is in a promoted f32 operation, which would produce
incorrect results.

AArch64 had the correct behavior; add a focused test.

Fixes http://llvm.org/PR26871

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

9 years agoMake StringTableBuilder to cache hash values.
Rui Ueyama [Fri, 6 May 2016 00:51:58 +0000 (00:51 +0000)]
Make StringTableBuilder to cache hash values.

This change seems to speed up LLD a bit if it has a lot of mergeable
sections. The number is below. It's not too bad for a small patch.

Time to link Clang (debug build):

w/o patch 6.3696 seconds
w/patch   6.2746 seconds (-1.5%)

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

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

9 years agoObject: Fix two -Wpessimizing-move warnings after r268694
Justin Bogner [Thu, 5 May 2016 23:59:57 +0000 (23:59 +0000)]
Object: Fix two -Wpessimizing-move warnings after r268694

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

9 years agoFix window bots failures due to r268694 - Cleanup and refactor of malformedError...
Kevin Enderby [Thu, 5 May 2016 23:55:27 +0000 (23:55 +0000)]
Fix window bots failures due to r268694 - Cleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .

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

9 years ago[LAA] Fix confusing debug message
Adam Nemet [Thu, 5 May 2016 23:41:28 +0000 (23:41 +0000)]
[LAA] Fix confusing debug message

This message used to be correct, when all we cared about was whether the
dependence was safe (i.e. NoDep) or unsafe.  With the current more
precise characterization, this is a forward dep.

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

9 years agoCleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .
Kevin Enderby [Thu, 5 May 2016 23:41:05 +0000 (23:41 +0000)]
Cleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .

No functional change.

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

9 years agoSDAG: Rename Select->SelectImpl and repurpose Select as returning void
Justin Bogner [Thu, 5 May 2016 23:19:08 +0000 (23:19 +0000)]
SDAG: Rename Select->SelectImpl and repurpose Select as returning void

This is a step towards removing the rampant undefined behaviour in
SelectionDAG, which is a part of llvm.org/PR26808.

We rename SelectionDAGISel::Select to SelectImpl and update targets to
match, and then change Select to return void and consolidate the
sketchy behaviour we're trying to get away from there.

Next, we'll update backends to implement `void Select(...)` instead of
SelectImpl and eventually drop the base Select implementation.

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

9 years agoSDAG: Remove OPC_MarkGlueResults and associated logic. NFC
Justin Bogner [Thu, 5 May 2016 22:37:45 +0000 (22:37 +0000)]
SDAG: Remove OPC_MarkGlueResults and associated logic. NFC

This opcode never happens in practice, and yet the logic we have in
place to handle it would be undefined behaviour if we ever executed
it. Remove it rather than trying to refactor code that's never
reached.

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

9 years ago[scan-build] fix warnings emitted on LLVM Hexagon code base
Krzysztof Parzyszek [Thu, 5 May 2016 22:00:44 +0000 (22:00 +0000)]
[scan-build] fix warnings emitted on LLVM Hexagon code base

Patch by Apelete Seketeli.

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

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

9 years ago[Hexagon] Fix the offset ranges for vector memory instructions
Krzysztof Parzyszek [Thu, 5 May 2016 21:58:02 +0000 (21:58 +0000)]
[Hexagon] Fix the offset ranges for vector memory instructions

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

9 years agoFix some Clang-tidy readability-simplify-boolean-expr and Include What You Use warnings.
Eugene Zelenko [Thu, 5 May 2016 21:35:47 +0000 (21:35 +0000)]
Fix some Clang-tidy readability-simplify-boolean-expr and Include What You Use warnings.

Differential revision: reviews.llvm.org/D19946

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

9 years ago[PM] port Branch Frequency Analaysis pass to new PM
Xinliang David Li [Thu, 5 May 2016 21:13:27 +0000 (21:13 +0000)]
[PM] port Branch Frequency Analaysis pass to new PM

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

9 years ago[PM] Port Interprocedural SCCP to the new pass manager.
Davide Italiano [Thu, 5 May 2016 21:05:36 +0000 (21:05 +0000)]
[PM] Port Interprocedural SCCP to the new pass manager.

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

9 years ago[codeview] Improve some comments
Reid Kleckner [Thu, 5 May 2016 20:58:46 +0000 (20:58 +0000)]
[codeview] Improve some comments

This FIXME was already fixed, and these LF_* enum names were
inconsistent.

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

9 years ago[AArch64] Remove unused MBP headers/dependency. NFC.
Chad Rosier [Thu, 5 May 2016 20:58:38 +0000 (20:58 +0000)]
[AArch64] Remove unused MBP headers/dependency. NFC.

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

9 years agoRevert http://reviews.llvm.org/D19926 as it breaks tests.
Dehao Chen [Thu, 5 May 2016 20:47:53 +0000 (20:47 +0000)]
Revert http://reviews.llvm.org/D19926 as it breaks tests.

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

9 years agoRevert "LTOCodeGenerator: handle correctly "unnamed" symbol"
Mehdi Amini [Thu, 5 May 2016 20:44:21 +0000 (20:44 +0000)]
Revert "LTOCodeGenerator: handle correctly "unnamed" symbol"

This reverts commit r268658.

I incorrectly diagnose this as the source of an assertion during an
LTO bootstrap of clang.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years ago[WebAssembly] Don't emit epilogue code in the middle of stackified code.
Dan Gohman [Thu, 5 May 2016 20:41:15 +0000 (20:41 +0000)]
[WebAssembly] Don't emit epilogue code in the middle of stackified code.

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

9 years agoFix CVTypeDumperImpl formatting after class rename
Reid Kleckner [Thu, 5 May 2016 20:31:16 +0000 (20:31 +0000)]
Fix CVTypeDumperImpl formatting after class rename

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

9 years agoRemove unnecessary anonymous namespace from a header
Reid Kleckner [Thu, 5 May 2016 20:30:48 +0000 (20:30 +0000)]
Remove unnecessary anonymous namespace from a header

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

9 years agoAMDGPU: Simplify control flow / conditions
Matt Arsenault [Thu, 5 May 2016 20:27:02 +0000 (20:27 +0000)]
AMDGPU: Simplify control flow / conditions

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

9 years agoSimplify CFG before assigning discriminator.
Dehao Chen [Thu, 5 May 2016 20:18:49 +0000 (20:18 +0000)]
Simplify CFG before assigning discriminator.

Summary: We need to clean up CFG before assigning discriminator to minimize the impact of optimization on debug info.

Reviewers: davidxl, dblaikie, dnovillo

Subscribers: dnovillo, danielcdh, llvm-commits

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

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

9 years ago[MSan] [MIPS64] Fix vararg helper for >1 fixed argument.
Marcin Koscielnicki [Thu, 5 May 2016 20:13:17 +0000 (20:13 +0000)]
[MSan] [MIPS64] Fix vararg helper for >1 fixed argument.

This fixes http://llvm.org/PR27646 on Mips64.

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

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

9 years agoAMDGPU: Run r600 tests last
Matt Arsenault [Thu, 5 May 2016 20:07:37 +0000 (20:07 +0000)]
AMDGPU: Run r600 tests last

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

9 years agoDegrade assertions to a warning in LTOCodeGenerator for preserved linkonce
Mehdi Amini [Thu, 5 May 2016 20:05:33 +0000 (20:05 +0000)]
Degrade assertions to a warning in LTOCodeGenerator for preserved linkonce

The assertions were assuming that the linker will not ask to preserve
a global that is internal or available_externally, as it does not
really make sense. In practice this break the bootstrap of clang,
I degrade to a warning for now.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoRemove LLVM_ENABLE_TIMESTAMPS
Chris Bieneman [Thu, 5 May 2016 19:57:03 +0000 (19:57 +0000)]
Remove LLVM_ENABLE_TIMESTAMPS

Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.

With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.

See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html

Reviewers: bogner, silvas, rnk

Subscribers: llvm-commits

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

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

9 years agoAdd a note about the "entry count" used the profile summary
Sean Silva [Thu, 5 May 2016 19:54:13 +0000 (19:54 +0000)]
Add a note about the "entry count" used the profile summary

Thanks to David Li for the clarification.

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

9 years ago[profile] Remove unneeded field in raw profile reader
Xinliang David Li [Thu, 5 May 2016 19:41:18 +0000 (19:41 +0000)]
[profile] Remove unneeded field in raw profile reader

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

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

9 years agoTouch Hexagon/CMakeLists.txt to regenerate build files, since r268641 complains of...
NAKAMURA Takumi [Thu, 5 May 2016 19:28:01 +0000 (19:28 +0000)]
Touch Hexagon/CMakeLists.txt to regenerate build files, since r268641 complains of missing HexagonAlias.td on ninja.

FIXME: TableGen.cmake globs *.td(s) with wildcards for deps. It is not good.

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

9 years agoARM: don't attempt to merge litpools referencing different PC-anchors.
Tim Northover [Thu, 5 May 2016 18:38:53 +0000 (18:38 +0000)]
ARM: don't attempt to merge litpools referencing different PC-anchors.

Given something like:

    ldr r0, .LCPI0_0 (== pc-rel var)
    add r0, pc

    ldr r1, .LCPI0_1 (== pc-rel var)
    add r1, pc

we cannot combine the 2 ldr instructions and litpools because they get added to
a different pc to form the correct address. I think the original logic came
from a time when we fused the LDRpci/PICADD instructions into one
pseudo-instruction so the PC was always immediately at-hand. That's no longer
the case.

Should fix general-dynamic TLS access on Linux, and quite possibly other -fPIC
code that relies on litpools (e.g. v6m and -Oz compilations) though trivial
tweaks of the .ll test didn't provoke anything.

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

9 years ago[Hexagon] Add aliases for vector loads/stores with no explicit offset
Krzysztof Parzyszek [Thu, 5 May 2016 18:38:35 +0000 (18:38 +0000)]
[Hexagon] Add aliases for vector loads/stores with no explicit offset

The mem(r0) instructions are treated as mem(r0+#0).

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

9 years agoRevert "[ThinLTO] Emit individual index files for distributed backends"
Vitaly Buka [Thu, 5 May 2016 18:31:00 +0000 (18:31 +0000)]
Revert "[ThinLTO] Emit individual index files for distributed backends"

MemorySanitizer: use-of-uninitialized-value in lib/Bitcode/Writer/BitcodeWriter.cpp:364:70
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12544/steps/check-llvm%20msan/logs/stdio

This reverts commit 0c4a898ea550699d1b2f4fe3767251c8f9a48d52.

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

9 years agoLTOCodeGenerator: handle correctly "unnamed" symbol
Mehdi Amini [Thu, 5 May 2016 18:14:55 +0000 (18:14 +0000)]
LTOCodeGenerator: handle correctly "unnamed" symbol

This should fix the assertions in a clang LTO bootstrap we're seeing.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoMachineFunction: Add a const modifier to print() parameter
Matthias Braun [Thu, 5 May 2016 18:14:43 +0000 (18:14 +0000)]
MachineFunction: Add a const modifier to print() parameter

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

9 years ago[libFuzzer] better docs for coverage
Kostya Serebryany [Thu, 5 May 2016 18:07:09 +0000 (18:07 +0000)]
[libFuzzer] better docs for coverage

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

9 years agoRemove dead include. NFC.
Chad Rosier [Thu, 5 May 2016 17:55:51 +0000 (17:55 +0000)]
Remove dead include. NFC.

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

9 years agoRemove dead include. NFC.
Chad Rosier [Thu, 5 May 2016 17:53:43 +0000 (17:53 +0000)]
Remove dead include. NFC.

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

9 years agoClean up the specific error message for a malformed Mach-O files with bad segment
Kevin Enderby [Thu, 5 May 2016 17:43:35 +0000 (17:43 +0000)]
Clean up the specific error message for a malformed Mach-O files with bad segment
load commands.

The existing test case in test/Object/macho-invalid.test for
macho-invalid-too-small-segment-load-command has a cmdsize of 55, while
being too small also it is not a multiple of 4.  So when that check is added
this test case will produce a different error. So I constructed a new test case
that will trigger the intended error.

I also changed the error message to be consistent with the other malformed Mach-O
file error messages which prints the load command index.  I also removed both
object_error::macho_load_segment_too_small and
object_error::macho_load_segment_too_many_sections from Object/Error.h
as they are not needed and can just use object_error::parse_failed and let the
error message string distinguish the specific error.

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

9 years ago[ValueTracking] Early exit when further analysis won't be fruitful.
Chad Rosier [Thu, 5 May 2016 17:41:19 +0000 (17:41 +0000)]
[ValueTracking] Early exit when further analysis won't be fruitful.

This should have NFC in the context of codegen, but may have positive
implications on compile-time.

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

9 years agoAMDGPU: Uniform branch conditions can originate with intrinsics
Nicolai Haehnle [Thu, 5 May 2016 17:36:36 +0000 (17:36 +0000)]
AMDGPU: Uniform branch conditions can originate with intrinsics

Summary:
Discovered by Dave Airlie, fixes an assertion in Khronos OpenGL CTS
GL43-CTS.shader_storage_buffer_object.advanced-matrix.

In this particular case, the buffer load intrinsic fed into a uniform
conditional branch, and led the brcond lowering down the wrong path.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, llvm-commits

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

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

9 years agoAMDGPU/SI: Add support for AMD code object version 2.
Tom Stellard [Thu, 5 May 2016 17:03:33 +0000 (17:03 +0000)]
AMDGPU/SI: Add support for AMD code object version 2.

Summary:
Version 2 is now the default.  If you want to emit version 1, use
the amdgcn--amdhsa-amdcov1 triple.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, llvm-commits

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

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

9 years agoX86CallFrameOptimization: make adjustCallSequence's return type void
Hans Wennborg [Thu, 5 May 2016 16:39:31 +0000 (16:39 +0000)]
X86CallFrameOptimization: make adjustCallSequence's return type void

It always returned the same value (true). No functionality change.

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

9 years agollvm-lto: add a -thinlto-module-id that enables to force the Module identifier.
Mehdi Amini [Thu, 5 May 2016 16:33:51 +0000 (16:33 +0000)]
llvm-lto: add a -thinlto-module-id that enables to force the Module identifier.

ThinLTO is using the Module Identifier to find the corresponding entry
in the index. However when reproducing part of the flow from temporary
files generated from the linker, you'd like to process a file and
force llvm-lto to use another module identifier than the current
filename. The alternative would be to tweak the index, which would be
more involved.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years ago[Hexagon] Merge HexagonAlias.td into HexagonInstrAlias.td, NFC
Krzysztof Parzyszek [Thu, 5 May 2016 16:19:36 +0000 (16:19 +0000)]
[Hexagon] Merge HexagonAlias.td into HexagonInstrAlias.td, NFC

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

9 years ago[ValueTracking] Improve isImpliedCondition for matching LHS and Imm RHSs.
Chad Rosier [Thu, 5 May 2016 15:39:18 +0000 (15:39 +0000)]
[ValueTracking] Improve isImpliedCondition for matching LHS and Imm RHSs.

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

9 years ago[Hexagon] Handle operand type differences for A2_tfrpi
Krzysztof Parzyszek [Thu, 5 May 2016 15:29:47 +0000 (15:29 +0000)]
[Hexagon] Handle operand type differences for A2_tfrpi

The instruction A2_tfrpi has a 64-bit operand, while the corresponding
intrinsic takes a 32-bit value. The actual value has only 8 significant
bits, so the difference is only in the type used to represent it.
In order to map the intrinsic to the instruction, the operand needs to
be extended to the correct type.

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

9 years agoFix unused variable warning after r268632
Silviu Baranga [Thu, 5 May 2016 15:27:57 +0000 (15:27 +0000)]
Fix unused variable warning after r268632

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

9 years ago[LV] Identify more induction PHIs by coercing expressions to AddRecExprs
Silviu Baranga [Thu, 5 May 2016 15:20:39 +0000 (15:20 +0000)]
[LV] Identify more induction PHIs by coercing expressions to AddRecExprs

Summary:
Some PHIs can have expressions that are not AddRecExprs due to the presence
of sext/zext instructions. In order to prevent the Loop Vectorizer from
bailing out when encountering these PHIs, we now coerce the SCEV
expressions to AddRecExprs using SCEV predicates (when possible).

We only do this when the alternative would be to not vectorize.

Reviewers: mzolotukhin, anemet

Subscribers: mssimpso, sanjoy, mzolotukhin, llvm-commits

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

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

9 years ago[LV] Refactor the validation of PHI inductions. NFC
Silviu Baranga [Thu, 5 May 2016 15:14:01 +0000 (15:14 +0000)]
[LV] Refactor the validation of PHI inductions. NFC

This moves the validation of PHI inductions into a
separate method, making it easier to reuse this
logic.

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

9 years agoRemove bit-rotten CppBackend.
James Y Knight [Thu, 5 May 2016 14:35:40 +0000 (14:35 +0000)]
Remove bit-rotten CppBackend.

This backend was supposed to generate C++ code which will re-construct
the LLVM IR passed as input. This seems to me to have very marginal
usefulness in the first place.

However, the code has never been updated to use IRBuilder, which makes
its current value negative -- people who look at the output may be
steered to use the *wrong* C++ APIs to construct IR.

Furthermore, it's generated code that doesn't compile since at least
2013.

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

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

9 years agoFix Mips Parser error reporting
Nirav Dave [Thu, 5 May 2016 14:15:46 +0000 (14:15 +0000)]
Fix Mips Parser error reporting

[mips] On error, ParseDirective should always return false to signify that the
directive was understood.

Reviewers: dsanders, vkalintiris, sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

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

9 years agoFix Windows bot failures from r268627
Teresa Johnson [Thu, 5 May 2016 14:10:57 +0000 (14:10 +0000)]
Fix Windows bot failures from r268627

Remove "/" path separator from expected pattern which should fix a
couple of Windows bots that have failed:

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/4816
http://bb.pgr.jp/builders/ninja-clang-i686-msc19-R/builds/2610

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

9 years ago[ThinLTO] Emit individual index files for distributed backends
Teresa Johnson [Thu, 5 May 2016 13:44:56 +0000 (13:44 +0000)]
[ThinLTO] Emit individual index files for distributed backends

Summary:
When launching ThinLTO backends in a distributed build (currently
supported in gold via the thinlto-index-only plugin option), emit
an individual index file for each backend process as described here:
http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html

The individual index file encodes the summary and module information
required for implementing the importing/exporting decisions made
for a given module in the thin link step.
This is in place of the current mechanism that uses the combined index
to make importing decisions in each back end independently. It is an
enabler for doing global summary based optimizations in the thin link
step (which will be recorded in the individual index files), and reduces
the size of the index that must be sent to each backend process, and
the amount of work to scan it in the backends.

Rather than create entirely new ModuleSummaryIndex structures (and all
the included unique_ptrs) for each backend index file, a map is created
to record all of the GUID and summary pointers needed for a particular
index file. The IndexBitcodeWriter walks this map instead of the full
index (hiding the details of managing the appropriate summary iteration
in a new iterator subclass). This is more efficient than walking the
entire combined index and filtering out just the needed summaries during
each backend bitcode index write.

Depends on D19481.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

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

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

9 years ago[X86] Extend some Linux special cases to cover kFreeBSD.
Marcin Koscielnicki [Thu, 5 May 2016 11:35:51 +0000 (11:35 +0000)]
[X86] Extend some Linux special cases to cover kFreeBSD.

Both Linux and kFreeBSD use glibc, so follow similiar code paths.
Add isTargetGlibc to check for this, and use it instead of isTargetLinux
in a few places.

Fixes PR22248 for kFreeBSD.

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

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

9 years ago[Coverage] Combine counts of expansion regions if there are no code regions for the...
Igor Kudrin [Thu, 5 May 2016 09:39:45 +0000 (09:39 +0000)]
[Coverage] Combine counts of expansion regions if there are no code regions for the same area.

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

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

9 years ago[TableGen] Make sure to recursively factor any ScopeMatchers created while forming...
Craig Topper [Thu, 5 May 2016 06:19:27 +0000 (06:19 +0000)]
[TableGen] Make sure to recursively factor any ScopeMatchers created while forming a SwitchType node. Remove a couple hundred bytes from the X86 matcher table.

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

9 years ago[TableGen] Remove stale comment.
Craig Topper [Thu, 5 May 2016 06:19:25 +0000 (06:19 +0000)]
[TableGen] Remove stale comment.

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

9 years ago[X86] Use the right type when folding xor (truncate (shift)) -> setcc
David Majnemer [Thu, 5 May 2016 06:00:56 +0000 (06:00 +0000)]
[X86] Use the right type when folding xor (truncate (shift)) -> setcc

The result type of setcc is dependent on whether or not AVX512 is
present.
We had an X86-specific DAG-combine which assumed that the result type
should be i8 when it could be i1.
This meant that we would generate illegal setccs which LowerSETCC did
not like.

Instead, use an appropriate type and zero extend to i8.

Also, there were some scenarios where the fold should have fired but
didn't because we were overly cautious about the types.  This meant that
we generated:

        shrl    $31, %edi
        andl    $1, %edi
        kmovw   %edi, %k0
        kxnorw  %k0, %k0, %k1
        kshiftrw        $15, %k1, %k1
        kxorw   %k1, %k0, %k0
        kmovw   %k0, %eax

instead of:

        testl   %edi, %edi
        setns   %al

This fixes PR27638.

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

9 years agoLTOCodeGenerator: add linkonce(_odr) to "llvm.compiler.used" when present in "MustPre...
Mehdi Amini [Thu, 5 May 2016 05:14:24 +0000 (05:14 +0000)]
LTOCodeGenerator: add linkonce(_odr) to "llvm.compiler.used" when present in "MustPreserve" set

If the linker requested to preserve a linkonce function, we should
honor this even if we drop all uses.
We explicitely avoid turning them into weak_odr (unlike the first
version of this patch in r267644), because the codegen can be
different on Darwin: because of `llvm::canBeOmittedFromSymbolTable()`
we may emit the symbol as weak_def_can_be_hidden instead of
weak_definition.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoRevert "LTOCodeGenerator: turns linkonce(_odr) into weak_(odr) when present "MustPres...
Mehdi Amini [Thu, 5 May 2016 05:14:20 +0000 (05:14 +0000)]
Revert "LTOCodeGenerator: turns linkonce(_odr) into weak_(odr) when present "MustPreserve" set"

This reverts commit r267644. Turning linkonce_odr into weak_odr is
a sementic change on Darwin: because of
`llvm::canBeOmittedFromSymbolTable()` we may emit the symbol as
weak_def_can_be_hidden instead of weak_definition.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agoThinLTOCodeGenerator: remove useless temporary file that was emitted.
Mehdi Amini [Thu, 5 May 2016 05:14:16 +0000 (05:14 +0000)]
ThinLTOCodeGenerator: remove useless temporary file that was emitted.

This was a remaining of a previous scheme where some IPOs were taking
place before we enter this code. This is not relevant anymore.

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years ago[Profile] Raw profile header clean up
Xinliang David Li [Thu, 5 May 2016 04:07:30 +0000 (04:07 +0000)]
[Profile] Raw profile header clean up

Remove dead ValueDataBegin field in raw header.

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

9 years ago[PM] Port Branch Probability Analysis pass to the new pass manager.
Xinliang David Li [Thu, 5 May 2016 02:59:57 +0000 (02:59 +0000)]
[PM] Port Branch Probability Analysis pass to the new pass manager.

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

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

9 years ago[PM] Port EliminateAvailableExternally pass to the new pass manager.
Davide Italiano [Thu, 5 May 2016 02:37:32 +0000 (02:37 +0000)]
[PM] Port EliminateAvailableExternally pass to the new pass manager.

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

9 years ago[ThinLTO] Remove missed piece of lazy summary reading support (NFC)
Teresa Johnson [Thu, 5 May 2016 02:30:48 +0000 (02:30 +0000)]
[ThinLTO] Remove missed piece of lazy summary reading support (NFC)

Missed in r267097.

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

9 years agoARM: Use a Handle to track SDNodes in case they're CSE'd. NFC
Justin Bogner [Thu, 5 May 2016 01:43:49 +0000 (01:43 +0000)]
ARM: Use a Handle to track SDNodes in case they're CSE'd. NFC

The code here is recursively Select-ing a new Node to avoid issues
where N is CSE'd during replaceDAGValue and stops being valid. We can
accomplish the same goal in a more principled way by using a
HandleSDNode.

This is essentially a less dodgy fix for PR25733 than the original
attempt back in r255120.

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

9 years agoRevert "[asan] add option to set shadow mapping offset"
Ryan Govostes [Thu, 5 May 2016 01:27:04 +0000 (01:27 +0000)]
Revert "[asan] add option to set shadow mapping offset"

This reverts commit ba89768f97b1d4326acb5e33c14eb23a05c7bea7.

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

9 years ago[asan] add option to set shadow mapping offset
Ryan Govostes [Thu, 5 May 2016 01:14:39 +0000 (01:14 +0000)]
[asan] add option to set shadow mapping offset

Allowing overriding the default ASAN shadow mapping offset with the
-asan-shadow-offset option, and allow zero to be specified for both offset and
scale.

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

9 years agoclang-format some files in preparation of coming patch reviews.
Dehao Chen [Thu, 5 May 2016 00:54:54 +0000 (00:54 +0000)]
clang-format some files in preparation of coming patch reviews.

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

9 years ago[PM] Port ConstantMerge to the new pass manager.
Davide Italiano [Thu, 5 May 2016 00:51:09 +0000 (00:51 +0000)]
[PM] Port ConstantMerge to the new pass manager.

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

9 years ago[SystemZ] Implement backchain attribute (recommit with fix).
Marcin Koscielnicki [Thu, 5 May 2016 00:37:30 +0000 (00:37 +0000)]
[SystemZ] Implement backchain attribute (recommit with fix).

This introduces a SystemZ-specific "backchain" attribute on function, which
enables writing the frame backchain link as specified by the ABI.  This will
be used to implement -mbackchain option in clang.

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

Fixed in this version: added RegState::Define and RegState::Kill on R1D
in prologue.

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

9 years ago[codeview] Move dumper into lib/DebugInfo/CodeView
Reid Kleckner [Thu, 5 May 2016 00:34:33 +0000 (00:34 +0000)]
[codeview] Move dumper into lib/DebugInfo/CodeView

So that we can call it from llvm-pdbdump.

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

9 years ago[LoopDataPrefetch] Add optimization remark
Adam Nemet [Thu, 5 May 2016 00:08:15 +0000 (00:08 +0000)]
[LoopDataPrefetch] Add optimization remark

With -Rpass=loop-data-prefetch, show the memory access that got
prefetched.

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