124314 Commits

Author SHA1 Message Date
Dan Gohman
9a9e26b34f [WebAssembly] Model the return value of store instructions in wasm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253916 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:16:35 +00:00
Chad Rosier
7ce4dcb91f [LIR] Put includes in correct order. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253915 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:09:13 +00:00
Xinliang David Li
55f78334c1 [PGO] Add --text option for llvm-profdata show|merge commands
The new option is similar to the SampleProfile dump option.

- dump raw/indexed format into text profile format
- merge the profile and output into text profile format.

Note that Value Profiling data text format is not yet designed. 
That functionality will be added later.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253913 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 20:47:38 +00:00
Diego Novillo
df79221070 SamplePGO - Add coverage tracking for samples.
The existing coverage tracker counts the number of records that were used
from the input profile. An alternative view of coverage is to check how
many available samples were applied.

This way, if the profile contains several records with few samples, it
doesn't really matter much that they were not applied. The more
interesting records to apply are the ones that contribute many samples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253912 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 20:12:21 +00:00
Andrew Kaylor
704489d52e [WinEH] Fix a case where GVN could incorrectly PRE a load into an EH pad.
Differential Revision: http://reviews.llvm.org/D14842



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253908 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 19:51:41 +00:00
Dan Gohman
c558dd39be [WebAssembly] Don't use set_local instructions explicitly.
The current approach to using get_local and set_local is to use them
implicitly, as register uses and defs. Introduce new copy instructions
which are themselves no-ops except for the get_local and set_local
that they imply, so that we use get_local and set_local consistently.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253905 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 19:30:43 +00:00
Teresa Johnson
846661215e [ThinLTO] Deduplicate function index loading into shared helper (NFC)
Add a shared helper routine to read the function index from a file
and create/return the function index object. Use it in llvm-link and
llvm-lto.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253903 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 19:19:11 +00:00
Andrew Kaylor
e03f5e5c43 [WinEH] Fix problem where CodeGenPrepare incorrectly sinks a bitcast into an EH pad.
Differential Revision: http://reviews.llvm.org/D14842



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253902 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 19:16:15 +00:00
Dan Gohman
5aafb6def5 [WebAssembly] Always print loop end labels
WebAssembly is currently using labels to end scopes, so for example a
loop scope looks like this:

BB0_0:
  loop BB0_1
  ...
BB0_1:

with BB0_0 being the label of the first block not in the loop. This
requires that the label be printed even when it's only reachable via
fallthrough. To arrange this, insert a no-op LOOP_END instruction in
such cases at the end of the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253901 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 19:12:37 +00:00
Xinliang David Li
236067a61b [PGO] Introduce alignment macro for instr-prof control data(NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253893 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 18:02:59 +00:00
Dan Gohman
e89242e734 [WebAssembly] Remove incomplete MCCodeEmitter bits.
These are parts of a separate patch that I accidentally included in r253878.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253892 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 18:00:04 +00:00
Teresa Johnson
02d1c40fad Remove unused function parameter (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253889 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 17:42:49 +00:00
Paul Robinson
5112df471f Add Windows error code and tidy formatting for system errors.
Differential Revision: http://reviews.llvm.org/D14892


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 17:34:20 +00:00
Xinliang David Li
cd0aaaa14c Fix comment not allowed in C90
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253880 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 17:05:45 +00:00
Dan Gohman
19dfe052ee [WebAssembly] Emit .param, .result, and .local through MC.
This eliminates one of the main remaining uses of EmitRawText.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253878 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 16:50:18 +00:00
Diego Novillo
b08070ce10 SamplePGO - Clear coverage tracking when clearing per-function data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253877 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 16:30:17 +00:00
Dan Gohman
96bd946285 [WebAssembly] Use dominator information to improve BLOCK placement
Always starting blocks at the top of their containing loops works, but creates
unnecessarily deep nesting because it makes all blocks in a loop overlap.
Refine the BLOCK placement algorithm to start blocks at nearest common
dominating points instead, which significantly shrinks them and reduces
overlapping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253876 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 16:19:56 +00:00
Daniel Sanders
8452e84d36 [mips] .ent and .end should also set the type and size of the symbol respectively.
Reviewers: vkalintiris

Subscribers: llvm-commits, seanbruno, emaste, vkalintiris, dsanders

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253875 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 16:08:03 +00:00
Nathan Slingerland
f2bc179203 [Support] Fix SaturatingMultiply<T>() to be correct (and fast), Re-enable Unit Tests
Summary:
This change fixes the SaturatingMultiply<T>() function template to not cause undefined behavior with T=uint16_t.
Thanks to Richard Smith's contribution, it also no longer requires an integer division.

Patch by Richard Smith.

Reviewers: silvas, davidxl

Subscribers: rsmith, davidxl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253870 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 15:33:43 +00:00
Diego Novillo
e5c2c47f2f SamplePGO - Use newly introduced local variable. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253868 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 15:24:13 +00:00
Krzysztof Parzyszek
a1bbb47859 [Hexagon] Update instruction formats
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253867 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 14:09:26 +00:00
Martell Malone
ee54187984 ARM: address WoA division overflow crash
Disable custom handling of signed 32-bit and 64-bit integer divide.
Add test cases for both 32-bit and 64-bit integer overflow crashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253865 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 13:11:39 +00:00
Craig Topper
4c91939703 [TableGen] Use std::remove_if instead of manually coded loops that called erase inside them. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253857 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 07:19:10 +00:00
Craig Topper
e3376e6361 [TableGen] Use empty() instead of checking if size of vector is greater than or equal to 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253856 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 07:19:08 +00:00
Craig Topper
3d6b356c19 [Mips] Remove an unnecessary wrapping of a predicate with std::ptr_fun. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 07:19:06 +00:00
Xinliang David Li
9c157b23d4 Move two Value Profiler data structs to InstrProfData.inc (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 05:29:51 +00:00
Xinliang David Li
94e1578270 [PGO] Fix remaining bugs in ProfData template file (when used by compiler-rt)
1. move const qualifier out of raw header field type as runtime use of the header
   needs to initialze the fields
2. use C style casting for integer types.






git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253844 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 03:49:07 +00:00
Davide Italiano
a7e61b0322 [Analysis/CallGraph] Switch dump() definitions over to LLVM_DUMP_METHOD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 02:58:42 +00:00
Davide Italiano
b5e17577ae [LoopStrengthReduce] Mark dump() definitions as LLVM_DUMP_METHOD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253841 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 02:47:30 +00:00
Mehdi Amini
6fc1509fb7 Add const qualifier for FunctionInfoIndex in ModuleLinker and linkInModule() (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253840 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 01:59:16 +00:00
Mehdi Amini
b70988b005 Add const qualifier on FunctionInfoIndex::hasExportedFunctions() (NFC)
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253839 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 01:59:12 +00:00
Craig Topper
020e24091c Revert a portion of r253836 that seems to have broke a couple bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253838 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 22:43:40 +00:00
Sanjoy Das
85b3856163 [SCEV] Use C++11'isms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253837 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 21:20:13 +00:00
Craig Topper
1664232ab1 [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 20:46:24 +00:00
Craig Topper
5f57903187 [TableGen] Use std::fill instead of a manually coded loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253835 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 20:46:22 +00:00
David Blaikie
7ceb9c769f Further simplify from r253832 with some unique_ptr and coalescing conditions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253834 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 20:11:21 +00:00
David Blaikie
bcd624a451 Further simplify from r253832, removing unnecessary intermediate lambdas
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253833 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 20:02:58 +00:00
Craig Topper
6ca468743c [TableGen] Use std::any_of and std::find instead of manual loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253832 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 19:27:02 +00:00
Simon Pilgrim
3ab475a9ad [X86][FMA] Regenerate tests.
Fixes some broken checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 19:05:53 +00:00
Benjamin Kramer
987c37b777 [MDBuilder] Simplify code using initializer lists. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253826 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 18:03:17 +00:00
Benjamin Kramer
1fcfdffdc7 [SCEV] Simplify code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253825 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 17:27:27 +00:00
Simon Pilgrim
8865f70d70 [X86][AVX] Added load splat tests.
Placeholder for upcoming patch for PR23022.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 16:52:16 +00:00
Simon Pilgrim
f4a7279ca5 Remove duplicate getValueType() calls. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253823 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 16:49:38 +00:00
Krzysztof Parzyszek
e2f476f636 Revert r253810. The builds should be fine now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253822 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 16:13:51 +00:00
Simon Pilgrim
626353404e [Utils] Updated shuffle fuzz script to generate more modern (valid) IR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 16:04:32 +00:00
Krzysztof Parzyszek
d8d11cb07e Avoid dependency between TableGen and CodeGen
Duplicate a few common definitions between DFAPacketizer.cpp and
DFAPacketizerEmitter.cpp to avoid including files from CodeGen
in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253820 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 15:20:19 +00:00
Elena Demikhovsky
0e636e35e3 AVX-512: Optimized INSERT_SUBVECTOR for i1 vector types
ISERT_SUBVECTOR for i1 vectors may be done with shifts, when we insert into the lower part, or into the upper part, on into all-zero vector.
CONCAT_VECTORS uses ISERT_SUBVECTOR.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 13:57:38 +00:00
Xinliang David Li
416b0b1dd8 [PGO] move names of runtime sections definitions to InstrProfData.inc
In profile runtime implementation for Darwin, Linux and FreeBSD, the
names of sections holding profile control/counter/naming data need
to be known by the runtime in order to locate the start/end of the
data. Moving the name definitions to the common file to specify the
connection.






git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253814 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 05:42:31 +00:00
NAKAMURA Takumi
add2047b2c Temporary fix broken build.ninja after r253790.
FIXME: This can be reverted several hours later.

r253790 introduced cyclic deps around llvm-tblgen and it was affecting after reverting.

  ninja: error: dependency cycle: include/llvm/IR/Attributes.inc -> include/llvm/IR/Attributes.inc.tmp -> bin/llvm-tblgen -> utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/DFAPacketizerEmitter.cpp.o -> include/llvm/IR/Attributes.inc

It may be a ninja's bug.

FYI, renaming DFAPacketizerEmitter.cpp would be useless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 02:32:49 +00:00
Xinliang David Li
77b5e38161 [PGO] move raw magic and version def to InstrProfData.inc
These are shared definitions too. (NFC)





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 02:05:50 +00:00