Commit Graph

124329 Commits

Author SHA1 Message Date
Sanjay Patel
373a5678d3 [x86] add test to show suboptimal codegen (PR25554)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253934 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 23:18:20 +00:00
Sanjoy Das
5ac8b382d8 [RuntimeDyld] Avoid unused-private-field warning; NFC
Fixes the no asserts -Werror,-Wunused-private-field build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253933 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:59:36 +00:00
Dan Gohman
c165502aa2 [WebAssembly] Don't print the types of memory_size and grow_memory
This matches the current spec, for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253931 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:37:29 +00:00
Xinliang David Li
54daffcbaa [PGO] In llvm-profdata text dump, add comment lines as annotations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:31:22 +00:00
Krzysztof Parzyszek
85354d4e30 Revert r253923.
Per Eric's request.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253928 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:19:57 +00:00
Andy Ayers
77a84a9451 findDeadCallerSavedReg needs to pay attention to calling convention
Caller saved regs differ between SysV and Win64. Use the tail call available set to scavenge from.

Refactor register info to create new helper to get at tail call GPRs. Added a new test case for windows. Fixed up a number of X64 tests since now RCX is preferred over RDX on SysV.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253927 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:17:44 +00:00
Dan Gohman
272978f362 [WebAssembly] Don't special-case call operand order.
With the '=' suffix now indicating which operands are output operands, it's
no longer as important to distinguish between a call's inputs and its outputs
using operand ordering, so we can go back to printing them in the normal order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253925 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:04:06 +00:00
Rafael Espindola
e77aaecb56 Don't create implicit comdats.
comdats are explicitly represented for some time now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253924 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:01:51 +00:00
Krzysztof Parzyszek
277704eaac Add new vector types for 512-, 1024- and 2048-bit vectors
Those types are needed to implement instructions for Hexagon Vector
Extensions (HVX): 16x32, 16x64, 32x16, 32x32, 32x64, 64x8, 64x16,
64x32, 128x8, 128x16, 256x8, 512x1, and 1024x1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253923 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 22:00:17 +00:00
Dan Gohman
789af34864 [WebAssembly] Suffix output operands with '='.
This distinguishes input operands from output operands. This is something of
a syntactic experiment to see whether the mild amount of clutter this adds is
outweighed by the extra information it conveys to the reader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253922 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:55:57 +00:00
Nathan Slingerland
0197bd6d5e [Support] Add optional argument to SaturatingAdd() and SaturatingMultiply() to indicate that overflow occurred
Summary: Adds the ability for callers to detect when saturation occurred on the result of saturating addition/multiplication.

Reviewers: davidxl, silvas, rsmith

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253921 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:54:22 +00:00
Sanjoy Das
96ddcceb80 [RuntimeDyld] Don't allocate unnecessary stub buffer space
Summary:
For relocation types that are known to not require stub functions, there
is no need to allocate extra space for the stub functions.

Reviewers: lhames, reames, maksfb

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253920 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:47:51 +00:00
Sanjoy Das
0fec8398ca [RuntimeDyld] Add bounds checking to SectionEntry::advanceStubOffset
Summary:
Change SectionEntry to keep track of the size of its underlying
allocation, and use that to bounds check advanceStubOffset.

Reviewers: lhames, andrew.w.kaylor, reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253919 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:47:46 +00:00
Sanjoy Das
43e224dd49 [RuntimeDyld] Add accessors to SectionEntry; NFC
Summary:
Remove naked access to the data members in `SectionEntry` and route
accesses through accessor functions.  This makes it obvious how the
instances of the class are used, and will also facilitate adding bounds
checking to `advanceStubOffset` in a later change.

Reviewers: lhames, loladiro, andrew.w.kaylor

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253918 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:47:41 +00:00
James Y Knight
423c686bec Make utils/update_llc_test_checks.py note that the assertions are
autogenerated.

Also update existing test cases which appear to be generated by it and
weren't modified (other than addition of the header) by rerunning it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253917 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-23 21:33:58 +00:00
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