Commit Graph

225619 Commits

Author SHA1 Message Date
Daniel Sanders 0f17d0da4a [mips] Range check simm5.
Summary:
We can't check the error message for this one because there's another lw/sw
available that covers a larger range. We therefore check the transition
between the two sizes.

Reviewers: vkalintiris

Subscribers: llvm-commits, dsanders

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

llvm-svn: 264054
2016-03-22 14:29:53 +00:00
Daniel Sanders 946dee3b5b [mips] Range check vsplat_uimm[1234568].
Summary:

Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

llvm-svn: 264053
2016-03-22 14:17:41 +00:00
Daniel Sanders 93fa4ce9b7 [mips] Range check uimm4_ptr, remove uimm6_ptr, and use correctly sized immediates in MSA copy/insert.
Reviewers: vkalintiris

Subscribers: dsanders, llvm-commits

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

llvm-svn: 264052
2016-03-22 13:58:53 +00:00
Zinovy Nis 07ac2bd4d0 [PATCH] Force LoopReroll to reset the loop trip count value after reroll.
It's a bug fix. 
For rerolled loops SE trip count remains unchanged. It leads to incorrect work of the next passes.
My patch just resets SE info for rerolled loop forcing SE to re-evaluate it next time it requested.
I also added a verifier call in the exisitng test to be sure no invalid SE data remain. Without my fix this test would fail with -verify-scev.

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

llvm-svn: 264051
2016-03-22 13:50:57 +00:00
Aaron Ballman 4c9c07414e Moving files that were placed in the wrong directory from r264049.
llvm-svn: 264050
2016-03-22 13:44:36 +00:00
Aaron Ballman 73a7bd3616 Fix crashes from delayed template parsing code that assumed getBody() would return non-null.
Patch by Etienne Bergeron.

llvm-svn: 264049
2016-03-22 13:37:44 +00:00
Rafael Espindola 26d239c293 Skip some relocations in scanRelocs.
When a tls access is optimized, a group of relocations is converted at a
time.

We were already skipping relocations that were optimized out in
relocate, but not in scanRelocs.

This is a small optimization. I got here while working on a patch that
will always keep scanRelocs and relocate in sync.

llvm-svn: 264048
2016-03-22 13:24:29 +00:00
George Rimar 9f8f4e3944 [ELF] - Process R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations.
R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX relocations were added in latest ABI:
https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r249.pdf

They should be generated instead of R_X86_64_GOTPCREL for cases 
when relaxation is possible. Currently this patch just process them in the 
same way like R_X86_64_GOTPCREL. That should work for now
and we can implement relaxations later.

There is no testcases provided as I think there is no way to generate
such relocations using llvm-mc atm.

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

llvm-svn: 264043
2016-03-22 12:15:26 +00:00
Marina Yatsina 33ef7dad18 [ELF][gcc compatibility]: support section names with special characters (e.g. "/")
Adding support for section names with special characters in them (e.g. "/").
GCC successfully compiles such section names.
This also fixes PR24520.

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

llvm-svn: 264038
2016-03-22 11:23:15 +00:00
Alexander Kornienko 976921d4b4 [ASTMatchers] New matcher hasReturnValue added
Summary: A checker (will be uploaded after this patch) needs to check implicit casts. Existing generic matcher "has" ignores implicit casts and parenthesized expressions and no specific matcher for matching return value expression preexisted. The patch adds such a matcher (hasReturnValue).

Reviewers: klimek, sbenza

Subscribers: xazax.hun, klimek, cfe-commits

Patch by Ádám Balogh!

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

llvm-svn: 264037
2016-03-22 11:03:03 +00:00
Vasileios Kalintiris e5c095923d Fix warning about extra semicolon. NFC.
llvm-svn: 264035
2016-03-22 10:41:20 +00:00
Simon Atanasyan f3ec3be178 [ELF][MIPS] Delete GotSection::addMipsLocalEntry method
Now local symbols have SymbolBody so we can handle all kind of symbols
in the GotSection::addEntry method. The patch moves the code from
addMipsLocalEntry to addEntry. NFC.

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

llvm-svn: 264032
2016-03-22 08:36:48 +00:00
Jonas Hahnfeld b1cad2954b [OMPT] Make tests require OMPT_BLAME
ompt_event_barrier_{begin,end} are optional blame events.
In total it doesn't make any sense to test partially built OMPT support.

llvm-svn: 264031
2016-03-22 08:23:24 +00:00
Mohit K. Bhakkad 19d806792a [LLDB]{MIPS] Fix TestPlatformProcessConnect.py
Patch by Nitesh Jain

Reviewers: clayborg, labath.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, lldb-commits.
Differential Revision: http://reviews.llvm.org/D18082

llvm-svn: 264030
2016-03-22 08:08:02 +00:00
Mehdi Amini 844baa240a Fix unittests: resize() -> reserve()
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264029
2016-03-22 07:35:51 +00:00
Mehdi Amini d595b08998 DenseMap resize() is now named reserved(), adapt the call sites
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264028
2016-03-22 07:31:35 +00:00
Jonas Hahnfeld c804301113 [OMPT] Create infrastructure and add first tests for OMPT
Some basic checks next to the implementation should futher lower the
possibility to introduce regressions. (Note that this would have catched
the ordering issue fixed in rL258866 and pointed to rL263940.)

The tests are implementation dependent in one point because they assume that
thread ids are assigned in ascending order. This is not defined by the standard
but currently ensured in libomp. We have to think about another way of ordering
the threads should this ever be subject to change...

Note that this isn't aiming at replacing the implementation independent
test-suite at https://github.com/OpenMPToolsInterface/ompt-test-suite!

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

llvm-svn: 264027
2016-03-22 07:22:49 +00:00
Mehdi Amini c04fc7a60f Rename DenseMap::resize() into DenseMap::reserve() (NFC)
This is more coherent with usual containers.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 264026
2016-03-22 07:20:00 +00:00
Akira Hatanaka 7e2c82da90 [Objective-c] Do not set IsExact to true when the receiver is a class.
IsExact shouldn't be set to true in WeakObjectProfileTy::getBaseInfo
when the receiver is a class because having a class as the receiver
doesn't guarantee that the Base is exact.

This is a follow-up to r263818.

rdar://problem/25208167

llvm-svn: 264025
2016-03-22 05:00:21 +00:00
Junmo Park 5ac1a47cad Minor code cleanup. NFC.
llvm-svn: 264024
2016-03-22 04:37:32 +00:00
Pete Cooper 3e4d732dd0 Revert "Use owning pointers instead of raw pointers for Atom's to fix leaks."
This reverts commit r264022.

This breaks the Window's bots which don't like that i'm calling ~Atom when
the this pointer is a sublcass of Atom.

Reverting for now until I try find a better fix.  I tried using std::unique_ptr with
a custom deleter as a quick fix, but it didn't work well in the YAML parser.

llvm-svn: 264023
2016-03-22 04:00:41 +00:00
Pete Cooper 572a87e2aa Use owning pointers instead of raw pointers for Atom's to fix leaks.
Currently each File contains an BumpPtrAllocator in which Atom's are
allocated.  Some Atom's contain data structures like std::vector which
leak as we don't run ~Atom when they are BumpPtrAllocate'd.

Now each File actually owns its Atom's using an OwningAtomPtr.  This
is analygous to std::unique_ptr and may be replaced by it if possible.

An Atom can therefore only be owned by a single File, so the Resolver now
moves them from one File to another.  The MachOLinkingContext owns the File's
and so clears all the Atom's in ~MachOLinkingContext, then delete's all the
File's.  This makes sure all Atom's have been destructed before any of the
BumpPtrAllocator's in which they run have gone away.

Should hopefully fix the remaining leaks.  Will keep an eye on the bots to
make sure.

llvm-svn: 264022
2016-03-22 03:44:32 +00:00
Chris Bieneman b6f7efa71f [Perf-training] Fixing an issue with multi-threading PGO generation
When LIT parallelizes the profraw file generation we need to generate unique temp filenames then clean them up after the driver executes.

llvm-svn: 264021
2016-03-22 02:55:40 +00:00
Mike Spertus 32e9a32225 Visual Studio Native Visualizations for constructors and methods
With this change, the class

  struct A {
    A(int _i);
    ~A();
    int foo(double d);
    double bar(A *a) { return 1.3; }
  };

appears in the VS2015 Locals Window as

D              0x02dbb378 struct A
|- DeclKind    CXXRecord
|- Members
 |- [0]        implicit struct A
 |- [1]        Constructor {A(int _i)}
 |- [2]        Destructor {~A()}
 |- [3]        Method {int foo(double d)}
 |- [4]        Method {double bar(struct A *)}
|- [Raw View]  /* Other stuff */

Note that these changes only benefit VS2015 as
VS2013 does not have views and only displays the
struct name "A", but the change does no apparent
harm in VS2013, so is still a win.

llvm-svn: 264020
2016-03-22 02:29:22 +00:00
Sanjoy Das dd1d72ce92 Appease the windows buildbots
The guess is that the stdout/stderr ordering may differ between windows
/ unix.

llvm-svn: 264019
2016-03-22 02:11:57 +00:00
Arpith Chacko Jacob 5c309e475d [OpenMP] Base support for target directive codegen on NVPTX device.
Summary:
This patch adds base support for codegen of the target directive on the NVPTX device.

Reviewers: ABataev

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

Reworked test case after buildbot failure on windows.
Updated patch to integrate r263837 and test case nvptx_target_firstprivate_codegen.cpp.

llvm-svn: 264018
2016-03-22 01:48:56 +00:00
Reid Kleckner f2be78c07e Move -fms-compatibility-version=19 into target cflags
This reduces cflags duplication and allows us to build
sanitizer_common/tests with clang and the VS 2015 STL.

llvm-svn: 264017
2016-03-22 01:14:36 +00:00
Reid Kleckner 2ea051e699 [asan] Relax strdup test check lines
On the buildbot, strdup appears as frame 1 instead of frame 0. Either is
an acceptable user experience.

llvm-svn: 264016
2016-03-22 01:04:33 +00:00
Sanjoy Das 38bfc22161 Add "first class" lowering for deopt operand bundles
Summary:
After this change, deopt operand bundles can be lowered directly by
SelectionDAG into STATEPOINT instructions (which are then lowered to a
call or sequence of nop, with an associated __llvm_stackmaps entry0.
This obviates the need to round-trip deoptimization state through
gc.statepoint via RewriteStatepointsForGC.

Reviewers: reames, atrick, majnemer, JosephTremoulet, pgavlin

Subscribers: sanjoy, mcrosier, majnemer, llvm-commits

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

llvm-svn: 264015
2016-03-22 00:59:13 +00:00
Reid Kleckner ea4ae806bb Wrap 81 character line to satisfy linter
llvm-svn: 264014
2016-03-22 00:53:04 +00:00
Reid Kleckner 23d0fde535 [asan] Intercept strdup on Windows
Some unit tests were failing because we didn't intercept strdup.  It
turns out it works just fine on 2013 and 2015 with a small patch to the
interception logic.

llvm-svn: 264013
2016-03-22 00:52:47 +00:00
Siva Chandra f027e130d8 [JITLoaderGDB] Pack the jit entry struct according to the target arch.
Reviewers: clayborg

Subscribers: tberghammer, dsrbecky, lldb-commits

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

llvm-svn: 264012
2016-03-22 00:35:31 +00:00
Reid Kleckner 79d2451cd7 [asan] Also apply r264006 to asan_win_dynamic_runtime_thunk.cc
llvm-svn: 264011
2016-03-22 00:34:53 +00:00
Reid Kleckner c35d402aeb Fix coverage-related asan tests for VS 2015
printf is an inline function in VS 2015, giving these tests an
unexpected extra point of coverage. This change works around that by
avoiding printf.

llvm-svn: 264010
2016-03-22 00:11:51 +00:00
Justin Lebar 717d2b0a0d [CUDA] Implement atomicInc and atomicDec builtins
These functions cannot be implemented as atomicrmw or cmpxchg
instructions, so they are implemented as a call to the NVVM intrinsics
@llvm.nvvm.atomic.load.inc.32.p0i32 and
@llvm.nvvm.atomic.load.dec.32.p0i32.

Patch by Jason Henline.

Reviewers: jlebar

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

llvm-svn: 264009
2016-03-22 00:09:28 +00:00
Justin Lebar e6a2cc12a3 [sema] [CUDA] Use std algorithms in EraseUnwantedCUDAMatchesImpl.
Summary: NFC

Reviewers: tra

Subscribers: cfe-commits

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

llvm-svn: 264008
2016-03-22 00:09:25 +00:00
NAKAMURA Takumi 8794f98e21 Revert r263974, "clang-cl: With -fmsc-version=1900, use MSVS2015 diag formatting."
It seems the test wouldn't expect if default target is *-win32.

llvm-svn: 264007
2016-03-21 23:51:50 +00:00
Reid Kleckner 81f7729c3d [asan] Set the unhandled exception filter slightly later during startup
VS 2015 moved the priority of their exception filter initializer from
XIY to XCAA. We now set ours to XCAB, which makes it run after both CRT
versions but before user constructors, as it should.

Fixes null_deref.cc and a variety of related tests with VS 2015. Only 4
failures remain.

llvm-svn: 264006
2016-03-21 23:51:21 +00:00
Reid Kleckner ed051774ba [asan] Add new _*_base interceptors for VS 2015
There are some places in the CRT (such as mbctype) that directly call
_malloc_base. If you are incrementally linking a binary with ASan from
before this change, this change appears to result in a linker error.
Retrying the link succeeds for some reason.

llvm-svn: 264005
2016-03-21 23:51:17 +00:00
Pete Cooper c0c464cac1 Move ownership of Pass File's to the MachoLinkingContext.
In trying to fix the leaks in the MachO lld codebase, we need to have
a better model for file and atom ownership.  Having the context own
everything seems like the simplest model, so change all the passes to
allocate File's on the context instead of owning files as a member.

llvm-svn: 264004
2016-03-21 23:17:47 +00:00
Mike Aizatsky 602f79275d [sancov] do not instrument nodes that are full pre-dominators
Summary:
Without tree pruning clang has 2,667,552 points.
Wiht only dominators pruning: 1,515,586.
With both dominators & predominators pruning: 1,340,534.

Resubmit of r262103.

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

llvm-svn: 264003
2016-03-21 23:08:16 +00:00
Justin Lebar 32835c82d5 [CUDA] Add documentation explaining how to detect clang vs nvcc.
llvm-svn: 264002
2016-03-21 23:05:15 +00:00
John Thompson 1c158c192a Fixed some cases in the modularize assistant mode where header file names didn't translate to valid module names.
llvm-svn: 264001
2016-03-21 23:05:14 +00:00
Nicolai Haehnle 0a33abdfd2 AMDGPU: Fix dangling references introduced by r263982
Fixes Valgrind errors on the test cases that were reported as failing
by buildbots.

llvm-svn: 264000
2016-03-21 22:54:02 +00:00
Davide Italiano 901de03fe2 [ELF] Simplify code a bit. No functional change.
llvm-svn: 263999
2016-03-21 22:44:24 +00:00
Evgeniy Stepanov 7923ce692e [asan] Add strrchr to asan_win_dll_thunk.
"dll_host.cc" test says there is a mismatch.

llvm-svn: 263998
2016-03-21 22:42:15 +00:00
Chris Bieneman 12fd02db6b [Perf-training] Adding support for tests to skip the clang driver
This patch adds a new set of substitutions to the lit run lines for order files and PGO generation which run the clang driver to get the cc1 command, then execute the cc1 command directly. This allows the scripts to bypass profiling the clang driver over and over again.

The approach in this patch was discussed via IRC with Sean Silvas.

Special thanks to Daniel Dunbar whose out-of-tree code I liberally plagiarized.

llvm-svn: 263997
2016-03-21 22:37:14 +00:00
Richard Smith e9b02d68f4 [modules] Store mangling numbers in a deterministic order so they don't cause the resulting .pcm files to be nondeterministic.
llvm-svn: 263996
2016-03-21 22:33:02 +00:00
Sean Callanan bd4dc69308 Collect IRExecutionUnits as part of persistent expression state.
IRExecutionUnits contain code and data that persistent declarations can
depend on.  In order to keep them alive and provide for lookup of these
symbols, we now allow any PersistentExpressionState to keep a list of
execution units.  Then, when doing symbol lookup on behalf of an 
expression, any IRExecutionUnit can consult the persistent expression
states on a particular Target to find the appropriate symbol.

<rdar://problem/22864976>

llvm-svn: 263995
2016-03-21 22:23:38 +00:00
Simon Pilgrim b57b002253 [InstCombine] Ensure all undef operands are handled before binary instruction constant folding
As noted in PR18355, this patch makes it clear that all cases with undef operands have been handled before further constant folding is attempted.

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

llvm-svn: 263994
2016-03-21 22:15:50 +00:00