Petr Hosek [Fri, 17 May 2019 06:07:37 +0000 (06:07 +0000)]
[Analysis] Only run plugins tests if plugins are actually enabled
When plugins aren't enabled, don't try to run plugins tests. Don't
enable plugins unconditionally based on the platform, instead check
if LLVM shared library is actually being built which may not be the
case for every host configuration, even if the host itself supports
plugins.
This addresses test failures introduced by r360891/D59464.
Differential Revision: https://reviews.llvm.org/D62050
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360991
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 17 May 2019 06:04:11 +0000 (06:04 +0000)]
[PowerPC] Support .reloc *, R_PPC{,64}_NONE, *
This can be used to create references among sections. When --gc-sections
is used, the referenced section will be retained if the origin section
is retained.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360990
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 17 May 2019 05:53:39 +0000 (05:53 +0000)]
[GlobalISel] Fix -Wsign-compare on 32-bit -DLLVM_ENABLE_ASSERTIONS=on builds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360989
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 17 May 2019 05:44:26 +0000 (05:44 +0000)]
[MC][PowerPC] Clean up PPCAsmBackend
Replace the member variable Target with Triple
Use Triple instead of TheTarget.getName() to dispatch on 32-bit/64-bit.
Delete redundant parameters
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360986
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Dunbobbin [Fri, 17 May 2019 03:44:15 +0000 (03:44 +0000)]
[ELF] Implement Dependent Libraries Feature
This patch implements a limited form of autolinking primarily designed to allow
either the --dependent-library compiler option, or "comment lib" pragmas (
https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=vs-2017) in
C/C++ e.g. #pragma comment(lib, "foo"), to cause an ELF linker to automatically
add the specified library to the link when processing the input file generated
by the compiler.
Currently this extension is unique to LLVM and LLD. However, care has been taken
to design this feature so that it could be supported by other ELF linkers.
The design goals were to provide:
- A simple linking model for developers to reason about.
- The ability to to override autolinking from the linker command line.
- Source code compatibility, where possible, with "comment lib" pragmas in other
environments (MSVC in particular).
Dependent library support is implemented differently for ELF platforms than on
the other platforms. Primarily this difference is that on ELF we pass the
dependent library specifiers directly to the linker without manipulating them.
This is in contrast to other platforms where they are mapped to a specific
linker option by the compiler. This difference is a result of the greater
variety of ELF linkers and the fact that ELF linkers tend to handle libraries in
a more complicated fashion than on other platforms. This forces us to defer
handling the specifiers to the linker.
In order to achieve a level of source code compatibility with other platforms
we have restricted this feature to work with libraries that meet the following
"reasonable" requirements:
1. There are no competing defined symbols in a given set of libraries, or
if they exist, the program owner doesn't care which is linked to their
program.
2. There may be circular dependencies between libraries.
The binary representation is a mergeable string section (SHF_MERGE,
SHF_STRINGS), called .deplibs, with custom type SHT_LLVM_DEPENDENT_LIBRARIES
(0x6fff4c04). The compiler forms this section by concatenating the arguments of
the "comment lib" pragmas and --dependent-library options in the order they are
encountered. Partial (-r, -Ur) links are handled by concatenating .deplibs
sections with the normal mergeable string section rules. As an example, #pragma
comment(lib, "foo") would result in:
.section ".deplibs","MS",@llvm_dependent_libraries,1
.asciz "foo"
For LTO, equivalent information to the contents of a the .deplibs section can be
retrieved by the LLD for bitcode input files.
LLD processes the dependent library specifiers in the following way:
1. Dependent libraries which are found from the specifiers in .deplibs sections
of relocatable object files are added when the linker decides to include that
file (which could itself be in a library) in the link. Dependent libraries
behave as if they were appended to the command line after all other options. As
a consequence the set of dependent libraries are searched last to resolve
symbols.
2. It is an error if a file cannot be found for a given specifier.
3. Any command line options in effect at the end of the command line parsing apply
to the dependent libraries, e.g. --whole-archive.
4. The linker tries to add a library or relocatable object file from each of the
strings in a .deplibs section by; first, handling the string as if it was
specified on the command line; second, by looking for the string in each of the
library search paths in turn; third, by looking for a lib<string>.a or
lib<string>.so (depending on the current mode of the linker) in each of the
library search paths.
5. A new command line option --no-dependent-libraries tells LLD to ignore the
dependent libraries.
Rationale for the above points:
1. Adding the dependent libraries last makes the process simple to understand
from a developers perspective. All linkers are able to implement this scheme.
2. Error-ing for libraries that are not found seems like better behavior than
failing the link during symbol resolution.
3. It seems useful for the user to be able to apply command line options which
will affect all of the dependent libraries. There is a potential problem of
surprise for developers, who might not realize that these options would apply
to these "invisible" input files; however, despite the potential for surprise,
this is easy for developers to reason about and gives developers the control
that they may require.
4. This algorithm takes into account all of the different ways that ELF linkers
find input files. The different search methods are tried by the linker in most
obvious to least obvious order.
5. I considered adding finer grained control over which dependent libraries were
ignored (e.g. MSVC has /nodefaultlib:<library>); however, I concluded that this
is not necessary: if finer control is required developers can fall back to using
the command line directly.
RFC thread: http://lists.llvm.org/pipermail/llvm-dev/2019-March/131004.html.
Differential Revision: https://reviews.llvm.org/D60274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360984
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 17 May 2019 03:25:39 +0000 (03:25 +0000)]
[X86] Support .reloc *, R_{386,X86_64}_NONE, *
This can be used to create references among sections. When --gc-sections
is used, the referenced section will be retained if the origin section
is retained.
See R_MIPS_NONE (D13659), R_ARM_NONE (D61992), R_AARCH64_NONE (D61973) for similar changes.
Reviewed By: rnk
Differential Revision: https://reviews.llvm.org/D62014
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360983
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 17 May 2019 03:05:07 +0000 (03:05 +0000)]
[AArch64] Support .reloc *, R_AARCH64_NONE, *
Summary:
This can be used to create references among sections. When --gc-sections
is used, the referenced section will be retained if the origin section
is retained.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D61973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360981
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Fri, 17 May 2019 02:51:54 +0000 (02:51 +0000)]
[ARM] Support .reloc *, R_ARM_NONE, *
R_ARM_NONE can be used to create references among sections. When
--gc-sections is used, the referenced section will be retained if the
origin section is retained.
Add a generic MCFixupKind FK_NONE as this kind of no-op relocation is
ubiquitous on ELF and COFF, and probably available on many other binary
formats. See D62014.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D61992
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360980
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 17 May 2019 02:18:03 +0000 (02:18 +0000)]
[LFTR] Strengthen assertions in genLoopLimit [NFCI]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360978
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 17 May 2019 02:09:03 +0000 (02:09 +0000)]
[IndVars] Don't reimplement Loop::isLoopInvariant [NFC]
Using dominance vs a set membership check is indistinguishable from a compile time perspective, and the two queries return equivelent results. Simplify code by using the existing function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360976
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 17 May 2019 01:39:58 +0000 (01:39 +0000)]
[LFTR] Factor out a helper function for readability purpose [NFC]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360972
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Fri, 17 May 2019 01:26:35 +0000 (01:26 +0000)]
[CodeMetrics] Don't let extends of i1 be free.
getUserCost() currently returns TCC_Free for any extend of a compare (i1)
result. It seems this is only true in a limited number of cases where for
example two compares are chained. Even in those types of cases it seems
unlikely that they are generally free, while they may be in some cases.
This patch therefore removes this special handling of cast of i1. No tests
are failing because of this.
If some target want the old behavior, it could override getUserCost().
Review: Hal Finkel, Chandler Carruth, Evgeny Astigeevich, Simon Pilgrim,
Ulrich Weigand
https://reviews.llvm.org/D54742/new/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360970
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 17 May 2019 01:17:32 +0000 (01:17 +0000)]
Fix broken test case.
EXPECT_EQ takes two arguments, not a single expression that evaluates to bool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360969
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 17 May 2019 01:12:02 +0000 (01:12 +0000)]
Clarify comments on helpers used by LFTR [NFC]
I'm slowly wrapping my head around this code, and am making comment improvements where I can.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360968
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Fri, 17 May 2019 00:50:35 +0000 (00:50 +0000)]
[SystemZ] Bugfix in SystemZTargetLowering::combineIntDIVREM()
Make sure to not unroll a vector division/remainder (with a constant splat
divisor) after type legalization, since the scalar type may then be illegal.
Review: Ulrich Weigand
https://reviews.llvm.org/D62036
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360965
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Fri, 17 May 2019 00:43:53 +0000 (00:43 +0000)]
Revert r360859: "Reland r360771 "[MergeICmps] Simplify the code.""
It caused PR41917.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360963
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 17 May 2019 00:39:38 +0000 (00:39 +0000)]
Convert PointerUnion to a variadic template.
Summary:
Rather than duplicating code between PointerUnion, PointerUnion3, and
PointerUnion4 (and missing things from the latter cases, such as some of the
DenseMap support and operator==), convert PointerUnion to a variadic template
that can be used as a union of any number of pointers.
(This doesn't support PointerUnion<> right now. Adding a special case for that
would be possible, and perhaps even useful in some situations, but it doesn't
seem worthwhile until we have a concrete use case.)
Reviewers: dblaikie
Subscribers: dexonsmith, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62027
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360962
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 17 May 2019 00:19:28 +0000 (00:19 +0000)]
[Tests] Consolidate more lftr tests
These are all of the ones involving the same data layout string. Remainder take a bit more consideration, but at least everything can be auto-updated now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360961
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Fri, 17 May 2019 00:19:20 +0000 (00:19 +0000)]
[X86][AsmParser] Add mnemonics missed in r360954.
These are valid Jcc, but aren't based on the EFLAGS condition codes (Intel 64
and IA-32 Architetcures Software Developer's Manual Vol. 1, Appendix B). These
are covered in clang/test, but not llvm/test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360960
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 16 May 2019 23:54:41 +0000 (23:54 +0000)]
HWASan exception support.
Summary:
Adds a call to __hwasan_handle_vfork(SP) at each landingpad entry.
Reusing __hwasan_handle_vfork instead of introducing a new runtime call
in order to be ABI-compatible with old runtime library.
Reviewers: pcc
Subscribers: kubamracek, hiraditya, #sanitizers, llvm-commits
Tags: #sanitizers, #llvm
Differential Revision: https://reviews.llvm.org/D61968
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360959
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 23:41:28 +0000 (23:41 +0000)]
[Tests] Expand basic lftr coverage
Newly written tests to cover the simple cases. We don't appear to have broad coverage of this transform anywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360957
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Thu, 16 May 2019 23:27:07 +0000 (23:27 +0000)]
[X86][AsmParser] Ignore "short" even harder in Intel syntax ASM.
In Intel syntax, it's not uncommon to see a "short" modifier on Jcc conditional
jumps, which indicates the offset should be a "short jump" (8-bit immediate
offset from EIP, -128 to +127). This patch expands to all recognized Jcc
condition codes, and removes the inline restriction.
Clang already ignores "jmp short" in inline assembly. However, only "jmp" and a
couple of Jcc are actually checked, and only inline (i.e., not when using the
integrated assembler for asm sources). A quick search through asm-containing
libraries at hand shows a pretty broad range of Jcc conditions spelled with
"short."
GAS ignores the "short" modifier, and instead uses an encoding based on the
given immediate. MS inline seems to do the same, and I suspect MASM does, too.
NASM will yield an error if presented with an out-of-range immediate value.
Example of GCC 9.1 and MSVC v19.20, "jmp short" with offsets that do and do not
fit within 8 bits: https://gcc.godbolt.org/z/aFZmjY
Differential Revision: https://reviews.llvm.org/D61990
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360954
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Thu, 16 May 2019 23:27:05 +0000 (23:27 +0000)]
[X86][AsmParser] Rename "ConditionCode" variable to "ConditionPredicate".
This better matches the verbiage in Intel documentation, and should help avoid
confusion between these two different kinds of values, both of which are parsed
from mnemonics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360953
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 16 May 2019 23:15:26 +0000 (23:15 +0000)]
[X86] Deduplicate symbol lowering logic, NFC
Summary:
This refactors four pieces of code that create SDNodes for references to
symbols:
- normal global address lowering (LEA, MOV, etc)
- callee global address lowering (CALL)
- external symbol address lowering (LEA, MOV, etc)
- external symbol address lowering (CALL)
Each of these pieces of code need to:
- classify the reference
- lower the symbol
- emit a RIP wrapper if needed
- emit a load if needed
- add offsets if needed
I think handling them all in one place will make the code easier to
maintain in the future.
Reviewers: craig.topper, RKSimon
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61690
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360952
91177308-0d34-0410-b5e6-
96231b3b80d8
Amy Huang [Thu, 16 May 2019 22:28:52 +0000 (22:28 +0000)]
Emit global variables as S_CONSTANT records for codeview debug info.
Summary:
This emits S_CONSTANT records for global variables.
Currently this emits records for the global variables already being tracked in the
LLVM IR metadata, which are just constant global variables; we'll also want S_CONSTANTs
for static data members and enums.
Related to https://bugs.llvm.org/show_bug.cgi?id=41615
Reviewers: rnk
Subscribers: aprantl, hiraditya, llvm-commits, thakis
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61926
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360948
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Thu, 16 May 2019 21:49:06 +0000 (21:49 +0000)]
[CodeGen] Fixed de-optimization of legalize subvector extract
The recent introduction of v3i32 etc as an MVT, and its use in AMDGPU
3-dword memory instructions, caused a de-optimization problem for code
with such a load that then bitcasts via vector of i8, because v12i8 is
not an MVT so it legalizes the bitcast by widening it.
This commit adds the ability to widen a bitcast using extract_subvector
on the result, so the value does not need to go via memory.
Differential Revision: https://reviews.llvm.org/D60457
Change-Id: Ie4abb7760547e54a2445961992eafc78e80d4b64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360942
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 20:42:00 +0000 (20:42 +0000)]
[Tests] More consolidation of lftr tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360936
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 20:37:20 +0000 (20:37 +0000)]
[Test] Remove a bunch of cruft from a test
This test hadn't been fully reduced, so do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360935
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 20:33:41 +0000 (20:33 +0000)]
[Tests] Start consolidating lftr tests into a single file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360934
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 20:24:57 +0000 (20:24 +0000)]
[Tests] Autogen the last lftr test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360933
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 20:19:02 +0000 (20:19 +0000)]
[Tests] Autogen a few more lftr tests for readability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360932
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Thu, 16 May 2019 20:15:25 +0000 (20:15 +0000)]
[Tests] Autogen a few lftr test in preparation for merging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360931
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Thu, 16 May 2019 19:00:57 +0000 (19:00 +0000)]
[NFC][InstSimplify] Update fast-math.ll tests I botched in r360808.
These were new tests I added in r360808. I made a mistake while converting the exisiting binary FNeg test into the new unary FNeg tests. Correct that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360928
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 16 May 2019 18:29:34 +0000 (18:29 +0000)]
[ORC] Change handling for SymbolStringPtr tombstones and empty keys.
SymbolStringPtr used to use nullptr as its empty value and (since it performed
ref-count operations on any non-nullptr) a pointer to a special pool-entry
instance as its tombstone.
This commit changes the scheme to use two invalid pointer values as the empty
and tombstone values, and broadens the ref-count guard to prevent ref-counting
operations from being performed on these pointers. This should improve the
performance of SymbolStringPtrs used in DenseMaps/DenseSets, as ref counting
operations will no longer be performed on the tombstone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360925
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 May 2019 18:09:47 +0000 (18:09 +0000)]
[InstCombine] add tests for shuffle of insert subvectors; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360923
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 16 May 2019 18:01:57 +0000 (18:01 +0000)]
Fix typos in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360921
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 16 May 2019 17:20:17 +0000 (17:20 +0000)]
[ORC] Use inline friend definitions for SymbolStringPtr operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360917
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 16 May 2019 16:53:50 +0000 (16:53 +0000)]
[X86] Use 0x9 instead of 0x1 as the immediate in some masked floor pattern. Similarly change 0x2 to 0xA for ceil.
This suppresses exceptions which is what we should be doing for ceil and floor. We already use the correct immediate
in patterns without masking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360915
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Thu, 16 May 2019 16:25:13 +0000 (16:25 +0000)]
[CommandLine] Don't allow duplicate categories.
Summary:
This is a fix to D61574, r360179, that allowed duplicate
OptionCategory's. This change adds a check to make sure a category can
only be added once even if the user passes it twice.
Reviewed By: MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61972
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360913
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 16 May 2019 15:20:08 +0000 (15:20 +0000)]
[llvm-objdump]Move test code missed in r360904
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360909
91177308-0d34-0410-b5e6-
96231b3b80d8
Pavel Labath [Thu, 16 May 2019 15:17:30 +0000 (15:17 +0000)]
Minidump: Add support for the MemoryList stream
Summary:
the stream format is exactly the same as for ThreadList and ModuleList
streams, only the entry types are slightly different, so the changes in
this patch are just straight-forward applications of established
patterns.
Reviewers: amccarth, jhenderson, clayborg
Subscribers: markmentovai, lldb-commits, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61885
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360908
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 15:10:27 +0000 (15:10 +0000)]
AMDGPU: Introduce TokenFactor for ABI register copies in call sequence
The call was missing chain dependencies on the pre-call copies. I
don't think this was causing any real issues however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360906
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 May 2019 15:00:11 +0000 (15:00 +0000)]
[InstSimplify] add tests for fcmp of maxnum with constants; NFC
Sibling tests for rL360899 (D61691).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360905
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 16 May 2019 14:49:10 +0000 (14:49 +0000)]
[llvm-objdump]Split section-filter.test in two to remove X86 dependency
This allows the generic parts of section-filter.test to be tested on all
targets. The X86-specific parts have been moved to another test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360904
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 14:48:34 +0000 (14:48 +0000)]
AMDGPU: Assume xnack is enabled by default
This is the conservatively correct default. It is always safe to
assume xnack is enabled, but not the converse.
Introduce a feature to blacklist targets where xnack can never be
meaningfully enabled. I'm not sure the targets this is applied to is
100% correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360903
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Tozer [Thu, 16 May 2019 14:41:01 +0000 (14:41 +0000)]
Resubmit: [Salvage] Change salvage debug info implementation to use DW_OP_LLVM_convert where needed
Fixes issue: https://bugs.llvm.org/show_bug.cgi?id=40645
Previously, LLVM had no functional way of performing casts inside of a
DIExpression(), which made salvaging cast instructions other than Noop casts
impossible. With the recent addition of DW_OP_LLVM_convert this salvaging is
now possible, and so can be used to fix the attached bug as well as any cases
where SExt instruction results are lost in the debugging metadata. This patch
introduces this fix by expanding the salvage debug info method to cover these
cases using the new operator.
Differential revision: https://reviews.llvm.org/D61184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360902
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 16 May 2019 14:40:31 +0000 (14:40 +0000)]
[llvm-objdump] Add "REQUIES: x86-registered-target" to section-filter.test after rL360893
Appease the hexagon buildbot that doesn't build X86. Disassemblers
require Target/X86 support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360901
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 16 May 2019 14:03:10 +0000 (14:03 +0000)]
[InstSimplify] fold fcmp (minnum, X, C1), C2
minnum(X, LesserC) == C --> false
minnum(X, LesserC) >= C --> false
minnum(X, LesserC) > C --> false
minnum(X, LesserC) != C --> true
minnum(X, LesserC) <= C --> true
minnum(X, LesserC) < C --> true
maxnum siblings will follow if there are no problems here.
We should be able to perform some other combines when the constants
are equal or greater-than too, but that would go in instcombine.
We might also generalize this by creating an FP ConstantRange
(similar to what we do for integers).
Differential Revision: https://reviews.llvm.org/D61691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360899
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing Xue [Thu, 16 May 2019 14:02:13 +0000 (14:02 +0000)]
Fixes for builds that require strict X/Open and POSIX compatiblity
Summary:
- Use alternative to MAP_ANONYMOUS for allocating mapped memory if it isn't available
- Use strtok_r instead of strsep as part of getting program path
- Don't try to find the width of a terminal using "struct winsize" and TIOCGWINSZ on POSIX builds. These aren't defined under POSIX (even though some platforms make them available when they shouldn't), so just check if we are doing a X/Open or POSIX compliant build first.
Author: daltenty
Reviewers: hubert.reinterpretcast, xingxue, andusy
Reviewed By: hubert.reinterpretcast
Subscribers: MaskRay, jsji, hiraditya, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61326
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360898
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Thu, 16 May 2019 13:56:23 +0000 (13:56 +0000)]
[RISCV][NFC] Add nounwind attribute to functions missing it in test/CodeGen/RISCV
This is in preparation for emitting CFI directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360897
91177308-0d34-0410-b5e6-
96231b3b80d8
Xing Xue [Thu, 16 May 2019 13:32:55 +0000 (13:32 +0000)]
[tests][go]Add -stdlib=libc++ to build GO test if LLVM is built with libc++
When libc++ is used to build LLVM libraries, these libraries have dependencies on libc++ and C++ STL signatures in these libraries are corresponding to libc++ implementation. Therefore, -stdlib=libc++ is required on the C++ compiler command for building GO tests that link with these LLVM libraries.
Reviewers: hubert.reinterpretcast, sfertile, amyk, EricWF
Reviewed By: sfertile, hubert.reinterpretcast
Subscribers: jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61900
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360895
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Thu, 16 May 2019 13:30:18 +0000 (13:30 +0000)]
[AArch64] Handle ISD::LROUND and ISD::LLROUND
This patch optimizes ISD::LROUND and ISD::LLROUND to fcvtas
instruction. It currently only handles the scalar version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360894
91177308-0d34-0410-b5e6-
96231b3b80d8
James Henderson [Thu, 16 May 2019 13:28:36 +0000 (13:28 +0000)]
[llvm-objdump]Improve testing of some switches #1
This is the first in a set of patches I have to improve testing of
llvm-objdump. This patch targets --all-headers, --section, and
--full-contents. In the --section case, it deletes a pre-canned binary
which is only used by the one test and replaces it with yaml.
Reviewed by: grimar, MaskRay
Differential Revision: https://reviews.llvm.org/D61941
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360893
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 16 May 2019 13:24:04 +0000 (13:24 +0000)]
Recommit [Object] Change object::SectionRef::getContents() to return Expected<StringRef>
r360876 didn't fix 2 call sites in clang.
Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
Follow-up of D61781.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360892
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Thu, 16 May 2019 13:15:27 +0000 (13:15 +0000)]
[CodeGen] Add lround/llround builtins
This patch add the ISD::LROUND and ISD::LLROUND along with new
intrinsics. The changes are straightforward as for other
floating-point rounding functions, with just some adjustments
required to handle the return value being an interger.
The idea is to optimize lround/llround generation for AArch64
in a subsequent patch. Current semantic is just route it to libm
symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360889
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 13:04:20 +0000 (13:04 +0000)]
GlobalISel: Add buildFMA to MachineIRBuilder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360888
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 12:50:39 +0000 (12:50 +0000)]
RegAllocFast: Improve hinting heuristic
Trace through multiple COPYs when looking for a physreg source. Add
hinting for vregs that will be copied into physregs (we only hinted
for vregs getting copied to a physreg previously). Give hinted a
register a bonus when deciding which value to spill. This is part of
my rewrite regallocfast series. In fact this one doesn't even have an
effect unless you also flip the allocation to happen from back to
front of a basic block. Nonetheless it helps to split this up to ease
review of D52010
Patch by Matthias Braun
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360887
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 16 May 2019 12:48:56 +0000 (12:48 +0000)]
[DominatorTree] Print roots unconditionally in `print()`.
Summary:
This came up in a debugging session. I was failing to update the root of
the tree, and got during verification:
```
DominatorTree is different than a freshly computed one!
Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
[1] %"entry+land.rhs.i" {
4294967295,
4294967295} [0]
[2] %opeq1.exit {
4294967295,
4294967295} [1]
Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
[1] %"entry+land.rhs.i" {
4294967295,
4294967295} [0]
[2] %opeq1.exit {
4294967295,
4294967295} [1]
```
We now print:
```
DominatorTree is different than a freshly computed one!
Current:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
[1] %"entry+land.rhs.i" {
4294967295,
4294967295} [0]
[2] %opeq1.exit {
4294967295,
4294967295} [1]
Roots: <badref>
Freshly computed tree:
=============================--------------------------------
Inorder Dominator Tree: DFSNumbers invalid: 0 slow queries.
[1] %"entry+land.rhs.i" {
4294967295,
4294967295} [0]
[2] %opeq1.exit {
4294967295,
4294967295} [1]
Roots: %"entry+land.rhs.i"
```
Reviewers: kuhar, asbirlea
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61999
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360886
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 16 May 2019 12:39:34 +0000 (12:39 +0000)]
[NFC] Fixup FileCheck option name in tests added in rL360881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360884
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 16 May 2019 12:26:53 +0000 (12:26 +0000)]
[NFC][CodeGen] Add some more tests for pulling binops through shifts
The ashr variant may see relaxation in https://reviews.llvm.org/D61918
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360881
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 12:23:04 +0000 (12:23 +0000)]
GlobalISel: Add buildXor/buildNot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360880
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 12:22:56 +0000 (12:22 +0000)]
GlobalISel: Add DstOp version of buildIntrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360879
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 16 May 2019 12:08:34 +0000 (12:08 +0000)]
Revert r360876 "[Object] Change object::SectionRef::getContents() to return Expected<StringRef>"
It broke the Clang build, see llvm-commits thread.
> Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
>
> Follow-up of D61781.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360878
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 12:06:41 +0000 (12:06 +0000)]
AMDGPU/GlobalISel: Correct regbank for 1-bit and/or/xor
Bool values should use the scc/vcc regbank since r350611.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360877
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 16 May 2019 11:33:48 +0000 (11:33 +0000)]
[Object] Change object::SectionRef::getContents() to return Expected<StringRef>
Expected<ArrayRef<uint8_t>> may be better but use Expected<StringRef> for now.
Follow-up of D61781.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360876
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 16 May 2019 09:42:22 +0000 (09:42 +0000)]
[AArch64][SVE2] Asm: implement CMLA/SQRDCMLAH instructions
Summary:
This patch adds support for the indexed and unpredicated vectors forms
of the CMLA and SQRDCMLAH instructions.
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer
Differential Revision: https://reviews.llvm.org/D61906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360871
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 16 May 2019 09:33:44 +0000 (09:33 +0000)]
[AArch64][SVE2] Asm: implement CDOT instruction
Summary:
The complex DOT instructions perform a dot-product on quadtuplets from
two source vectors and the resuling wide real or wide imaginary is
accumulated into the destination register. The instructions come in two
forms:
Vector form, e.g.
cdot z0.s, z1.b, z2.b, #90 - complex dot product on four 8-bit quad-tuplets,
accumulating results in 32-bit elements. The
complex numbers in the second source vector are
rotated by 90 degrees.
cdot z0.d, z1.h, z2.h, #180 - complex dot product on four 16-bit quad-tuplets,
accumulating results in 64-bit elements.
The complex numbers in the second source
vector are rotated by 180 degrees.
Indexed form, e.g.
cdot z0.s, z1.b, z2.b[3], #0 - complex dot product on four 8-bit quad-tuplets,
with specified quadtuplet from second source vector,
accumulating results in 32-bit elements.
cdot z0.d, z1.h, z2.h[1], #0 - complex dot product on four 16-bit quad-tuplets,
with specified quadtuplet from second source vector,
accumulating results in 64-bit elements.
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer, rovka
Differential Revision: https://reviews.llvm.org/D61903
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360870
91177308-0d34-0410-b5e6-
96231b3b80d8
Cullen Rhodes [Thu, 16 May 2019 09:07:26 +0000 (09:07 +0000)]
[AArch64][SVE2] Asm: add unpredicated integer multiply instructions
Summary:
Add support for the following instructions:
* MUL (indexed and unpredicated vectors forms)
* SQDMULH (indexed and unpredicated vectors forms)
* SQRDMULH (indexed and unpredicated vectors forms)
* SMULH (unpredicated, predicated form added in SVE)
* UMULH (unpredicated, predicated form added in SVE)
* PMUL (unpredicated)
The specification can be found here:
https://developer.arm.com/docs/ddi0602/latest
Reviewed By: SjoerdMeijer, rovka
Differential Revision: https://reviews.llvm.org/D61902
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360867
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Thu, 16 May 2019 08:31:22 +0000 (08:31 +0000)]
Add Triple::isPPC64()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360864
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 16 May 2019 06:22:51 +0000 (06:22 +0000)]
[llvm-readobj] - Revert r360676 partially. NFC.
In the r360676 "Apply clang format. NFC" I applied clang-format
for whole ELFDumper.cpp. It caused a little discussion,
one of the points mentioned was that previously nicely lined up
tables are not so nice now.
This patch reverts them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360860
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 16 May 2019 06:18:02 +0000 (06:18 +0000)]
Reland r360771 "[MergeICmps] Simplify the code."
This revision does not seem to be the culprit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360859
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Kudrin [Thu, 16 May 2019 05:23:13 +0000 (05:23 +0000)]
[IRMover] Improve diagnostic messages for conflicting metadata
This does the similar for error messages as rL344011 has done for warnings.
With llvm::lto::LTO, the error might appear when LTO::run() is executed.
In that case, the calling code cannot know which module causes the error
and, subsequently, cannot hint the user.
Differential Revision: https://reviews.llvm.org/D61880
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360857
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 04:09:06 +0000 (04:09 +0000)]
GlobalISel: Add buildFConstant for APFloat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360853
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 04:08:55 +0000 (04:08 +0000)]
GlobalISel: Add some FP instructions to MachineIRBuilder
This makes FP legalization code more convenient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360852
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 04:08:46 +0000 (04:08 +0000)]
GlobalISel: Fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360851
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 04:08:39 +0000 (04:08 +0000)]
GlobalISel: Add G_FCOPYSIGN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360850
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 16 May 2019 04:08:25 +0000 (04:08 +0000)]
Fix missing const
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360849
91177308-0d34-0410-b5e6-
96231b3b80d8
Yevgeny Rouban [Thu, 16 May 2019 03:39:09 +0000 (03:39 +0000)]
Fix prof branch_weights in entry_counts_missing_dbginfo.ll test
Removed extra parameter from !prof branch_weights metadata of
a call instruction according to the spec.
Differential Revision: https://reviews.llvm.org/D61932
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360843
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 16 May 2019 01:07:54 +0000 (01:07 +0000)]
Fix typo in comment of CSAction -> Action.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360834
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 16 May 2019 00:21:10 +0000 (00:21 +0000)]
[ORC] Modify DenseMap hashing for SymbolStringPtrs.
Modifies the DenseMapInfo<SymbolStringPtr>::getHashValue method to take its
argument by const-ref rather than by value (to avoid unnecessary ref-counting
operations) and to defer to DenseMapInfo<void*> for the hash value computation
(since SymbolStringPtrs are just pointers under the hood).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360831
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 16 May 2019 00:21:07 +0000 (00:21 +0000)]
[JITLink][MachO] Use getSymbol64TableEntry for 64-bit MachO files.
Fixes a think-o. No test case: The nlist and nlist64 data structures happen to
line up for this field, so there's no way to construct a failing test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360830
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Thu, 16 May 2019 00:19:37 +0000 (00:19 +0000)]
Fix GN build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360829
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 May 2019 21:59:53 +0000 (21:59 +0000)]
[X86] Delay creating index register negations during address matching until after we know for sure the match will succeed
If we're trying to match an LEA, its possible the LEA match will be deemed unprofitable. In which case the negation we created in matchAddress would be left dangling in the SelectionDAG. This could artificially increase use counts for other nodes in the DAG. Though I don't have an example of that. But it just seems like bad form to have dangling nodes in isel.
Differential Revision: https://reviews.llvm.org/D61047
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360823
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 May 2019 21:46:05 +0000 (21:46 +0000)]
[codeview] Fix SDNode representation of annotation labels
Before this change, they were erroneously constructed with the EH_LABEL
SDNode opcode, which caused other passes to interact with them in
incorrect ways. See the FIXME about fastisel that this addresses in the
existing test case.
Fixes PR41890
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360818
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Wed, 15 May 2019 21:26:25 +0000 (21:26 +0000)]
[mips] Use range-based `for` loops. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360817
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Wed, 15 May 2019 21:23:41 +0000 (21:23 +0000)]
[AArch64] only indicate CFI on Windows if we emitted CFI
Summary:
Otherwise, we emit directives for CFI without any actual CFI opcodes to
go with them, which causes tools to malfunction. The technique is
similar to what the x86 backend already does.
Fixes https://bugs.llvm.org/show_bug.cgi?id=40876
Patch by: froydnj (Nathan Froyd)
Reviewers: mstorsjo, eli.friedman, rnk, mgrang, ssijaric
Reviewed By: rnk
Subscribers: javed.absar, kristof.beyls, llvm-commits, dmajor
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61960
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360816
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 15 May 2019 21:16:28 +0000 (21:16 +0000)]
[X86] Strengthen type constraints on some specialized X86 ISD opcodes that don't have any flexibility. NFC
These particular instructions only operate on 128-bit vectors and have no wider equivalents. And the
element size is always known.
One could argue that MOVSS/MOVSD could be merged, but that's probably disruptive to code in
X86ISelLowering and probably low value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360815
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Wed, 15 May 2019 21:15:44 +0000 (21:15 +0000)]
[NFC][InstCombine] Add some more tests for pulling binops through shifts
The ashr variant may see relaxation in https://reviews.llvm.org/D61938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360814
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 15 May 2019 20:53:39 +0000 (20:53 +0000)]
[codeview] Finish support for reading and writing S_ANNOTATION records
Implement dumping via llvm-pdbutil and llvm-readobj.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360813
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 15 May 2019 20:48:50 +0000 (20:48 +0000)]
Revert llvm-svn: 360807
Somehow submitted this patch twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360812
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 15 May 2019 20:27:37 +0000 (20:27 +0000)]
Pre-commit unary fneg tests to InstSimplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360808
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 15 May 2019 20:27:35 +0000 (20:27 +0000)]
Add unary fneg to InstSimplify/fp-nan.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360807
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Couperus [Wed, 15 May 2019 19:46:17 +0000 (19:46 +0000)]
Uncomment LLVM_FALLTHROUGH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360798
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron McInally [Wed, 15 May 2019 19:37:03 +0000 (19:37 +0000)]
Add unary fneg to InstSimplify/fp-nan.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360797
91177308-0d34-0410-b5e6-
96231b3b80d8
Taewook Oh [Wed, 15 May 2019 19:35:38 +0000 (19:35 +0000)]
[PredicateInfo] Do not process unreachable operands.
Summary: We should excluded unreachable operands from processing as their DFS visitation order is undefined. When `renameUses` function sorts `OpsToRename` (https://fburl.com/d2wubn60), the comparator assumes that the parent block of the operand has a corresponding dominator tree node. This is not the case for unreachable operands and crashes the compiler.
Reviewers: dberlin, mgrang, davide
Subscribers: efriedma, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61154
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360796
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 15 May 2019 17:48:10 +0000 (17:48 +0000)]
[MachineOperand] Add a ChangeToGA method
Summary:
Analogous to the other ChangeToXXX methods. See the next patch for a
use case.
Change-Id: I6548d614706834fb9109ab3c8fe915e9c6ece2a7
Reviewers: arsenm, kzhuravl
Subscribers: wdng, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61651
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360789
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Wed, 15 May 2019 17:29:58 +0000 (17:29 +0000)]
RegAlloc: try to fail more gracefully when out of registers
Summary:
The emitError path allows the program to continue, unlike report_fatal_error.
This is friendlier to use cases where LLVM is embedded in a larger program,
because the caller may be able to deal with the error somewhat gracefully.
Change the number of requested NOP bytes in the AArch64 and PowerPC
test cases to avoid triggering an unrelated assertion. The compilation
still fails, as verified by the test.
Change-Id: Iafb9ca341002a597b82e59ddc7a1f13c78758e3d
Reviewers: arsenm, MatzeB
Subscribers: qcolombet, nemanjai, wdng, javed.absar, kristof.beyls, kbarton, jsji, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61489
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360786
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Preud'homme [Wed, 15 May 2019 15:20:45 +0000 (15:20 +0000)]
[FileCheck] Fix sphinx error: Make input be gas block
Summary:
Change example of input text from being llvm block to being gas block
since that text is made-up assembly.
Reviewers: jhenderson, jdenny, probinson, arichardson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61893
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360781
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Wed, 15 May 2019 15:15:16 +0000 (15:15 +0000)]
[JumpThreading] A bug fix for stale loop info after unfold select
Summary:
The return value of a TryToUnfoldSelect call was not checked, which led to an
incorrectly preserved loop info and some crash.
The original crash was reported on https://reviews.llvm.org/D59514.
Reviewers: davidxl, amehsan
Reviewed By: davidxl
Subscribers: fhahn, brzycki, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61920
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360780
91177308-0d34-0410-b5e6-
96231b3b80d8
Ryan Taylor [Wed, 15 May 2019 14:43:55 +0000 (14:43 +0000)]
[AMDGPU] Increases available SGPR for Calling Convention
Summary:
SGPR in CC can be either hw initialized or set by other chained shaders
and so this increases the SGPR count availalbe to CC to 105.
Change-Id: I3dfadc750fe4a3e2bd07117a2899fd13f3e2fef3
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D61261
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360778
91177308-0d34-0410-b5e6-
96231b3b80d8