Alex Lorenz [Wed, 26 Apr 2017 13:09:28 +0000 (13:09 +0000)]
-Wdocumentation should not check the @returns command for Objective-C
function/block pointer properties
The commit r300981 allowed @param/@return commands for function/block
pointer property declarations. This meant that -Wdocumentation started warning
about @return that was used to document properties whose function/block type
returned void. However, prior to that commit, we allowed @return for all
property declarations, because it can be used to document the value that's
returned by the property getter. This commit restores the previous behaviour:
now the @return command can be used to document all properties without warnings.
rdar://
24978538
llvm-svn: 301402
Simon Pilgrim [Wed, 26 Apr 2017 13:03:00 +0000 (13:03 +0000)]
[X86] Added pointer math zext test case (PR22970)
llvm-svn: 301401
Alex Lorenz [Wed, 26 Apr 2017 12:46:27 +0000 (12:46 +0000)]
[AST] Look through attribute type locs when searching for function type
loc
Prior to this commit -Wdocumentation crashed when checking the @returns command
for declarations whose function/block pointer type included an attribute like
_Nullable.
rdar://
31818195
llvm-svn: 301400
Martin Probst [Wed, 26 Apr 2017 12:36:49 +0000 (12:36 +0000)]
clang-format: [JS/Java] ignore Objective-C constructs in JS & Java.
Summary:
Java and JavaScript support annotations and decorators, respectively, that use a leading "@" token. clang-format currently detects this as an Objective-C construct and applies special formatting, for example no whitespace around "=" operators. This change disables the distinction for Java and JavaScript, which leads to normal formatting of single line annotated and initialized properties.
Before:
class X {
@foo() bar=false;
}
After:
class X {
@foo() bar = false;
}
Reviewers: djasper, bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D32532
llvm-svn: 301399
Martin Probst [Wed, 26 Apr 2017 12:34:18 +0000 (12:34 +0000)]
formatting
llvm-svn: 301398
Martin Probst [Wed, 26 Apr 2017 12:34:15 +0000 (12:34 +0000)]
clang-format: [JS] prevent wraps before class members.
Summary: In JavaScript/TypeScript, class member definitions that use modifiers can be subject to Automatic Semicolon Insertion (ASI). For example, "class X { get \n foo }" defines a property called "get" and a property called "foo", both with no type annotation. This change prevents wrapping after the modifier keywords (visibility modifiers, static, get and set) to prevent accidental ASI.
Reviewers: djasper, bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D32531
llvm-svn: 301397
Simon Pilgrim [Wed, 26 Apr 2017 12:23:32 +0000 (12:23 +0000)]
[X86][SSE] Add test case for repeated vector insertions of the same element (PR15298)
llvm-svn: 301396
Filipe Cabecinhas [Wed, 26 Apr 2017 12:02:41 +0000 (12:02 +0000)]
Simplify the CFG after loop pass cleanup.
Summary:
Otherwise we might end up with some empty basic blocks or
single-entry-single-exit basic blocks.
This fixes PR32085
Reviewers: chandlerc, danielcdh
Subscribers: mehdi_amini, RKSimon, llvm-commits
Differential Revision: https://reviews.llvm.org/D30468
llvm-svn: 301395
Sagar Thakur [Wed, 26 Apr 2017 11:40:12 +0000 (11:40 +0000)]
[mips] Fix test mips64fpldst.ll with machine verifier enabled
Removed micro mips register classes for gp initialization because gp initialization uses pure mips64 instruction. Even when compiling for micro mips, gp initialization can be done with pure mips64 instructions.
Reviewed by Simon Dardis
Differential: D32286
llvm-svn: 301394
Ayman Musa [Wed, 26 Apr 2017 11:34:09 +0000 (11:34 +0000)]
[X86] Add missing mayLoad/mayStore attributes to some X86 instructions (Continue)
Complete the patch committed in rL300190.
Differential Revision: https://reviews.llvm.org/D32287
llvm-svn: 301393
Simon Dardis [Wed, 26 Apr 2017 11:10:38 +0000 (11:10 +0000)]
[mips] Rework a portion of MipsCC interface. (NFC)
r299766 contained a "conditional move or jump depends on uninitialized value"
fault, identified by valgrind. This occurred as MipsFastISel::finishCall(..)
used CCState over MipsCCState. The latter is required for the TableGen'd calling
convention logic due to reliance on pre-analyzing type information to lower call
results/returns of vectors correctly.
This change modifies the MipsCC AnalyzeCallResult to be useful with both the
SelectionDAG and FastISel lowering logic.
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D32004
llvm-svn: 301392
George Rimar [Wed, 26 Apr 2017 10:40:02 +0000 (10:40 +0000)]
[ELF] - Implemented --defsym option.
gnu ld description of option is:
--defsym=symbol=expression
Create a global symbol in the output file, containing the absolute address given
by expression. You may use this option as many times as necessary to define multiple
symbols in the command line. A limited form of arithmetic is supported for the
expression in this context: you may give a hexadecimal constant or the name of an
existing symbol, or use "+" and "-" to add or subtract hexadecimal constants or
symbols. If you need more elaborate expressions, consider using the linker command
language from a script. Note: there should be no white space between symbol,
the equals sign ("="), and expression.
In compare with D32082, this patch does not support math expressions and absolute
symbols. It implemented via code similar to --wrap. That covers 1 of 3 possible
--defsym cases.
Differential revision: https://reviews.llvm.org/D32171
llvm-svn: 301391
Andrew V. Tischenko [Wed, 26 Apr 2017 09:56:59 +0000 (09:56 +0000)]
PR31007 and PR27884 will be closed: a possibility to compile constants like 0bH is now supported in MS asm.
llvm-svn: 301390
Ravitheja Addepally [Wed, 26 Apr 2017 08:48:50 +0000 (08:48 +0000)]
Initial implementation of SB APIs for Tracing support.
Summary:
This patch introduces new SB APIs for tracing support
inside LLDB. The idea is to gather trace data from
LLDB and provide it through this APIs to external
tools integrating with LLDB. These tools will be
responsible for interpreting and presenting the
trace data to their users.
The patch implements the following new SB APIs ->
-> StartTrace - starts tracing with given parameters
-> StopTrace - stops tracing.
-> GetTraceData - read the trace data .
-> GetMetaData - read the meta data assosciated with the trace.
-> GetTraceConfig - read the trace configuration
Tracing is associated with a user_id that is returned
by the StartTrace API and this id needs to be used
for accessing the trace data and also Stopping
the trace. The user_id itself may map to tracing
the complete process or just an individual thread.
The APIs require an additional thread parameter
when the user of these APIs wishes to perform
thread specific manipulations on the tracing instances.
The patch also includes the corresponding
python wrappers for the C++ based APIs.
Reviewers: k8stone, lldb-commits, clayborg
Reviewed By: clayborg
Subscribers: jingham, mgorny
Differential Revision: https://reviews.llvm.org/D29581
llvm-svn: 301389
Michal Gorny [Wed, 26 Apr 2017 07:35:36 +0000 (07:35 +0000)]
[test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is on
Cover the sanitizer tests with COMPILER_RT_BUILD_SANITIZERS
conditional, and add COMPILER_RT_BUILD_XRAY conditional to the xray
tests. This makes it possible to do a pure-builtins build with tests
enabled.
Differential Revision: https://reviews.llvm.org/D32489
llvm-svn: 301387
Ayman Musa [Wed, 26 Apr 2017 07:08:44 +0000 (07:08 +0000)]
[X86][SSE2] Fix asm string for movq (Move Quadword) instruction.
Replace "mov{d|q}" with "movq".
Differential Revision: https://reviews.llvm.org/D32220
llvm-svn: 301386
Craig Topper [Wed, 26 Apr 2017 05:59:19 +0000 (05:59 +0000)]
[InstCombine] Add test cases for opportunities to improve knownbits handling for cttz and ctlz intrinsics.
llvm-svn: 301385
Leslie Zhai [Wed, 26 Apr 2017 05:33:14 +0000 (05:33 +0000)]
[analyzer] Teach the MallocChecker about Glib API for two arguments
Reviewers: zaks.anna, NoQ, danielmarjamaki
Reviewed By: zaks.anna, NoQ, danielmarjamaki
Subscribers: cfe-commits, kalev, pwithnall
Differential Revision: https://reviews.llvm.org/D30771
llvm-svn: 301384
Michael Liao [Wed, 26 Apr 2017 05:27:20 +0000 (05:27 +0000)]
Remove tailing whitespaces.
llvm-svn: 301383
Bruno Cardoso Lopes [Wed, 26 Apr 2017 05:06:20 +0000 (05:06 +0000)]
[Modules][ObjC] Check definition from canonical decl on designated initializers
Use definition from canonical decl when checking for designated
initializers. This is necessary since deserialization of a interface
might reuse the definition from the canonical one (see r281119).
rdar://problem/
29360655
llvm-svn: 301382
Daniel Berlin [Wed, 26 Apr 2017 04:10:02 +0000 (04:10 +0000)]
InstructionSimplify: Use braced initializer list for SimplifyQuery creation
llvm-svn: 301381
Daniel Berlin [Wed, 26 Apr 2017 04:10:00 +0000 (04:10 +0000)]
InstructionSimplify: Have SimplifyFPBinOp pass FastMathFlags by value, like we do everywhere else
llvm-svn: 301380
Daniel Berlin [Wed, 26 Apr 2017 04:09:56 +0000 (04:09 +0000)]
InstructionSimplify: End our long national nightmare of ever-growing Simplify* arguments.
Summary:
Expose the internal query structure, start using it.
Note: This is the most minimal change possible i could create. I have
trivial followups, like fixing the one use of const FastMathFlags &,
the renaming of CtxI to be consistent, etc.
This should be NFC.
Reviewers: majnemer, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32448
llvm-svn: 301379
Dean Michael Berris [Wed, 26 Apr 2017 03:49:49 +0000 (03:49 +0000)]
[XRay][tools] Remove wayward semicolon (NFC)
Follow-up to D29320.
llvm-svn: 301378
Vedant Kumar [Wed, 26 Apr 2017 02:17:21 +0000 (02:17 +0000)]
[ubsan] Skip alignment checks on allocas with known alignment
It's possible to determine the alignment of an alloca at compile-time.
Use this information to skip emitting some runtime alignment checks.
Testing: check-clang, check-ubsan.
This significantly reduces the amount of alignment checks we emit when
compiling X86ISelLowering.cpp. Here are the numbers from patched/unpatched
clangs based on r301361.
------------------------------------------
| Setup | # of alignment checks |
------------------------------------------
| unpatched, -O0 | 47195 |
| patched, -O0 | 30876 | (-34.6%)
------------------------------------------
llvm-svn: 301377
Dean Michael Berris [Wed, 26 Apr 2017 01:35:23 +0000 (01:35 +0000)]
[XRay][tools] Fixup definition for stat division.
Copy-pasta error.
Follow-up to D29320.
llvm-svn: 301376
Davide Italiano [Wed, 26 Apr 2017 01:00:52 +0000 (01:00 +0000)]
[AMDGPU] Garbage collect dead code. NFCI.
llvm-svn: 301375
Evgeniy Stepanov [Wed, 26 Apr 2017 00:51:06 +0000 (00:51 +0000)]
[asan] Unconditionally enable GC of globals on COFF.
This change restores pre-r301225 behavior, where linker GC compatible global
instrumentation was used on COFF targets disregarding -f(no-)data-sections and/or
/Gw flags.
This instrumentation puts each global in a COMDAT with an ASan descriptor for that global.
It effectively enables -fdata-sections, but limits it to ASan-instrumented globals.
llvm-svn: 301374
Ahmed Bougacha [Wed, 26 Apr 2017 00:48:28 +0000 (00:48 +0000)]
[Support] Avoid UB in sys::fs::perms::operator~. NFC.
This was exposed in r297945 and r301220: the intermediate complement
is a 32-bit value, and casting it to 'perms' invokes UB.
llvm-svn: 301373
Vadzim Dambrouski [Wed, 26 Apr 2017 00:33:59 +0000 (00:33 +0000)]
[MSP430] Fix PR32769: Select8 and Select16 need to have SR in Uses.
If Select pseudo instruction doesn't have use SR, then
CMP instructions are being marked as dead and later can be
removed by MachineCSE pass. This leads to incorrect code
generation.
Differential Revision: https://reviews.llvm.org/D32473
llvm-svn: 301372
Vedant Kumar [Wed, 26 Apr 2017 00:16:10 +0000 (00:16 +0000)]
[gcov] Sort file info before printing it
The order in which GCOV file info is printed depends on the string hash
function. This makes some GCOV tests brittle, because the tests must be
updated whenever the hash function changes.
Sort the filenames before printing out the file info to solve the
problem. This should be relatively cheap.
Differential Revision: https://reviews.llvm.org/D32512
llvm-svn: 301371
Sam Clegg [Wed, 26 Apr 2017 00:02:39 +0000 (00:02 +0000)]
revert debugging
llvm-svn: 301370
Sam Clegg [Wed, 26 Apr 2017 00:02:31 +0000 (00:02 +0000)]
[WebAssembly] Allow for signed relocation addends
Summary:
Addends are used as offsets to addresses of globals
and can be both positive and negative. This change
prints libObject in line with the spec and the MC
layer.
Subscribers: jfb, dschuff
Differential Revision: https://reviews.llvm.org/D32507
llvm-svn: 301369
Dylan McKay [Tue, 25 Apr 2017 23:58:20 +0000 (23:58 +0000)]
[AVR] Do not kill the dest register for a pseudo instruction
It caused the register to later be dead, which would trigger a verifier
error.
llvm-svn: 301368
Matt Arsenault [Tue, 25 Apr 2017 23:40:57 +0000 (23:40 +0000)]
AMDGPU: Shift down reserved SP register like scratch wave offset
llvm-svn: 301367
Sanjay Patel [Tue, 25 Apr 2017 23:33:28 +0000 (23:33 +0000)]
[DAG] fix formatting of isConstantSplat(); NFC
llvm-svn: 301366
Jakub Kuderski [Tue, 25 Apr 2017 22:38:39 +0000 (22:38 +0000)]
[clang-tidy] run-clang-tidy.py: check if clang-apply-replacements succeeds
Summary:
When running run-clang-tidy.py with -fix it tries to apply found replacements at the end.
If there are errors running clang-apply-replacements, the script currently crashes or displays no error at all.
This patch checks for errors running clang-apply-replacements the same way clang-tidy binary is handled.
Another option would be probably checking for clang-apply-replacements (when -fix is passed) even before running clang-tidy.
Reviewers: Prazek, alexfh, bkramer, mfherbst
Reviewed By: Prazek, alexfh
Subscribers: kimgr, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D32294
llvm-svn: 301365
Krzysztof Parzyszek [Tue, 25 Apr 2017 21:31:55 +0000 (21:31 +0000)]
[Hexagon] Handle -O4 when checking optimization level
llvm-svn: 301364
Matt Arsenault [Tue, 25 Apr 2017 21:17:38 +0000 (21:17 +0000)]
AMDGPU: Clean up VOP3NoMods pattern
There is no need to copy the operands or inspect the sources.
Also remove some unnecessary clamp/omod usage.
llvm-svn: 301363
Sanjay Patel [Tue, 25 Apr 2017 20:56:14 +0000 (20:56 +0000)]
[x86] add more tests for potential change in bool math folding; NFC
Also, use AVX2 to show a potential difference for 256-bit vectors.
llvm-svn: 301362
Krzysztof Parzyszek [Tue, 25 Apr 2017 20:51:51 +0000 (20:51 +0000)]
[Hexagon] Set -ffp-contract=fast at -O3 unless explicitly specified
llvm-svn: 301361
Konstantin Zhuravlyov [Tue, 25 Apr 2017 20:38:26 +0000 (20:38 +0000)]
AMDGPU: Fix ValueKind code object metadata for images
Differential Revision: https://reviews.llvm.org/D32504
llvm-svn: 301360
Sanjay Patel [Tue, 25 Apr 2017 20:30:08 +0000 (20:30 +0000)]
[x86] regenerate checks; NFC
llvm-svn: 301359
Zachary Turner [Tue, 25 Apr 2017 20:22:29 +0000 (20:22 +0000)]
[llvm-pdbdump] Allow sorting / filtering by immediate padding
llvm-svn: 301358
Zachary Turner [Tue, 25 Apr 2017 20:22:02 +0000 (20:22 +0000)]
[llvm-pdbdump] Dump File / Line Info to YAML.
We were already parsing and dumping this to the human readable
format, but not to the YAML format. This does so, in preparation
for reading it in and reconstructing the line information from
YAML.
llvm-svn: 301357
Zachary Turner [Tue, 25 Apr 2017 20:21:35 +0000 (20:21 +0000)]
[StringExtras] Add a fromHex to complement toHex.
We already have a function toHex that will convert a string like
"\xFF\xFF" to the string "FFFF", but we do not have one that goes
the other way - i.e. to convert a textual string representing a
sequence of hexadecimal characters into the corresponding actual
bytes. This patch adds such a function.
llvm-svn: 301356
Rui Ueyama [Tue, 25 Apr 2017 19:55:28 +0000 (19:55 +0000)]
Attempt to fix a Windows bot.
Looks like `echo "{_start;};"` on lld-x86_64-win7 bot echoes `_start;;`
for some reason. I cannot reproduce the issue locally. I suspect that
it might be interpreting {<word>} in a special way. This patch is to
attempt to fix it by appending space characters.
llvm-svn: 301353
Matthias Braun [Tue, 25 Apr 2017 19:44:25 +0000 (19:44 +0000)]
SimplifyLibCalls: Fix crash on memset(notmalloc())
rdar://
31520787
llvm-svn: 301352
Adrian Prantl [Tue, 25 Apr 2017 19:40:53 +0000 (19:40 +0000)]
Fix an assertion when skipping stack values in DWARF2 mode.
The fix consists of resetting LocationKind when addMachineRegExpression fails.
rdar://problem/
31803010
llvm-svn: 301351
Frederich Munch [Tue, 25 Apr 2017 19:04:19 +0000 (19:04 +0000)]
[builtins] Implement emulated TLS on Windows.
Summary:
LLVM JIT needs to be able to use emulated TLS on all platforms, and this provides a reference one can compile to enable emutls for Linux/Mac/Windows.
Reviewers: chh, howard.hinnant
Reviewed By: chh
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D30787
llvm-svn: 301350
Jonathan Peyton [Tue, 25 Apr 2017 19:04:07 +0000 (19:04 +0000)]
Fix Hwloc API Incompatibility
Older Hwloc libraries (< 1.10.0) don't offer the HWLOC_OBJ_NUMANODE nor
HWLOC_OBJ_PACKAGE types. Instead they are named HWLOC_OBJ_NODE and
HWLOC_OBJ_SOCKET instead. This patch just defines the newer names based on
the older names when using an older Hwloc.
Differential Revision: https://reviews.llvm.org/D32496
llvm-svn: 301349
Carlo Bertolli [Tue, 25 Apr 2017 18:59:37 +0000 (18:59 +0000)]
Minor fix for distribute_parallel_for_num_threads_codegen on AARCH64
llvm-svn: 301348
Petr Hosek [Tue, 25 Apr 2017 18:56:33 +0000 (18:56 +0000)]
[llvm-objdump] Don't attempt to print lines beyond the end of file
This may trigger a segfault in llvm-objdump when the line number stored
in debug infromation points beyond the end of file; lines in LineBuffer
are stored in std::vector which is allocated in chunks, so even if the
debug info points beyond the end of the file, this doesn't necessarily
trigger the segfault unless the line number points beyond the allocated
space.
Differential Revision: https://reviews.llvm.org/D32466
llvm-svn: 301347
Krzysztof Parzyszek [Tue, 25 Apr 2017 18:56:14 +0000 (18:56 +0000)]
[Hexagon] Only increment debug counters if debug option is present
llvm-svn: 301346
Gil Rapaport [Tue, 25 Apr 2017 18:14:24 +0000 (18:14 +0000)]
[LV] Make LIT test insensitive to basic block numbering
This patch is part of D28975's breakdown.
induction.ll encodes the specific (and rather arbitrary) numbers given to
predicated basic blocks by the unique naming mechanism, which makes it
sensitive to changes in LV's instruction generation order. This patch replaces
those specific numbers with a numeric pattern.
Differential Revision: https://reviews.llvm.org/D32404
llvm-svn: 301345
Davide Italiano [Tue, 25 Apr 2017 18:04:31 +0000 (18:04 +0000)]
[PGO/tests] Update comment to reflect reality.
llvm-svn: 301344
Stanislav Mekhanoshin [Tue, 25 Apr 2017 18:00:08 +0000 (18:00 +0000)]
Skip bitcasts while looking for GEP in LoadStoreVectorizer
Differential Revisison: https://reviews.llvm.org/D32101
llvm-svn: 301343
Simon Pilgrim [Tue, 25 Apr 2017 18:00:04 +0000 (18:00 +0000)]
[X86][AVX2] Add shuffle test for PR27320 showing current codegen.
llvm-svn: 301342
Craig Topper [Tue, 25 Apr 2017 17:54:12 +0000 (17:54 +0000)]
[InstCombine] Remove redundant code from SimplifyUsingDistributiveLaws
The code I've removed here exists in ExpandBinOp in InstSimplify which we call into before SimplifyUsingDistributiveLaws. The code in InstSimplify looks to have been copied from here.
I verified this code doesn't fire on any lit tests. Not that that proves its definitely dead.
Differential Revision: https://reviews.llvm.org/D32472
llvm-svn: 301341
Carlo Bertolli [Tue, 25 Apr 2017 17:52:12 +0000 (17:52 +0000)]
Recommit of
[OpenMP] Initial implementation of code generation for pragma 'distribute parallel for' on host
https://reviews.llvm.org/D29508
This patch makes the following additions:
It abstracts away loop bound generation code from procedures associated with pragma 'for' and loops in general, in such a way that the same procedures can be used for 'distribute parallel for' without the need for a full re-implementation.
It implements code generation for 'distribute parallel for' and adds regression tests. It includes tests for clauses.
It is important to notice that most of the clauses are implemented as part of existing procedures. For instance, firstprivate is already implemented for 'distribute' and 'for' as separate pragmas. As the implementation of 'distribute parallel for' is based on the same procedures, then we automatically obtain implementation for such clauses without the need to add new code. However, this requires regression tests that verify correctness of produced code.
llvm-svn: 301340
Davide Italiano [Tue, 25 Apr 2017 17:48:10 +0000 (17:48 +0000)]
[PGO] Update test now that we don't call IndirectCallPromotion.
llvm-svn: 301339
Craig Topper [Tue, 25 Apr 2017 17:46:30 +0000 (17:46 +0000)]
[APInt] Use isSubsetOf, intersects, and bit counting methods to reduce temporary APInts
This patch uses various APInt methods to reduce temporary APInt creation.
This should be all of the unrelated cleanups that got buried in D32376(creating a KnownBits struct) as well as some pointed out by Simon during the review of that. Plus a few improvements to use counting instead of masking.
I've left out any places where we do something like (KnownZero & KnownOne) != 0 as I plan to add a helper method to KnownBits to ask that question and didn't want to thrash that code an additional time.
Differential Revision: https://reviews.llvm.org/D32495
llvm-svn: 301338
Craig Topper [Tue, 25 Apr 2017 17:40:58 +0000 (17:40 +0000)]
[InstCombine] Fix CHECK-LABEL in two tests.
llvm-svn: 301337
Rui Ueyama [Tue, 25 Apr 2017 17:40:12 +0000 (17:40 +0000)]
Make it explicit that -export-dynamic overrides -dynamic-list and -export-dynamic-symbol.
No functionality change.
llvm-svn: 301336
Alex Shlyapnikov [Tue, 25 Apr 2017 17:24:27 +0000 (17:24 +0000)]
[lsan] When necessary, define LSan suppression for pthread_exit.
Summary:
Generalize already defined LSan suppression for the leak on
pthread_exit, some envs do not have the entire call stack symbolized,
so we have to be less specific.
Reviewers: eugenis
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32497
llvm-svn: 301335
Simon Pilgrim [Tue, 25 Apr 2017 17:22:34 +0000 (17:22 +0000)]
[X86][SSE] Add tests for PR14657 showing current codegen.
llvm-svn: 301334
Adrian Prantl [Tue, 25 Apr 2017 17:22:09 +0000 (17:22 +0000)]
Print complete DIExpressions in the assembler output DEBUG_VALUE comments.
The previous code was complex, incorrect, and couldn't print everything.
llvm-svn: 301333
Rui Ueyama [Tue, 25 Apr 2017 17:19:15 +0000 (17:19 +0000)]
Add a test for ICF and REL relocations.
llvm-svn: 301332
Sam Clegg [Tue, 25 Apr 2017 17:13:23 +0000 (17:13 +0000)]
[WebAssembly] Fix relocation count in wasm binaries with call_indirect
Subscribers: jfb, dschuff
Differential Revision: https://reviews.llvm.org/D32459
llvm-svn: 301331
Sam Clegg [Tue, 25 Apr 2017 17:11:56 +0000 (17:11 +0000)]
[WebAssembly] Read global index in init expression as LEB
Subscribers: jfb, dschuff
Differential Revision: https://reviews.llvm.org/D32462
llvm-svn: 301330
Craig Topper [Tue, 25 Apr 2017 17:01:32 +0000 (17:01 +0000)]
[InstSimplify] Handle (~A & ~B) | (~A ^ B) -> ~A ^ B
The code Sanjay Patel moved over from InstCombine doesn't work properly if the 'and' has both inputs as nots because we used a commuted op matcher on the 'and' first. But this will bind to the first 'not' on 'and' when there could be two 'not's. InstCombine could rely on DeMorgan to ensure the 'and' wouldn't have two 'not's eventually, but InstSimplify can't rely on that.
This patch matches the xor first then checks for the ands and allows a not of either operand of the xor.
Differential Revision: https://reviews.llvm.org/D32458
llvm-svn: 301329
Alex Lorenz [Tue, 25 Apr 2017 16:59:07 +0000 (16:59 +0000)]
[libclang] Check for a record declaration before a template specialization
Fixes PR32539.
Patch by Emilio Cobos Álvarez!
Differential Revision: https://reviews.llvm.org/D32348
llvm-svn: 301328
Davide Italiano [Tue, 25 Apr 2017 16:54:45 +0000 (16:54 +0000)]
[PM] Run IndirectCallPromotion only when PGO is enabled.
Differential Revision: https://reviews.llvm.org/D32465
llvm-svn: 301327
Craig Topper [Tue, 25 Apr 2017 16:48:19 +0000 (16:48 +0000)]
[InstCombine] Remove superfluous curly braces around a single line if body. NFC
llvm-svn: 301326
Craig Topper [Tue, 25 Apr 2017 16:48:14 +0000 (16:48 +0000)]
[ValueTracking] Use APInt::operator|=(uint64_t) instead of creating a temporary APInt. NFC
llvm-svn: 301325
Craig Topper [Tue, 25 Apr 2017 16:48:09 +0000 (16:48 +0000)]
[ValueTracking] Use APInt instead of auto. NFC
This is a pre-commit for a patch I'm working on to turn KnownZero/One into a struct. Once I do that the type here will be less obvious.
llvm-svn: 301324
Craig Topper [Tue, 25 Apr 2017 16:48:03 +0000 (16:48 +0000)]
[ValueTracking] Use BitWidth local variable instead of re-reading it from KnownZero. NFC
This is a pre-commit for a patch that I'm working on to merge KnownZero/KnownOne into a KnownBits struct which would have had to touch this line.
llvm-svn: 301323
Simon Pilgrim [Tue, 25 Apr 2017 16:41:28 +0000 (16:41 +0000)]
[SelectionDAG] Added getBuildVector(ArrayRef<SDUse>) helper.
llvm-svn: 301322
George Rokos [Tue, 25 Apr 2017 16:34:13 +0000 (16:34 +0000)]
[OpenMP] Optimized default kernel launch parameters in CUDA plugin
Differential Revision: https://reviews.llvm.org/D32321
llvm-svn: 301321
Simon Pilgrim [Tue, 25 Apr 2017 16:16:03 +0000 (16:16 +0000)]
[DAGCombiner] Refactor to make it easy to add support for vectors in a future patch. NFCI.
llvm-svn: 301320
Rui Ueyama [Tue, 25 Apr 2017 16:00:44 +0000 (16:00 +0000)]
[ELF] Improve error message for incompatible section flags
Previously we were not printing out the flags of the incompatible
section which made it difficult to determine what the problem was.
The error message format has been change to the following:
error: incompatible section flags for .bar
>>> /foo/bar/incompatible-section-flags.s.tmp.o:(.bar): 0x403
>>> output section .bar: 0x3
Patch by Alexander Richardson.
Differential Revision: https://reviews.llvm.org/D32484
llvm-svn: 301319
George Rokos [Tue, 25 Apr 2017 15:55:39 +0000 (15:55 +0000)]
[OpenMP] Add missing parenthesis which triggers a compile error
Differential Revision: https://reviews.llvm.org/D32490
llvm-svn: 301318
Andrew Ng [Tue, 25 Apr 2017 15:39:57 +0000 (15:39 +0000)]
Resubmit r301309: [DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler.
This patch reapplies r301309 with the fix to the MIR test to fix the assertion
triggered by r301309. Had trimmed a little bit too much from the MIR!
llvm-svn: 301317
Craig Topper [Tue, 25 Apr 2017 15:19:04 +0000 (15:19 +0000)]
[InstCombine] Add missing commute handling to (A | B) & (B ^ (~A)) -> (A & B)
The matching here wasn't able to handle all the possible commutes. It always assumed the not would be on the left of the xor, but that's not guaranteed.
Differential Revision: https://reviews.llvm.org/D32474
llvm-svn: 301316
Alex Lorenz [Tue, 25 Apr 2017 15:13:42 +0000 (15:13 +0000)]
[index] Index type source info for class specializations
rdar://
31758344
llvm-svn: 301315
Simon Pilgrim [Tue, 25 Apr 2017 15:10:47 +0000 (15:10 +0000)]
[SelectionDAG] Use getBuildVector helper where possible. NFCI
llvm-svn: 301314
Dylan McKay [Tue, 25 Apr 2017 15:09:04 +0000 (15:09 +0000)]
[AVR] Support the LDWRdPtr instruction with the same Src+Dst register
llvm-svn: 301313
Andrew Ng [Tue, 25 Apr 2017 14:36:01 +0000 (14:36 +0000)]
Revert "[DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler."
This reverts commit r301309 which is causing buildbot assertion failures.
llvm-svn: 301312
Daniel Sanders [Tue, 25 Apr 2017 14:27:27 +0000 (14:27 +0000)]
Bring back the ability opt out of padding zero-byte functions by not providing a nop instruction.
Summary: No test case since I'm not aware of an in-tree target that needs this.
Reviewers: hans
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32398
llvm-svn: 301311
Alex Lorenz [Tue, 25 Apr 2017 14:22:29 +0000 (14:22 +0000)]
[index] Record the 'SpecializationOf' relation for function specializations
rdar://
31603531
llvm-svn: 301310
Andrew Ng [Tue, 25 Apr 2017 13:39:49 +0000 (13:39 +0000)]
[DebugInfo][X86] Fix handling of DBG_VALUE's in post-RA scheduler.
This patch fixes a bug with the updating of DBG_VALUE's in
BreakAntiDependencies. Previously, it would only attempt to update the first
DBG_VALUE following the instruction whose register is being changed,
potentially leaving DBG_VALUE's referring to the wrong register. Now the code
will update all DBG_VALUE's that immediately follow the instruction.
This issue was detected as a result of an optimized codegen difference with
"-g" where an X86 byte/word fixup was not performed due to a DBG_VALUE
referencing the wrong register.
Differential Revision: https://reviews.llvm.org/D31755
llvm-svn: 301309
Simon Pilgrim [Tue, 25 Apr 2017 13:39:07 +0000 (13:39 +0000)]
[SelectionDAG] Pull out repeated getValueType calls. NFCI.
Noticed in D32391.
llvm-svn: 301308
Nitesh Jain [Tue, 25 Apr 2017 13:25:40 +0000 (13:25 +0000)]
[Compiler-rt][MIPS] Fix assert introduce with commit rl301171.
llvm-svn: 301307
Pavel Labath [Tue, 25 Apr 2017 12:58:49 +0000 (12:58 +0000)]
Remove the home-grown android toolchain file and all references to it
Summary:
The toolchain file has been deprecated in favor of the "official"
toolchain file present in the Android NDK. Also update the web
build instructions to reflect this.
Reviewers: eugene
Subscribers: srhines, mgorny, dgross, tberghammer, lldb-commits
Differential Revision: https://reviews.llvm.org/D32441
llvm-svn: 301306
Simon Pilgrim [Tue, 25 Apr 2017 12:40:45 +0000 (12:40 +0000)]
[DAGCombiner] Add vector support for (srl (trunc (srl x, c1)), c2) combine.
llvm-svn: 301305
Andrew Ng [Tue, 25 Apr 2017 12:36:14 +0000 (12:36 +0000)]
[SimplifyLibCalls] Fix infinite loop with fast-math optimization.
One of the fast-math optimizations is to replace calls to standard double
functions with their float equivalents, e.g. exp -> expf. However, this can
cause infinite loops for the following:
float expf(float val) { return (float) exp((double) val); }
A similar inline declaration exists in the MinGW-w64 math.h header file which
when compiled with -O2/3 and fast-math generates infinite loops.
So this fix checks that the calling function to the standard double function
that is being replaced does not match the float equivalent.
Differential Revision: https://reviews.llvm.org/D31806
llvm-svn: 301304
Simon Pilgrim [Tue, 25 Apr 2017 12:29:07 +0000 (12:29 +0000)]
[SelectionDAG] Recognise splat vector isKnownToBeAPowerOfTwo one/sign bit shift cases.
llvm-svn: 301303
Ismail Donmez [Tue, 25 Apr 2017 11:24:14 +0000 (11:24 +0000)]
Fix fuzzer.c test on platforms where CLANG_DEFAULT_CXX_STDLIB is libc++
llvm-svn: 301302
Michael Kruse [Tue, 25 Apr 2017 10:57:32 +0000 (10:57 +0000)]
[DeLICM] Use Known information when comparing Existing.Occupied and Proposed.Occupied.
Do not conflict if the value of Existing and Proposed are the same.
This change only affects unit tests, but no functional changes are
expected on LLVM-IR, as no Known information is yet extracted and
consequently this functionality is only triggered through unit tests.
Differential Revision: https://reviews.llvm.org/D32025
llvm-svn: 301301
Simon Pilgrim [Tue, 25 Apr 2017 10:47:35 +0000 (10:47 +0000)]
[DAGCombiner] Use SDValue::getConstantOperandVal helper where possible. NFCI.
llvm-svn: 301300