Zachary Turner [Thu, 2 Aug 2018 17:33:33 +0000 (17:33 +0000)]
Fix one more warning.
llvm-svn: 338742
Volodymyr Sapsai [Thu, 2 Aug 2018 17:29:53 +0000 (17:29 +0000)]
[c-index-test] Use correct executable path to discover resource directory.
Driver builds resource directory path based on provided executable path.
Instead of string "clang" use actual executable path.
rdar://problem/
42699514
Reviewers: nathawes, akyrtzi, bob.wilson
Reviewed By: akyrtzi
Subscribers: dexonsmith, cfe-commits
Differential Revision: https://reviews.llvm.org/D50160
llvm-svn: 338741
Zachary Turner [Thu, 2 Aug 2018 17:20:31 +0000 (17:20 +0000)]
Update the LLVM VS integration to sign the assembly.
llvm-svn: 338740
Zachary Turner [Thu, 2 Aug 2018 17:18:01 +0000 (17:18 +0000)]
Fix a couple of warnings.
llvm-svn: 338739
Julie Hockett [Thu, 2 Aug 2018 17:17:19 +0000 (17:17 +0000)]
[clang-doc] Refactoring mapper to map by scope
The result of this adjusted mapper pass is that all Function and Enum
infos are absorbed into the info of their enclosing scope (i.e. the
class or namespace in which they are defined). Namespace and Record
infos are passed along to the final output, but the second pass creates
a reference to each in its parent scope. As a result, the top-level final
outputs are Namespaces and Records.
llvm-svn: 338738
Zachary Turner [Thu, 2 Aug 2018 17:08:24 +0000 (17:08 +0000)]
Use %.*s instead of %*s when formatting strings with explicit length.
llvm-svn: 338737
Zachary Turner [Thu, 2 Aug 2018 17:08:03 +0000 (17:08 +0000)]
[MS Demangler] Resolve back-references lazily.
We need to both record and resolve back-references lazily due to
not being able to know until a demangling is complete whether or
not a name should go into the back-reference table.. This patch
implements lazy resolution of back-references, but we still have
eager recording of back-references. This will be fixed in a
subsequent patch.
llvm-svn: 338736
Craig Topper [Thu, 2 Aug 2018 16:48:01 +0000 (16:48 +0000)]
[X86] Allow fake unary unpckhpd and movhlps to be commuted for execution domain fixing purposes
These instructions perform the same operation, but the semantic of which operand is destroyed is reversed. If the same register is used as both operands we can change the execution domain without worrying about this difference.
Unfortunately, this really only works in cases where the input register is killed by the instruction. If its not killed, the two address isntruction pass inserts a copy that will become a move instruction. This makes the instruction use different physical registers that contain the same data at the time the unpck/movhlps executes. I've considered using a unary pseudo instruction with tied operand to trick the two address instruction pass. We could then expand the pseudo post regalloc to get the same physical register on both inputs.
Differential Revision: https://reviews.llvm.org/D50157
llvm-svn: 338735
Greg Clayton [Thu, 2 Aug 2018 16:46:15 +0000 (16:46 +0000)]
Add support for ARM and ARM64 breakpad generated minidump files
In this patch I add support for ARM and ARM64 break pad files. There are two flavors of ARM: Apple where FP is R7, and non Apple where FP is R11. Added minimal tests that load up ARM64 and the two flavors or ARM core files with a single thread and known register values in each register. Each register is checked for the exact value.
Differential Revision: https://reviews.llvm.org/D49750
llvm-svn: 338734
Raphael Isemann [Thu, 2 Aug 2018 16:38:34 +0000 (16:38 +0000)]
Add byte counting mechanism to LLDB's Stream class.
Summary:
This patch allows LLDB's Stream class to count the bytes it has written to so far.
There are two major motivations for this patch:
The first one is that this will allow us to get rid of all the handwritten byte counting code
we have in LLDB so far. Examples for this are pretty much all functions in LLDB that
take a Stream to write to and return a size_t, which usually represents the bytes written.
By moving to this centralized byte counting mechanism, we hopefully can avoid some
tricky errors that happen when some code forgets to count the written bytes while
writing something to a stream.
The second motivation is that this is needed for the migration away from LLDB's `Stream`
and towards LLVM's `raw_ostream`. My current plan is to start offering a fake raw_ostream
class that just forwards to a LLDB Stream.
However, for this raw_ostream wrapper we need to fulfill the raw_ostream interface with
LLDB's Stream, which currently lacks the ability to count the bytes written so far (which
raw_ostream exposes by it's `tell()` method). By adding this functionality it is trivial to start
rolling out our raw_ostream wrapper (and then eventually completely move to raw_ostream).
Also, once this fake raw_ostream is available, we can start replacing our own code writing
to LLDB's Stream by LLVM code writing to raw_ostream. The best example for this is the
LEB128 encoding we currently ship, which can be replaced with by LLVM's version which
accepts an raw_ostream.
From the point of view of the pure source changes this test does, we essentially just renamed
the Write implementation in Stream to `WriteImpl` while the `Write` method everyone is using
to write its raw bytes is now just forwarding and counting the written bytes.
Reviewers: labath, davide
Reviewed By: labath
Subscribers: JDevlieghere, lldb-commits
Differential Revision: https://reviews.llvm.org/D50159
llvm-svn: 338733
Fangrui Song [Thu, 2 Aug 2018 16:29:36 +0000 (16:29 +0000)]
[analyzer] Make RegionVector use const reference
llvm-svn: 338732
Evandro Menezes [Thu, 2 Aug 2018 15:43:57 +0000 (15:43 +0000)]
[SLC] Refactor simplification of pow() (NFC)
llvm-svn: 338730
Simon Pilgrim [Thu, 2 Aug 2018 15:34:51 +0000 (15:34 +0000)]
[X86][SSE] Add uniform/non-uniform exact sdiv vector tests covering all paths
Regenerated tests and tested on 64-bit (AVX2) as well.
llvm-svn: 338729
David Bolvansky [Thu, 2 Aug 2018 14:59:23 +0000 (14:59 +0000)]
[InstCombine] [NFC] Tests for select with binop fold
llvm-svn: 338727
George Rimar [Thu, 2 Aug 2018 14:44:39 +0000 (14:44 +0000)]
[LLD][ELF] - Remove dead check from adjustSplitStackFunctionPrologues().
In according to the comment, undefined symbol should never reach there.
So, should be able to remove the check. I am assuming this is NFC.
llvm-svn: 338723
George Rimar [Thu, 2 Aug 2018 14:34:39 +0000 (14:34 +0000)]
[LLD][ELF] - An attemp to fix BB after rL338718.
BB is unhappy :`-(
http://lab.llvm.org:8011/builders/lld-perf-testsuite/builds/5632
llvm-svn: 338722
Jonas Hahnfeld [Thu, 2 Aug 2018 14:34:08 +0000 (14:34 +0000)]
[OMPT] Disable by default on Windows
This is broken per PR36561 and PR36574, so disable it for now until
somebody interested can take a look. OMPT can still be activated manually
by passing -DLIBOMP_OMPT_SUPPORT=ON during configuration.
Differential Revision: https://reviews.llvm.org/D50086
llvm-svn: 338721
Jonas Hahnfeld [Thu, 2 Aug 2018 14:34:03 +0000 (14:34 +0000)]
[tests] Add annotations for taskloop features
Only supported since GCC 6 and Intel 17.0. However GCC 6.3.0 is
crashing on two of the tests, so disable them as well...
Differential Revision: https://reviews.llvm.org/D50085
llvm-svn: 338720
Sanjay Patel [Thu, 2 Aug 2018 14:33:40 +0000 (14:33 +0000)]
[InstSimplify] move minnum/maxnum with undef fold from instcombine
llvm-svn: 338719
George Rimar [Thu, 2 Aug 2018 14:15:02 +0000 (14:15 +0000)]
[LLD][ELF] - Remove excessive cases from getRelocTargetVA(). NFC.
There is no point to explicitly proccess the expressions this patch removes.
We already have a llvm_unreachable for the default case.
llvm-svn: 338718
Sjoerd Meijer [Thu, 2 Aug 2018 14:04:48 +0000 (14:04 +0000)]
[ARM][NFC] Follow up of r338568
I disabled more tests than necessary, this enables them.
llvm-svn: 338717
Sanjay Patel [Thu, 2 Aug 2018 13:46:20 +0000 (13:46 +0000)]
[ValueTracking] fix maxnum miscompile for cannotBeOrderedLessThanZero (PR37776)
This adds the NAN checks suggested in PR37776:
https://bugs.llvm.org/show_bug.cgi?id=37776
If both operands to maxnum are NAN, that should get constant folded, so we don't
have to handle that case. This is the same assumption as other FP ops in this
function. Returning 'false' is always conservatively correct.
Copying from the bug report:
Currently, we have this for "when is cannotBeOrderedLessThanZero
(mustBePositiveOrNaN) true for maxnum":
L
-------------------
| Pos | Neg | NaN |
------------------------
|Pos | x | x | x |
------------------------
R |Neg | x | | x |
------------------------
|NaN | x | x | x |
------------------------
The cases with (Neg & NaN) are wrong. We should have:
L
-------------------
| Pos | Neg | NaN |
------------------------
|Pos | x | x | x |
------------------------
R |Neg | x | | |
------------------------
|NaN | x | | x |
------------------------
Differential Revision: https://reviews.llvm.org/D50081
llvm-svn: 338716
Matt Arsenault [Thu, 2 Aug 2018 13:43:53 +0000 (13:43 +0000)]
DAG: Fix vector widening fcanonicalize
llvm-svn: 338715
Matt Arsenault [Thu, 2 Aug 2018 13:43:42 +0000 (13:43 +0000)]
AMDGPU: Fix scalarizing v4f16 fcanonicalize
llvm-svn: 338714
George Rimar [Thu, 2 Aug 2018 13:18:49 +0000 (13:18 +0000)]
[LLD][ELF] - Remove dead code. NFC.
It does not seem that this code is alive.
I seems was needed previously but we fixed it.
If it is still needed, it needs new tests,
but for now I do not know how to trigger it,
and so I removed it.
llvm-svn: 338713
Tim Northover [Thu, 2 Aug 2018 12:50:23 +0000 (12:50 +0000)]
Move ClangHighlighter.cpp to hopefully better place in Xcode project.
But with a write-only format, who can really say?
llvm-svn: 338712
Ben Dunbobbin [Thu, 2 Aug 2018 12:27:01 +0000 (12:27 +0000)]
[llvm-ar] Fix help text test. NFC.
Missed from @338703
llvm-svn: 338709
George Rimar [Thu, 2 Aug 2018 12:20:36 +0000 (12:20 +0000)]
[LLD][ELF] - Remove redundant code. NFC.
Code was never executed with our test cases,
though it is valid and I think we can always run it.
This improves code coverage.
llvm-svn: 338708
Matt Arsenault [Thu, 2 Aug 2018 12:14:28 +0000 (12:14 +0000)]
Try to make builtin address space declarations not useless
The way address space declarations for builtins currently work
is nearly useless. The code assumes the address spaces used for
builtins is a confusingly named "target address space" from user
code using __attribute__((address_space(N))) that matches
the builtin declaration. There's no way to use this to declare
a builtin that returns a language specific address space.
The terminology used is highly cofusing since it has nothing
to do with the the address space selected by the target to use
for a language address space.
This feature is essentially unused as-is. AMDGPU and NVPTX
are the only in-tree targets attempting to use this. The AMDGPU
builtins certainly do not behave as intended (i.e. all of the
builtins returning pointers can never compile because the numbered
address space never matches the expected named address space).
The NVPTX builtins are missing tests for some, and the others
seem to rely on an implicit addrspacecast.
Change the used address space for builtins based on a target
hook to allow using a language address space for a builtin.
This allows the same builtin declaration to be used for multiple
languages with similarly purposed address spaces (e.g. the same
AMDGPU builtin can be used in OpenCL and CUDA even though the
constant address spaces are arbitarily different).
This breaks the possibility of using arbitrary numbered
address spaces alongside the named address spaces for builtins.
If this is an issue we probably need to introduce another builtin
declaration character to distinguish language address spaces from
so-called "target address spaces".
llvm-svn: 338707
Martin Probst [Thu, 2 Aug 2018 11:52:08 +0000 (11:52 +0000)]
clang-format: fix a crash in comment wraps.
Summary:
Previously, clang-format would crash if it tried to wrap an overlong
single line comment, because two parts of the code inserted a break in
the same location.
/** heregoesalongcommentwithnospace */
This wasn't previously noticed as it could only trigger for an overlong
single line comment that did have no breaking opportunities except for a
whitespace at the very beginning.
This also introduces a check for JavaScript to not ever wrap a comment
before an opening curly brace:
/** @mods {donotbreakbeforethecurly} */
This is because some machinery parsing these tags sometimes supports
breaks before a possible `{`, but in some other cases does not.
Previously clang-format was careful never to wrap a line with certain
tags on it. The better solution is to specifically disable wrapping
before the problematic token: this allows wrapping and aligning comments
but still avoids the problem.
Reviewers: krasimir
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50177
llvm-svn: 338706
Chris Jackson [Thu, 2 Aug 2018 11:33:54 +0000 (11:33 +0000)]
[lld] Make tests calling llvm-ar more robust
Some lit tests that call llvm-ar use the 'r' flag. If the target archive
already exists and is in a corrupt state, this can cause the test to fail. We
have added 'rm -f' calls before the llvm-ar calls to increase the
robustness of the tests.
Differential revision: https://reviews.llvm.org/D49184
llvm-svn: 338705
Ben Dunbobbin [Thu, 2 Aug 2018 11:27:38 +0000 (11:27 +0000)]
[llvm-ar] Correct help text
Corrected and simplified the help text.
It was clearly too difficult to maintain before (see e.g. @227296) making it
simpler and more consistent it should help people keep it up to date.
Differential Revision: https://reviews.llvm.org/D48577
llvm-svn: 338703
Andrea Di Biagio [Thu, 2 Aug 2018 11:12:35 +0000 (11:12 +0000)]
[llvm-mca] Use a vector to store ResourceState objects in the ResourceManager.
We don't need to use a map to store ResourceState objects. The number of
processor resources is known statically from the scheduling model. We can
therefore use a vector, and reserve a slot for each processor resource that we
want to simulate.
Every time the ResourceManager queries the ResourceState vector, the index to
the vector of ResourceState objects can be easily computed from the processor
resource mask.
This drastically reduces the time complexity of method ResourceManager::use() and
method ResourceManager::release(). This patch gives an average speedup of 12%.
llvm-svn: 338702
Guillaume Chatelet [Thu, 2 Aug 2018 11:12:02 +0000 (11:12 +0000)]
[llvm-exegesis] Rename InstructionInstance into InstructionBuilder.
Summary: Non functional change.
Subscribers: tschuett, courbet, llvm-commits
Differential Revision: https://reviews.llvm.org/D50176
llvm-svn: 338701
Filipe Cabecinhas [Thu, 2 Aug 2018 11:05:07 +0000 (11:05 +0000)]
Add header guard to asan_report.h
llvm-svn: 338700
George Rimar [Thu, 2 Aug 2018 10:59:28 +0000 (10:59 +0000)]
[LLD][ELF] - Simplify. NFC.
isHeaderSection can be useful I believe,
but probably not right now and not
for this case.
llvm-svn: 338699
Simon Pilgrim [Thu, 2 Aug 2018 10:53:53 +0000 (10:53 +0000)]
[X86][SSE] Add more UDIV nonuniform-constant vector tests
Ensure we cover all paths for vector data as requested on D49248
llvm-svn: 338698
George Rimar [Thu, 2 Aug 2018 10:45:46 +0000 (10:45 +0000)]
[LLD] Do not overwrite LMAOffset of PT_LOAD header
Patch by Konstantin Schwarz!
If more than a single output section is added to a PT_LOAD header,
only the first section should set the LMAOffset of the segment.
Otherwise, we get a load-address overlap error
Differential revision: https://reviews.llvm.org/D50133
llvm-svn: 338697
Eric Liu [Thu, 2 Aug 2018 10:30:56 +0000 (10:30 +0000)]
Replace hardcoded format styles in a few tools with the default style in libFormat.
llvm-svn: 338696
Stefan Granitz [Thu, 2 Aug 2018 10:13:18 +0000 (10:13 +0000)]
Unit test for Symtab::InitNameIndexes
Summary: In order to exploit the potential of LLVM's new ItaniumPartialDemangler for indexing in LLDB, we expect conceptual changes in the implementation of the InitNameIndexes function. Here is a unit test that aims at covering all relevant code paths in that function.
Reviewers: labath, jingham, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: friss, teemperor, davide, clayborg, erik.pilkington, lldb-commits, mgorny
Differential Revision: https://reviews.llvm.org/D49909
llvm-svn: 338695
Stefan Granitz [Thu, 2 Aug 2018 09:45:59 +0000 (09:45 +0000)]
Add include guard
Summary: Add missing include guard LLVM_DEMANGLE_DEMANGLE_H in llvm/Demangle/Demangle.h
Reviewers: erik.pilkington
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D50042
llvm-svn: 338694
Simon Pilgrim [Thu, 2 Aug 2018 09:20:27 +0000 (09:20 +0000)]
[X86][SSE] Pull out duplicate VSELECT to shuffle mask code. NFCI.
llvm-svn: 338693
Alexander Ivchenko [Thu, 2 Aug 2018 08:55:05 +0000 (08:55 +0000)]
[GlobalISel] Fix typo with missed override specifier
llvm-svn: 338689
Andrew Savonichev [Thu, 2 Aug 2018 08:50:41 +0000 (08:50 +0000)]
[emacs] Indent statement continuation to match clang-format
Summary:
Was:
int LongVariableName =
veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter);
int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter)
.nowThisDoesntFit()
.andThis()
Now:
int LongVariableName =
veryLongFunctionNameThatExceeds80ColumnsRule(SomeParameter);
int ShortVar = veryLongFunctionNameThatStillFitsIntoOneLine(SomeParameter)
.nowThisDoesntFit()
.andThis()
Reviewers: espindola, MaskRay
Reviewed By: MaskRay
Subscribers: greened, llvm-commits
Differential Revision: https://reviews.llvm.org/D49726
llvm-svn: 338686
Alexander Ivchenko [Thu, 2 Aug 2018 08:33:31 +0000 (08:33 +0000)]
[GlobalISel] Rewrite CallLowering::lowerReturn to accept multiple VRegs per Value
This is logical continuation of https://reviews.llvm.org/D46018 (r332449)
Differential Revision: https://reviews.llvm.org/D49660
llvm-svn: 338685
George Rimar [Thu, 2 Aug 2018 08:13:56 +0000 (08:13 +0000)]
[LLD] Only increase LMARegion if different from MemRegion
Patch by Konstantin Schwarz!
If both the MemRegion and LMARegion are set for an output section in
a linker script, we should only increase the LMARegion if it is
different from the MemRegion. Otherwise, we reserve the memory twice.
Differential revision: https://reviews.llvm.org/D50065
llvm-svn: 338684
Hans Wennborg [Thu, 2 Aug 2018 08:10:34 +0000 (08:10 +0000)]
utils/release/tag.sh: add debuginfo-tests to project list
llvm-svn: 338682
George Rimar [Thu, 2 Aug 2018 08:07:07 +0000 (08:07 +0000)]
[LLD] - Improve handling of AT> linker script commands
Patch by Konstantin Schwarz!
The condition to create a new phdr must also check the usage of "AT>"
linker script command, and create a new PT_LOAD header if a new LMARegion is used.
This fixes PR38307
Differential revision: https://reviews.llvm.org/D50052
llvm-svn: 338679
Hans Wennborg [Thu, 2 Aug 2018 07:48:44 +0000 (07:48 +0000)]
lit: bump version number
llvm-svn: 338677
David Green [Thu, 2 Aug 2018 07:30:53 +0000 (07:30 +0000)]
[UnJ] Add debug messages for why loops are not unrolled. NFC
Adds some cleaned up debug messages from back when I was writing this.
Hopefully useful to others (and myself) as to why unroll and jam is not
transforming as expected.
Differential Revision: https://reviews.llvm.org/D50062
llvm-svn: 338676
Michael Wu [Thu, 2 Aug 2018 07:28:11 +0000 (07:28 +0000)]
Test commit access
llvm-svn: 338675
David Green [Thu, 2 Aug 2018 06:24:40 +0000 (06:24 +0000)]
[AArch64] Add support for got relocated LDR's
As a part of adding the tiny codemodel, we need to support ldr's with :got:
relocations on them. This seems to be mostly already done, just needs the
relocation type support.
Differential Revision: https://reviews.llvm.org/D50137
llvm-svn: 338673
Kito Cheng [Thu, 2 Aug 2018 05:38:18 +0000 (05:38 +0000)]
Test commit.
llvm-svn: 338672
Philip Reames [Thu, 2 Aug 2018 04:08:04 +0000 (04:08 +0000)]
[LICM] Factor out fault legality from canHoistOrSinkInst [NFC]
This method has three callers, each of which wanted distinct handling:
1) Sinking into a loop is moving an instruction known to execute before a loop into the loop. We don't need to worry about introducing a fault at all in this case.
2) Hoisting from a loop into a preheader already duplicated the check in the caller.
3) Sinking from the loop into an exit block was the only true user of the code within the routine. For the moment, this has just been lifted into the caller, but up next is examining the logic more carefully. Whitelisting of loads and calls - while consistent with the previous code - is rather suspicious. Either way, a behavior change is worthy of it's own patch.
llvm-svn: 338671
Philip Reames [Thu, 2 Aug 2018 03:54:29 +0000 (03:54 +0000)]
[LICM] Expand tests to highlight an oddity in sinking implementation
llvm-svn: 338670
Raphael Isemann [Thu, 2 Aug 2018 03:01:09 +0000 (03:01 +0000)]
Added missing highlighter files to XCode project
llvm-svn: 338669
Marshall Clow [Thu, 2 Aug 2018 02:11:06 +0000 (02:11 +0000)]
Implement P1023: constexpr comparison operators for std::array
llvm-svn: 338668
George Karpenkov [Thu, 2 Aug 2018 02:02:40 +0000 (02:02 +0000)]
[analyzer] Extend NoStoreFuncVisitor to follow fields.
rdar://
39701823
Differential Revision: https://reviews.llvm.org/D49901
llvm-svn: 338667
Marshall Clow [Thu, 2 Aug 2018 01:56:02 +0000 (01:56 +0000)]
Implement P0887: The identity metafunction
llvm-svn: 338666
Lei Liu [Thu, 2 Aug 2018 01:54:12 +0000 (01:54 +0000)]
Fix FCOPYSIGN expansion
In expansion of FCOPYSIGN, the shift node is missing when the two
operands of FCOPYSIGN are of the same size. We should always generate
shift node (if the required shift bit is not zero) to put the sign
bit into the right position, regardless of the size of underlying
types.
Differential Revision: https://reviews.llvm.org/D49973
llvm-svn: 338665
Akira Hatanaka [Thu, 2 Aug 2018 01:52:17 +0000 (01:52 +0000)]
Pass triple to RUN line to fix failing bots.
This is a follow-up to r338656.
llvm-svn: 338664
Philip Reames [Thu, 2 Aug 2018 00:54:14 +0000 (00:54 +0000)]
[LICM] hoisting/sinking legality - bail early for unsupported instructions
Originally, this was part of a larger refactoring I'd planned, but had to abandoned. I figured the minor improvement in readability was worthwhile.
llvm-svn: 338663
Raphael Isemann [Thu, 2 Aug 2018 00:30:15 +0000 (00:30 +0000)]
[LLDB] Added syntax highlighting support
Summary:
This patch adds syntax highlighting support to LLDB. When enabled (and lldb is allowed
to use colors), printed source code is annotated with the ANSI color escape sequences.
So far we have only one highlighter which is based on Clang and is responsible for all
languages that are supported by Clang. It essentially just runs the raw lexer over the input
and then surrounds the specific tokens with the configured escape sequences.
Reviewers: zturner, davide
Reviewed By: davide
Subscribers: labath, teemperor, llvm-commits, mgorny, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D49334
llvm-svn: 338662
Kostya Serebryany [Thu, 2 Aug 2018 00:24:49 +0000 (00:24 +0000)]
[libFuzzer] use absolute distance in addition to the hamming distance in value profiling; our A/B testing have (somewhat weak) indication that this provides an additional signal for corpus expansion
llvm-svn: 338661
Tim Shen [Thu, 2 Aug 2018 00:21:12 +0000 (00:21 +0000)]
[ADT] Add some documentation for GraphTraits.
Summary: Add some context for GraphTraits.
Reviewers: dblaikie, asbirlea
Subscribers: sanjoy, jlebar, bixia, dexonsmith, llvm-commits
Differential Revision: https://reviews.llvm.org/D50120
llvm-svn: 338660
Michael Kruse [Thu, 2 Aug 2018 00:11:14 +0000 (00:11 +0000)]
[JSONExporter] Print instead of ignoring parser error.
Silence the warning
warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
JSONExporter is a developer tool, there is no mechanism for error
handling. Print the parser error and abort with a fatal error.
llvm-svn: 338659
Nemanja Ivanovic [Thu, 2 Aug 2018 00:03:22 +0000 (00:03 +0000)]
[PowerPC] Do not round values prior to converting to integer
Adding the FP_ROUND nodes when combining FP_TO_[SU]INT of elements
feeding a BUILD_VECTOR into an FP_TO_[SU]INT of the built vector
loses precision. This patch removes the code that adds these nodes
to true f64 operands. It also adds patterns required to ensure
the code is still vectorized rather than converting individual
elements and inserting into a vector.
Fixes https://bugs.llvm.org/show_bug.cgi?id=38342
Differential Revision: https://reviews.llvm.org/D50121
llvm-svn: 338658
Raphael Isemann [Wed, 1 Aug 2018 23:54:37 +0000 (23:54 +0000)]
Remove unnecessary target from TestCompletion patch
As Jim pointed out, we don't need to manually create a target
here because we already create a target implicitly in the very
next line (which means we just created a target and don't use it).
This patch just removes the line that creates the first unused target.
llvm-svn: 338657
Akira Hatanaka [Wed, 1 Aug 2018 23:51:53 +0000 (23:51 +0000)]
Serialize DoesNotEscape.
I forgot to commit this in r326530.
llvm-svn: 338656
Lei Liu [Wed, 1 Aug 2018 23:46:49 +0000 (23:46 +0000)]
[AArch64] DWARF: do not generate AT_location for thread local
AArch64 ELF ABI does not define a static relocation type for TLS offset within
a module, which makes it impossible for compiler to generate a valid
DW_AT_location content for thread local variables. Currently LLVM generates an
invalid R_AARCH64_ABS64 relocation at the DW_AT_location field for a TLS
variable. That causes trouble for linker because thread local variable does
not have an absolute address at link time. AArch64 GCC solves the problem by
not generating DW_AT_location for thread local variables. We should do the
same in LLVM.
Differential Revision: https://reviews.llvm.org/D43860
llvm-svn: 338655
Nick Desaulniers [Wed, 1 Aug 2018 23:46:48 +0000 (23:46 +0000)]
Add maybe-unused attribute to a variable.
Summary:
Mark a variable as maybe-unused to prevent a -Wunused-but-set-variable
warning in optimized builds where asserts are removed.Test/first commit
to check setup and understand patch submission process.
Reviewers: srhines, pirama, dblaikie
Reviewed By: dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49756
llvm-svn: 338654
George Burgess IV [Wed, 1 Aug 2018 23:14:14 +0000 (23:14 +0000)]
Reland r338431: "Add DebugCounters to DivRemPairs"
(Previously reverted in r338442)
I'm told that the breakage came from us using an x86 triple on configs
that didn't have x86 enabled. This is remedied by moving the
debugcounter test to an x86 directory (where there's also a
opt-bisect-isel.ll test for similar reasons).
I can't repro the reverse-iteration failure mentioned in the revert with
this patch, so I assume that a misconfiguration on my end is what caused
that.
Original commit message:
Add DebugCounters to DivRemPairs
For people who don't use DebugCounters, NFCI.
Patch by Zhizhou Yang!
Differential Revision: https://reviews.llvm.org/D50033
llvm-svn: 338653
Sanjay Patel [Wed, 1 Aug 2018 23:05:55 +0000 (23:05 +0000)]
[InstSimplify] move minnum/maxnum with same arg fold from instcombine
llvm-svn: 338652
Reid Kleckner [Wed, 1 Aug 2018 22:56:05 +0000 (22:56 +0000)]
Load from the GOT for external symbols in the large, PIC code model
Do the same handling for external symbols that we do for jump table
symbols and global values.
Fixes one of the cases in PR38385
llvm-svn: 338651
John Baldwin [Wed, 1 Aug 2018 22:51:13 +0000 (22:51 +0000)]
[ASAN] Use the correct shadow offset for ASAN on FreeBSD/mips64.
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D49939
llvm-svn: 338650
Lang Hames [Wed, 1 Aug 2018 22:42:23 +0000 (22:42 +0000)]
[ORC] Add a 'Callable' flag to JITSymbolFlags.
The callable flag can be used to indicate that a symbol is callable. If present,
the symbol is callable. If absent, the symbol may or may not be callable (the
client must determine this by context, for example by examining the program
representation that will provide the symbol definition).
This flag will be used in the near future to enable creation of lazy compilation
stubs based on SymbolFlagsMap instances only (without having to provide
additional information to determine which symbols need stubs).
llvm-svn: 338649
Vlad Tsyrklevich [Wed, 1 Aug 2018 22:41:03 +0000 (22:41 +0000)]
[AST] Remove the static_assert check in ObjCMethodDecl::ObjCMethodDecl
Summary:
This check was introduced by r338641
but this broke some builds. For now remove it.
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D50163
llvm-svn: 338648
Rui Ueyama [Wed, 1 Aug 2018 22:31:31 +0000 (22:31 +0000)]
Re-submit r338596 with a bug fix and a test.
llvm-svn: 338647
Michael Kruse [Wed, 1 Aug 2018 22:28:32 +0000 (22:28 +0000)]
[ScopBuilder] Set domain to empty instead of NULL.
The domain generation used nullptr to mark the domain of an error block
as never-executed. Later, nullptr domains are recreated with a
zero-tuple domain that then mismatches with the expected domain the
error block within the loop.
Instead of using nullptr, assign an empty domain which preserves the
expected space. Remove empty domains during SCoP simplification.
Fixes llvm.org/PR38218.
llvm-svn: 338646
Reid Kleckner [Wed, 1 Aug 2018 22:10:03 +0000 (22:10 +0000)]
Fix -Wcovered-switch-default uncovered after r338630
llvm-svn: 338643
Reid Kleckner [Wed, 1 Aug 2018 21:57:15 +0000 (21:57 +0000)]
Update for DWARF API change
llvm-svn: 338642
Erich Keane [Wed, 1 Aug 2018 21:31:08 +0000 (21:31 +0000)]
[AST][4/4] Move the bit-fields from ObjCMethodDecl and ObjCContainerDecl into DeclContext
This patch follows https://reviews.llvm.org/D49729,
https://reviews.llvm.org/D49732 and
https://reviews.llvm.org/D49733.
Move the bits from ObjCMethodDecl and ObjCContainerDecl
into DeclContext.
Differential Revision: https://reviews.llvm.org/D49734
Patch By: bricci
llvm-svn: 338641
Roman Lebedev [Wed, 1 Aug 2018 21:20:58 +0000 (21:20 +0000)]
[NFC][CodeGenCXX] Use -emit-llvm-only instead of -emit-llvm and ignoring it.
As pointed out by Richard Smith in post-review of r338489.
llvm-svn: 338640
Erich Keane [Wed, 1 Aug 2018 21:16:54 +0000 (21:16 +0000)]
[AST][3/4] Move the bit-fields from BlockDecl, LinkageSpecDecl and OMPDeclareReductionDecl into DeclContext
This patch follows https://reviews.llvm.org/D49729
and https://reviews.llvm.org/D49732, and is
followed by https://reviews.llvm.org/D49734.
Move the bits from BlockDecl, LinkageSpecDecl and
OMPDeclareReductionDecl into DeclContext.
Differential Revision: https://reviews.llvm.org/D49733
Patch By: bricci
llvm-svn: 338639
Davide Italiano [Wed, 1 Aug 2018 21:13:45 +0000 (21:13 +0000)]
[DWARFASTParser] Remove special cases for `llvm-gcc`
Reviewed by: aprantl, labath.
Differential Revision: https://reviews.llvm.org/D48500
llvm-svn: 338638
Raphael Isemann [Wed, 1 Aug 2018 21:07:18 +0000 (21:07 +0000)]
Fix out-of-bounds read in Stream::PutCStringAsRawHex8
Summary:
When I added the Stream unit test (r338488), the build bots failed due to an out-of-
bound reads when passing an empty string to the PutCStringAsRawHex8 method.
In r338491 I removed the test case to fix the bots.
This patch fixes this in PutCStringAsRawHex8 by always checking for the terminating
null character in the given string (instead of skipping it the first time). It also re-adds the
test case I removed.
Reviewers: vsk
Reviewed By: vsk
Subscribers: vsk, lldb-commits
Differential Revision: https://reviews.llvm.org/D50149
llvm-svn: 338637
Erich Keane [Wed, 1 Aug 2018 21:02:40 +0000 (21:02 +0000)]
[AST][2/4] Move the bit-fields from FunctionDecl and CXXConstructorDecl into DeclContext
This patch follows https://reviews.llvm.org/D49729
and is followed by https://reviews.llvm.org/D49733
and https://reviews.llvm.org/D49734.
Move the bits from FunctionDecl and CXXConstructorDecl
into DeclContext.
Differential Revision: https://reviews.llvm.org/D49732
Patch By: bricci
llvm-svn: 338636
Jordan Rupprecht [Wed, 1 Aug 2018 20:59:39 +0000 (20:59 +0000)]
[llvm-objcopy] Add missing -I command line flag alias for --input-target
llvm-svn: 338635
Paul Robinson [Wed, 1 Aug 2018 20:54:11 +0000 (20:54 +0000)]
[DebugInfo/DWARF] [4/4] Unify handling of compile and type units. NFC
This is patch 4 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 4 combines separate DWARFUnitVectors for compile and type units
into a single DWARFUnitVector that contains both. For now the
implementation distinguishes compile units from type units by putting
all compile units at the front of the vector, reflecting the DWARF v4
distinction between .debug_info and .debug_types sections. A future
patch will change this to allow the free mixing of unit kinds, as is
specified by DWARF v5.
Differential Revision: https://reviews.llvm.org/D49744
llvm-svn: 338633
Paul Robinson [Wed, 1 Aug 2018 20:49:44 +0000 (20:49 +0000)]
[DebugInfo/DWARF] [3/4] Rename DWARFUnitSection to DWARFUnitVector. NFC
This is patch 3 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 3 simply renames DWARFUnitSection to DWARFUnitVector, as the
object-file section of a unit is nearly irrelevant now.
Differential Revision: https://reviews.llvm.org/D49743
llvm-svn: 338632
Matt Arsenault [Wed, 1 Aug 2018 20:49:00 +0000 (20:49 +0000)]
AMDGPU: Use SPseudoInst helper
llvm-svn: 338631
Erich Keane [Wed, 1 Aug 2018 20:48:16 +0000 (20:48 +0000)]
[AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext
DeclContext has a little less than 8 bytes free due to the alignment
requirements on 64 bits archs. This set of patches moves the
bit-fields from classes deriving from DeclContext into DeclContext.
On 32 bits archs this increases the size of DeclContext by 4 bytes
but this is balanced by an equal or larger reduction in the size
of the classes deriving from it.
On 64 bits archs the size of DeclContext stays the same but
most of the classes deriving from it shrink by 8/16 bytes.
(-print-stats diff here https://reviews.llvm.org/D49728)
When doing an -fsyntax-only on all of Boost this result
in a 3.6% reduction in the size of all Decls and
a 1% reduction in the run time due to the lower cache
miss rate.
For now CXXRecordDecl is not touched but there is
an easy 6 (if I count correctly) bytes gain available there
by moving some bits from DefinitionData into the free
space of DeclContext. This will be the subject of another patch.
This patch sequence also enable the possibility of refactoring
FunctionDecl: To save space some bits from classes deriving from
FunctionDecl were moved to FunctionDecl. This resulted in a
lot of stuff in FunctionDecl which do not belong logically to it.
After this set of patches however it is just a simple matter of
adding a SomethingDeclBitfields in DeclContext and moving the
bits to it from FunctionDecl.
This first patch introduces the anonymous union in DeclContext
and all the *DeclBitfields classes holding the bit-fields, and moves
the bits from TagDecl, EnumDecl and RecordDecl into DeclContext.
This patch is followed by https://reviews.llvm.org/D49732,
https://reviews.llvm.org/D49733 and https://reviews.llvm.org/D49734.
Differential Revision: https://reviews.llvm.org/D49729
Patch By: bricci
llvm-svn: 338630
Paul Robinson [Wed, 1 Aug 2018 20:46:46 +0000 (20:46 +0000)]
[DebugInfo/DWARF] [2/4] Type units no longer in a std::deque. NFC
This is patch 2 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 2 takes the existing std::deque<DWARFUnitSection> for type units
and makes it a simple DWARFUnitSection, simplifying the handling of
type units and making it more consistent with compile units.
Differential Revision: https://reviews.llvm.org/D49742
llvm-svn: 338629
Paul Robinson [Wed, 1 Aug 2018 20:43:47 +0000 (20:43 +0000)]
[DebugInfo/DWARF] [1/4] De-templatize DWARFUnitSection. NFC
This is patch 1 of 4 NFC refactorings to handle type units and compile
units more consistently and with less concern about the object-file
section that they came from.
Patch 1 replaces the templated DWARFUnitSection with a non-templated
version. That is, instead of being a SmallVector of pointers to a
specific unit kind, it is not a SmallVector of pointers to the base
class for both type and compile units. Virtual methods are magic.
Differential Revision: https://reviews.llvm.org/D49741
llvm-svn: 338628
Michal Gorny [Wed, 1 Aug 2018 20:38:22 +0000 (20:38 +0000)]
[test] Fix %hmaptool path for standalone builds
Fix %hmaptool path to refer to clang_tools_dir instead of
llvm_tools_dir, in order to fix standalone builds. The tool is built
as part of clang, so it won't be found in installed LLVM tools.
Differential Revision: https://reviews.llvm.org/D50156
llvm-svn: 338627
Matt Arsenault [Wed, 1 Aug 2018 20:13:58 +0000 (20:13 +0000)]
AMDGPU: Improve hack for packing conversion ops
Mutate the node type during selection when it
doesn't matter. This avoids an intermediate bitcast
node on targets with legal i16/f16.
Also fixes missing output modifiers on v_cvt_pkrtz_f32_f16,
which I assume are OK.
llvm-svn: 338619
Matt Arsenault [Wed, 1 Aug 2018 19:57:34 +0000 (19:57 +0000)]
AMDGPU: Partially fix handling of packed amdgpu_ps arguments
Fixes annoying limitations when writing tests.
Also remove more leftover code for manually scalarizing arguments
and return values.
llvm-svn: 338618
Heejin Ahn [Wed, 1 Aug 2018 19:40:28 +0000 (19:40 +0000)]
[WebAssembly] Support for a ternary atomic RMW instruction
Summary: This adds support for a ternary atomic RMW instruction: cmpxchg.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D49195
llvm-svn: 338617
Alexey Bataev [Wed, 1 Aug 2018 19:38:20 +0000 (19:38 +0000)]
[DEBUGINFO] Disable emission of the dwarf sections, but allow directives.
Summary:
Added an option that allows to emit only '.loc' and '.file' kind debug
directives, but disables emission of the DWARF sections. Required for
NVPTX target to support profiling. It requires '.loc' and '.file'
directives, but does not require any DWARF sections for the profiler.
Reviewers: probinson, echristo, dblaikie
Subscribers: aprantl, JDevlieghere, llvm-commits
Differential Revision: https://reviews.llvm.org/D46021
llvm-svn: 338616
Nico Weber [Wed, 1 Aug 2018 19:00:49 +0000 (19:00 +0000)]
lld-link: Remove /msvclto option
This was useful for LTO bringup in lld-link while lld couldn't write PDBs. Now
that it can, this should no longer be needed. Hopefully the flag is obscure
enough and recent enough, that nobody uses it – but if somebody should use it,
they should be able to just stop passing it and things should continue to work.
https://reviews.llvm.org/D50139
llvm-svn: 338615