Commit Graph

230604 Commits

Author SHA1 Message Date
Vedant Kumar 42369dbc01 [ProfileData] Use SoftInstrProfErrors to count soft errors, NFC
Differential Revision: http://reviews.llvm.org/D20082

llvm-svn: 269222
2016-05-11 19:42:19 +00:00
Simon Pilgrim 6ce35dd9ea [X86][AVX512] Fixed VPERMILPD/VPERMILPS shuffle comments.
Fixed incorrect operands indices used to access src registers

llvm-svn: 269221
2016-05-11 18:53:44 +00:00
Andrey Bokhanko 45d413260e [MSVC] Implementation of __unaligned as a proper type qualifier
This patch implements __unaligned (MS extension) as a proper type qualifier
(before that, it was implemented as an ignored attribute).

It also fixes PR27367 and PR27666.

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

llvm-svn: 269220
2016-05-11 18:38:21 +00:00
Rong Xu 5da4dab0fc Reapply r268608
Re-enable the tests after IR instrumentation fix (r269146).
Check-in on behalf of davidxl.

llvm-svn: 269219
2016-05-11 18:37:08 +00:00
Rafael Espindola 83658d6e7a Return a StringRef from getSection.
This is similar to how getName is handled.

llvm-svn: 269218
2016-05-11 18:21:59 +00:00
Zachary Turner 3f61c1ab5e Fix build breakage in DebugInfoCodeview
llvm-svn: 269217
2016-05-11 17:54:20 +00:00
Zachary Turner ae3882a19a Refactor CodeView type records to use common code.
Differential Revision: http://reviews.llvm.org/D20138
Reviewed By: rnk

llvm-svn: 269216
2016-05-11 17:47:35 +00:00
Justin Bogner c200ad7e3b SDAG: Minor cleanup in X86
Don't bother returning a result we don't use here. I've also renamed
this from selectGather to tryGather to better indicate that it may not
do anything.

llvm-svn: 269215
2016-05-11 17:46:03 +00:00
Reid Kleckner 43be52a59f Relax -Wcalling-convention-cast when casting to the default convention (cdecl)
llvm-svn: 269214
2016-05-11 17:43:13 +00:00
Sanjoy Das 4e8c80382f [SCEVExpander] Fix a failed cast<> assertion
SCEVExpander::replaceCongruentIVs assumes the backedge value of an
SCEV-analysable PHI to always be an instruction, when this is not
necessarily true.  For now address this by bailing out of the
optimization if the backedge value of the PHI is a non-Instruction.

llvm-svn: 269213
2016-05-11 17:41:41 +00:00
Sanjoy Das abb7b93eb9 [SCEVExpander] Don't break SSA in replaceCongruentIVs
`SCEVExpander::replaceCongruentIVs` bypasses `hoistIVInc` if both the
original and the isomorphic increments are PHI nodes.  Doing this can
break SSA if the isomorphic increment is not dominated by the original
increment.  Get rid of the bypass, and let `hoistIVInc` do the right
thing.

Fixes PR27232 (compile time crash/hang).

llvm-svn: 269212
2016-05-11 17:41:34 +00:00
Sanjoy Das 787c2460c2 [SCEV] Be more aggressive around proving no-wrap
... for AddRec's in loops for which SCEV is unable to compute a max
tripcount.  This is not a problem for "normal" loops[0] that don't have
guards or assumes, but helps in cases where we have guards or assumes in
the loop that can be used to constrain incoming values over the backedge.

This partially fixes PR27691 (we still don't handle the NUW case).

[0]: for "normal" loops, in the cases where we'd be able to prove
no-wrap via isKnownPredicate, we'd also be able to compute a max
tripcount.

llvm-svn: 269211
2016-05-11 17:41:26 +00:00
Etienne Bergeron 8311c446fc [clang-tidy] Refactoring of FixHintUtils
Summary:
Refactor some checkers to use the tooling re-writing API.
see: http://reviews.llvm.org/D19941

Reviewers: klimek, alexfh

Subscribers: cfe-commits

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

llvm-svn: 269210
2016-05-11 17:38:22 +00:00
Simon Pilgrim 3016d9e9e1 [X86][SSE] Avoid repeatedly calling MCInst::getNumOperands(). NFCI.
llvm-svn: 269209
2016-05-11 17:36:32 +00:00
Etienne Bergeron e646a833ab [clang-tidy] Add FixIt for swapping arguments in string-constructor-checker.
Summary:
Arguments can be swapped using fixit when they are not in macros.
This is the same implementation than SwappedArguments. Some code 
got lifted to be reused.

Others checks are not safe to be fixed as they tend to be bugs or errors.
It is better to let the user manually review them.

Reviewers: alexfh

Subscribers: cfe-commits

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

llvm-svn: 269208
2016-05-11 17:32:12 +00:00
Jan Vesely 23dcd6e0ab AMDGPU: Split private memory tests
Reenable R600 testing

reviewer: arsenm

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

llvm-svn: 269207
2016-05-11 17:24:45 +00:00
Sanjay Patel 87f6ed6f48 fix typos in comments; NFC
llvm-svn: 269206
2016-05-11 17:00:07 +00:00
Pavel Labath 998bdc5b75 Generalize child process monitoring functions
Summary:
This replaces the C-style "void *" baton of the child process monitoring functions with a more
C++-like API taking a std::function. The motivation for this was that it was very difficult to
handle the ownership of the object passed into the callback function -- each caller ended up
implementing his own way of doing it, some doing it better than others. With the new API, one can
just pass a smart pointer into the callback and all of the lifetime management will be handled
automatically.

This has enabled me to simplify the rather complicated handshake in Host::RunShellCommand. I have
left handling of MonitorDebugServerProcess (my original motivation for this change) to a separate
commit to reduce the scope of this change.

Reviewers: clayborg, zturner, emaste, krytarowski

Subscribers: lldb-commits

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

llvm-svn: 269205
2016-05-11 16:59:04 +00:00
Filipe Cabecinhas 465a5041e9 [NFC] Remove some dead code:
DbgInfoIntrinsic::StripCast() is dead since r79977
The only function that creates Comdat objects seems to be in Module, and always creates them using the default constructor.

llvm-svn: 269204
2016-05-11 16:38:40 +00:00
Dan Gohman 3a5ce733ce [WebAssembl] Implement enough of fast-isel to run the comparison tests.
llvm-svn: 269203
2016-05-11 16:32:42 +00:00
Steven Wu 27fb5227ec Embed bitcode in object file (clang cc1 part)
Summary:
Teach clang to embed bitcode inside bitcode. When -fembed-bitcode cc1
option is used, clang will embed both the input bitcode and cc1
commandline into the bitcode in special sections before compiling to
the object file.  Using -fembed-bitcode-marker will only introduce a
marker in both sections.

Depends on D17390

Reviewers: rsmith

Subscribers: yaron.keren, vsk, cfe-commits

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

llvm-svn: 269202
2016-05-11 16:26:03 +00:00
Reid Kleckner 330fb175d4 Update clang support on recent Haiku
[ Copied from https://llvm.org/bugs/show_bug.cgi?id=26404 ]

clang support on Haiku is lagging a bit, and missing on x86_64.

This patch updates support for x86 and add support for x86_64. It should
apply directly to trunk and it's harmless in the sense that it only
affects Haiku.

Reviewers: rnk, rsmith

Patch by Jérôme Duval

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

llvm-svn: 269201
2016-05-11 16:19:05 +00:00
Krzysztof Parzyszek 338b98fc88 [Hexagon] Avoid spurious failures in test/Driver/hexagon-toolchain-elf.c
llvm-svn: 269200
2016-05-11 16:11:22 +00:00
Vedant Kumar 6b22ba68d9 Use an emplace_back for consistency, NFC
llvm-svn: 269199
2016-05-11 16:03:02 +00:00
Derek Bruening 1658c089fd [esan] EfficiencySanitizer shadow memory
Summary:
Adds shadow memory mapping support common to all tools to the new
Efficiencysanitizer ("esan") family of tools.  This includes:

+ Shadow memory layout and mapping support for 64-bit Linux for any
  power-of-2 scale-down (1x, 2x, 4x, 8x, 16x, etc.) that ensures that
  shadow(shadow(address)) does not overlap shadow or application
  memory.

+ Mmap interception to ensure the application does not map on top of
  our shadow memory.

+ Init-time sanity checks for shadow regions.

+ A test of the mmap conflict mechanism.

Reviewers: aizatsky, filcab

Subscribers: filcab, kubabrecka, llvm-commits, vitalybuka, eugenis, kcc, zhaoqin

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

llvm-svn: 269198
2016-05-11 15:47:54 +00:00
Vedant Kumar ee20294af5 [BasicAA] Compare GEP indices based on value (Fix PR27418)
Equivalent GEP indices with different types are treated as different
indices altogether, leading to an incorrect AA result. Fix the issue
by comparing indices based on their values.

Thanks to Mikael Holmén for reporting the issue!

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

llvm-svn: 269197
2016-05-11 15:45:43 +00:00
Daniel Sanders 45533b4060 [mips][ias] Work around incorrect microMIPS relocation evaluation exposed by r268900
microMIPS has a special case that is not correctly implemented in LLVM. If we
have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an
R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The
in-place addend should therefore be 0x11.

Work around this by partially reverting the effect of r268900 by keeping the
symbol when the STO_MIPS_MICROMIPS flag is set. This fixes
SingleSource/Regression/C/PR640 for microMIPS.

llvm-svn: 269196
2016-05-11 15:44:23 +00:00
Benjamin Kramer 79acc976ea [include-fixer] Always ignore SFINAE contexts.
This could lead to spurious includes being added for identifiers that
are supposed to be not available.

llvm-svn: 269195
2016-05-11 15:33:30 +00:00
Benjamin Kramer 3246fba975 [include-fixer] Also output the location where we found an unknown identifier.
For debugging only, makes it a bit easier when there are queries coming
out of headers.

llvm-svn: 269194
2016-05-11 15:33:28 +00:00
Simon Pilgrim 87d05b9852 [X86][AVX512] Regenerate intrinsics test
llvm-svn: 269193
2016-05-11 15:13:29 +00:00
Krzysztof Parzyszek d559005ec4 [Hexagon] Add a debug option to disable all backend optimizations
llvm-svn: 269192
2016-05-11 15:01:30 +00:00
Krzysztof Parzyszek c2c7868591 [Hexagon] Use offsets relative to FP+8 in .cfi_offset instructions
When generating .cfi_offset instructions, make sure that the offset is
calculated with respect to the register used to define the CFA (which is
currently always FP+8).

llvm-svn: 269191
2016-05-11 14:53:07 +00:00
Artur Pilipenko 7a26326442 NFC. Introduce Value::isPointerDereferenceable
Extract a part of isDereferenceableAndAlignedPointer functionality to Value:
    
Reviewed By: hfinkel, sanjoy
    
Differential Revision: http://reviews.llvm.org/D17611

llvm-svn: 269190
2016-05-11 14:43:28 +00:00
Rafael Espindola 610a4e916e Merge two unreachable cases.
llvm-svn: 269189
2016-05-11 14:41:30 +00:00
Etienne Bergeron 53276d1221 [tooling] FixItHint Tooling refactoring
Summary:
This is the refactoring to lift some FixItHint into tooling.
used by: http://reviews.llvm.org/D19807

Reviewers: klimek, alexfh

Subscribers: cfe-commits

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

llvm-svn: 269188
2016-05-11 14:31:39 +00:00
Omair Javaid 86e0dd5c1c Xfail failing watchpoint tests on aarch64-linux
Some watchpoint tests fail on aarch64-linux as it lacks support for intalling watchpoints which are not alligned at 8bytes boundary.

Marking them as xfail for now. 

llvm-svn: 269187
2016-05-11 13:57:20 +00:00
Simon Pilgrim 02699f3f3d [X86] Regenerate shuffle test
llvm-svn: 269186
2016-05-11 13:57:15 +00:00
Rafael Espindola 4787ba390e Refactor duplicated check for valid declaration linkage. NFC.
llvm-svn: 269184
2016-05-11 13:51:39 +00:00
George Rimar fa91000290 [ELF] implemented -z defs option
Just do not allow to link shared library if there are
undefined symbols.

This fixes PR27447

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

llvm-svn: 269183
2016-05-11 13:48:41 +00:00
Rafael Espindola cc8900f66c Delete duplicated verifier test.
Also add unittest to show we still detect the errors.

llvm-svn: 269182
2016-05-11 13:23:52 +00:00
Sagar Thakur 477eb42f85 [LLDB][MIPS] Setting appropriate ArchSpec::m_flags based on ABI
Patch by Nitesh Jain.

Summary: The ArchSpec::m_flags will be set based on ELF flag ABI.

Reviewers: ovyalov, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, jaydeep, bhushan
Differential: D18858
llvm-svn: 269181
2016-05-11 13:08:29 +00:00
Daniel Sanders 10e6cefd82 [mips][ias] Fix missing header that should have been in r269179
llvm-svn: 269180
2016-05-11 13:04:22 +00:00
Daniel Sanders df8510d4fa [mips][ias] Fix N32 and N64 .cprestore directive when inside .set noat region.
Summary:
r268058 unintentionally made the retrieval of the current assembler temporary
unconditional. This was fine for the existing tests but it broke the cases
where the assembler temporary is not needed (N32/N64 or not PIC) and is
unavailable due to a '.set noat' directive.

This fixes FreeBSD's libc.

Reviewers: emaste, sdardis, seanbruno

Subscribers: dsanders, emaste, sdardis, llvm-commits

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

llvm-svn: 269179
2016-05-11 12:48:19 +00:00
Rafael Espindola 8b4b8c28c2 Try to fix a msvc warning.
llvm-svn: 269178
2016-05-11 12:37:16 +00:00
Haojian Wu 2d07ed4530 [include-fixer] Add lit-test for relative include path.
Reviewers: bkramer

Subscribers: cfe-commits

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

llvm-svn: 269177
2016-05-11 12:30:45 +00:00
Hrvoje Varga 52c9bed858 [mips][microMIPS] Implement CFC*, CTC* and LDC* instructions
Differential Revision: http://reviews.llvm.org/D19713

llvm-svn: 269176
2016-05-11 12:12:24 +00:00
Rafael Espindola ea7f539a54 clang-format LLToken.h.
Having it be special is quite annoying for being able to just run
git-clang-format in patches that change it.

llvm-svn: 269175
2016-05-11 12:07:32 +00:00
Simon Pilgrim 41c05c019e [X86][AVX512] Updated shuffle comments instruction macros to split writemask instructions. NFC
This will make it easier to support the different writemask cases in shuffle comments

llvm-svn: 269174
2016-05-11 11:55:12 +00:00
Haojian Wu 075ba119b2 [find-all-symbols] Save relative file path for each symbol.
Summary:
The HeaderSearch::suggestPathToFileForDiagnostics used in include-fixer
doesn't work well with absolute file path, it assumes a relative file
path based on header searching path.

So saving relative file path to make include-fixer get the most
appropriate header path.

Reviewers: bkramer

Subscribers: cfe-commits

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

llvm-svn: 269173
2016-05-11 11:50:08 +00:00
Michael Zuckerman 13d3c002df [clang][AVX512] completing missing set intrinsics
Differential Revision: http://reviews.llvm.org/D20099

llvm-svn: 269172
2016-05-11 11:41:29 +00:00