OSDN Git Service
Daniel Berlin [Wed, 14 Jun 2017 21:19:52 +0000 (21:19 +0000)]
PredicateInfo: Don't insert conditional info when a conditional branch jumps to the same target regardless of condition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305416
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Wed, 14 Jun 2017 21:19:28 +0000 (21:19 +0000)]
NewGVN: This is wrong by inspection, it will not cause an issue currently due to other limitations, i believe. This also means i can't make a test for it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305415
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Jun 2017 20:37:11 +0000 (20:37 +0000)]
[x86] avoid unnecessary shuffle mask math in combineX86ShufflesRecursively()
This is a follow-up to https://reviews.llvm.org/D34174 / https://reviews.llvm.org/rL305398.
We mentioned replacing the multiplies with shifts, but the real win seems to be in
bypassing the extra ops in the common case when the RootRatio and OpRatio are one.
This gives us another 1-2% overall win for the test in PR32037:
https://bugs.llvm.org/show_bug.cgi?id=32037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305414
91177308-0d34-0410-b5e6-
96231b3b80d8
David Callahan [Wed, 14 Jun 2017 20:35:33 +0000 (20:35 +0000)]
Allow -profile-guided-section-prefix more than once
Summary:
At present, `-profile-guided-section-prefix` is a `cl::Optional` option, which means it demands to be passed exactly zero or one times. Our build system makes it pretty tricky to guarantee this. We often accidentally pass the flag more than once (but always with the same "false" value) which results in an error, after which compilation fails:
```
clang (LLVM option parsing): for the -profile-guided-section-prefix option: may only occur zero or one times!
```
While we work on improving our build system, it also seems reasonable just to allow `-profile-guided-section-prefix` to be passed more than once, by to `cl::ZeroOrMore`. Quoting [[ http://llvm.org/docs/CommandLine.html#controlling-the-number-of-occurrences-required-and-allowed | the documentation ]]:
> The cl::ZeroOrMore modifier ... indicates that your program will allow the option to be specified zero or more times.
> ...
> If an option is specified multiple times for an option of the cl::opt class, only the last value will be retained.
Reviewers: danielcdh
Reviewed By: danielcdh
Subscribers: twoh, david2050, llvm-commits
Differential Revision: https://reviews.llvm.org/D34219
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305413
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 20:11:46 +0000 (20:11 +0000)]
[StringExtras] overload toHex for ArrayRef<uint8_t>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305411
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Wed, 14 Jun 2017 19:29:53 +0000 (19:29 +0000)]
[EarlyCSE] Make PhiToCheck in removeMSSA() a set.
This way we end up not looking at PHI args already removed.
MemSSA now goes through the updater so we can prune
it to avoid having redundant MemoryPHI arguments, but that
doesn't quite work for the general case.
Discussed with Daniel Berlin, fixes PR33406.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305409
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Wed, 14 Jun 2017 19:16:22 +0000 (19:16 +0000)]
Hide dbgs() stream for when built with -fmodules.
Summary: Make DebugCounter::print and dump methods to be const correct.
Reviewers: aprantl
Reviewed By: aprantl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34214
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305408
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 14 Jun 2017 18:52:12 +0000 (18:52 +0000)]
MC, Object: Reserve a section type, SHT_LLVM_ODRTAB, for the ODR table.
This is part of the ODR checker proposal:
http://lists.llvm.org/pipermail/llvm-dev/2017-June/113820.html
Per discussion on the gnu-gabi mailing list [1] the section type range
0x6fff4c00..0x6fff4cff is reserved for LLVM.
[1] https://sourceware.org/ml/gnu-gabi/2017-q2/msg00030.html
Differential Revision: https://reviews.llvm.org/D33978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305407
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Wed, 14 Jun 2017 17:32:53 +0000 (17:32 +0000)]
Specified ReportError as noreturn friendly to old compilers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305405
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Wed, 14 Jun 2017 17:30:35 +0000 (17:30 +0000)]
Supressed warning: declared ‘static’ but never defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305403
91177308-0d34-0410-b5e6-
96231b3b80d8
Lei Huang [Wed, 14 Jun 2017 17:25:55 +0000 (17:25 +0000)]
Test commit - NFC.
Modified a comment to confirm commit access functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305402
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 14 Jun 2017 17:04:59 +0000 (17:04 +0000)]
[ValueTracking] Correct early out in computeKnownBitsFromOperator to work with non power of 2 bit widths
There's an early out that's trying to detect when we don't know any bits that make up the legal range of a shift. The code subtracts one from BitWidth which creates a mask in the lower bits for power of 2 bit widths. This is then ANDed with the known bits to see if any of those bits are known. If the bit width isn't a power of 2 this creates a non-sensical mask.
This patch corrects this by rounding up to a power of 2 before doing the subtract and mask.
Differential Revision: https://reviews.llvm.org/D34165
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305400
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Jun 2017 17:00:57 +0000 (17:00 +0000)]
[x86] replace div/rem with shift/mask for better shuffle combining perf
We know that shuffle masks are power-of-2 sizes, but there's no way (?) for LLVM to know that,
so hack combineX86ShufflesRecursively() to be much faster by replacing div/rem with shift/mask.
This makes the motivating compile-time bug in PR32037 ( https://bugs.llvm.org/show_bug.cgi?id=32037 )
about 9% faster overall.
Differential Revision: https://reviews.llvm.org/D34174
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305398
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 16:49:38 +0000 (16:49 +0000)]
Add an include of gtest-printers.h to appease the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305396
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 16:41:50 +0000 (16:41 +0000)]
[gtest] Create a shared include directory for gtest utilities.
Many times unit tests for different libraries would like to use
the same helper functions for checking common types of errors.
This patch adds a common library with helpers for testing things
in Support, and introduces helpers in here for integrating the
llvm::Error and llvm::Expected<T> classes with gtest and gmock.
Normally, we would just be able to write:
EXPECT_THAT(someFunction(), succeeded());
but due to some quirks in llvm::Error's move semantics, gmock
doesn't make this easy, so two macros EXPECT_THAT_ERROR() and
EXPECT_THAT_EXPECTED() are introduced to gloss over the difficulties.
Consider this an exception, and possibly only temporary as we
look for ways to improve this.
Differential Revision: https://reviews.llvm.org/D33059
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305395
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 15:59:27 +0000 (15:59 +0000)]
Resubmit "[codeview] Make obj2yaml/yaml2obj support .debug$S..."
This was originally reverted because of some non-deterministic
failures on certain buildbots. Luckily ASAN eventually caught
this as a stack-use-after-scope, so the fix is included in
this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305393
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandros Lamprineas [Wed, 14 Jun 2017 15:00:08 +0000 (15:00 +0000)]
Revert "[ARM] Support constant pools in data when generating execute-only code."
This reverts commit
3a204faa093c681a1e96c5e0622f50649b761ee0.
I've upset a buildbot which runs the address sanitizer:
ERROR: AddressSanitizer: stack-use-after-scope
lib/Target/ARM/ARMISelLowering.cpp:2690
That Twine variable is used illegally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305390
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 14 Jun 2017 14:46:30 +0000 (14:46 +0000)]
[mips] Fix multiprecision arithmetic.
For multiprecision arithmetic on MIPS, rather than using ISD::ADDE / ISD::ADDC,
get SelectionDAG to break down the operation into ISD::ADDs and ISD::SETCCs.
For MIPS, only the DSP ASE has a carry flag, so in the general case it is not
useful to directly support ISD::{ADDE, ADDC, SUBE, SUBC} nodes.
Also improve the generation code in such cases for targets with
TargetLoweringBase::ZeroOrOneBooleanContent by directly using the result of the
comparison node rather than using it in selects. Similarly for ISD::SUBE /
ISD::SUBC.
Address optimization breakage by moving the generation of MIPS specific integer
multiply-accumulate nodes to before legalization.
This revolves PR32713 and PR33424.
Thanks to Simonas Kazlauskas and Pirama Arumuga Nainar for reporting the issue!
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D33494
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305389
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 14 Jun 2017 14:28:24 +0000 (14:28 +0000)]
[MathExtras] fix documentation comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305388
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandros Lamprineas [Wed, 14 Jun 2017 13:22:41 +0000 (13:22 +0000)]
[ARM] Support constant pools in data when generating execute-only code.
The ARM backend asserts against constant pool lowering when it generates
execute-only code in order to prevent the generation of constant pools in
the text section. It appears that target independent optimizations might
generate DAG nodes that represent constant pools. By lowering such nodes
as global addresses we don't violate the semantics of execute-only code
and also it is guaranteed that execute-only behaves correct with the
position-independent addressing modes that support execute-only code.
Differential Revision: https://reviews.llvm.org/D33773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305387
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Wed, 14 Jun 2017 13:14:38 +0000 (13:14 +0000)]
Align definition of DW_OP_plus with DWARF spec [3/3]
Summary:
This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things.
The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack.
This is done in three stages:
• The first patch (LLVM) adds support for DW_OP_plus_uconst.
• The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst.
• The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions.
Patch by Sander de Smalen.
Reviewers: echristo, pcc, aprantl
Reviewed By: aprantl
Subscribers: fhahn, javed.absar, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D33894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305386
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Wed, 14 Jun 2017 12:16:47 +0000 (12:16 +0000)]
[mips] Fix machine verifier errors in the long branch pass
This patch fixes two systemic machine verifier errors in the long
branch pass. The first is the incorrect basic block successors
and the second was the incorrect construction of several jump
instructions.
This partially resolves PR27458 and the associated PR32146.
Reviewers: slthakur
Differential Revision: https://reviews.llvm.org/D33378
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305382
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Wed, 14 Jun 2017 07:05:42 +0000 (07:05 +0000)]
Revert r304907 as it is causing some failures that I cannot reproduce.
Reverting this until a test case can be provided to aid the investigation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305372
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 06:24:24 +0000 (06:24 +0000)]
Revert "[codeview] Make obj2yaml/yaml2obj support .debug$S..."
This is causing failures on linux bots with an invalid stream
read. It doesn't repro in any configuration on Windows, so
reverting until I have a chance to investigate on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305371
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 05:48:33 +0000 (05:48 +0000)]
Use make_shared instead of make_unique.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305369
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 05:44:38 +0000 (05:44 +0000)]
Fix some more errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305368
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 05:38:34 +0000 (05:38 +0000)]
Add some #includes to appease the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305367
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Wed, 14 Jun 2017 05:31:00 +0000 (05:31 +0000)]
[codeview] Make obj2yaml/yaml2obj support .debug$S/T sections.
This allows us to use yaml2obj and obj2yaml to round-trip CodeView
symbol and type information without having to manually specify the bytes
of the section. This makes for much easier to maintain tests. See the
tests under lld/COFF in this patch for example. Before they just said
SectionData: <blob> whereas now we can use meaningful record
descriptions. Note that it still supports the SectionData yaml field,
which could be useful for initializing a section to invalid bytes for
testing, for example.
Differential Revision: https://reviews.llvm.org/D34127
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305366
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 14 Jun 2017 00:36:21 +0000 (00:36 +0000)]
Support: Remove MSVC 2013 workarounds in ThreadPool class.
I have confirmed that these are no longer needed with MSVC 2015.
Differential Revision: https://reviews.llvm.org/D34187
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305347
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 14 Jun 2017 00:34:42 +0000 (00:34 +0000)]
[libFuzzer] really restrict the new test to Linux (fails on Mac/Windows currently)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305346
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Wed, 14 Jun 2017 00:22:43 +0000 (00:22 +0000)]
Re-enable tests on power pc since the bug has been fixed.
Summary: just flip them on.
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34186
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305345
91177308-0d34-0410-b5e6-
96231b3b80d8
Spyridoula Gravani [Wed, 14 Jun 2017 00:17:55 +0000 (00:17 +0000)]
Added partial verification for .apple_names accelerator table in llvm-dwarfdump output.
This patch adds code which verifies that each bucket in the .apple_names
accelerator table is either empty or has a valid hash index.
Differential Revision: https://reviews.llvm.org/D34177
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305344
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Tue, 13 Jun 2017 23:57:51 +0000 (23:57 +0000)]
Reverted r305339 as MSVC is not happy with noreturn in lambda.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305343
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Tue, 13 Jun 2017 23:42:32 +0000 (23:42 +0000)]
[globalisel][legalizer] G_LOAD/G_STORE NarrowScalar should not emit G_GEP x, 0.
Summary:
When legalizing G_LOAD/G_STORE using NarrowScalar, we should avoid emitting
%0 = G_CONSTANT ty 0
%1 = G_GEP %x, %0
since it's cheaper to not emit the redundant instructions than it is to fold them
away later.
Reviewers: qcolombet, t.p.northover, ab, rovka, aditya_nandakumar, kristof.beyls
Reviewed By: qcolombet
Subscribers: javed.absar, llvm-commits, igorb
Differential Revision: https://reviews.llvm.org/D32746
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305340
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Tue, 13 Jun 2017 23:39:42 +0000 (23:39 +0000)]
Specified LLVM_ATTRIBUTE_NORETURN for ReportError.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305339
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 23:30:41 +0000 (23:30 +0000)]
[InstCombine] Add test cases demonstrating failure to handle (select (icmp eq (and X, C1), 0), Y, (or Y, C2)) when the icmp portion gets turned into a truncate and a signed compare with 0.
InstCombine has an optimization that recognizes an and with the sign bit of legal type size and turns it into a truncate and compare that checks the sign bit. But the select handling code doesn't recognize this idiom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305338
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 13 Jun 2017 23:09:11 +0000 (23:09 +0000)]
[libFuzzer] restrict the new test to Linux (fails on Mac currently)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305335
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Tue, 13 Jun 2017 22:32:38 +0000 (22:32 +0000)]
[ADT] Revert r305326 changes in BitVector.h to fix broken builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305332
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 13 Jun 2017 22:31:21 +0000 (22:31 +0000)]
[libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in libFuzzer. This is not fully functional yet, but simple tests work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305331
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 13 Jun 2017 22:24:24 +0000 (22:24 +0000)]
[AMDGPU] Remove now dead defaultOffsetS13(). NFCI.
Fixes the GCC7 build with -Werror.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305329
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Tue, 13 Jun 2017 22:12:35 +0000 (22:12 +0000)]
[InstrProf] Don't take the address of alwaysinline available_externally functions
Doing so breaks compilation of the following C program
(under -fprofile-instr-generate):
__attribute__((always_inline)) inline int foo() { return 0; }
int main() { return foo(); }
At link time, we fail because taking the address of an
available_externally function creates an undefined external reference,
which the TU cannot provide.
Emitting the function definition into the object file at all appears to
be a violation of the langref: "Globals with 'available_externally'
linkage are never emitted into the object file corresponding to the LLVM
module."
Differential Revision: https://reviews.llvm.org/D34134
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305327
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Tue, 13 Jun 2017 22:11:49 +0000 (22:11 +0000)]
[ADT] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305326
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 21:05:42 +0000 (21:05 +0000)]
Use reference to iterate through string table instead of copying.
Summary: just a quick patch
Subscribers: ruiu, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D34171
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305324
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 20:53:31 +0000 (20:53 +0000)]
Fix a bug introduced in r305092 on big-endian systems.
Summary:
We were writing the length of the string based on system-endianness, and
not universally little-endian. This fixes that.
Reviewers: zturner
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D34159
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305322
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Tue, 13 Jun 2017 20:44:08 +0000 (20:44 +0000)]
[PGO] Update VP metadata after memory intrinsic optimization
Summary:
Leave an updated VP metadata on the fallback memcpy intrinsic after
specialization. This can be used for later possible expansion based on
the average of the remaining values.
Reviewers: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D34164
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305321
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 20:36:19 +0000 (20:36 +0000)]
Fix alignment complaint.
Summary: Apparently we need to write using a void* pointer on some architectures, or else alignment error is caused.
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D34166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305320
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Tue, 13 Jun 2017 20:33:51 +0000 (20:33 +0000)]
[ADT] PointerUnion::getAddrOfPtr1(): fix/silence -Wcast-qual warning.
Summary:
Previously, when D33102 landed, this broke -Werror buildbots.
http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu/builds/3249
```
FAILED: /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/install/stage1/bin/clang++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_GLOBAL_ISEL -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/CodeGen/AsmPrinter -I/home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/lib/CodeGen/AsmPrinter -Iinclude -I/home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/include -fPIC -fvisibility-inlines-hidden -Werror -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections -O3 -UNDEBUG -fno-exceptions -fno-rtti -MMD -MT lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/CodeViewDebug.cpp.o -MF lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/CodeViewDebug.cpp.o.d -o lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/CodeViewDebug.cpp.o -c /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
In file included from /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:14:
In file included from /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/lib/CodeGen/AsmPrinter/CodeViewDebug.h:17:
In file included from /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h:15:
In file included from /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/include/llvm/IR/DebugInfoMetadata.h:26:
In file included from /home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/include/llvm/IR/Metadata.h:23:
/home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/include/llvm/ADT/PointerUnion.h:161:19: error: cast from 'void **' to 'const llvm::DISubprogram **' must have all intermediate pointers const qualified to be safe [-Werror,-Wcast-qual]
return (PT1 *)Val.getAddrOfPointer();
^
/home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/include/llvm/ADT/TinyPtrVector.h:177:18: note: in instantiation of member function 'llvm::PointerUnion<const llvm::DISubprogram *, llvm::SmallVector<const llvm::DISubprogram *, 4> *>::getAddrOfPtr1' requested here
return Val.getAddrOfPtr1();
^
/home/buildbot/Buildbot/Slave1a/clang-with-lto-ubuntu/llvm.src/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:1885:33: note: in instantiation of member function 'llvm::TinyPtrVector<const llvm::DISubprogram *>::begin' requested here
for (const DISubprogram *SP : MethodItr.second) {
^
1 error generated.
```
Reviewers: dblaikie, akyrtzi
Reviewed By: dblaikie
Subscribers: joerg, mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D34153
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305319
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Tue, 13 Jun 2017 19:05:24 +0000 (19:05 +0000)]
Revert r305313 & r305303, self-hosting build-bot isn’t liking it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305318
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Seurer [Tue, 13 Jun 2017 18:52:41 +0000 (18:52 +0000)]
[powerpc] deactivate tests combined.test and object.test on powerpc64 be
These tests fail on powerpc64 BE (only, not LE) and are thus intefering with
the running of 3 of the powerpc buildbots. The author of the tests has been
notified and is working on fixing them but in the meantime I am disabling
them to get the bots working again.
See https://bugs.llvm.org//show_bug.cgi?id=33429
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305317
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 13 Jun 2017 18:51:50 +0000 (18:51 +0000)]
[WebAssembly] Cleanup WebAssemblyWasmObjectWriter
Differential Revision: https://reviews.llvm.org/D34131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305316
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 18:17:36 +0000 (18:17 +0000)]
Improve error messages in order to help with fixing a big-endian bug.
Summary: Added output to stderr so that we can actually see what is happening when the test fails on big endian.
Reviewers: zturner
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D34155
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305314
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Tue, 13 Jun 2017 18:12:11 +0000 (18:12 +0000)]
Fix self hosting build-bot failure from r305303 by adjusting DynamicLibraryTests compile flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305313
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 17:58:59 +0000 (17:58 +0000)]
[IR] Remove a couple explicitly deleted default constructors on classes that have a non-default constructor. NFC
The non-default constructor will implicitly delete the default constructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305311
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Tue, 13 Jun 2017 17:43:39 +0000 (17:43 +0000)]
[AArch64][Falkor] Fix sched details for FDIV, FSQRT, SDIV, UDIV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305310
91177308-0d34-0410-b5e6-
96231b3b80d8
Kit Barton [Tue, 13 Jun 2017 17:35:29 +0000 (17:35 +0000)]
Test commit - NFC.
Modified a comment to confirm commit access functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305309
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 17:18:45 +0000 (17:18 +0000)]
Fix m_[Ord|Unord][FMin|FMax] matchers to correctly match ordering.
Previously, the matching was done incorrectly for the case where
operands for FCmpInst and SelectInst were in opposite order.
Patch by Andrei Elovikov.
Differential Revision: https://reviews.llvm.org/D33185
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305308
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 13 Jun 2017 17:10:16 +0000 (17:10 +0000)]
[Hexagon] Generate store-immediate instructions for stack objects
Store-immediate instructions have a non-extendable offset. Since the
actual offset for a stack object is not known until much later, only
generate these stores when the stack size (at the time of instruction
selection) is small.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305305
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Tue, 13 Jun 2017 16:54:44 +0000 (16:54 +0000)]
Align definition of DW_OP_plus with DWARF spec [1/3]
Summary:
This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things.
The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack.
This is done in three stages:
• The first patch (LLVM) adds support for DW_OP_plus_uconst.
• The second patch (Clang) contains changes all its uses from DW_OP_plus to DW_OP_plus_uconst.
• The third patch (LLVM) changes the semantics of DW_OP_plus and DW_OP_minus to be in line with its DWARF meaning. This patch includes the bitcode upgrade from legacy DIExpressions.
Patch by Sander de Smalen.
Reviewers: pcc, echristo, aprantl
Reviewed By: aprantl
Subscribers: fhahn, aprantl, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33892
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305304
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederich Munch [Tue, 13 Jun 2017 16:48:41 +0000 (16:48 +0000)]
Force RegisterStandardPasses to construct std::function in the IPO library.
Summary: Fixes an issue using RegisterStandardPasses from a statically linked object before PassManagerBuilder::addGlobalExtension is called from a dynamic library.
Reviewers: efriedma, theraven
Reviewed By: efriedma
Subscribers: mehdi_amini, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D33515
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305303
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 13 Jun 2017 16:21:57 +0000 (16:21 +0000)]
[Hexagon] Generate multiply-high instruction in isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305302
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Tue, 13 Jun 2017 16:17:20 +0000 (16:17 +0000)]
bpf: clang-format on BPFAsmPrinter.cpp
Signed-off-by: Yonghong Song <yhs@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305301
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 13 Jun 2017 16:07:36 +0000 (16:07 +0000)]
[Hexagon] Don't kill live registers when creating mux out of tfr
When a mux instruction is created from a pair of complementary conditional
transfers, it can be placed at the location of either the earlier or the
later of the transfers. Since it will use the operands of the original
transfers, putting it in the earlier location may hoist a kill of a source
register that was originally further down. Make sure the kill flag is
removed if the register is still used afterwards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305300
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 13 Jun 2017 15:49:13 +0000 (15:49 +0000)]
[PDB] Add a module descriptor for every object file
Summary:
Expose the module descriptor index and fill it in for section
contributions.
Reviewers: zturner
Subscribers: llvm-commits, ruiu, hiraditya
Differential Revision: https://reviews.llvm.org/D34126
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305296
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Tue, 13 Jun 2017 14:11:29 +0000 (14:11 +0000)]
[MIPS] BuildCondBr should preserve MO flags
While simplifying branches in the MachineInstr representation, the
routine BuildCondBr must preserve flags on register MachineOperands. In
particular, it must preserve the <undef> flag.
This fixes a bug that is unlikely to occur in any real scenario, but
which bugpoint is likely to introduce.
Patch By Nick Johnson!
Reviewers: ahatanak, sdardis
Differential Revision: https://reviews.llvm.org/D34041
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305290
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 13 Jun 2017 13:51:49 +0000 (13:51 +0000)]
[Hexagon] Stop pmpy recognition when shift conversion fails
The conversion of shifts from right shifts to left shifts may fail.
In such case, the pmpy recognition cannot proceed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305289
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 13 Jun 2017 13:04:32 +0000 (13:04 +0000)]
[ARM] Add scheduling classes for VFNM[AS]
The VFNM[AS] instructions did not have scheduling information attached, which
was causing assertion failures with the Cortex-A57 scheduling model and
-fp-contract=fast, because the Cortex-A57 sched model claims to be complete.
Differential Revision: https://reviews.llvm.org/D34139
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305288
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 13 Jun 2017 10:17:57 +0000 (10:17 +0000)]
Strip UTF8 BOM that got added in rL305091
Seems my recent move to VS2017 has resulted in a few text editor issues.....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305285
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 13 Jun 2017 10:13:48 +0000 (10:13 +0000)]
[X86][SSE] Refactor getTargetConstantBitsFromNode to avoid large APInts (PR32037)
Much of PR32037's compile time regression is due to getTargetConstantBitsFromNode always creating large (>64bit) APInts during the bitcasting from the source data to the destination bitwidth.
This commit avoids this bitcast stage if the data is already the correct bitwidth.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305284
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 13 Jun 2017 09:58:27 +0000 (09:58 +0000)]
Strip UTF8 BOM that got added for some reason in rL305163
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305282
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 13 Jun 2017 07:34:32 +0000 (07:34 +0000)]
PPCISelLowering.cpp: Fix warnings in r305214. [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305277
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 07:13:50 +0000 (07:13 +0000)]
[AVX-512] Mark masked VPCMP instructions as commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305276
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 07:13:47 +0000 (07:13 +0000)]
[AVX-512] Mark masked version of vpcmpeq as being commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305275
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 07:13:44 +0000 (07:13 +0000)]
[X86] Add masked integer compare instructions to load folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305274
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Tue, 13 Jun 2017 07:00:05 +0000 (07:00 +0000)]
Read /out:%t which was (accidentally?) removed in r305258.
Without it, the source directory gets polluted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305271
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Tue, 13 Jun 2017 03:06:16 +0000 (03:06 +0000)]
[Lexicon] Add GVN
Summary: Add a lexicon entry for global value numbering.
Reviewers: davide, majnemer
Reviewed By: davide
Subscribers: llvm-commits, inouehrs
Differential Revision: https://reviews.llvm.org/D33664
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305270
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 13 Jun 2017 02:24:09 +0000 (02:24 +0000)]
Inliner: Avoid calling shouldInline until it's absolutely necessary
This restores the order of evaluation (& conditionalized evaluation) of
isTriviallyDeadInstruction, InlineHistoryIncludes, and shouldInline
(with the addition of a shouldInline call after
isTriviallyDeadInstruction) from before r305245.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305267
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Tue, 13 Jun 2017 01:42:21 +0000 (01:42 +0000)]
[WebAssembly] Fix symbol type for addresses of external functions
These symbols were previously not being marked as functions
so were appearing as globals instead, and with the incorrect
relocation type.
Without this fix, objects that take address of external
functions include them as global imports rather than function
imports which then fails at link time.
Differential Revision: https://reviews.llvm.org/D34068
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305263
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 13 Jun 2017 01:28:49 +0000 (01:28 +0000)]
Fix signed/unsigned comparison warning; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305262
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Tue, 13 Jun 2017 00:42:03 +0000 (00:42 +0000)]
Adding one test that I forgot to include with the commit for https://reviews.llvm.org/D32779.
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305261
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 00:19:43 +0000 (00:19 +0000)]
Revert "Revert "Fix alignment bug in COFF emission.""
This revert was done so that my other patch to add test framework could
land separately. Now the revert can be reverted and this patch can
reland.
This reverts commit
18b3c75b2b0d32601fb60a06b9672c33d6f0dff9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305259
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 00:16:32 +0000 (00:16 +0000)]
Update the test framework for llvm-cvtres to be more comprehensive.
Summary: Added test cases for multiple machine types, file merging, multiple languages, and more resource types. Also fixed new bugs these tests exposed.
Subscribers: javed.absar, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D34047
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305258
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 00:15:47 +0000 (00:15 +0000)]
Revert "Fix alignment bug in COFF emission."
I accidentally combined this patch with one for adding more tests, they
should be separated.
This reverts commit
3da218a523be78df32e637d3446ecf97c9ea0465.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305257
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 13 Jun 2017 00:06:10 +0000 (00:06 +0000)]
Fix alignment bug in COFF emission.
Summary: Fix alignment issue in D34020, by aligning all sections to 8 bytes.
Reviewers: zturner
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D34072
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305256
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 13 Jun 2017 00:00:19 +0000 (00:00 +0000)]
[IR] Remove override of operator new from PHINode.
This just forwarded to the same signature in User. The version in User is protected so there's no danger of anyone outside of PHINode constructing with the wrong operator new. All PHINodes are created by a static Create function in PHINode.
I believe at one point in history this called User::operator new(s, 0) so it was useful then.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305255
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 12 Jun 2017 23:59:43 +0000 (23:59 +0000)]
Update LangRef for PR27284.
And reverse the ownership between DICompileUnit and DISubprogram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305254
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Clegg [Mon, 12 Jun 2017 23:52:44 +0000 (23:52 +0000)]
[WebAssembly] MC: Fix value of R_WEBASSEMBLY_TABLE_INDEX relocations
Previously we were writing the value function index space
value but for these types of relocations we want to be
writing the table element index space value.
Add a test case for these relocation types that fails
without this change.
Differential Revision: https://reviews.llvm.org/D33962
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305253
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 12 Jun 2017 23:47:27 +0000 (23:47 +0000)]
Use a fixed target triple to s to appease windows bots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305252
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 12 Jun 2017 23:25:15 +0000 (23:25 +0000)]
[IR] Stop deleting other signatures of User::operator new when we override one signature in a class derived from User
User has 3 signatures for operator new today. They take a single size, a size and a number of users, and a size, number of users, and descriptor size.
Historically there used to only be one signature that took size and a number of uses. Long ago derived classes implemented their own versions that took just a size and would call the size and use count version. Then they left an unimplemented signature for the size and use count signature from User. As we moved to C++11 this unimplemented signature because = delete.
Since then operator new has picked up two new signatures for operator new. But when the 3 argument version was added it was never added to the delete list in all of the derived classes where the 2 argument version is deleted. This makes things inconsistent.
I believe once one version of operator new is created in a derived class name hiding will take care of making all of the base class signatures unavailable. So I don't think the deleted lines are needed at all.
This patch removes all of the deletes in cases where there is an override or there is already a delete of another signature (that should trigger name hiding too).
Differential Revision: https://reviews.llvm.org/D34120
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305251
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 12 Jun 2017 23:15:47 +0000 (23:15 +0000)]
Fix line endings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305249
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 12 Jun 2017 23:10:31 +0000 (23:10 +0000)]
[pdb] Don't choke on unknown symbol types.
When we get an unknown symbol type, we might as well at least
dump it. Same goes for round-tripping through YAML, we can
dump the record contents as raw bytes even if we don't know
how to interpret it semantically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305248
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 12 Jun 2017 23:01:17 +0000 (23:01 +0000)]
Inliner: Don't remove calls to readnone+nounwind (but not always_inline) functions in the AlwaysInliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305245
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Mon, 12 Jun 2017 22:41:06 +0000 (22:41 +0000)]
Fix an assertion failure when duplicate dbg.declares are present.
This fixes PR33157.
https://bugs.llvm.org//show_bug.cgi?id=33157
We might also think about disallowing duplicate dbg.declare intrinsics
entirely, but this may complicate some passes needlessly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305244
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 12 Jun 2017 22:34:37 +0000 (22:34 +0000)]
fix typos/formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305243
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 12 Jun 2017 22:16:49 +0000 (22:16 +0000)]
Support: Don't set RLIMIT_AS on child processes when applying a memory limit
It doesn't seem relevant to set an address space limit - this isn't
important in any sense that I'm aware & it gets in the way of things
that use a lot of address space, like llvm-symbolizer.
This came up when I realized that bugpoint regression tests were much
slower with -gsplit-dwarf than plain -g. Turned out that bugpoint
subprocesses (opt, etc) were crashing and doing symbolization - but
bugpoint runs those subprocesses with a 400MB memory limit. So with
plain -g, mmaping the opt binary would exceed the memory limit, fail,
and thus be really fast - no symbolization occurred. Whereas with
-gsplit-dwarf, comically, having less to map in, it would succeed and
then spend lots of time symbolizing.
I've fixed at least the critical part of bugpoint's perf problem there
by adding an option to allow bugpoint to disable symbolization. Thus
improving the perfromance for -gsplit-dwarf and making the -g-esque
speed available without this quirk/accidental benefit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305242
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Mon, 12 Jun 2017 22:08:08 +0000 (22:08 +0000)]
[ADT] Add type-safe methods to FoldingSetImpl; NFC.
Thankfully, this hasn't uncovered any new bugs. With this, issues like
the one fixed in r305207 (hopefully) shouldn't happen again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305241
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 12 Jun 2017 22:08:03 +0000 (22:08 +0000)]
Fix printing error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305240
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 12 Jun 2017 21:57:41 +0000 (21:57 +0000)]
[llvm-pdbutil] Fix one more issue with no-id-stream PDBs.
This one occurred when we were dumping symbols, we have code
that is prepared to dump many different types of symbols,
including symbols which reference an ID stream. So when creating
the dumper object, we assume that there is an ID stream. Fix
this assumption.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305237
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 12 Jun 2017 21:46:51 +0000 (21:46 +0000)]
Slightly better fix for dealing with no-id-stream PDBs.
The last fix required the user to manually add the required
feature. This caused an LLD test to fail because I failed to
update LLD. In practice we can hide this logic so it can just
be transparently added when we write the PDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305236
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 12 Jun 2017 21:34:53 +0000 (21:34 +0000)]
[llvm-pdbdump] Don't fail on PDBs with no ID stream.
Older PDBs don't have this. Its presence is detected by using
the various "feature" flags that come at the end of the PDB
Stream. Detect this, and don't try to dump the ID stream if the
features tells us it's not present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305235
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Thomas [Mon, 12 Jun 2017 21:26:53 +0000 (21:26 +0000)]
[RS4GC] Drop invalid metadata after pointers are relocated
Summary:
After RS4GC, we should drop metadata that is no longer valid. These metadata
is used by optimizations scheduled after RS4GC, and can cause a miscompile.
One such metadata is invariant.load which is used by LICM sinking transform.
After rewriting statepoints, the address of a load maybe relocated. With
invariant.load metadata on a load instruction, LICM sinking assumes the
loaded value (from a dererenceable address) to be invariant, and
rematerializes the load operand and the load at the exit block.
This transforms the IR to have an unrelocated use of the
address after a statepoint, which is incorrect.
Other metadata we conservatively remove are related to
dereferenceability and noalias metadata.
This patch drops such metadata on store and load instructions after
rewriting statepoints.
Reviewers: reames, sanjoy, apilipenko
Reviewed by: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D33756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305234
91177308-0d34-0410-b5e6-
96231b3b80d8