OSDN Git Service

android-x86/external-llvm.git
8 years ago[PPC] Remove -ppc-loop-prefetch-distance in favor of -prefetch-distance
Adam Nemet [Tue, 29 Mar 2016 23:45:56 +0000 (23:45 +0000)]
[PPC] Remove -ppc-loop-prefetch-distance in favor of -prefetch-distance

After the previous change, this can now be overridden centrally in the
pass.

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

8 years ago[LoopDataPrefetch] Centralize the tuning cl::opts under the pass
Adam Nemet [Tue, 29 Mar 2016 23:45:52 +0000 (23:45 +0000)]
[LoopDataPrefetch] Centralize the tuning cl::opts under the pass

This is effectively NFC, minus the renaming of the options
(-cyclone-prefetch-distance -> -prefetch-distance).

The change was requested by Tim in D17943.

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

8 years ago[tsan] Do not instrument reads/writes to instruction profile counters.
Anna Zaks [Tue, 29 Mar 2016 23:19:40 +0000 (23:19 +0000)]
[tsan] Do not instrument reads/writes to instruction profile counters.

We have known races on profile counters, which can be reproduced by enabling
-fsanitize=thread and -fprofile-instr-generate simultaneously on a
multi-threaded program. This patch avoids reporting those races by not
instrumenting the reads and writes coming from the instruction profiler.

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

8 years ago[libFuzzer] more trophies
Kostya Serebryany [Tue, 29 Mar 2016 23:13:25 +0000 (23:13 +0000)]
[libFuzzer] more trophies

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

8 years ago[libFuzzer] more docs
Kostya Serebryany [Tue, 29 Mar 2016 23:07:36 +0000 (23:07 +0000)]
[libFuzzer] more docs

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

8 years agoADCE: Remove debug info intrinsics in dead scopes
Duncan P. N. Exon Smith [Tue, 29 Mar 2016 22:57:12 +0000 (22:57 +0000)]
ADCE: Remove debug info intrinsics in dead scopes

During ADCE, track which debug info scopes still have live references
from the code, and delete debug info intrinsics for the dead ones.

These intrinsics describe the locations of variables (in registers or
stack slots).  If there's no code left corresponding to a variable's
scope, then there's no way to reference the variable in the debugger and
it doesn't matter what its value is.

I add a DEBUG printout when the described location in an SSA register,
in case it helps some trying to track down why locations get lost.
However, we still delete these; the scope itself isn't attached to any
real code, so the ship has already sailed.

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

8 years agoMachineSink: make shouldSink a TII target hook
Fiona Glaser [Tue, 29 Mar 2016 22:44:57 +0000 (22:44 +0000)]
MachineSink: make shouldSink a TII target hook

Some targets may disagree on what they want sunk or not sunk,
so make this a target hook instead of hardcoded.

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

8 years ago[LoopDataPrefetch] Make more member functions private, NFC.
Adam Nemet [Tue, 29 Mar 2016 22:40:02 +0000 (22:40 +0000)]
[LoopDataPrefetch] Make more member functions private, NFC.

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

8 years agoUpgrade some wildly anachronistic debug info in testcases.
Adrian Prantl [Tue, 29 Mar 2016 22:34:30 +0000 (22:34 +0000)]
Upgrade some wildly anachronistic debug info in testcases.

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

8 years agouse FileCheck and auto-check-generation script for exact checking
Sanjay Patel [Tue, 29 Mar 2016 22:27:39 +0000 (22:27 +0000)]
use FileCheck and auto-check-generation script for exact checking

1. Removed the run line for mingw32 and made the Darwin triples unknown.
   This is a test of 32-bit vs. 64-bit platform and the underlying hardware.
   We have other tests for checking behavioral differences of the OS platform.

2. Changed the CPU specifiers to the attributes they were meant to represent.
   Any CPU that doesn't have SSE4.2 is assumed to have slow unaligned 16-byte accesses,
   so it won't use those here.

3. Although the stores really could all be CHECK-DAG, I left them as CHECK-NEXT to
   show the strange behavior of the instruction scheduler in the SLOW_32 case.

4. The odd-looking instructions are due to the use of a null pointer in the IR, so
   we have integer immediate store addresses. Cute.

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

8 years agoAdd a print method to MachineFunctionProperties for better error messages
Derek Schuff [Tue, 29 Mar 2016 20:28:20 +0000 (20:28 +0000)]
Add a print method to MachineFunctionProperties for better error messages

This makes check failures much easier to understand.
Make it empty (but leave it in the class) for NDEBUG builds.

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

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

8 years agoClarifying some of the requirements for building with Visual Studio on Windows. Namel...
Aaron Ballman [Tue, 29 Mar 2016 20:23:55 +0000 (20:23 +0000)]
Clarifying some of the requirements for building with Visual Studio on Windows. Namely, we require the latest Update to be installed (for sanity purposes), and we require CMake 2.8.12.2 for building LLVM with Visual Studio.

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

8 years agoFix some bugs in the posix output of llvm-nm. Which is documented on
Kevin Enderby [Tue, 29 Mar 2016 20:18:07 +0000 (20:18 +0000)]
Fix some bugs in the posix output of llvm-nm.  Which is documented on
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/nm.html .

1) For Mach-O files the code was not printing the values in hex as is the default.
2) The values printed had leading zeros which they should not have.
3) The address for undefined symbols was printed as spaces instead of 0.
4) With the -A option with posix output for an archive did not use square
brackets around the archive member name.

rdar://25311883 and rdar://25299678

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

8 years ago[SPARC] Use AtomicExpandPass to expand AtomicRMW instructions.
James Y Knight [Tue, 29 Mar 2016 19:09:54 +0000 (19:09 +0000)]
[SPARC] Use AtomicExpandPass to expand AtomicRMW instructions.

They were previously expanded to CAS loops in a custom isel expansion,
but AtomicExpandPass knows how to do that generically.

Testing is covered by the existing sparc atomics.ll testcases.

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

8 years agoMachineVerifier: On dead-def live segments, check that corresponding machine operand...
Matthias Braun [Tue, 29 Mar 2016 19:07:43 +0000 (19:07 +0000)]
MachineVerifier: On dead-def live segments, check that corresponding machine operand has a dead flag

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

8 years agoLiveVariables: Fix typo and shorten comment
Matthias Braun [Tue, 29 Mar 2016 19:07:40 +0000 (19:07 +0000)]
LiveVariables: Fix typo and shorten comment

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

8 years agoIR: Add DbgInfoIntrinsic::getVariableLocation
Duncan P. N. Exon Smith [Tue, 29 Mar 2016 18:56:03 +0000 (18:56 +0000)]
IR: Add DbgInfoIntrinsic::getVariableLocation

Create a common accessor, DbgInfoIntrinsic::getVariableLocation, which
doesn't care about the type of debug info intrinsic.  Use this to
further unify the implementations of DbgDeclareInst::getAddress and
DbgValueInst::getValue.

Besides being a cleanup, I'm planning to use this to prepare DEBUG
output without having to branch on the concrete type.

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

8 years agoRevert "[asan] Make the global_metadata_darwin.ll test require El Capitan or newer"
Ryan Govostes [Tue, 29 Mar 2016 18:27:24 +0000 (18:27 +0000)]
Revert "[asan] Make the global_metadata_darwin.ll test require El Capitan or newer"

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

8 years ago[ThinLTO] Remove post-pass metadata linking support
Teresa Johnson [Tue, 29 Mar 2016 18:24:19 +0000 (18:24 +0000)]
[ThinLTO] Remove post-pass metadata linking support

Since we have moved to a model where functions are imported in bulk from
each source module after making summary-based importing decisions, there
is no longer a need to link metadata as a postpass, and all users have
been removed.

This essentially reverts r255909 and follow-on fixes.

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

8 years ago[asan] Make the global_metadata_darwin.ll test require El Capitan or newer
Ryan Govostes [Tue, 29 Mar 2016 17:58:49 +0000 (17:58 +0000)]
[asan] Make the global_metadata_darwin.ll test require El Capitan or newer

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

8 years agoAdd support for no-jump-tables
Nirav Dave [Tue, 29 Mar 2016 17:46:23 +0000 (17:46 +0000)]
Add support for no-jump-tables

Add function soft attribute to the generation of Jump Tables in CodeGen
as initial step towards clang support of gcc's no-jump-table support

Reviewers: hans, echristo

Subscribers: llvm-commits

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

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

8 years agoAdd MachineVerifier check for AllVRegsAllocated MachineFunctionProperty
Derek Schuff [Tue, 29 Mar 2016 17:40:22 +0000 (17:40 +0000)]
Add MachineVerifier check for AllVRegsAllocated MachineFunctionProperty

Summary:
Check that any function that has the property set is free of virtual
register operands.

Also, it is actually VirtRegMap (and not the register allocators) that
acutally remove the VReg operands (except for RegAllocFast).

Reviewers: qcolombet

Subscribers: MatzeB, llvm-commits, qcolombet

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

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

8 years agoSwift Calling Convention: add swiftself attribute.
Manman Ren [Tue, 29 Mar 2016 17:37:21 +0000 (17:37 +0000)]
Swift Calling Convention: add swiftself attribute.

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

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

8 years ago[x86] add tests to show current memset codegen
Sanjay Patel [Tue, 29 Mar 2016 17:09:27 +0000 (17:09 +0000)]
[x86] add tests to show current memset codegen

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

8 years ago[SCEV] Extract out a MatchBinaryOp; NFCI
Sanjoy Das [Tue, 29 Mar 2016 16:40:44 +0000 (16:40 +0000)]
[SCEV] Extract out a MatchBinaryOp; NFCI

MatchBinaryOp abstracts out the IR instructions from the operations they
represent.  While this change is NFC, we will use this factoring later
to map things like `(extractvalue 0 (sadd.with.overflow X Y))` to `(add
X Y)`.

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

8 years ago[SCEV] Use Operator::getOpcode instead of manual dispatch; NFC
Sanjoy Das [Tue, 29 Mar 2016 16:40:39 +0000 (16:40 +0000)]
[SCEV] Use Operator::getOpcode instead of manual dispatch; NFC

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

8 years agoMake InlineSimple's one-arg constructor explicit. NFC
Justin Lebar [Tue, 29 Mar 2016 16:26:06 +0000 (16:26 +0000)]
Make InlineSimple's one-arg constructor explicit. NFC

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

8 years agoReformat a comment in InlineSimple.cpp. NFC
Justin Lebar [Tue, 29 Mar 2016 16:26:03 +0000 (16:26 +0000)]
Reformat a comment in InlineSimple.cpp. NFC

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

8 years agoregenerate checks
Sanjay Patel [Tue, 29 Mar 2016 16:11:29 +0000 (16:11 +0000)]
regenerate checks

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

8 years agoTest commit access
Konstantin Zhuravlyov [Tue, 29 Mar 2016 15:15:44 +0000 (15:15 +0000)]
Test commit access

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

8 years ago[ThinLTO] Use new GlobalValue::getGUID helper (NFC)
Teresa Johnson [Tue, 29 Mar 2016 14:49:26 +0000 (14:49 +0000)]
[ThinLTO] Use new GlobalValue::getGUID helper (NFC)

This was already being used for functions and aliases, was missed when
handling global variables.

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

8 years ago[llvm-readobj] NFC: Remove unneeded parenthesis
Hemant Kulkarni [Tue, 29 Mar 2016 14:20:20 +0000 (14:20 +0000)]
[llvm-readobj] NFC: Remove unneeded parenthesis

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

8 years ago[mips] Test commit: Mark insertNoop as dead code (NFC)
Simon Dardis [Tue, 29 Mar 2016 13:02:19 +0000 (13:02 +0000)]
[mips] Test commit: Mark insertNoop as dead code (NFC)

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

8 years ago[mips] Correct MIPS16 jal/jalx to have uimm26 offsets and add MC layer range checks...
Daniel Sanders [Tue, 29 Mar 2016 09:40:38 +0000 (09:40 +0000)]
[mips] Correct MIPS16 jal/jalx to have uimm26 offsets and add MC layer range checks. NFC.

Summary:
However, this has no effect at this time because the instructions affected
are marked 'isCodeGenOnly=1' and have no alternative for the MC layer.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

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

8 years agofix CHECK_NOT -> CHECK-NOT
Junmo Park [Tue, 29 Mar 2016 07:53:07 +0000 (07:53 +0000)]
fix CHECK_NOT -> CHECK-NOT

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

8 years agofixed typo - CHECK-LABEL
Junmo Park [Tue, 29 Mar 2016 07:03:27 +0000 (07:03 +0000)]
fixed typo - CHECK-LABEL

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

8 years agoAdded 2 notes
Elena Demikhovsky [Tue, 29 Mar 2016 06:55:56 +0000 (06:55 +0000)]
Added 2 notes
1) Skylake and KNL support for X86
2) masked intrinsics load/store/gather/scatter

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

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

8 years agofixed typo - CHECK-LABEL
Elena Demikhovsky [Tue, 29 Mar 2016 06:49:38 +0000 (06:49 +0000)]
fixed typo - CHECK-LABEL

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

8 years agoAVX-512: fixed a bug in fp_to_uint pattern on KNL
Elena Demikhovsky [Tue, 29 Mar 2016 06:33:41 +0000 (06:33 +0000)]
AVX-512: fixed a bug in fp_to_uint pattern on KNL

Fixed fp_to_uint instruction selection on KNL.
One pattern was missing for <4 x double> to <4 x i32>

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

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

8 years agoBitcodeReader: Allow METADATA_STRINGS to only have !""
Duncan P. N. Exon Smith [Tue, 29 Mar 2016 05:25:17 +0000 (05:25 +0000)]
BitcodeReader: Allow METADATA_STRINGS to only have !""

Support parsing a METADATA_STRINGS record that only has a single piece
of metadata, !"".  Fixes a corner case in r264551.

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

8 years ago[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially...
Hyojin Sung [Tue, 29 Mar 2016 04:08:57 +0000 (04:08 +0000)]
[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops

When eliminating or merging almost empty basic blocks, the existence of non-trivial PHI nodes
is currently used to recognize potential loops of which the block is the header and keep the block.
However, the current algorithm fails if the loops' exit condition is evaluated only with volatile
values hence no PHI nodes in the header. Especially when such a loop is an outer loop of a nested
loop, the loop is collapsed into a single loop which prevent later optimizations from being
applied (e.g., transforming nested loops into simplified forms and loop vectorization).

The patch augments the existing PHI node-based check by adding a pre-test if the BB actually
belongs to a set of loop headers and not eliminating it if yes.

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

8 years agoRegisterPressure: Simplify liveness tracking when lanemasks are not checked.
Matthias Braun [Tue, 29 Mar 2016 03:54:22 +0000 (03:54 +0000)]
RegisterPressure: Simplify liveness tracking when lanemasks are not checked.

Split RegisterOperands code that collects defs/uses into a variant with
and without lanemask tracking. This is a bit of code duplication, but
there are enough subtle differences between the two variants that this
seems cleaner (and potentially faster).

This also fixes a problem where lanes where tracked even though
TrackLaneMasks was false. This is part of the fix for
http://llvm.org/PR27106. I will commit the testcase when it is
completely fixed.

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

8 years agoLiveVariables: Do not remove dead flags from vreg operands
Matthias Braun [Tue, 29 Mar 2016 03:08:18 +0000 (03:08 +0000)]
LiveVariables: Do not remove dead flags from vreg operands

Also add a FIXME comment on why Mips RDDSP causes bogus dead flags to be
added which LiveVariables cleans up by accident.

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

8 years ago[llvm-readobj] Support GNU style dyn-relocations
Hemant Kulkarni [Tue, 29 Mar 2016 02:41:49 +0000 (02:41 +0000)]
[llvm-readobj] Support GNU style dyn-relocations

http://reviews.llvm.org/D18534

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

8 years ago[PowerPC] Refactor popcnt[dw] target features
Hal Finkel [Tue, 29 Mar 2016 01:36:01 +0000 (01:36 +0000)]
[PowerPC] Refactor popcnt[dw] target features

Instead of using two feature bits, one to indicate the availability of the
popcnt[dw] instructions, and another to indicate whether or not they're fast,
use a single enum. This allows more consistent control via target attribute
strings, and via Clang's command line.

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

8 years ago[Codegen] Decrease minimum jump table density.
Kyle Butt [Tue, 29 Mar 2016 00:23:41 +0000 (00:23 +0000)]
[Codegen] Decrease minimum jump table density.

Minimum density for both optsize and non optsize are now options
-sparse-jump-table-density (default 10) for non optsize functions
-dense-jump-table-density (default 40) for optsize functions, which
matches the current default. This improves several benchmarks at google
at the cost of a small codesize increase. For code compiled with -Os,
the old behavior continues

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

8 years agoSample profile summary cleanup
Easwaran Raman [Mon, 28 Mar 2016 23:14:29 +0000 (23:14 +0000)]
Sample profile summary cleanup

Replace references to MaxHeadSamples with MaxFunctionCount

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

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

8 years ago[WebAssembly] Remove duplicate disabling of passes
Derek Schuff [Mon, 28 Mar 2016 22:52:20 +0000 (22:52 +0000)]
[WebAssembly] Remove duplicate disabling of passes

Also put all the disabled passes together

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

8 years ago[PowerPC] Clarify a comment in PPCTTI about vector loads
Hal Finkel [Mon, 28 Mar 2016 22:39:35 +0000 (22:39 +0000)]
[PowerPC] Clarify a comment in PPCTTI about vector loads

This should say that we could do unaligned vector loads on the P7 using VSX
instructions, not that we should.

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

8 years ago[docs] Corrections w.r.t V2 of the coverage mapping format
Vedant Kumar [Mon, 28 Mar 2016 22:16:01 +0000 (22:16 +0000)]
[docs] Corrections w.r.t V2 of the coverage mapping format

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

8 years ago[PGO] More comments how function pointers for indirect calls are mapped
Adam Nemet [Mon, 28 Mar 2016 22:15:15 +0000 (22:15 +0000)]
[PGO] More comments how function pointers for indirect calls are mapped
to function names

Summary:
Hopefully this will make it easier for the next person to figure all
this out...

Reviewers: bogner, davidxl

Subscribers: davidxl, cfe-commits

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

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

8 years agoregenerate checks
Sanjay Patel [Mon, 28 Mar 2016 22:12:21 +0000 (22:12 +0000)]
regenerate checks

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

8 years agofix checks: *_DAG -> *-DAG
Sanjay Patel [Mon, 28 Mar 2016 22:11:06 +0000 (22:11 +0000)]
fix checks: *_DAG -> *-DAG

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

8 years ago[Coverage] Fix the expected counts in instrprof-comdat.h
Vedant Kumar [Mon, 28 Mar 2016 22:10:40 +0000 (22:10 +0000)]
[Coverage] Fix the expected counts in instrprof-comdat.h

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

8 years agofix CHECK_NEXT -> CHECK-NEXT
Sanjay Patel [Mon, 28 Mar 2016 22:03:07 +0000 (22:03 +0000)]
fix CHECK_NEXT -> CHECK-NEXT

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

8 years agofix CHECK_DAG -> CHECK-DAG
Sanjay Patel [Mon, 28 Mar 2016 22:00:38 +0000 (22:00 +0000)]
fix CHECK_DAG -> CHECK-DAG

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

8 years agofix CHECK_NEXT -> CHECK-NEXT
Sanjay Patel [Mon, 28 Mar 2016 21:58:27 +0000 (21:58 +0000)]
fix CHECK_NEXT -> CHECK-NEXT

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

8 years agofix CHECK_LABEL -> CHECK-LABEL
Sanjay Patel [Mon, 28 Mar 2016 21:56:48 +0000 (21:56 +0000)]
fix CHECK_LABEL -> CHECK-LABEL

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

8 years agotrailing whitespace
Sanjay Patel [Mon, 28 Mar 2016 21:52:53 +0000 (21:52 +0000)]
trailing whitespace

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

8 years agoMove use of scoped enum in MachineFunctionProperties after its declaration
Derek Schuff [Mon, 28 Mar 2016 21:38:35 +0000 (21:38 +0000)]
Move use of scoped enum in MachineFunctionProperties after its declaration

This should fix the build with MSVC 2013

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

8 years agoRemove personality for declarations in CloneModule.
Evgeniy Stepanov [Mon, 28 Mar 2016 21:37:02 +0000 (21:37 +0000)]
Remove personality for declarations in CloneModule.

Personality is copied as part of copyFunctionAttributes, but it is
invalid on a declaration. Remove the personality attribute it the
function body is not cloned.

Also add a verifier run over output modules in the llvm-split tool.

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

8 years ago[X86][SSE] Vectorize a bit (AND/XOR/OR) op if a BUILD_VECTOR has the same op for...
Simon Pilgrim [Mon, 28 Mar 2016 21:33:52 +0000 (21:33 +0000)]
[X86][SSE] Vectorize a bit (AND/XOR/OR) op if a BUILD_VECTOR has the same op for all their scalar elements.

If all a BUILD_VECTOR's source elements are the same bit (AND/XOR/OR) operation type and each has one constant operand, lower to a pair of BUILD_VECTOR and just apply the bit operation to the vectors.

The constant operands will form a constant vector meaning that we still only have a single BUILD_VECTOR to lower and we will have replaced all the scalarized operations with a single SSE equivalent.

Its not in our interest to start make a general purpose vectorizer from this, but I'm seeing enough of these scalar bit operations from the later legalization/scalarization stages to support them at least.

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

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

8 years agodocs: Fix footnote after r260042.
Nico Weber [Mon, 28 Mar 2016 21:24:46 +0000 (21:24 +0000)]
docs: Fix footnote after r260042.

r260042 removed a footnote referring to autoconf, but it left
around one item still referring to that footnote (libtool), and
it didn't renumber the later footnote reference.

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

8 years agofix CHECK_NEXT -> CHECK-NEXT
Sanjay Patel [Mon, 28 Mar 2016 21:14:24 +0000 (21:14 +0000)]
fix CHECK_NEXT -> CHECK-NEXT

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

8 years agoReapply (2x) "[PGO] Fix name encoding for ObjC-like functions"
Vedant Kumar [Mon, 28 Mar 2016 21:06:42 +0000 (21:06 +0000)]
Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions"

Function names in ObjC can have spaces in them. This interacts poorly
with name compression, which uses spaces to separate PGO names. Fix the
issue by using a different separator and update a test.

I chose "\01" as the separator because 1) it's non-printable, 2) we
strip it from PGO names, and 3) it's the next natural choice once "\00"
is discarded (that one's overloaded).

What's changed since the original commit?

- I fixed up the covmap-V2 binary format tests using a linux VM.
- I weakened the CHECK lines in instrprof-comdat.h to account for the
  fact that there have been bugfixes to clang coverage. These will be
  fixed up in a follow-up.
- I added an assert to make sure we don't get bitten by this again.
- I constructed the c-general.profraw file without name compression
  enabled to appease some bots.

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

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

8 years agoAdd an IR Verifier check for orphaned DICompileUnits.
Adrian Prantl [Mon, 28 Mar 2016 21:06:26 +0000 (21:06 +0000)]
Add an IR Verifier check for orphaned DICompileUnits.
A DICompileUnit that is not listed in llvm.dbg.cu will cause assertion
failures and/or crashes in the backend. The Verifier should reject this.

rdar://problem/25369499

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

8 years ago[LVers] Change CHECK_LABEL to CHECK-LABEL (underscore->dash)
Adam Nemet [Mon, 28 Mar 2016 21:04:13 +0000 (21:04 +0000)]
[LVers] Change CHECK_LABEL to CHECK-LABEL (underscore->dash)

Thanks to Sanjoy for catching this.

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

8 years agodocs: Try to remove weird linebreak from generated html.
Nico Weber [Mon, 28 Mar 2016 21:00:21 +0000 (21:00 +0000)]
docs: Try to remove weird linebreak from generated html.

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

8 years ago[asan] Fix testcase for r264645
Ryan Govostes [Mon, 28 Mar 2016 20:42:56 +0000 (20:42 +0000)]
[asan] Fix testcase for r264645

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

8 years agoExplicitly test BitstreamReader::setArtificialByteLimit, NFC
Duncan P. N. Exon Smith [Mon, 28 Mar 2016 20:39:41 +0000 (20:39 +0000)]
Explicitly test BitstreamReader::setArtificialByteLimit, NFC

Explicitly check that artificial byte limit is rounded correctly by
exposing BitstreamReader::Size through a new accessor, getSizeIfKnown.

The original code for rounding (from r264547) wasn't obviously correct,
and even though r264623 cleaned it up (by calling llvm::alignTo) I think
it's worth testing.

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

8 years agoHandle section vs global name conflict.
Evgeniy Stepanov [Mon, 28 Mar 2016 20:36:28 +0000 (20:36 +0000)]
Handle section vs global name conflict.

This is a fix for PR26941.

When there is both a section and a global definition with the same
name, the global wins.

Section symbols are not added to the symbol table; section references
are left undefined and fixed up in the object writer unless they've
been satisfied by some other definition.

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

8 years agodocs: Update Ninja link, also fix link syntax.
Nico Weber [Mon, 28 Mar 2016 20:32:38 +0000 (20:32 +0000)]
docs: Update Ninja link, also fix link syntax.

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

8 years agoRemove accidentally duplicated test
Duncan P. N. Exon Smith [Mon, 28 Mar 2016 20:30:15 +0000 (20:30 +0000)]
Remove accidentally duplicated test

This was identical to setArtificialByteLimitNotWordBoundary.

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

8 years ago[asan] Support dead code stripping on Mach-O platforms
Ryan Govostes [Mon, 28 Mar 2016 20:28:57 +0000 (20:28 +0000)]
[asan] Support dead code stripping on Mach-O platforms

On OS X El Capitan and iOS 9, the linker supports a new section
attribute, live_support, which allows dead stripping to remove dead
globals along with the ASAN metadata about them.

With this change __asan_global structures are emitted in a new
__DATA,__asan_globals section on Darwin.

Additionally, there is a __DATA,__asan_liveness section with the
live_support attribute. Each entry in this section is simply a tuple
that binds together the liveness of a global variable and its ASAN
metadata structure. Thus the metadata structure will be alive if and
only if the global it references is also alive.

Review: http://reviews.llvm.org/D16737

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

8 years agoRevert "Reapply "[PGO] Fix name encoding for ObjC-like functions""
Vedant Kumar [Mon, 28 Mar 2016 20:20:40 +0000 (20:20 +0000)]
Revert "Reapply "[PGO] Fix name encoding for ObjC-like functions""

This reverts commit r264641 to investigate why c-general.test is failing
on the bots.

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

8 years agoReapply "[PGO] Fix name encoding for ObjC-like functions"
Vedant Kumar [Mon, 28 Mar 2016 20:12:07 +0000 (20:12 +0000)]
Reapply "[PGO] Fix name encoding for ObjC-like functions"

Function names in ObjC can have spaces in them. This interacts poorly
with name compression, which uses spaces to separate PGO names. Fix the
issue by using a different separator and update a test.

I chose "\01" as the separator because 1) it's non-printable, 2) we
strip it from PGO names, and 3) it's the next natural choice once "\00"
is discarded (that one's overloaded).

This reverts the revert commit beaf3d18. What's changed?

- I fixed up the covmap-V2 binary format tests using a linux VM.
- I updated the expected counts in instrprof-comdat.h to account for
  the fact that there have been bugfixes to clang coverage.
- I added an assert to make sure we don't get bitten by this again.

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

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

8 years agoSimplify how we represent relocation iterators.
Rafael Espindola [Mon, 28 Mar 2016 19:23:51 +0000 (19:23 +0000)]
Simplify how we represent relocation iterators.

Instead of using a bit to detect if they are "dynamic", just look at
sh_link.

This is a simplification on its own, and will help with using
llvm-objdump in dynamic objects.

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

8 years agoUse 'alignTo' instead of re-inventing it. NFC
Douglas Katzman [Mon, 28 Mar 2016 19:23:23 +0000 (19:23 +0000)]
Use 'alignTo' instead of re-inventing it. NFC

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

8 years agoSubmitted new file with wrong line endings. Correcting...
Mike Spertus [Mon, 28 Mar 2016 19:06:17 +0000 (19:06 +0000)]
Submitted new file with wrong line endings. Correcting...

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

8 years agoProfile summary cleanup.
Easwaran Raman [Mon, 28 Mar 2016 18:58:05 +0000 (18:58 +0000)]
Profile summary cleanup.

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

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

8 years agoFix builds on Windows broken in r264598.
Eugene Zelenko [Mon, 28 Mar 2016 18:54:58 +0000 (18:54 +0000)]
Fix builds on Windows broken in r264598.

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

8 years ago[PGO] Update r264611 to use C-style comment
Adam Nemet [Mon, 28 Mar 2016 18:45:30 +0000 (18:45 +0000)]
[PGO] Update r264611 to use C-style comment

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

8 years ago[PGO] Comment how function pointers for indirect calls are mapped to function names
Adam Nemet [Mon, 28 Mar 2016 18:27:44 +0000 (18:27 +0000)]
[PGO] Comment how function pointers for indirect calls are mapped to function names

Summary:
Hopefully this will make it easier for the next person to figure all
this out...

Reviewers: bogner, davidxl

Subscribers: llvm-commits

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

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

8 years agodos2unix CMakeLists.txt
Reid Kleckner [Mon, 28 Mar 2016 18:19:32 +0000 (18:19 +0000)]
dos2unix CMakeLists.txt

The sign now reads "0 days since the last line ending confusion"

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

8 years agoMIRParser: Add %subreg.xxx syntax for subregister index operands
Matthias Braun [Mon, 28 Mar 2016 18:18:46 +0000 (18:18 +0000)]
MIRParser: Add %subreg.xxx syntax for subregister index operands

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

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

8 years agoCodeGen: Correct specification of PHI nodes
Matthias Braun [Mon, 28 Mar 2016 18:18:41 +0000 (18:18 +0000)]
CodeGen: Correct specification of PHI nodes

They do have a def machine operand.

Fixing the definition is necessary for an upcoming patch.

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

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

8 years ago[AArch64] Do not lower scalar sdiv/udiv to a shifts + mul sequence when optimizing...
Haicheng Wu [Mon, 28 Mar 2016 18:17:07 +0000 (18:17 +0000)]
[AArch64] Do not lower scalar sdiv/udiv to a shifts + mul sequence when optimizing for minsize

Mimic what x86 does when optimizing sdiv/udiv for minsize.

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

8 years agoRevert "[SimlifyCFG] Prevent passes from destroying canonical loop structure, especia...
Reid Kleckner [Mon, 28 Mar 2016 18:07:40 +0000 (18:07 +0000)]
Revert "[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops"

This reverts commit r264596.

It does not compile.

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

8 years agoForgot to commit this file in revision 264601
Mike Spertus [Mon, 28 Mar 2016 17:59:40 +0000 (17:59 +0000)]
Forgot to commit this file in revision 264601

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

8 years agoUse VS2015 Project Support for Natvis to eliminate the need to manually install natvi...
Mike Spertus [Mon, 28 Mar 2016 17:58:38 +0000 (17:58 +0000)]
Use VS2015 Project Support for Natvis to eliminate the need to manually install natvis files

When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations.
Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013)

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

8 years ago[PowerPC] On the A2, popcnt[dw] are very slow
Hal Finkel [Mon, 28 Mar 2016 17:52:08 +0000 (17:52 +0000)]
[PowerPC] On the A2, popcnt[dw] are very slow

The A2 cores support the popcntw/popcntd instructions, but they're microcoded,
and slower than our default software emulation. Specifically, popcnt[dw] take
approximately 74 cycles, whereas our software emulation takes only 24-28
cycles.

I've added a new target feature to indicate a slow popcnt[dw], instead of just
removing the existing target feature from the a2/a2q processor models, because:
  1. This allows us to return more accurate information via the TTI interface
     (I recognize that this currently makes no practical difference)
  2. Is hopefully easier to understand (it allows the core's features to match
     its manual while still having the desired effect).

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

8 years agoRemove else after return
David Blaikie [Mon, 28 Mar 2016 17:45:48 +0000 (17:45 +0000)]
Remove else after return

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

8 years agoFix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes.
Eugene Zelenko [Mon, 28 Mar 2016 17:40:08 +0000 (17:40 +0000)]
Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes.

Differential revision: http://reviews.llvm.org/D18469

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

8 years ago[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially...
Hyojin Sung [Mon, 28 Mar 2016 17:22:25 +0000 (17:22 +0000)]
[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops

When eliminating or merging almost empty basic blocks, the existence of non-trivial PHI nodes
is currently used to recognize potential loops of which the block is the header and keep the block.
However, the current algorithm fails if the loops' exit condition is evaluated only with volatile
values hence no PHI nodes in the header. Especially when such a loop is an outer loop of a nested
loop, the loop is collapsed into a single loop which prevent later optimizations from being
applied (e.g., transforming nested loops into simplified forms and loop vectorization).

The patch augments the existing PHI node-based check by adding a pre-test if the BB actually
belongs to a set of loop headers and not eliminating it if yes.

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

8 years ago[llvm-readobj] NFC Replace case by macros for PT_* enums
Hemant Kulkarni [Mon, 28 Mar 2016 17:20:23 +0000 (17:20 +0000)]
[llvm-readobj] NFC Replace case by macros for PT_* enums

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

8 years ago[PGO] Don't set the function hotness attribute when populating counters
Rong Xu [Mon, 28 Mar 2016 17:08:56 +0000 (17:08 +0000)]
[PGO] Don't set the function hotness attribute when populating counters

Don't set the function hotness attribute on the fly. This changes the CFG
branch probability of the caller function, which leads to inconsistent BB
ordering. This patch moves the attribute setting to a separated loop after
 the counts in all functions are populated.

Fixes PR27024 - PGO instrumentation profile data is not reflected in correct
basic blocks.

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

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

8 years agoIntroduce MachineFunctionProperties and the AllVRegsAllocated property
Derek Schuff [Mon, 28 Mar 2016 17:05:30 +0000 (17:05 +0000)]
Introduce MachineFunctionProperties and the AllVRegsAllocated property

MachineFunctionProperties represents a set of properties that a MachineFunction
can have at particular points in time. Existing examples of this idea are
MachineRegisterInfo::isSSA() and MachineRegisterInfo::tracksLiveness() which
will eventually be switched to use this mechanism.
This change introduces the AllVRegsAllocated property; i.e. the property that
all virtual registers have been allocated and there are no VReg operands
left.

With this mechanism, passes can declare that they require a particular property
to be set, or that they set or clear properties by implementing e.g.
MachineFunctionPass::getRequiredProperties(). The MachineFunctionPass base class
verifies that the requirements are met, and handles the setting and clearing
based on the delcarations. Passes can also directly query and update the current
properties of the MF if they want to have conditional behavior.

This change annotates the target-independent post-regalloc passes; future
changes will also annotate target-specific ones.

Reviewers: qcolombet, hfinkel

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

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

8 years ago[llvm-size] Implement --common option
Hemant Kulkarni [Mon, 28 Mar 2016 16:48:10 +0000 (16:48 +0000)]
[llvm-size] Implement --common option

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

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

8 years agoRevert "[PGO] Fix name encoding for ObjC-like functions"
Vedant Kumar [Mon, 28 Mar 2016 16:14:07 +0000 (16:14 +0000)]
Revert "[PGO] Fix name encoding for ObjC-like functions"

This reverts commit r264587. Reverting to investigate 6 unexpected
failures on the ppc bot:

http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2822

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

8 years agoAMDGPU/SI: Limit load clustering to 16 bytes instead of 4 instructions
Tom Stellard [Mon, 28 Mar 2016 16:10:13 +0000 (16:10 +0000)]
AMDGPU/SI: Limit load clustering to 16 bytes instead of 4 instructions

Summary:
This helps prevent load clustering from drastically increasing register
pressure by trying to cluster 4 SMRDx8 loads together.  The limit of 16
bytes was chosen, because it seems like that was the original intent
of setting the limit to 4 instructions, but more analysis could show
that a different limit is better.

This fixes yields small decreases in register usage with shader-db, but
also helps avoid a large increase in register usage when lane mask
tracking is enabled in the machine scheduler, because lane mask tracking
enables more opportunities for load clustering.

shader-db stats:

2379 shaders in 477 tests
Totals:
SGPRS: 49744 -> 48600 (-2.30 %)
VGPRS: 34120 -> 34076 (-0.13 %)
Code Size: 1282888 -> 1283184 (0.02 %) bytes
LDS: 28 -> 28 (0.00 %) blocks
Scratch: 495616 -> 492544 (-0.62 %) bytes per wave
Max Waves: 6843 -> 6853 (0.15 %)
Wait states: 0 -> 0 (0.00 %)

Reviewers: nhaehnle, arsenm

Subscribers: arsenm, llvm-commits

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

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