Commit Graph

117977 Commits

Author SHA1 Message Date
Filipe Cabecinhas
a3a2cab504 [BitcodeReader] Diagnose type mismatches with aliases
Bug found with AFL fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238895 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-03 01:30:13 +00:00
Filipe Cabecinhas
1a2a0ee8a0 [Bitcode] Minimize the test to not conflict with others
Source for the test:
@bloom = global <3 x i32> <i32 0, i32 1, i32 42>

Plus bit twiddling to set the vector numelts to 0 (in the bc file).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238894 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-03 01:30:08 +00:00
Filipe Cabecinhas
287f68d654 [BitcodeReader] Check vector size before trying to create a VectorType
Bug found with AFL fuzz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238891 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-03 00:05:30 +00:00
Rafael Espindola
2bff0d30f8 Avoid a call to getOrCreateSymbol when we already have the symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238890 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-03 00:02:40 +00:00
Nick Lewycky
9c8ebbf969 Int128 is also a built-in preconstructed type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238889 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 23:56:53 +00:00
Daniel Sanders
4e94cb75e5 [mips] XFAIL ELF_O32_PIC_relocations.s for big-endian mips
The test exposes pre-existing bugs when the endian of the host and target do
not match.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238888 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 23:20:40 +00:00
Rafael Espindola
0ba7ba487d Clarify when we can avoid creating names for temp symbols.
Some temporary symbols are created by MC itself. These symbols are never used
for lookup and are never included in the object symbol table, so we can
avoid creating a name for them.

Other temporaries are created by CodeGen or by the user by explicitly asking
for a name starting with .L (or L on MachO).

These temporaries behave like regular symbols, we just try to avoid including
them in the object symbol table, but sometimes they end up there:

const char *foo() {
  return "abc" + 3;
}

will have a relocation pointing to a .L symbol.

It just so happens that almost all MC created temporary has the AlwaysAddSuffix
option and CodeGen/user created ones don't.

One interesting future optimization would be to use unnamed symbols for
all temporaries, but that would require use an st_name of 0 or
having the object writer create the names if a symbol does end up in the
symbol table.

No testcase since this just avoid creating a few extra names for MC created
temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238887 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 22:52:13 +00:00
Sanjoy Das
531270e663 [NFC] Fix spelling in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238884 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 22:33:39 +00:00
Sanjoy Das
f73780ec1a [RewriteStatepointsForGC] Strip deref info after rewriting.
Summary:
Once a gc.statepoint has been rewritten to relocate live references, the
SSA values represent physical pointers instead of logical references.
Logical dereferencability does not imply physical dereferencability and
after RewriteStatepointsForGC has run any attributes that imply
dereferencability of the logical references need to be stripped.

This current approach is conservative, and can be made more precise
later if needed.  For starters, we need to strip dereferencable
attributes only from pointers that live in the GC address space.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238883 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 22:33:37 +00:00
Sanjoy Das
e9609875ee [NFCI] Change RewriteStatepointsForGC to a ModulePass.
Summary:
A later change that has RewriteStatepointsForGC change function
attributes throughout the module depends on this.

Reviewers: reames, pgavlin

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238882 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 22:33:34 +00:00
Sanjoy Das
8fadf8f4d3 [SelectionDAG] Fix PR23603.
Summary:
LLVM's MI level notion of invariant_load is different from LLVM's IR
level notion of invariant_load with respect to dereferenceability.  The
IR notion of invariant_load only guarantees that all *non-faulting*
invariant loads result in the same value.  The MI notion of invariant
load guarantees that the load can be legally moved to any location
within its containing function.  The MI notion of invariant_load is
stronger than the IR notion of invariant_load -- an MI invariant_load is
an IR invariant_load + a guarantee that the location being loaded from
is dereferenceable throughout the function's lifetime.

Reviewers: hfinkel, reames

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238881 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 22:33:30 +00:00
Rafael Espindola
4cc59a13c7 Pass a MCSymbolELF to a few ELF only functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238868 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 21:30:13 +00:00
Filipe Cabecinhas
6af0f89f37 [IR/AsmWriter] Output escape sequences if the first character isdigit()
If the first character in a metadata attachment's name is a digit, it has
to be output using an escape sequence, otherwise it's not valid text IR.

Removed an over-zealous assert from LLVMContext which didn't allow this.
The rule should only apply to text IR. Actual names can have any sequence
of non-NUL bytes.

Also added some documentation on accepted names.

Bug found with AFL fuzz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238867 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 21:25:08 +00:00
Filipe Cabecinhas
66774f6700 CHECK-LABEL-ize test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238866 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 21:25:03 +00:00
Filipe Cabecinhas
581e255b1f clang-format a few functions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238865 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 21:25:00 +00:00
Rafael Espindola
569f382a46 Merge MCELF.h into MCSymbolELF.h.
Now that we have a dedicated type for ELF symbol, these helper functions can
become member function of MCSymbolELF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238864 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 20:38:46 +00:00
Daniel Sanders
92a1dad6d1 [mips] Make TTypeEncoding indirect to allow .eh_frame to be read-only.
Summary:
Following on from r209907 which made personality encodings indirect, do the
same for TType encodings. This fixes the case where a try/catch block needs
to generate references to, for example, std::exception in the
.gcc_except_table.

Previous attempts at committing this broke the buildbots due to bugs in IAS.
These bugs have now been fixed so trying again.

Reviewers: petarj

Reviewed By: petarj

Subscribers: srhines, joerg, tberghammer, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238863 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 20:32:50 +00:00
Tim Northover
33d75a269c AArch64: fix typo in SMIN far atomics and add tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 18:37:20 +00:00
Duncan P. N. Exon Smith
16fb1632a1 DebugInfo: Really support 2^16 arguments in a subprogram
As a follow-up to r235955, actually support up to 65535 arguments in a
subprogram.  r235955 missed assembly support, having only tested the new
limit via C++ unit tests.  Code patch by Amjad Aboud.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238854 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 17:17:44 +00:00
Duncan P. N. Exon Smith
31ed6b767b DebugInfo: Rename testcases from MD* to DI*, NFC
As a follow-up to r236120, rename testcases to match the new names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238853 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 17:13:25 +00:00
Daniel Sanders
6c55f8dda7 [mips][mcjit] Add support for R_MIPS_PC32.
Summary:
This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings
in the exception handling LSDA.

Also fixed a nearby typo.

Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238844 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 15:28:29 +00:00
Benjamin Kramer
5a04f4af36 Push constness through LoopInfo::isLoopHeader and clean it up a bit.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238843 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 15:28:27 +00:00
Sanjay Patel
871beb8dd7 make reciprocal estimate code generation more flexible by adding command-line options (2nd try)
The first try (r238051) to land this was reverted due to bot failures
that were hopefully addressed by r238788.

This patch adds a TargetRecip class for processing many recip codegen possibilities.
The class is intended to handle both command-line options to llc as well
as options passed in from a front-end such as clang with the -mrecip option.

The x86 backend is updated to use the new functionality.
Only -mcpu=btver2 with -ffast-math should see a functional change from this patch.
All other x86 CPUs continue to *not* use reciprocal estimates by default with -ffast-math.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238842 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 15:28:15 +00:00
Daniel Sanders
1145b66434 [mips] Add RuntimeDyld tests for currently supported O32 relocations.
Reviewers: petarj, vkalintiris

Reviewed By: vkalintiris

Subscribers: vkalintiris, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238838 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 15:01:25 +00:00
Elena Demikhovsky
6628cb50bd AVX-512: Implemented VRANGESD and VRANGESS instructions for SKX Implemented DAG lowering for all these forms.
Added tests for encoding.

By Igor Breger (igor.breger@intel.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238834 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 14:12:54 +00:00
Elena Demikhovsky
ccbc17f896 AVX-512: Shorten implementation of lowerV16X32VectorShuffle()
using lowerVectorShuffleWithSHUFPS() and other shuffle-helpers routines.
Added matching of VALIGN instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 13:43:18 +00:00
Vasileios Kalintiris
330e5f16d1 [mips] Add support for dynamic stack realignment.
Summary:
With this change we are able to realign the stack dynamically, whenever it
contains objects with alignment requirements that are larger than the
alignment specified from the given ABI.

We have to use the $fp register as the frame pointer when we perform
dynamic stack realignment. In complex stack frames, with variably-sized
objects, we reserve additionally the callee-saved register $s7 as the
base pointer in order to reference locals.

Reviewers: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238829 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 13:14:46 +00:00
Rafael Espindola
9751e35f20 Simplify now that we always use an alignment of 2 for ELF files.
This saves 123144 bytes out of llvm-nm on powerpc64le.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238824 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 12:05:27 +00:00
Renato Golin
6b35bec8ef Revert "ARM: Thumb2 LDRD/STRD supports independent input/output regs"
This reverts commit r238795, as it broke the Thumb2 self-hosting buildbot.

Since self-hosting issues with Clang are hard to investigate, I'm taking the
liberty to revert now, so we can investigate it offline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238821 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 11:47:30 +00:00
Vladimir Sukharev
1e7e9b1881 [AArch64] Add v8.1a atomic instructions
Patch by: Tom Coxon

Reviewers: t.p.northover

Subscribers: llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238818 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 10:58:41 +00:00
Toma Tabacu
01cf1d3ef3 [mips] [IAS] Reformat mips-expansions.s. NFC.
Summary:
Make mips-expansions.s more readable by grouping the instructions with their respective CHECK's.
This test is going to get a lot bigger soon and it will become essentially unreadable if the current formatting is kept.

I've also made the comments more useful and accurate, and I've restricted the RUN lines to under 80 columns.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238817 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 10:34:10 +00:00
Daniel Sanders
fa82cb6244 [mips] Test both %dtprel_hi and %dtprel_lo instead of testing %dtprel_hi twice.
The second %dtprel_hi is used on an addiu so it looks like a copy/paste error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238815 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 10:09:08 +00:00
Daniel Sanders
ad601b6b90 [mips] Expand tabs in test/MC/Mips/mips-relocations.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238814 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 10:02:00 +00:00
Toma Tabacu
a5f14070fa [mips] [IAS] Add support for the .set softfloat/hardfloat directives.
Summary: These directives are used to set the current value of the SoftFloat feature.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits, mpf

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238813 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 09:48:04 +00:00
Elena Demikhovsky
d929045eb5 AVX-512: Implemented VFIXUPIMMSD and VFIXUPIMMSS instructions for KNL
Implemented DAG lowering for all these forms.
Added tests for encoding.

By Igor Breger (igor.breger@intel.com)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238811 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 08:28:57 +00:00
Asaf Badouh
aa9e1c528b revert 238809
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238810 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 07:45:19 +00:00
Asaf Badouh
82fa06895e AVX-512: Implemented GETEXP instruction for KNL and SKX
Added rounding mode modifier for SQRTPS/PD
Added tests for encoding and intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238809 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 07:18:14 +00:00
Craig Topper
caa40ec228 [TableGen] Use range-based for loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238808 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 06:19:28 +00:00
Craig Topper
77c7578426 Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 06:19:25 +00:00
Craig Topper
61f49542d7 [TableGen] Rename ListInit::getSize to just 'size' to be more consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238806 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 04:15:57 +00:00
Craig Topper
a1bedd75a0 [TableGen] Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238805 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 04:15:51 +00:00
Davide Italiano
69aef63931 [RuntimeDydlELF] Use range-based loop.
Differential Revision:	http://reviews.llvm.org/D10165
Reviewed by:	rafael


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238804 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 01:52:28 +00:00
Rafael Espindola
f7e0685b9a Create a MCSymbolELF.
This create a MCSymbolELF class and moves SymbolSize since only ELF
needs a size expression.

This reduces the size of MCSymbol from 56 to 48 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238801 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-02 00:25:12 +00:00
Jim Grosbach
398f175c45 MC: Tidy up LOH naming a bit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238800 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 23:55:06 +00:00
Jim Grosbach
574635710f MC: Tidy up formatting a bit. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238799 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 23:55:02 +00:00
David Majnemer
3ba7d326d5 [Support] Simplify Triple::getOSVersion
Those who are interested in the Android version can use
getEnvironmentVersion instead of getOSVersion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238798 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 23:45:25 +00:00
David Majnemer
3fcfa4873a [ADT] Add Triple::getEnvironmentVersion
This allows us to extract version numbers from the environment.
getOSVersion is currently overloaded for that purpose, this allows us to
clean it up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238796 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 23:38:09 +00:00
Matthias Braun
d421582e90 ARM: Thumb2 LDRD/STRD supports independent input/output regs
The existing code would unnecessarily break LDRD/STRD apart with
non-adjacent registers, on thumb2 this is not necessary.

Ideally on thumb2 we shouldn't match for ldrd/strd pre-regalloc anymore
as there is not reason to set register hints anymore, changing that is
something for a future patch however.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238795 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 23:27:08 +00:00
Matthias Braun
fe1391f07d AArch64: Use CMP;CCMP sequences for and/or/setcc trees.
Previously CCMP/FCCMP instructions were only used by the
AArch64ConditionalCompares pass for control flow. This patch uses them
for SELECT like instructions as well by matching patterns in ISelLowering.

PR20927, rdar://18326194

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238793 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 22:31:17 +00:00
Alexei Starovoitov
0b48e9a83c [bpf] fix build
fix breakage due to r238634

Patch by Vijay Subramanian.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238792 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-01 22:24:36 +00:00