OSDN Git Service

android-x86/external-llvm.git
8 years ago[SLPVectorizer] Fix dependency list
Keno Fischer [Mon, 14 Mar 2016 20:04:24 +0000 (20:04 +0000)]
[SLPVectorizer] Fix dependency list

Summary:
DemandedBits was added to the requirements of SLPVectorizer in rL261212
(and various earlier version of it), but the appropriate initialization
statement was accidentally forgotten.

Ref [[ https://github.com/JuliaLang/julia/issues/14998 | JuliaLang/julia#14998 ]].

Patch by Yichao Yu.
Reviewers: mssimpso
Differential Revision: http://reviews.llvm.org/D18152

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

8 years agoReverting r263474; it turns out there are uses of the public interface, but MSVC...
Aaron Ballman [Mon, 14 Mar 2016 20:03:15 +0000 (20:03 +0000)]
Reverting r263474; it turns out there are uses of the public interface, but MSVC wasn't caring about them.

http://lab.llvm.org:8080/green//job/clang-stage1-cmake-RA-incremental_build/21475/consoleFull#-45876453249ba4694-19c4-4d7e-bec5-911270d8a58c
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/8879

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

8 years agoThe file header of TrailingObjects.h suggests that TrailingObjects be inherited priva...
Aaron Ballman [Mon, 14 Mar 2016 19:57:48 +0000 (19:57 +0000)]
The file header of TrailingObjects.h suggests that TrailingObjects be inherited privately because the public APIs it exposes are not meant as part of the interface. There's no functional change because nothing currently relied on these being inherited publicly.

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

8 years agoTurn LoopLoadElimination on again
Adam Nemet [Mon, 14 Mar 2016 19:40:25 +0000 (19:40 +0000)]
Turn LoopLoadElimination on again

The two issues that were discovered got fixed (r263058, r263173).

The pass can be disabled with -mllvm -enable-loop-load-elim=0

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

8 years ago[AliasSetTracker] Do not strip pointer casts when processing MemSetInst
Michael Kuperstein [Mon, 14 Mar 2016 18:34:29 +0000 (18:34 +0000)]
[AliasSetTracker] Do not strip pointer casts when processing MemSetInst

This fixes PR26843.

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

8 years ago[AArch64] Refactor AArch64FrameLowering::emitPrologue. NFC.
Chad Rosier [Mon, 14 Mar 2016 18:24:34 +0000 (18:24 +0000)]
[AArch64] Refactor AArch64FrameLowering::emitPrologue. NFC.

http://reviews.llvm.org/D18125
Patch by Aditya Kumar.

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

8 years ago[SpillPlacement] Fix a quadratic behavior in spill placement.
Quentin Colombet [Mon, 14 Mar 2016 18:21:25 +0000 (18:21 +0000)]
[SpillPlacement] Fix a quadratic behavior in spill placement.

The bad behavior happens when we have a function with a long linear chain of
basic blocks, and have a live range spanning most of this chain, but with very
few uses.
Let say we have only 2 uses.
The Hopfield network is only seeded with two active blocks where the uses are,
and each iteration of the outer loop in `RAGreedy::growRegion()` only adds two
new nodes to the network due to the completely linear shape of the CFG.
Meanwhile, `SpillPlacer->iterate()` visits the whole set of discovered nodes,
which adds up to a quadratic algorithm.

This is an historical accident effect from r129188.

When the Hopfield network is expanding, most of the action is happening on the
frontier where new nodes are being added. The internal nodes in the network are
not likely to be flip-flopping much, or they will at least settle down very
quickly. This means that while `SpillPlacer->iterate()` is recomputing all the
nodes in the network, it is probably only the two frontier nodes that are
changing their output.

Instead of recomputing the whole network on each iteration, we can maintain a
SparseSet of nodes that need to be updated:

- `SpillPlacement::activate()` adds the node to the todo list.
- When a node changes value (i.e., `update()` returns true), its neighbors are
  added to the todo list.
- `SpillPlacement::iterate()` only updates the nodes in the list.

The result of Hopfield iterations is not necessarily exact. It should converge
to a local minimum, but there is no guarantee that it will find a global
minimum. It is possible that updating nodes in a different order will cause us
to switch to a different local minimum. In other words, this is not NFC, but
although I saw a few runtime improvements and regressions when I benchmarked
this change, those were side effects and actually the performance change is in
the noise as expected.

Huge thanks to Jakob Stoklund Olesen <stoklund@2pi.dk> for his feedbacks,
guidance and time for the review.

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

8 years ago[AArch64] Break the dependency between FP and SP when possible.
Chad Rosier [Mon, 14 Mar 2016 18:17:41 +0000 (18:17 +0000)]
[AArch64] Break the dependency between FP and SP when possible.

When the SP in not changed because of realignment/VLAs etc., we restore the SP
by using the previous value of SP and not the FP. Breaking the dependency will
help in cases when the epilog of a callee is close to the epilog of the caller;
for then "sub sp, fp, #" depends on the load restoring the FP in the epilog of
the callee.

http://reviews.llvm.org/D18060
Patch by Aditya Kumar and Evandro Menezes.

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

8 years ago[ADT] Add a pop_back_val method to the SparseSet container.
Quentin Colombet [Mon, 14 Mar 2016 18:10:41 +0000 (18:10 +0000)]
[ADT] Add a pop_back_val method to the SparseSet container.
The next commit will use it.

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

8 years ago[Mips] Fix -Wunused-private-field warning after r263444.
Chad Rosier [Mon, 14 Mar 2016 18:10:20 +0000 (18:10 +0000)]
[Mips] Fix -Wunused-private-field warning after r263444.

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

8 years ago[DAG] use !isUndef() ; NFCI
Sanjay Patel [Mon, 14 Mar 2016 18:09:43 +0000 (18:09 +0000)]
[DAG] use !isUndef() ; NFCI

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

8 years ago[DAG] use isUndef() ; NFCI
Sanjay Patel [Mon, 14 Mar 2016 17:28:46 +0000 (17:28 +0000)]
[DAG] use isUndef() ; NFCI

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

8 years agoAMDGPU/SI: Handle wait states required for DPP instructions
Tom Stellard [Mon, 14 Mar 2016 17:05:56 +0000 (17:05 +0000)]
AMDGPU/SI: Handle wait states required for DPP instructions

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

8 years ago[x86, AVX] replace masked load with full vector load when possible
Sanjay Patel [Mon, 14 Mar 2016 16:54:43 +0000 (16:54 +0000)]
[x86, AVX] replace masked load with full vector load when possible

Converting masked vector loads to regular vector loads for x86 AVX should always be a win.
I raised the legality issue of reading the extra memory bytes on llvm-dev. I did not see any
objections.

1. x86 already does this kind of optimization for multiple scalar loads -> vector load.
2. If other targets have the same flexibility, we could move this transform up to CGP or DAGCombiner.

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

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

8 years ago[mips] MIPS32R6 compact branch support
Daniel Sanders [Mon, 14 Mar 2016 16:24:05 +0000 (16:24 +0000)]
[mips] MIPS32R6 compact branch support

Summary:
MIPSR6 introduces a class of branches called compact branches. Unlike the
traditional MIPS branches which have a delay slot, compact branches do not
have a delay slot. The instruction following the compact branch is only
executed if the branch is not taken and must not be a branch.

It works by generating compact branches for MIPS32R6 when the delay slot
filler cannot fill a delay slot. Then, inspecting the generated code for
forbidden slot hazards (a compact branch with an adjacent branch or other
CTI) and inserting nops to clear this hazard.

Patch by Simon Dardis.

Reviewers: vkalintiris, dsanders

Subscribers: MatzeB, dsanders, llvm-commits

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

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

8 years agoAMDGPU/SI: Incomplete shader binaries need to finish execution at the end
Marek Olsak [Mon, 14 Mar 2016 15:57:14 +0000 (15:57 +0000)]
AMDGPU/SI: Incomplete shader binaries need to finish execution at the end

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm

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

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

8 years agoAMDGPU: mark llvm.amdgcn.image.atomic.* as a source of divergence
Nicolai Haehnle [Mon, 14 Mar 2016 15:37:18 +0000 (15:37 +0000)]
AMDGPU: mark llvm.amdgcn.image.atomic.* as a source of divergence

Summary:
When multiple threads perform an atomic op with the same arguments, they
will usually see different return values.

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, llvm-commits

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

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

8 years ago[mips] Use range-based for loops. NFC.
Vasileios Kalintiris [Mon, 14 Mar 2016 15:05:30 +0000 (15:05 +0000)]
[mips] Use range-based for loops. NFC.

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

8 years agoRevert "Recommitted r261633 "Supporting all entities declared in lexical scope in...
Benjamin Kramer [Mon, 14 Mar 2016 14:58:36 +0000 (14:58 +0000)]
Revert "Recommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug info." After fixing PR26715 at r263379."

This reverts commit r263424. Breaks self-host.

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

8 years ago[SystemZ] Avoid LER on z13 due to partial register dependencies
Ulrich Weigand [Mon, 14 Mar 2016 13:50:03 +0000 (13:50 +0000)]
[SystemZ] Avoid LER on z13 due to partial register dependencies

On the z13, it turns out to be more efficient to access a full
floating-point register than just the upper half (as done e.g.
by the LE and LER instructions).

Current code already takes this into account when loading from
memory by using the LDE instruction in place of LE.  However,
we still generate LER, which shows the same performance issues
as LE in certain circumstances.

This patch changes the back-end to emit LDR instead of LER to
implement FP32 register-to-register copies on z13.

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

8 years ago[CVP] Replace nonnegative with positive, per Philip's request. NFC.
Chad Rosier [Mon, 14 Mar 2016 13:48:00 +0000 (13:48 +0000)]
[CVP] Replace nonnegative with positive, per Philip's request. NFC.

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

8 years ago[mips] Fix an issue with long double when function roundl is defined
Zlatko Buljan [Mon, 14 Mar 2016 12:50:23 +0000 (12:50 +0000)]
[mips] Fix an issue with long double when function roundl is defined
Differential Revision: http://reviews.llvm.org/D17760

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

8 years ago[mips] Range check uimm16_64
Daniel Sanders [Mon, 14 Mar 2016 12:44:44 +0000 (12:44 +0000)]
[mips] Range check uimm16_64

Summary:

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years agoRecommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug...
Amjad Aboud [Mon, 14 Mar 2016 12:03:20 +0000 (12:03 +0000)]
Recommitted r261633 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26715 at r263379.

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

8 years ago[mips] Simplify ordering of range checked immediate classes.
Daniel Sanders [Mon, 14 Mar 2016 11:46:30 +0000 (11:46 +0000)]
[mips] Simplify ordering of range checked immediate classes.

Summary:
With the addition of checks to ensure that operands have a strict ordering
it has become tricky to manage the order in the way I originally intended.

This patch linearizes the ordering which simplifies the implementation but
requires an order that is arbitrary in places. Here are some examples:
* uimm4 < uimm5 < uimm6
* simm4 < uimm4 < simm5 < uimm5
* uimm5 < uimm5_plus1 (1..32) < uimm5_plus32 (32..63) < uimm6
  The term 'superset' starts to break down here since the *_plus* classes
  are not true supersets of uimm5 (but they are still subsets of uimm6).
* uimm5 < uimm5_64, and uimm5 < vsplat_uimm5
  This is entirely arbitrary. We need an ordering and what we pick is
  unimportant since only one is possible for a given mnemonic.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years ago[AMDGPU] Assembler: SOP* instruction fixes
Nikolay Haustov [Mon, 14 Mar 2016 11:17:19 +0000 (11:17 +0000)]
[AMDGPU] Assembler: SOP* instruction fixes

s_bitset0_b64, s_bitset1_b64 has 32-bit src0, not 64-bit.
s_rfe_b64 has just one destination operand and no source.
Uncomment S_BITCMP* and S_SETVSKIP, adjust SOPC_* classes for that.
Add s_memrealtime test and change comments in smem.s to follow common style.
Change test for s_memtime to use non-zero register to make it really test encoding.
Add tests for s_buffer_load*.
Add tests for SOPC instructions (same for SI and VI)

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

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

8 years ago[mips] Range check uimm6_lsl2.
Daniel Sanders [Mon, 14 Mar 2016 11:16:56 +0000 (11:16 +0000)]
[mips] Range check uimm6_lsl2.

Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

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

8 years agoTry to fix build of WebAssemblyRegStackify.cpp on Windows
Hans Wennborg [Mon, 14 Mar 2016 11:04:15 +0000 (11:04 +0000)]
Try to fix build of WebAssemblyRegStackify.cpp on Windows

It's failing to build on VS2015 with:

C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\lib\Target\WebAssembly\WebAssemblyRegStackify.cpp(520):
error C2668: 'llvm::make_reverse_iterator': ambiguous call to overloaded function
C:\b\build\slave\ClangToTWin\build\src\third_party\llvm\include\llvm/ADT/STLExtras.h(217):
note: could be 'std::reverse_iterator<llvm::MachineBasicBlock::iterator>
llvm::make_reverse_iterator<llvm::MachineInstrBundleIterator<llvm::MachineInstr>>(IteratorTy)'
        with
        [
            IteratorTy=llvm::MachineInstrBundleIterator<llvm::MachineInstr>
        ]
C:\b\depot_tools\win_toolchain\vs_files\391bbf1220d3edcd3cc3fccdb56224181e3b13a7\win_sdk\bin\..\..\VC\include\xutility(1217):
note: or 'std::reverse_iterator<llvm::MachineBasicBlock::iterator>
std::make_reverse_iterator<llvm::MachineInstrBundleIterator<llvm::MachineInstr>>(_RanIt)' [found using argument-dependent lookup]
        with
        [
            _RanIt=llvm::MachineInstrBundleIterator<llvm::MachineInstr>
        ]

I don't have VS2015 locally at the moment, but hopefully this will help.

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

8 years agoAVX512: icmp operation should be always lowered to CMPM (AVX-512) instruction on...
Igor Breger [Mon, 14 Mar 2016 10:26:39 +0000 (10:26 +0000)]
AVX512: icmp operation should be always lowered to CMPM (AVX-512) instruction on SKX.

implemented by delena

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

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

8 years ago[AMDGPU] AsmParser: Factor out parseRegister. NFC.
Valery Pykhtin [Mon, 14 Mar 2016 07:43:42 +0000 (07:43 +0000)]
[AMDGPU] AsmParser: Factor out parseRegister. NFC.

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

8 years ago[AMDGPU] AsmParser: refactor post push_back vector access. NFC.
Valery Pykhtin [Mon, 14 Mar 2016 05:25:44 +0000 (05:25 +0000)]
[AMDGPU] AsmParser: refactor post push_back vector access. NFC.

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

8 years ago[CodeView] Consistently handle overly large symbol names
David Majnemer [Mon, 14 Mar 2016 05:15:09 +0000 (05:15 +0000)]
[CodeView] Consistently handle overly large symbol names

Overly large symbol names weren't correctly handled for leaf function
records.

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

8 years ago[AMDGPU] AsmParser: remove redundant isReg checks. NFC.
Valery Pykhtin [Mon, 14 Mar 2016 05:01:45 +0000 (05:01 +0000)]
[AMDGPU] AsmParser: remove redundant isReg checks. NFC.

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

8 years ago[CVP] Convert an SDiv to a UDiv if both operands are known to be nonnegative
Haicheng Wu [Mon, 14 Mar 2016 03:24:28 +0000 (03:24 +0000)]
[CVP] Convert an SDiv to a UDiv if both operands are known to be nonnegative

The motivating example is this

for (j = n; j > 1; j = i) {
   i = j / 2;
}

The signed division is safely to be changed to an unsigned division (j is known
to be larger than 1 from the loop guard) and later turned into a single shift
without considering the sign bit.

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

8 years agoAdd facility to add/remove/check attribute on function and arguments.
Amaury Sechet [Mon, 14 Mar 2016 01:37:29 +0000 (01:37 +0000)]
Add facility to add/remove/check attribute on function and arguments.

Summary: This comes from work to make attribute manipulable via the C API.

Reviewers: gottesmm, hfinkel, baldrick, echristo, tejohnson

Subscribers: llvm-commits

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

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

8 years ago[MCSchedule] Remove comments about MinLatency. NFC
Junmo Park [Mon, 14 Mar 2016 00:36:19 +0000 (00:36 +0000)]
[MCSchedule] Remove comments about MinLatency. NFC

Summary:
There is no definition about MinLatency any more.

Reviewers: mcrosier, spatel, hfinkel

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

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

8 years ago[X86][XOP] Added target shuffle combine tests for XOP's VPPERM 2-op shuffle
Simon Pilgrim [Mon, 14 Mar 2016 00:18:26 +0000 (00:18 +0000)]
[X86][XOP] Added target shuffle combine tests for XOP's VPPERM 2-op shuffle

Actual combing support will be added in a future patch

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

8 years agoRemove some unused variables
David Blaikie [Sun, 13 Mar 2016 22:00:18 +0000 (22:00 +0000)]
Remove some unused variables

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

8 years agoRemove PreserveNames template parameter from IRBuilder
Mehdi Amini [Sun, 13 Mar 2016 21:05:13 +0000 (21:05 +0000)]
Remove PreserveNames template parameter from IRBuilder

This reapplies r263258, which was reverted in r263321 because
of issues on Clang side.

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

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

8 years ago[X86][SSE] Added truncated vector arithmetic tests.
Simon Pilgrim [Sun, 13 Mar 2016 19:08:01 +0000 (19:08 +0000)]
[X86][SSE] Added truncated vector arithmetic tests.

For cases where we are truncating an integer vector arithmetic result, it may be better to pre-truncate the input operands - no code to support this yet (scalar is done with SimplifyDemandedBits but adding vector support could be a lot of work) but these tests represent the current codegen status.

Example bugs: PR14666, PR22703

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

8 years ago[X86][SSE41] Avoid variable blend for constant v8i16 shifts
Simon Pilgrim [Sun, 13 Mar 2016 18:35:59 +0000 (18:35 +0000)]
[X86][SSE41] Avoid variable blend for constant v8i16 shifts

The SSE41 v8i16 shift lowering using (v)pblendvb is great for non-constant shift amounts, but if it is constant then we can efficiently reduce the VSELECT to shuffles with the pre-SSE41 lowering.

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

8 years agoFixed DIBuilder to verify that same imported entity will not be added twice to the...
Amjad Aboud [Sun, 13 Mar 2016 11:11:39 +0000 (11:11 +0000)]
Fixed DIBuilder to verify that same imported entity will not be added twice to the "imports" list of the DICompileUnit.

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

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

8 years ago[CodeView] Truncate display names
David Majnemer [Sun, 13 Mar 2016 10:53:30 +0000 (10:53 +0000)]
[CodeView] Truncate display names

Fundamentally, the length of a variable or function name is bound by the
maximum size of a record: 0xffff.  However, the name doesn't live in a
vacuum; other data is associated with the name, lowering the bound
further.

We would naively attempt to emit the name, causing us to assert because
the record would no-longer fit in 16-bits.  Instead, truncate the name
but preserve as much as we can.

While I have tested this locally, I've decided to not commit it due to
the test's size.

N.B.  While this behavior is undesirable, it is better than MSVC's
behavior.  They seem to truncate to ~4000 characters.

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

8 years ago[Bitcode] Make writeComdats less strange
David Majnemer [Sun, 13 Mar 2016 08:01:03 +0000 (08:01 +0000)]
[Bitcode] Make writeComdats less strange

It had a weird artificial limitation on the write side: the comdat name
couldn't be bigger than 2**16.  However, the reader had no such
limitation.  Make the reader and the writer agree.

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

8 years agoConstantFoldInstruction: avoid wasted calls to ConstantFoldConstantExpression
Fiona Glaser [Sun, 13 Mar 2016 05:36:15 +0000 (05:36 +0000)]
ConstantFoldInstruction: avoid wasted calls to ConstantFoldConstantExpression

Check to see if all operands are constant before calling simplify on them
so that we don't perform wasted simplifications.

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

8 years agoFix build
Matt Arsenault [Sun, 13 Mar 2016 05:22:08 +0000 (05:22 +0000)]
Fix build

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

8 years agoAPFloat: Fix ilogb for denormals
Matt Arsenault [Sun, 13 Mar 2016 05:12:32 +0000 (05:12 +0000)]
APFloat: Fix ilogb for denormals

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

8 years agoAPFloat: Fix scalbn handling of denormals
Matt Arsenault [Sun, 13 Mar 2016 05:11:51 +0000 (05:11 +0000)]
APFloat: Fix scalbn handling of denormals

This was incorrect for denormals, and also failed
on longer exponent ranges.

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

8 years agoDefine IsRela static const member to Elf_Rel type.
Rui Ueyama [Sun, 13 Mar 2016 04:55:44 +0000 (04:55 +0000)]
Define IsRela static const member to Elf_Rel type.

So that we can write RelTy::IsRela to query its type.

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

8 years ago[X86] Remove many operands that represent memory stores from outs to ins. These opera...
Craig Topper [Sun, 13 Mar 2016 02:56:31 +0000 (02:56 +0000)]
[X86] Remove many operands that represent memory stores from outs to ins. These operands are the registers and immediates that specify the memory address not the memory itself thus they are inputs.

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

8 years agoAdd echo test for constant data arrays in the LLVM C API
Amaury Sechet [Sun, 13 Mar 2016 00:58:25 +0000 (00:58 +0000)]
Add echo test for constant data arrays in the LLVM C API

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

8 years agoUse templated version of unwrap instead of cats in the Core.cpp. NFC
Amaury Sechet [Sun, 13 Mar 2016 00:54:40 +0000 (00:54 +0000)]
Use templated version of unwrap instead of cats in the Core.cpp. NFC

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

8 years agoMove LLVMConstStructInContext so that declarationa nd definition order match. NFC
Amaury Sechet [Sun, 13 Mar 2016 00:40:12 +0000 (00:40 +0000)]
Move LLVMConstStructInContext so that declarationa nd definition order match. NFC

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

8 years agoupdate test to use FileCheck
Sanjay Patel [Sat, 12 Mar 2016 21:09:26 +0000 (21:09 +0000)]
update test to use FileCheck

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

8 years agofix documentation comments; NFC
Sanjay Patel [Sat, 12 Mar 2016 20:44:58 +0000 (20:44 +0000)]
fix documentation comments; NFC

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

8 years agofix documentation comments; NFC
Sanjay Patel [Sat, 12 Mar 2016 20:44:30 +0000 (20:44 +0000)]
fix documentation comments; NFC

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

8 years agoremove unnecessary cast; NFC
Sanjay Patel [Sat, 12 Mar 2016 18:17:41 +0000 (18:17 +0000)]
remove unnecessary cast; NFC

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

8 years agofix formatting; NFC
Sanjay Patel [Sat, 12 Mar 2016 18:05:53 +0000 (18:05 +0000)]
fix formatting; NFC

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

8 years agouse range loops; NFCI
Sanjay Patel [Sat, 12 Mar 2016 16:52:17 +0000 (16:52 +0000)]
use range loops; NFCI

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

8 years ago[x86, InstCombine] delete x86 SSE2 masked store with zero mask
Sanjay Patel [Sat, 12 Mar 2016 15:16:59 +0000 (15:16 +0000)]
[x86, InstCombine] delete x86 SSE2 masked store with zero mask

This follows up on the related AVX instruction transforms, but this
one is too strange to do anything more with. Intel's behavioral
description of this instruction in its Software Developer's Manual
is tragi-comic.

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

8 years agoFix for PR 26378
Nemanja Ivanovic [Sat, 12 Mar 2016 10:23:07 +0000 (10:23 +0000)]
Fix for PR 26378

This patch corresponds to review:
http://reviews.llvm.org/D17712

We were not clearing the TOC vector in PPCAsmPrinter when initializing it. This
caused duplicate definition asserts when the pass is reused on the module
(i.e. with -compile-twice or in JIT contexts).

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

8 years agoUse default destructor and remove unnecessary virtual destructor
Teresa Johnson [Sat, 12 Mar 2016 05:38:22 +0000 (05:38 +0000)]
Use default destructor and remove unnecessary virtual destructor

Only the virtual destructor in the base class is needed, and can use the
default.

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

8 years ago[libFuzzer] refresh docs more
Kostya Serebryany [Sat, 12 Mar 2016 03:23:02 +0000 (03:23 +0000)]
[libFuzzer] refresh docs more

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

8 years ago[libFuzzer] refresh docs more
Kostya Serebryany [Sat, 12 Mar 2016 03:11:27 +0000 (03:11 +0000)]
[libFuzzer] refresh docs more

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

8 years ago[libFuzzer] refresh docs more
Kostya Serebryany [Sat, 12 Mar 2016 03:05:37 +0000 (03:05 +0000)]
[libFuzzer] refresh docs more

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

8 years ago[lit] Hack lit to allow a test suite to request that it is run "early".
Chandler Carruth [Sat, 12 Mar 2016 03:03:31 +0000 (03:03 +0000)]
[lit] Hack lit to allow a test suite to request that it is run "early".

This lets us for example start running the unit test suite early. For
'check-llvm' on my machine, this drops the tim e from 44s to 32s!!!!!

It's pretty ugly. I barely know how to write Python, so feel free to
just tell me how I should write it instead. =D Thanks to Filipe and
others for help.

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

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

8 years ago[libFuzzer] refresh docs
Kostya Serebryany [Sat, 12 Mar 2016 02:56:25 +0000 (02:56 +0000)]
[libFuzzer] refresh docs

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

8 years agoMake gc relocates more strongly typed; NFC
Sanjoy Das [Sat, 12 Mar 2016 02:54:27 +0000 (02:54 +0000)]
Make gc relocates more strongly typed; NFC

Don't use a `Value *` where we can use a stronger `GCRelocateInst *`
type.

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

8 years ago[X86] Make sure we do not clobber RBX with cmpxchg when used as a base pointer.
Quentin Colombet [Sat, 12 Mar 2016 02:25:27 +0000 (02:25 +0000)]
[X86] Make sure we do not clobber RBX with cmpxchg when used as a base pointer.

cmpxchg[8|16]b uses RBX as one of its argument.
In other words, using this instruction clobbers RBX as it is defined to hold one
the input. When the backend uses dynamically allocated stack, RBX is used as a
reserved register for the base pointer.

Reserved registers have special semantic that only the target understands and
enforces, because of that, the register allocator don’t use them, but also,
don’t try to make sure they are used properly (remember it does not know how
they are supposed to be used).

Therefore, when RBX is used as a reserved register but defined by something that
is not compatible with that use, the register allocator will not fix the
surrounding code to make sure it gets saved and restored properly around the
broken code. This is the responsibility of the target to do the right thing with
its reserved register.

To fix that, when the base pointer needs to be preserved, we use a different
pseudo instruction for cmpxchg that save rbx.
That pseudo takes two more arguments than the regular instruction:
- One is the value to be copied into RBX to set the proper value for the
  comparison.
- The other is the virtual register holding the save of the value of RBX as the
  base pointer. This saving is done as part of isel (i.e., we emit a copy from
  rbx).

cmpxchg_save_rbx <regular cmpxchg args>, input_for_rbx_reg, save_of_rbx_as_bp

This gets expanded into:
rbx = copy input_for_rbx_reg
cmpxchg <regular cmpxchg args>
rbx = save_of_rbx_as_bp

Note: The actual modeling of the pseudo is a bit more complicated to make sure
the interferes that appears after the pseudo gets expanded are properly modeled
before that expansion.

This fixes PR26883.

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

8 years ago[libFuzzer] try to use max_len based on the items of the corpus instead of blindly...
Kostya Serebryany [Sat, 12 Mar 2016 01:57:04 +0000 (01:57 +0000)]
[libFuzzer] try to use max_len based on the items of the corpus instead of blindly defaulting to 64 bytes.

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

8 years agoTemporarily revert:
Eric Christopher [Sat, 12 Mar 2016 01:47:22 +0000 (01:47 +0000)]
Temporarily revert:

commit ae14bf6488e8441f0f6d74f00455555f6f3943ac
Author: Mehdi Amini <mehdi.amini@apple.com>
Date:   Fri Mar 11 17:15:50 2016 +0000

    Remove PreserveNames template parameter from IRBuilder

    Summary:
    Following r263086, we are now relying on a flag on the Context to
    discard Value names in release builds.

    Reviewers: chandlerc

    Subscribers: mzolotukhin, llvm-commits

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

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

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

until we can figure out what to do about clang and Release build testing.

This reverts commit 263258.

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

8 years agoAdd Lanai.def to the module map.
Eric Christopher [Sat, 12 Mar 2016 01:31:53 +0000 (01:31 +0000)]
Add Lanai.def to the module map.

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

8 years ago[LoopUnroll] Convert some existing tests to unit-tests.
Michael Zolotukhin [Sat, 12 Mar 2016 01:28:56 +0000 (01:28 +0000)]
[LoopUnroll] Convert some existing tests to unit-tests.

Summary: As we now have unit-tests for UnrollAnalyzer, we can convert some existing tests to this format. It should make the tests more robust.

Reviewers: chandlerc, sanjoy

Subscribers: llvm-commits

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

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

8 years agoFix a memory leak due to missing virtual destructors
Teresa Johnson [Sat, 12 Mar 2016 01:23:57 +0000 (01:23 +0000)]
Fix a memory leak due to missing virtual destructors

Caused a couple of sanitizer bot failures in ThinLTO tests due to
r263275.

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

8 years agoUpdating source languages entry in FAQ.
Wilfred Hughes [Sat, 12 Mar 2016 00:43:26 +0000 (00:43 +0000)]
Updating source languages entry in FAQ.

Dragonegg is no longer actively maintained[1], and the Pypy team is not
actively pursuing LLVM[2].

1: http://reviews.llvm.org/D9331
2: http://rpython.readthedocs.org/en/latest/faq.html#could-we-use-llvm

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

8 years agoFix the docs I broke
Chris Matthews [Fri, 11 Mar 2016 23:31:02 +0000 (23:31 +0000)]
Fix the docs I broke

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

8 years ago[sancov] using md5 for anchors in attempt to reduce file size.
Mike Aizatsky [Fri, 11 Mar 2016 23:28:28 +0000 (23:28 +0000)]
[sancov] using md5 for anchors in attempt to reduce file size.

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

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

8 years agoDon't crash sancov if file is unreadable.
Mike Aizatsky [Fri, 11 Mar 2016 23:26:41 +0000 (23:26 +0000)]
Don't crash sancov if file is unreadable.

Summary:
Caller can provides the list of .so files where some files are
unreadable (e.g linux-vdso.so.1). It's more convenient to handler this in
sancov with warning then making all callers to check files.

Reviewers: aizatsky

Subscribers: llvm-commits

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

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

8 years agoExtend test-suite docs to describe how to run test-suite with cmake+lit
Chris Matthews [Fri, 11 Mar 2016 22:33:36 +0000 (22:33 +0000)]
Extend test-suite docs to describe how to run test-suite with cmake+lit

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

8 years agoMinor cleanup and documentation to IRMover (NFC)
Mehdi Amini [Fri, 11 Mar 2016 22:19:06 +0000 (22:19 +0000)]
Minor cleanup and documentation to IRMover (NFC)

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

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

8 years ago[X86][SSE] Simplify vector LOAD + EXTEND on pre-SSE41 hardware
Simon Pilgrim [Fri, 11 Mar 2016 22:18:05 +0000 (22:18 +0000)]
[X86][SSE] Simplify vector LOAD + EXTEND on pre-SSE41 hardware

Improve vector extension of vectors on hardware without dedicated VSEXT/VZEXT instructions.

We already convert these to SIGN_EXTEND_VECTOR_INREG/ZERO_EXTEND_VECTOR_INREG but can further improve this by using the legalizer instead of prematurely splitting into legal vectors in the combine as this only properly helps for lowering to VSEXT/VZEXT.

Removes a lot of unnecessary any_extend + mask pattern - (Fix for PR25718).

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

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

8 years ago[AArch64] Don't blindly lower f16/f128 FCCMPs.
Ahmed Bougacha [Fri, 11 Mar 2016 22:02:58 +0000 (22:02 +0000)]
[AArch64] Don't blindly lower f16/f128 FCCMPs.

Instead, extend f16 (like we do when lowering a standalone SETCC),
and let f128 be legalized to the RT calls.

Fixes PR26803.

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

8 years agoInitialize CalleeInfo to fix bot after r263275
Teresa Johnson [Fri, 11 Mar 2016 21:34:45 +0000 (21:34 +0000)]
Initialize CalleeInfo to fix bot after r263275

Hopefully will fix garbage output in
http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/6901

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

8 years agoDefine NT_GNU_BUILD_ID constant.
Rui Ueyama [Fri, 11 Mar 2016 20:20:25 +0000 (20:20 +0000)]
Define NT_GNU_BUILD_ID constant.

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

8 years ago[WebAssembly] Add `final` keywords to a few more subclasses, for consistency.
Dan Gohman [Fri, 11 Mar 2016 19:45:37 +0000 (19:45 +0000)]
[WebAssembly] Add `final` keywords to a few more subclasses, for consistency.

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

8 years ago[MemorySSA] Make a return type reflect reality. NFC.
George Burgess IV [Fri, 11 Mar 2016 19:34:03 +0000 (19:34 +0000)]
[MemorySSA] Make a return type reflect reality. NFC.

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

8 years agoIntroduce @llvm.experimental.deoptimize
Sanjoy Das [Fri, 11 Mar 2016 19:08:34 +0000 (19:08 +0000)]
Introduce @llvm.experimental.deoptimize

Summary:
This intrinsic, together with deoptimization operand bundles, allow
frontends to express transfer of control and frame-local state from
one (typically more specialized, hence faster) version of a function
into another (typically more generic, hence slower) version.

In languages with a fully integrated managed runtime this intrinsic can
be used to implement "uncommon trap" like functionality.  In unmanaged
languages like C and C++, this intrinsic can be used to represent the
slow paths of specialized functions.

Note: this change does not address how `@llvm.experimental_deoptimize`
is lowered.  That will be done in a later change.

Reviewers: chandlerc, rnk, atrick, reames

Subscribers: llvm-commits, kmod, mjacob, maksfb, mcrosier, JosephTremoulet

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

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

8 years ago[PGO] Skip value profile instrumentation of inline asm
Vedant Kumar [Fri, 11 Mar 2016 18:57:48 +0000 (18:57 +0000)]
[PGO] Skip value profile instrumentation of inline asm

Value profile instrumentation treats inline asm calls like they are
indirect calls. This causes problems when the 'Callee' is passed to a
ptrtoint cast -- the verifier rightly claims that this is bogus and
crashes opt.

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

8 years ago[ThinLTO] Support for reference graph in per-module and combined summary.
Teresa Johnson [Fri, 11 Mar 2016 18:52:24 +0000 (18:52 +0000)]
[ThinLTO] Support for reference graph in per-module and combined summary.

Summary:
This patch adds support for including a full reference graph including
call graph edges and other GV references in the summary.

The reference graph edges can be used to make importing decisions
without materializing any source modules, can be used in the plugin
to make file staging decisions for distributed build systems, and is
expected to have other uses.

The call graph edges are recorded in each function summary in the
bitcode via a list of <CalleeValueIds, StaticCount> tuples when no PGO
data exists, or <CalleeValueId, StaticCount, ProfileCount> pairs when
there is PGO, where the ValueId can be mapped to the function GUID via
the ValueSymbolTable. In the function index in memory, the call graph
edges reference the target via the CalleeGUID instead of the
CalleeValueId.

The reference graph edges are recorded in each summary record with a
list of referenced value IDs, which can be mapped to value GUID via the
ValueSymbolTable.

Addtionally, a new summary record type is added to record references
from global variable initializers. A number of bitcode records and data
structures have been renamed to reflect the newly expanded scope of the
summary beyond functions. More cleanup will follow.

Reviewers: joker.eph, davidxl

Subscribers: joker.eph, llvm-commits

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

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

8 years agoType correct Visual Studio native visualization for PointerUnions
Mike Spertus [Fri, 11 Mar 2016 18:26:47 +0000 (18:26 +0000)]
Type correct Visual Studio native visualization for PointerUnions

Visualize pointer unions by their actual type rather than as void *.

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

8 years agoUpdate test case to appease bots after 263255.
Chad Rosier [Fri, 11 Mar 2016 17:33:36 +0000 (17:33 +0000)]
Update test case to appease bots after 263255.

I'll follow up with Matt to confirm this is the correct fix.

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

8 years agoFix spelling.
Simon Pilgrim [Fri, 11 Mar 2016 17:31:43 +0000 (17:31 +0000)]
Fix spelling.

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

8 years ago[IRTranslator] Translate unconditional branches.
Quentin Colombet [Fri, 11 Mar 2016 17:28:03 +0000 (17:28 +0000)]
[IRTranslator] Translate unconditional branches.

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

8 years ago[MachineIRBuilder] Rework buildInstr API to maximize code reuse.
Quentin Colombet [Fri, 11 Mar 2016 17:27:58 +0000 (17:27 +0000)]
[MachineIRBuilder] Rework buildInstr API to maximize code reuse.

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

8 years ago[IRTranslator] Update getOrCreateVReg API to use references.
Quentin Colombet [Fri, 11 Mar 2016 17:27:54 +0000 (17:27 +0000)]
[IRTranslator] Update getOrCreateVReg API to use references.
A value that we want to keep in a virtual register cannot be null.
Reflect that in the API.

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

8 years ago[MachineIRBuilder] Rename the setter of MF for consistency with the getter.
Quentin Colombet [Fri, 11 Mar 2016 17:27:51 +0000 (17:27 +0000)]
[MachineIRBuilder] Rename the setter of MF for consistency with the getter.

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

8 years ago[MachineIRBuilder] Rename the setter for MBB for consistency with the getter.
Quentin Colombet [Fri, 11 Mar 2016 17:27:47 +0000 (17:27 +0000)]
[MachineIRBuilder] Rename the setter for MBB for consistency with the getter.

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

8 years ago[IRTranslator] Update getOrCreateBB API to use references.
Quentin Colombet [Fri, 11 Mar 2016 17:27:43 +0000 (17:27 +0000)]
[IRTranslator] Update getOrCreateBB API to use references.
A null basic block is invalid, so just pass a reference.

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

8 years ago[GlobalISel][Target] Add an opcode for unconditional branch.
Quentin Colombet [Fri, 11 Mar 2016 17:27:38 +0000 (17:27 +0000)]
[GlobalISel][Target] Add an opcode for unconditional branch.

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

8 years agoRemove PreserveNames template parameter from IRBuilder
Mehdi Amini [Fri, 11 Mar 2016 17:15:50 +0000 (17:15 +0000)]
Remove PreserveNames template parameter from IRBuilder

Summary:
Following r263086, we are now relying on a flag on the Context to
discard Value names in release builds.

Reviewers: chandlerc

Subscribers: mzolotukhin, llvm-commits

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

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

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