Commit Graph

197719 Commits

Author SHA1 Message Date
Eli Bendersky 45324cec5f Fix typo and reword in LangRef
Patch by Douglas Katzman

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

llvm-svn: 233920
2015-04-02 15:20:04 +00:00
Russell Gallop b9e15b2e94 [utils] Add Check Compile Flow Consistency tool (check_cfc.py).
This is a tool for checking consistency of code generation with different
compiler options (such as -g or outputting to .s). This tool has found a number
of code generation issues. The script acts as a wrapper to clang or clang++
performing 2 (or more) compiles then comparing the object files. Instructions
for use are in check_cfc.py including how to use with LNT.

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

llvm-svn: 233919
2015-04-02 15:01:53 +00:00
Timur Iskhodzhanov ad3ec82bb1 [ASan/Win] Minor improvements towards enabling coverage
llvm-svn: 233918
2015-04-02 14:48:08 +00:00
Benjamin Kramer 022e7fe144 [alignof] Put back the hack for old versions of GCC.
This works around a bug (PR56859) that is fixed in all versions of GCC I tested
with but was present in 4.8.0. Using 4.8.0 is of course a terrible idea, but looks
like we can't drop it just yet.

llvm-svn: 233916
2015-04-02 13:31:50 +00:00
Andrey Churbanov 74bf17b8ff Replace some unsafe API calls with safe alternatives on Windows, prepare code for similar actions on other platforms - wrap unsafe API calls into macros.
llvm-svn: 233915
2015-04-02 13:27:08 +00:00
Andrey Churbanov 1362ae750f Eliminated the write to depth field of the machine_hierarchy data structure in __kmp_get_hierarchy(), thus fixing race condition. Now local variable used by each thread.
llvm-svn: 233914
2015-04-02 13:18:50 +00:00
Alexey Bataev 8bf6b3eaf7 [OPENMP] Fix crash on private variables not used in OpenMP region in templates.
llvm-svn: 233913
2015-04-02 13:07:08 +00:00
Benjamin Kramer 3ebba5237e Partially revert "Replace custom alignment enforcement with LLVM_ALIGNAS."
MSVC 2013 can't even parse __declspec(align(sizeof(foo))). We'll have to
wait until MSVC 2015 for this.

This partially reverts commit r233911.

llvm-svn: 233912
2015-04-02 12:43:31 +00:00
Benjamin Kramer 1d4ffd74c1 Replace custom alignment enforcement with LLVM_ALIGNAS.
This isn't perfect as it still assumes sizeof(void*) == alignof(void*),
but we can fix that when compiler support gets better.

Shrinks some Stmts that happen to inherit from Stmt and have a
SourceLocation as the first member (64 bit archs only).

llvm-svn: 233911
2015-04-02 12:25:07 +00:00
Benjamin Kramer 165307184a [support] Add a macro wrapper for alignas and simplify some code.
We wrap __attribute((aligned)) for GCC 4.7 and __declspec(align) for
MSVC. The latter behaves weird in some contexts so this should be used
carefully.

llvm-svn: 233910
2015-04-02 11:32:48 +00:00
Vasileios Kalintiris 580f067f72 [mips] Implement eliminateCallFramePseudoInstr() in MipsFrameLowering. NFC.
Summary:
Avoid duplicate code in Mips16FrameLowering and MipsSEFrameLowering by
providing an implementation of the eliminateCallFramePseudoInstr()
function from their base class.

Depends on D8640.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 233909
2015-04-02 11:09:40 +00:00
Tamas Berghammer dcc8e595cb Use objcopy provided next to the compiler on android
Differential revision: http://reviews.llvm.org/D8765

llvm-svn: 233908
2015-04-02 11:09:28 +00:00
Tamas Berghammer 2e16902084 Fix test expectation for aarch64 in several test case
These test cases check if they are able to read registers after the
inferior is crashed. Previously they did it with reading the eax
register what is only available on i386 and x86_64. Thic CL add code to
do the check based on the target architecture (currently i386, x86_64
and aarch64 is supported)

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

llvm-svn: 233907
2015-04-02 11:07:55 +00:00
Elena Demikhovsky 1eeece1285 AVX-512: intrinsics for VPADD, VPMULDQ and VPSUB
by Asaf Badouh (asaf.badouh@intel.com)

llvm-svn: 233906
2015-04-02 10:51:40 +00:00
Vasileios Kalintiris 6d68778588 [mips] Expose adjustStackPtr() from MipsInstrInfo. NFC.
Summary:
adjustStackPtr() is implemented from both MipsSEInstrInfo and
Mips16InstrInfo. It makes sense to expose this function from
MipsInstrInfo and avoid explicit casting in some cases.

Depends on D8638.

Reviewers: dsanders

Subscribers: llvm-commits

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

llvm-svn: 233905
2015-04-02 10:42:44 +00:00
Vasileios Kalintiris b3698a53fa [mips] Make sure that we don't adjust the stack pointer by zero amount.
Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 233904
2015-04-02 10:14:54 +00:00
Vladimir Sukharev f3840700fa [ARM] Rename v8.1a from "extension" to "architecture": follow-up
Corrected forgotten change to remove excess "generic-armv8.1-a" cpu

Subscribers: llvm-commits

Completion of http://reviews.llvm.org/rL233811

llvm-svn: 233903
2015-04-02 09:32:14 +00:00
Alexey Bataev a8d4a54346 [OPENMP] Fix crash on private variables not used in OpenMP region.
llvm-svn: 233902
2015-04-02 07:48:16 +00:00
Rui Ueyama b709f8b6ef ELF: Always use variadic templates in CreateELF.h.
Since we no longer support MSVC 2012, we can assume that variadic
templates are always supported. This patch removes an #ifdef for
C++ compilers that don't support variadic templates.

llvm-svn: 233901
2015-04-02 07:28:19 +00:00
Denis Protivensky 2fc953bb98 [ARM] Generate PLT entries for calls from ARM and Thumb code
The function call that goes through PLT table may be performed
from both ARM and Thumb code.
This situation requires adding a veneer to original PLT code
(which is always ARM) to effect Thumb-to-ARM transition.

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

llvm-svn: 233900
2015-04-02 07:23:11 +00:00
Denis Protivensky ff51abcc52 [ARM] Report fatal error for wrong ARM entry point
The case is possible with wrong input, so report
an error instead of using llvm_unreachable.

llvm-svn: 233899
2015-04-02 07:03:44 +00:00
Peter Collingbourne 949eb3f6a7 Revert r233595, "MC: For variable symbols, maintain MCSymbol::Section as a cache."
llvm-svn: 233898
2015-04-02 07:02:51 +00:00
Rui Ueyama 0ee57cede0 ELF: Remove {AArch64,X86,X86_64}ELFFile because they are empty.
llvm-svn: 233897
2015-04-02 06:50:29 +00:00
Rui Ueyama 0a1fbb7b0c ELF: Replace empty classes with typedefs.
llvm-svn: 233896
2015-04-02 06:00:42 +00:00
Lang Hames 2f50744fe7 [Orc] Fix local-linkage handling in the CompileOnDemand layer.
llvm-svn: 233895
2015-04-02 05:28:10 +00:00
Rui Ueyama b965ac5dc9 ELF: Remove a template parameter from ELF{Object,DOS}Reader constructors.
There is one-to-one correspondence between ELF machine type and a
LinkingContext. We passed them as separate arguments to the constructor.
This patch is to teach the LinkingContexts about their machine types,
so that we don't need to pass that data as separate arguments.

llvm-svn: 233894
2015-04-02 05:19:36 +00:00
Jason Molenda dfb02a9e0d Handle LC_ENCRYPTION_64 in addition to LC_ENCRYPTION load commands in
Mach-O files.
<rdar://problem/20113673> 

llvm-svn: 233893
2015-04-02 05:19:33 +00:00
Philip Reames 4692f36306 [gcroot] Remove unused items from an enum
These two were never implemented for gcroot, so there's no point in keeping them around now.

llvm-svn: 233892
2015-04-02 05:02:16 +00:00
Philip Reames 2df7827c75 Teach gcroot how to handle dynamically realigned frames
I'm playing with supporting custom stack map formats with statepoints.  While 
doing so, I noticed that the existing implementation didn't indicate inherently 
unsized frames.  This change essentially just ports the functionality that already 
exists for the default StackMaps section to custom stackmaps.

llvm-svn: 233891
2015-04-02 05:00:40 +00:00
Sanjoy Das b8239ed0df [ADT] Increment epoch from DenseMap::swap.
Swapping DenseMap A with DenseMap B invalidates iterators pointing into
both A and B.

llvm-svn: 233890
2015-04-02 04:58:12 +00:00
Sanjoy Das be7638bce4 [ADT] Remove dead code.
Nothing is using DenseMapBase::swap.  Besides it does not compile in its
current form.

llvm-svn: 233889
2015-04-02 04:58:08 +00:00
Rui Ueyama 4229b946a8 ELF: Mips: Remove unused field and almost-empty class.
Looks like MipsTargetHandler::_runtimeFile is unused.
MipsRuntimeFile doesn't seem to add values to the base class,
so I removed that class too.

llvm-svn: 233888
2015-04-02 04:48:30 +00:00
Adam Nemet 4ff3ed5960 [LoopAccesses] Remove unused global variables in tests
llvm-svn: 233887
2015-04-02 04:42:51 +00:00
Jason Molenda c48ef341e1 Add a tiny bit of hardening to the eh_frame and compact unwind parsing.
When we're seeing offsets that exceed the size of our section, don't 
try to use that unwind info.
<rdar://problem/20113673> 

llvm-svn: 233886
2015-04-02 04:35:32 +00:00
Lang Hames b1cd98a18d [Orc] Add support classes for inspecting and running C++ static ctor/dtors, and
use these to add support for C++ static ctors/dtors to the Orc-lazy JIT in LLI.

Replace the trivial_retval_1 regression test - the new 'hello' test is covering
strictly more code. 

llvm-svn: 233885
2015-04-02 04:34:45 +00:00
Craig Topper 768ccc4bfa Don't print an error message when looking up the scheduling model if user specified -mcpu=help.
llvm-svn: 233884
2015-04-02 04:27:50 +00:00
Rui Ueyama 7d5492d9ab ELF: Move registerRelocationNames() from TargetHandler to <Arch>ELFLinkingContext.
registerRelocationNames() function is called to register all known
ELF relocation types to the central registry. Since we have separate
LinkingContext class for each ELF machine type, we need to call the
function for each LinkingContext.

However, the function belonged to TargetHandler instead of LinkingContext.
So we needed to do ctx.getTargetHandler().registerRelocationNames().
This patch removes that redundant getTargetHandler call by moving the
function from TargetHandler to LinkingContext.

Conceptually this patch is small, but in reality it's not that small.
It's because the same code is copied to each architecture.
Most of this patch is just repetition. We need to merge them, but
that cannot be done in this patch.

llvm-svn: 233883
2015-04-02 04:18:54 +00:00
Rui Ueyama 0052736eb1 ELF: Move x86-64-only function from DefaultLayout to X86_64TargetLayout.
Also removed some over-generalization added in r232866, such as
making a function take two parameters and pass two equivalent
arguments to the function.

llvm-svn: 233882
2015-04-02 01:36:02 +00:00
Alexey Samsonov f96cde9f68 Fix a bug indicated by -fsanitize=shift-exponent.
llvm-svn: 233881
2015-04-02 01:30:10 +00:00
Rui Ueyama a9b549f924 ELF: Remove empty classes.
llvm-svn: 233880
2015-04-02 01:22:23 +00:00
Alexey Samsonov d4273ebbf3 Add missing " at the end of the #error directive.
llvm-svn: 233879
2015-04-02 01:13:43 +00:00
Rui Ueyama 8ecb0b68c1 ELF: Make createWriterELF's type consistent with other functions.
Other createWriter<Arch> functions take <Arch>LinkingContext as arguments.
Only createWriterELF was an exception. This patch makes it consistent with
others.

llvm-svn: 233878
2015-04-02 01:02:58 +00:00
Peter Collingbourne 7881648a4e Add tests for non-virtual call checking.
Differential Revision: http://reviews.llvm.org/D8792

llvm-svn: 233876
2015-04-02 00:33:36 +00:00
Peter Collingbourne 1a7488afaa Implement CFI type checks for non-virtual calls.
This uses the same class metadata currently used for virtual call and
cast checks.

The new flag is -fsanitize=cfi-nvcall. For consistency, the -fsanitize=cfi-vptr
flag has been renamed -fsanitize=cfi-vcall.

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

llvm-svn: 233874
2015-04-02 00:23:30 +00:00
Rui Ueyama 943206da8e ELF: x86, x86-64, ARM, AArch64: Remove architecture name prefixes from class members.
llvm-svn: 233873
2015-04-02 00:19:04 +00:00
Rui Ueyama 4e725665b0 Remove unused varaible.
llvm-svn: 233872
2015-04-02 00:18:58 +00:00
Daniel Berlin 845864775d Mark this inline properly
llvm-svn: 233870
2015-04-02 00:03:15 +00:00
Daniel Berlin a5af720051 Return iterator from Instruction::eraseFromParent.
Summary:
This is necessary in order to make removal while using reverse iterators work.

(See http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/084122.html)

Updates to other eraseFromParent's to come in later patches.

Reviewers: chandlerc

Subscribers: llvm-commits

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

llvm-svn: 233869
2015-04-02 00:03:07 +00:00
Siva Chandra 2af5dbb1dd Remove the unused m_ast_context member of ClangExpressionParser.
Test Plan: Build LLDB.

Reviewers: spyffe

Subscribers: lldb-commits

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

llvm-svn: 233868
2015-04-02 00:02:46 +00:00
Rui Ueyama 4507003622 ELF: Remove <Arch>TargetHandler::kindString.
<Arch>TargetHandler::kindString is a static member variable
containg a list of names of relocation types.

The member is used only by one function, registerRelocationNames,
so they don't have to be a static member.

This patch makes the visibility of the data narrower by making
them file-scoped variables in small files.

llvm-svn: 233867
2015-04-01 23:55:10 +00:00