Commit Graph

282551 Commits

Author SHA1 Message Date
Rui Ueyama 005e7c3d75 Do not use Decompressor::isCompressedELFSection. NFC.
In order to identify a compressed section, we check if a section name
starts with ".zdebug" or the section has SHF_COMPRESSED flag. We already
use the knowledge in this function. So hiding that check in
isCompressedELFSection doesn't make sense.

llvm-svn: 324951
2018-02-12 22:32:57 +00:00
Sam Clegg 126cf39d09 [WebAssembly] MC: Remove redundant `private` specifiers
This is inline with the other MCSection and MCSymbol subclasses

llvm-svn: 324950
2018-02-12 22:29:51 +00:00
Rui Ueyama 3cd48fb124 Remove 'z' in .zdebug when decompressing a section.
When decompressing a compressed debug section, we drop SHF_COMPRESSED
flag but we didn't drop "z" in ".zdebug" section name. This patch does
that for consistency.

This change also fixes the issue that .zdebug_gnu_pubnames are not
dropped when we are creating a .gdb_index section.

llvm-svn: 324949
2018-02-12 22:25:45 +00:00
John Baldwin f7854b669a Look for 32-bit libraries in /usr/lib32 for MIPS O32 on FreeBSD.
Summary:
FreeBSD N64 MIPS systems can include 32-bit libraries for O32 in
/usr/lib32 similar to the 32-bit compatibility libraries provided
for FreeBSD/amd64 and FreeBSD/powerpc64.

Reviewers: dim

Reviewed By: dim

Differential Revision: https://reviews.llvm.org/D42972

llvm-svn: 324948
2018-02-12 22:22:01 +00:00
Sanjay Patel 0537deb5cd [x86] add select test to show there's no single right answer (PR28968); NFC
llvm-svn: 324947
2018-02-12 22:19:24 +00:00
George Karpenkov 192d9a186f [analyzer] [tests] Fix a typo in analyzer testing script.
Incorrect option instance construction.

llvm-svn: 324946
2018-02-12 22:13:01 +00:00
Adrian Prantl a5eee4de07 Simplify switch statement (NFC)
llvm-svn: 324945
2018-02-12 22:09:57 +00:00
Rui Ueyama ac114d27ae s/uncompress/decompress/g.
In lld, we use both "uncompress" and "decompress" which is confusing.
Since LLVM uses "decompress", we should use the same term.

llvm-svn: 324944
2018-02-12 21:56:14 +00:00
Gerolf Hoflehner edcd564820 [LSR] Avoid UB overflow when examining reuse opportunities
llvm-svn: 324943
2018-02-12 21:49:32 +00:00
Jacob Gravelle ca358da5e7 [WebAssembly] Fix casting MCSymbol to MCSymbolWasm on ELF
Summary:
wasm32-unknown-unknown-elf has MCSymbols that are not MCSymbolWasms, so
we need a non-asserting cast here.

Reviewers: dschuff, sunfish

Subscribers: jfb, sbc100, aheejin, llvm-commits

Differential Revision: https://reviews.llvm.org/D43205

llvm-svn: 324942
2018-02-12 21:41:12 +00:00
Sanjay Patel 014c000f6a [DAG] make binops with undef operands consistent with IR
This started by noticing that scalar and vector types were producing different results with div ops in PR36305:
https://bugs.llvm.org/show_bug.cgi?id=36305

...but the problem is bigger. I couldn't keep it straight without a table, so I'm attaching that as a PDF to 
the review. The x86 tests in undef-ops.ll correspond to that table.

Green means that instsimplify and the DAG agree on the result for all types.
Red means the DAG was returning undef when IR was not.
Yellow means the DAG was returning a non-undef result when IR returned undef.

This patch assumes that we're currently doing the right thing in IR.

Note: I couldn't find any problems with lowering vector constants as the code comments were warning, 
but those comments were written long ago in rL36413 .

Differential Revision: https://reviews.llvm.org/D43141

llvm-svn: 324941
2018-02-12 21:37:27 +00:00
Abderrazek Zaafrani e7ed880761 [AArch64] Fixes for ARMv8.2-A FP16 scalar intrinsic - clang portion
https://reviews.llvm.org/D42993

llvm-svn: 324940
2018-02-12 21:26:06 +00:00
Craig Topper 88939fefe8 [X86] Simplify X86DAGToDAGISel::matchBEXTRFromAnd by creating an X86ISD::BEXTR node and calling Select. Add isel patterns to recognize this node.
This removes a bunch of special case code for selecting the immediate and folding loads.

llvm-svn: 324939
2018-02-12 21:18:11 +00:00
Craig Topper efe3923514 [X86] Remove unused multiclass argument. NFC
llvm-svn: 324938
2018-02-12 21:18:09 +00:00
Martin Storsjo 9ca8b57186 [GlobalMerge] Allow merging of dllexported variables
If merging them, the dllexport attribute needs to be brought along
to the new GlobalAlias.

Differential Revision: https://reviews.llvm.org/D43192

llvm-svn: 324937
2018-02-12 21:14:21 +00:00
Adrian Prantl 520789e139 Fix the syntax highlighting of strings in dwarfdump.
llvm-svn: 324936
2018-02-12 21:11:23 +00:00
Adrian Prantl baf9c20b02 Factor out common condition into an easier to understand helper function (NFC).
llvm-svn: 324935
2018-02-12 21:11:14 +00:00
Michael Kruse a6716d9d81 [ScopBuilder] scalar-indep: Fix mutually referencing PHIs.
Two or more PHIs mutually using each other directly or indirectly as
incoming value could cause that a PHI WRITE be added before the PHI READ
(i.e. it overwrites the current incoming value with the next incoming
value before it being read).

Fix by ensuring that the PHI WRITE and PHI READ are in the same statement.

This should fix the miscompile of SingleSource/Benchmark/Misc/whetstone
from the test-suite.

llvm-svn: 324934
2018-02-12 21:09:40 +00:00
Vedant Kumar a8b8d3225b Move the debuginfo-dce-or test into debuginfo-variables.ll, NFC
llvm-svn: 324933
2018-02-12 21:02:45 +00:00
Volodymyr Sapsai 2ad768bb13 Revert "[ThinLTO] Add GraphTraits for FunctionSummaries"
It caused assertion failure
Assertion failed: (!DD.IsLambda && !MergeDD.IsLambda && "faked up lambda definition?"), function MergeDefinitionData, file /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp, line 1675.

on the second stage build bots.

llvm-svn: 324932
2018-02-12 20:43:31 +00:00
Volodymyr Sapsai 9fa3a808b5 Revert "Follow on to rL324854 (Added tests)" as part of r324854 revert.
r324854 caused broken build on the second stage build bots.

llvm-svn: 324931
2018-02-12 20:42:18 +00:00
Jim Ingham 78ffed02d8 Remove the pubnames support from the Xcode project.
llvm-svn: 324930
2018-02-12 20:25:37 +00:00
Scott Linder 94834f16be [DebugInfo] Update Checksum handling in CGDebugInfo
Update to match new DIFile API.

llvm-svn: 324929
2018-02-12 19:47:05 +00:00
Scott Linder 7160384d40 [DebugInfo] Unify ChecksumKind and Checksum value in DIFile
Rather than encode the absence of a checksum with a Kind variant, instead put
both the kind and value in a struct and wrap it in an Optional.

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

llvm-svn: 324928
2018-02-12 19:45:54 +00:00
Sanjay Patel 4a4f35f324 [InstCombine] X / (X * Y) --> 1.0 / Y
This is similar to the instsimplify fold added with D42385 
( rL323716 )
...but this can't be in instsimplify because we're creating/morphing
a different instruction.

llvm-svn: 324927
2018-02-12 19:39:21 +00:00
Sanjay Patel ee4257f676 [InstCombine] add tests for missing fdiv fold; NFC
llvm-svn: 324926
2018-02-12 19:23:39 +00:00
Adrian McCarthy fbfdd53ad1 Remove dead code for handling DWARF pubnames
Summary:
LLDB doesn't use this code, the code has no tests, and the code does suspicious
things like hashing pointers to strings instead of the strings themselves.

Subscribers: sanjoy, mgorny, JDevlieghere

Differential Revision: https://reviews.llvm.org/D43202

llvm-svn: 324925
2018-02-12 19:19:04 +00:00
Sanjay Patel e4fcb00290 [InstCombine] regenerate checks; NFC
llvm-svn: 324924
2018-02-12 19:14:01 +00:00
Marshall Clow 5012793e05 Implement LWG 2835 - fix <tgmath.h>
llvm-svn: 324923
2018-02-12 19:13:24 +00:00
Sanjay Patel 1998cc6a47 [InstCombine] various clean-ups for div transforms; NFC
llvm-svn: 324922
2018-02-12 18:38:35 +00:00
Davide Italiano 1ecd449814 [testsuite] Reintroduce test to check leaking.
It wasn't python leaking, it was lldb. Thanks to Pavel for the
explanation. Pointy-hat to me.

llvm-svn: 324919
2018-02-12 18:06:34 +00:00
Adrian Prantl 01d5cbe2ea Add a unit test for Driver::getDefaultModuleCachePath().
llvm-svn: 324917
2018-02-12 17:59:54 +00:00
Jun Bum Lim 144eb593dd [LICM] update BlockColors after splitting predecessors
Update BlockColors after splitting predecessors. Do not allow splitting
EHPad for sinking when the BlockColors is not empty, so we can
simply assign predecessor's color to the new block.

Fixes PR36184

llvm-svn: 324916
2018-02-12 17:56:55 +00:00
Erich Keane 2908a04301 Further cleanup to Driver mode code, as suggested by dblaikie [NFC]
llvm-svn: 324915
2018-02-12 17:47:01 +00:00
Fangrui Song 31b97194e6 [libclang] Add `CXSymbolRole role` to CXIdxEntityRefInfo
Summary:
CXIdxEntityRefInfo contains the member `CXIdxEntityRefKind kind;` to
differentiate implicit and direct calls. However, there are more roles
defined in SymbolRole. Among them, `Read/Write` are probably the most
useful ones as they can be used to differentiate Read/Write occurrences
of a symbol for document highlight in a text document.

See `export namespace DocumentHighlightKind`
on https://microsoft.github.io/language-server-protocol/specification

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D42895

llvm-svn: 324914
2018-02-12 17:42:09 +00:00
Reid Kleckner b0a17edff7 [Sema] Don't mark plain MS enums as fixed
Summary:
This fixes a flaw in our AST: PR27098

MSVC always gives plain enums the underlying type 'int'. Clang does this
as well, but we claim the enum is "fixed", as if the user actually wrote
': int'. It means we end up emitting spurious -Wsign-compare warnings on
code like this:

  enum Vals { E1, E2, E3 };
  bool f(unsigned v1, Vals v2) {
    return v1 == v2;
  }

We think 'v2' can take on negative values because we think 'Vals' is
fixed. This fixes that.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D43110

llvm-svn: 324913
2018-02-12 17:37:06 +00:00
Abderrazek Zaafrani e72d99261f [AArch64] Fixes for ARMv8.2-A FP16 scalar intrinsic - llvm portion
https://reviews.llvm.org/D42993

llvm-svn: 324912
2018-02-12 17:35:42 +00:00
Marshall Clow c0db07299e Implement LWG#2908 - The less-than operator for shared pointers could do more, and mark 2878 as complete as well (we already do that)
llvm-svn: 324911
2018-02-12 17:26:40 +00:00
Simon Pilgrim 0efe9bc953 [X86] Add missing scheduling class tag for i64 absolute address moves
Expand existing SchedRW to encompass these like it did for the other memory offset movs - added comments to closing braces to keep track of def scopes.

We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).

llvm-svn: 324910
2018-02-12 17:21:28 +00:00
Erich Keane a172654a09 Update target-note-test to be current with the AMDGPU changes
llvm-svn: 324909
2018-02-12 17:19:57 +00:00
Oliver Stannard 02f08c9d1f [AArch64] Improve v8.1-A code-gen for atomic load-and
Armv8.1-A added an atomic load-clear instruction (which performs bitwise
and with the complement of it's operand), but not a load-and
instruction. Our current code-generation for atomic load-and always
inserts an MVN instruction to invert its argument, even if it could be
folded into a constant or another instruction.

This adds lowering early in selection DAG to convert a load-and
operation into an xor with -1 and a load-clear, allowing the normal DAG
optimisations to work on it.

To do this, I've had to add a new ISD opcode, ATOMIC_LOAD_CLR. I don't
see any easy way to do this with an AArch64-specific ISD node, because
the code-generation for atomic operations assumes the SDNodes are of
type AtomicSDNode.

I've left the old tablegen patterns in because they are still needed for
global isel.

Differential revision: https://reviews.llvm.org/D42478

llvm-svn: 324908
2018-02-12 17:03:11 +00:00
Erich Keane 93e58667ee Make attribute-target on a Definition-after-use update the LLVM attributes
As reported here: https://bugs.llvm.org/show_bug.cgi?id=36301
The issue is that the 'use' causes the plain declaration to emit
the attributes to LLVM-IR. However, if the definition added it
later, these would silently disappear.

This commit extracts that logic to its own function in CodeGenModule,
and has the attribute-applications done during 'definition' update
the attributes properly.

Differential Revision: https://reviews.llvm.org/D43095

llvm-svn: 324907
2018-02-12 17:01:41 +00:00
Kostya Kortchinsky 1022220b16 [sanitizer] Size class map & local cache improvements
Summary:
- Reland rL324263, this time allowing for a compile-time decision as to whether
  or not use the 32-bit division. A single test is using a class map covering
  a maximum size greater than 4GB, this can be checked via the template
  parameters, and allows SizeClassAllocator64PopulateFreeListOOM to pass;
- `MaxCachedHint` is always called on a class id for which we have already
  computed the size, but we still recompute `Size(class_id)`. Change the
  prototype of the function to work on sizes instead of class ids. This also
  allows us to get rid of the `kBatchClassID` special case. Update the callers
  accordingly;
- `InitCache` and `Drain` will start iterating at index 1: index 0 contents are
  unused and can safely be left to be 0. Plus we do not pay the cost of going
  through an `UNLIKELY` in `MaxCachedHint`, and touching memory that is
  otherwise not used;
- `const` some variables in the areas modified;
- Remove an spurious extra line at the end of a file.

Reviewers: alekseyshl, tl0gic, dberris

Reviewed By: alekseyshl, dberris

Subscribers: dberris, kubamracek, delcypher, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D43088

llvm-svn: 324906
2018-02-12 16:59:17 +00:00
Simon Pilgrim 07e1337c2a [X86][AVX512] Add missing scheduling class tag for KMOVB/KMOVW/KMOVD/KMOVQ moves/loads/stores.
We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).

llvm-svn: 324905
2018-02-12 16:59:04 +00:00
Gheorghe-Teodor Bercea d5ae4e6501 [OpenMP][libomptarget] Enable the compilation of multiple bc libraries for runtime inlining
Summary:
Different NVIDIA GPUs support different compute capabilities. To enable the inlining of runtime functions and the best performance on different generations of NVIDIA GPUs, a bc library for each compute capability needs to be compiled. The same compiler build will then be usable in conjunction with multiple generations of NVIDIA GPUs.
To differentiate between versions of the same bc lib, the output file name will contain the compute capability ID.
Depends on D14254

Reviewers: Hahnfeld, hfinkel, carlo.bertolli, caomhin, ABataev, grokos

Reviewed By: Hahnfeld, grokos

Subscribers: guansong, mgorny, openmp-commits

Differential Revision: https://reviews.llvm.org/D41724

llvm-svn: 324904
2018-02-12 16:45:20 +00:00
Evandro Menezes 7dc0f1ec45 [AArch64] Refactor identification of SIMD immediates
Get rid of icky goto loops and make the code easier to maintain (NFC).

Differential revision: https://reviews.llvm.org/D42723

llvm-svn: 324903
2018-02-12 16:41:41 +00:00
Erich Keane cfd451b746 Add Invalid-note test negllected in R324673,324674,324675,324676
llvm-svn: 324902
2018-02-12 16:24:08 +00:00
Simon Pilgrim 369e59d4d1 [X86][AVX512] Add missing scheduling class tag for VMOVQ/VMOVHLPS/VMOVLHPS/VMOVHPD/VMOVHPS/VMOVLPD/VMOVLPS
Tag AVX512 variants to match SSE/AVX originals.

We only tagged it with the itinerary class, so completeness checks were erroneously passed (PR35639).

llvm-svn: 324901
2018-02-12 16:18:36 +00:00
Momchil Velikov 25f6be5326 Re-commit r324490: [DebugInfo] Improvements to representation of enumeration types (PR36168)
Differential revision: https://reviews.llvm.org/D42736

llvm-svn: 324900
2018-02-12 16:12:52 +00:00
Momchil Velikov 08dc66eff0 Re-commit r324489: [DebugInfo] Improvements to representation of enumeration types (PR36168)
Differential Revision: https://reviews.llvm.org/D42734

llvm-svn: 324899
2018-02-12 16:10:09 +00:00