Commit Graph

124493 Commits

Author SHA1 Message Date
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
Davide Italiano
e5dedf932d [llvm-rtdyld] Refactor to reduce indentation.
Suggested by: David Blaikie.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 01:58:33 +00:00
Xinliang David Li
085776b0a3 [PGO] InstrProf Template file documentation change
Add more complete description of the content and structure
of the template file. Made the comment in C style to be
shared by C runtime. Also enhance the file structure so
that it can included as standalone header for common 
definitions.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 01:51:31 +00:00
Xinliang David Li
6aa45fb3ac [PGO] Move Value Profile Kind to InstrProfData.inc
ValueProfKind value affects runtime data structure and
definition is shared between compiler-rt and LLVM.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253806 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 01:39:07 +00:00
Xinliang David Li
9b627286bc [PGO] Define value profiling updater API signature in InstrProfData.inc (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 00:22:07 +00:00
Rafael Espindola
a2197f8f51 Have a single way for creating unique value names.
We had two code paths. One would create names like "foo.1" and the other
names like "foo1".

For globals it is important to use "foo.1" to help C++ name demangling.
For locals there is no strong reason to go one way or the other so I
kept the most common mangling (foo1).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253804 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 00:16:24 +00:00
Xinliang David Li
0e13c07553 [PGO] Move Raw Header def into template file InstrProfData.inc
To enable code sharing with compiler-rt (NFC)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253803 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 00:06:39 +00:00
Sanjay Patel
3688ae8632 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253802 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-22 00:03:16 +00:00
Sanjoy Das
108f8f32b8 [SCEVExpander] Use C++isms; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253801 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 23:20:10 +00:00
Krzysztof Parzyszek
b08711cc55 Now fix errors in NDEBUG build.
Hope this won't break any hardware next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253799 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 22:46:52 +00:00
Krzysztof Parzyszek
b61ef9d5f3 Fix warnings in NDEBUG build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 22:19:50 +00:00
Teresa Johnson
f1f60632b0 [ThinLTO] Handle bitcode without function summary sections gracefully
Summary:
Several fixes to the handling of bitcode files without function summary
sections so that they are skipped during ThinLTO processing in llvm-lto
and the gold plugin when appropriate instead of aborting.

1 Don't assert when trying to add a FunctionInfo that doesn't have
  a summary attached.
2 Skip FunctionInfo structures that don't have attached function summary
  sections when trying to create the combined function summary.
3 In both llvm-lto and gold-plugin, check whether a bitcode file has
  a function summary section before trying to parse the index, and skip
  the bitcode file if it does not.
4 Fix hasFunctionSummaryInMemBuffer in BitcodeReader, which had a bug
  where we returned to early while looking for the summary section.

Also added llvm-lto and gold-plugin based tests for cases where we
don't have function summaries in the bitcode file. I verified that
either the first couple fixes described above are enough to avoid the
crashes, or fixes 1,3,4. But have combined them all here for added
robustness.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253796 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 21:55:48 +00:00
Simon Pilgrim
ef8457f79e [MachineInstrBuilder] Support for adding a ConstantPoolIndex MO with an additional offset.
MachineInstrBuilder::addDisp can already add an immediate or global address MO with an adjusted offset, this patch adds support for constant pool indices as well.

All remaining MO types still assert - there are a number of other types that could support adjusted offsets but I have no test cases at this time.

Required to fix a regression in D13988 found by Mikael Holmén during stress testing (test case attached).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253795 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 21:42:26 +00:00
Krzysztof Parzyszek
bf390b05bc Hexagon V60/HVX DFA scheduler support
Extended DFA tablegen to:
  - added "-debug-only dfa-emitter" support to llvm-tblgen

  - defined CVI_PIPE* resources for the V60 vector coprocessor

  - allow specification of multiple required resources
    - supports ANDs of ORs
    - e.g. [SLOT2, SLOT3], [CVI_MPY0, CVI_MPY1] means:
           (SLOT2 OR SLOT3) AND (CVI_MPY0 OR CVI_MPY1)

  - added support for combo resources
    - allows specifying ORs of ANDs
    - e.g. [CVI_XLSHF, CVI_MPY01] means:
           (CVI_XLANE AND CVI_SHIFT) OR (CVI_MPY0 AND CVI_MPY1)

  - increased DFA input size from 32-bit to 64-bit
    - allows for a maximum of 4 AND'ed terms of 16 resources

  - supported expressions now include:

    expression     => term [AND term] [AND term] [AND term]
    term           => resource [OR resource]*
    resource       => one_resource | combo_resource
    combo_resource => (one_resource [AND one_resource]*)

Author: Dan Palermo <dpalermo@codeaurora.org>

kparzysz: Verified AMDGPU codegen to be unchanged on all llc
tests, except those dealing with instruction encodings.

Reapply the previous patch, this time without circular dependencies.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253793 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 20:00:45 +00:00
Craig Topper
9ea618ed34 Use modulo operator instead of multiplying result of a divide and subtracting from the original dividend. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253792 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 17:44:42 +00:00
Krzysztof Parzyszek
a00b4f6e5d Revert r253790: it breaks all builds for some reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253791 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 17:38:33 +00:00
Krzysztof Parzyszek
c7fdae2400 Hexagon V60/HVX DFA scheduler support
Extended DFA tablegen to:
  - added "-debug-only dfa-emitter" support to llvm-tblgen

  - defined CVI_PIPE* resources for the V60 vector coprocessor

  - allow specification of multiple required resources
    - supports ANDs of ORs
    - e.g. [SLOT2, SLOT3], [CVI_MPY0, CVI_MPY1] means:
           (SLOT2 OR SLOT3) AND (CVI_MPY0 OR CVI_MPY1)

  - added support for combo resources
    - allows specifying ORs of ANDs
    - e.g. [CVI_XLSHF, CVI_MPY01] means:
           (CVI_XLANE AND CVI_SHIFT) OR (CVI_MPY0 AND CVI_MPY1)

  - increased DFA input size from 32-bit to 64-bit
    - allows for a maximum of 4 AND'ed terms of 16 resources

  - supported expressions now include:

    expression     => term [AND term] [AND term] [AND term]
    term           => resource [OR resource]*
    resource       => one_resource | combo_resource
    combo_resource => (one_resource [AND one_resource]*)

Author: Dan Palermo <dpalermo@codeaurora.org>

kparzysz: Verified AMDGPU codegen to be unchanged on all llc
tests, except those dealing with instruction encodings.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253790 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 17:23:52 +00:00
Sanjay Patel
0b4392ac91 use ternary ops; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253787 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:51:19 +00:00
Sanjay Patel
56739f0051 remove unnecessary temp variables; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253786 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:37:09 +00:00
Sanjay Patel
8c4c988c9e fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253785 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:16:29 +00:00
Sanjay Patel
549121305a move a single test case to where most other instcombine shuffle bug test cases exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253784 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 16:12:58 +00:00
Simon Pilgrim
9ef65a89c3 [X86][SSE] Added SSE2 PSUBUS tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253783 91177308-0d34-0410-b5e6-96231b3b80d8
2015-11-21 13:57:22 +00:00