Commit Graph

308150 Commits

Author SHA1 Message Date
Matt Arsenault 30989e492b GlobalISel: Allow shift amount to be a different type
For AMDGPU the shift amount is never 64-bit, and
this needs to use a 32-bit shift.

X86 uses i8, but seemed to be hacking around this before.

llvm-svn: 351882
2019-01-22 21:42:11 +00:00
Joel E. Denny 352695c336 [FileCheck] Suppress old -v/-vv diags if dumping input
The old diagnostic form of the trace produced by -v and -vv looks
like:

```
check1:1:8: remark: CHECK: expected string found in input
CHECK: abc
       ^
<stdin>:1:3: note: found here
; abc def
  ^~~
```

When dumping annotated input is requested (via -dump-input), I find
that this old trace is not useful and is sometimes harmful:

1. The old trace is mostly redundant because the same basic
   information also appears in the input dump's annotations.

2. The old trace buries any error diagnostic between it and the input
   dump, but I find it useful to see any error diagnostic up front.

3. FILECHECK_OPTS=-dump-input=fail requests annotated input dumps only
   for failed FileCheck calls.  However, I have to also add -v or -vv
   to get a full set of annotations, and that can produce massive
   output from all FileCheck calls in all tests.  That's a real
   problem when I run this in the IDE I use, which grinds to a halt as
   it tries to capture all that output.

When -dump-input=fail|always, this patch suppresses the old trace from
-v or -vv.  Error diagnostics still print as usual.  If you want the
old trace, perhaps to see variable expansions, you can set
-dump-input=none (the default).

Reviewed By: probinson

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

llvm-svn: 351881
2019-01-22 21:41:42 +00:00
Matt Arsenault 52133812f6 GlobalISel: Make buildConstant handle vectors
Produce a splat build_vector similar to how
SelectionDAG::getConstant does.

llvm-svn: 351880
2019-01-22 21:31:02 +00:00
Stefan Granitz fea3731f37 [CMake] Fix two details from r351863
llvm-svn: 351879
2019-01-22 21:14:51 +00:00
Martin Storsjo 4540f5d82e Remove an unused variable
Differential Revision: https://reviews.llvm.org/D56985

llvm-svn: 351878
2019-01-22 20:50:45 +00:00
Martin Storsjo 43ed1dbfa9 Add casts to avoid warnings about implicit conversions losing precision
This fixes warnings like these:

DwarfInstructions.hpp:85:25: warning: implicit conversion
      loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'libunwind::DwarfInstructions<libunwind::LocalAddressSpace,
      libunwind::Registers_arm>::pint_t' (aka 'unsigned int')
      [-Wshorten-64-to-32]

DwarfInstructions.hpp:88:25: warning: implicit conversion
      loses integer precision: 'uint64_t' (aka 'unsigned long long') to
      'libunwind::DwarfInstructions<libunwind::LocalAddressSpace,
      libunwind::Registers_arm>::pint_t' (aka 'unsigned int')
      [-Wshorten-64-to-32]

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

llvm-svn: 351877
2019-01-22 20:50:42 +00:00
Martin Storsjo 94adf435ca Fix warnings about printf format strings
Either adjust the format string to use a more exact type, or add casts
(for cases when printing pointers to structs/objects with a %p
format specifier).

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

llvm-svn: 351876
2019-01-22 20:50:39 +00:00
Martin Storsjo 495c3d3c90 Enable LLVM_ENABLE_WARNINGS when building standalone out of tree
When built within the llvm runtimes directory, the runtimes
CMakeLists.txt adds the same.

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

llvm-svn: 351875
2019-01-22 20:50:33 +00:00
Craig Topper a13edd3ef2 [X86][AVX512F_SCALAR]: Adding full coverage of MC encoding for the AVX512F_SCALAR isa sets. NFC
Adding MC regressions tests to cover the AVX512F_SCALAR isa sets.
This patch is part of a larger task to cover MC encoding of all X86 isa sets started in revision: https://reviews.llvm.org/D39952

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

llvm-svn: 351874
2019-01-22 20:48:24 +00:00
Martin Storsjo dfcb36bf9f Enable LLVM_ENABLE_WARNINGS when building standalone out of tree
When built within the llvm runtimes directory, the runtimes
CMakeLists.txt adds the same.

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

llvm-svn: 351873
2019-01-22 20:43:37 +00:00
Matt Arsenault 6378629609 GlobalISel: Implement widen for extract_vector_elt elt type
llvm-svn: 351871
2019-01-22 20:38:15 +00:00
Zinovy Nis 1449277fc0 [doc] Replace 'class' with 'struct' for 'public' by default
Make sample syntax correct.

llvm-svn: 351867
2019-01-22 20:27:02 +00:00
Matt Arsenault aebb2ee036 GlobalISel: Implement fewerElementsVector for basic FP ops
llvm-svn: 351866
2019-01-22 20:14:29 +00:00
George Karpenkov a9e295604a [analyzer] Insert notes in RetainCountChecker where our dynamic cast modeling assumes 'null' output
rdar://47397214

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

llvm-svn: 351865
2019-01-22 19:51:00 +00:00
George Karpenkov db0c66eeb0 [analyzer] Model another special-case kind of cast for OSObject RetainCountChecker
Differential Revision: https://reviews.llvm.org/D56951

llvm-svn: 351864
2019-01-22 19:50:47 +00:00
Alex Langford b8ecd7e49b [CMake] Replace use of llvm-config with LLVM and Clang CMake packages
Summary:
I did this for two reasons:
- Using the CMake packages simplifies building LLDB Standalone. This is for two
  reasons: 1) We were doing a decent amount of work that is already done in the
  LLVMConfig.cmake that we want to import, 2) We had to do some manual work to call
  llvm-config, parse its output, and populate variables that the build system
  uses.
- As far as I understand, using llvm-config makes it difficult if not impossible
  to cross-compile LLDB standalone.

Reviewers: sgraenitz, labath, zturner, JDevlieghere, davide, aprantl, stella.stamenova

Subscribers: mgorny, lldb-commits

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

llvm-svn: 351863
2019-01-22 19:26:42 +00:00
Eugene Zelenko b272ec1347 [Documentation] Use HTTPS whenever possible.
Differential revision: https://reviews.llvm.org/D56926

llvm-svn: 351862
2019-01-22 19:19:48 +00:00
Konstantin Zhuravlyov 8456cddedd Add missing include (cstdlib) to Demangle.h
Differential Revision: https://reviews.llvm.org/D57035

llvm-svn: 351861
2019-01-22 19:18:18 +00:00
Matt Arsenault 41a8bee93b AMDGPU/GlobalISel: Remove vectors from legal constant types
llvm-svn: 351859
2019-01-22 19:04:51 +00:00
Matt Arsenault 6614f852b6 GlobalISel: Support narrowing zextload/sextload
llvm-svn: 351856
2019-01-22 19:02:10 +00:00
Jonathan Metzman 3c535a60dd [libFuzzer][MSVC] Enable building libFuzzer with MSVC
Summary:
Enable building libFuzzer with MSVC.

* Don't try to include <endian.h> in FuzzerSHA1.cpp. MSVC
  doesn't have this header, and WINDOWS is always little
  endian (even on ARM)

Subscribers: srhines, mgorny, javed.absar, kristof.beyls

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

llvm-svn: 351855
2019-01-22 18:59:25 +00:00
Nirav Dave d0418341fd [SelectionDAGBuilder] Defer C_Register Assignments to be in line with
those of C_RegisterClass. NFCI.

llvm-svn: 351854
2019-01-22 18:57:49 +00:00
Matt Arsenault a7cd83bc88 GlobalISel: Disallow vectors for G_CONSTANT/G_FCONSTANT
llvm-svn: 351853
2019-01-22 18:53:41 +00:00
Rui Ueyama 4063cfc745 FileOutputBuffer: Handle "-" as stdout.
I was honestly a bit surprised that we didn't do this before. This
patch is to handle "-" as the stdout so that if you pass `-o -` to
lld, for example, it writes an output to stdout instead of file `-`.

I thought that we might want to handle this at a higher level than
FileOutputBuffer, because if we land this patch, we can no longer
create a file whose name is `-` (there's a workaround though; you can
pass `./-` instead of `-`). However, because raw_fd_ostream already
handles `-` as a special file name, I think it's okay and actually
consistent to handle `-` as a special name in FileOutputBuffer.

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

llvm-svn: 351852
2019-01-22 18:44:04 +00:00
Matt Arsenault a5840c3c39 Codegen support for atomicrmw fadd/fsub
llvm-svn: 351851
2019-01-22 18:36:06 +00:00
Matt Arsenault 39508331ef Reapply "IR: Add fp operations to atomicrmw"
This reapplies commits r351778 and r351782 with
RISCV test fixes.

llvm-svn: 351850
2019-01-22 18:18:02 +00:00
Raphael Isemann 1c5d23f140 [ASTImporter] Fix importing OperatorDelete from CXXConstructorDecl
Summary:
Shafik found out that importing a CXXConstructorDecl will create a translation unit that
causes Clang's CodeGen to crash. The reason for that is that we don't copy the OperatorDelete
from the CXXConstructorDecl when importing. This patch fixes it and adds a test case for that.

Reviewers: shafik, martong, a_sidorin, a.sidorin

Reviewed By: martong, a_sidorin

Subscribers: rnkovacs, cfe-commits

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

llvm-svn: 351849
2019-01-22 17:59:45 +00:00
Simon Pilgrim 922b540643 [llvm-mca][X86] Tidyup avx512 placeholder tests
Ensure we keep avx512f/bw/dq + vl versions separate, add example broadcast tests - this should allow us to better the test coverage of test\CodeGen\X86\avx512-schedule.ll

llvm-svn: 351848
2019-01-22 17:52:15 +00:00
Louis Dionne 53e8ece06a [libcxx] Include <cstring> in tests that use strcmp
Reviewed as https://reviews.llvm.org/D56503.
Thanks to Andrey Maksimov for the patch.

llvm-svn: 351847
2019-01-22 17:45:00 +00:00
Alexey Bataev 4e9db1beff [DEBUGINFO, NVPTX] Enable support for the debug info on NVPTX target.
Summary: Enable full support for the debug info.

Reviewers: echristo

Subscribers: jholewinski, aprantl, JDevlieghere, llvm-commits

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

llvm-svn: 351846
2019-01-22 17:43:37 +00:00
Jordan Rupprecht 0efe27e62b Revert r351520, "Re-enable terminator folding in LoopSimplifyCFG"
This is still causing compilation crashes in some targets. Will follow up shortly with a repro.

llvm-svn: 351845
2019-01-22 17:39:02 +00:00
Alexey Bataev 9d5974a9fc [DEBUG_INFO, NVPTX] Fix relocation info.
Summary: Initial function labels must follow the debug location for the correct relocation info generation.

Reviewers: tra, jlebar, echristo

Subscribers: jholewinski, llvm-commits

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

llvm-svn: 351843
2019-01-22 17:24:16 +00:00
Simon Pilgrim 8e11254132 [llvm-mca][X86] Add VPOPCNTDQ tests
Matches test coverage of test\CodeGen\X86\avx512vpopcntdq-schedule.ll

llvm-svn: 351842
2019-01-22 17:19:44 +00:00
Hans Wennborg a5f7e5b8dc ReleaseNotes: remove openmp notes from r351580
They were for the 8.0 branch, and have been committed there in r351839.

llvm-svn: 351841
2019-01-22 17:01:39 +00:00
Sanjay Patel 58256802ce [x86] add partial undef 'and' test; NFC
llvm-svn: 351840
2019-01-22 17:01:06 +00:00
Kostya Kortchinsky 0000fdd11f [docs] Scudo: document error messages & their potential cause
Summary:
A couple of changes in the Scudo documentation:
- tag the shell code blocks as `console`;
- document error messages that are displayed in some termination conditions,
  the reason they triggered, and potential causes.

Reviewers: eugenis, enh

Reviewed By: eugenis

Subscribers: llvm-commits

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

llvm-svn: 351838
2019-01-22 16:43:45 +00:00
Adrian Prantl 6f0ec69914 Add DIGlobalVariableExpression to LangRef
llvm-svn: 351837
2019-01-22 16:40:18 +00:00
Simon Pilgrim 90fa50d928 [llvm-mca][X86] Add missing CLWB/CLZERO/FSGSBASE/LWP/MWAITX/RDPID/SHA tests
We're getting pretty close to matching/exceeding test coverage of the test\CodeGen\X86\*-schedule.ll files, which should allow us to get rid of -print-schedule and fix PR37160

llvm-svn: 351836
2019-01-22 16:39:28 +00:00
Simon Pilgrim fc4b1e841e [llvm-mca][X86] Add missing enter/leave, invlpg/invlpga, rdmsr/wrmsr, rdpmc and rdtsc/rdtscp tests
llvm-svn: 351835
2019-01-22 16:29:26 +00:00
Sanjay Patel 6019e6f866 [x86] add another partial undef vector binop test; NFC
The existing test unintentionally shows that we have prematurely
optimized the shuffle into a vector concat and lost the undef info, 
so it is not affected by a basic improvement to 
SimplifyDemandedVectorElts.

llvm-svn: 351834
2019-01-22 16:26:09 +00:00
Serge Guelton d62eb16331 Use response file when generating LLVM-C.dll
As discovered in D56774 the command line gets to long, so use a response file to give the script the libs. This change has been tested and is confirmed working for me.

Commited on behalf of Jakob Bornecrantz

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

llvm-svn: 351833
2019-01-22 16:25:17 +00:00
Marshall Clow 03ed93fd37 Note that we have a patch for LWG3101
llvm-svn: 351832
2019-01-22 16:22:53 +00:00
Simon Pilgrim 4e03b2496d [llvm-mca][X86] Add missing mfence/pinsrw tests
llvm-svn: 351831
2019-01-22 16:01:08 +00:00
Stefan Granitz 16be420953 [CMake] Turn LLDB_FRAMEWORK_TOOLS into STRING to allow overrides from cache files
llvm-svn: 351830
2019-01-22 15:59:47 +00:00
Simon Pilgrim 05198a9b8a [llvm-mca][X86] Add missing monitor/mwait tests
These technically should be under a MONITOR cpuid bit, but we tag them as SSE3 so I've done that here as well.

llvm-svn: 351829
2019-01-22 15:48:16 +00:00
Simon Pilgrim 9b3a2f96a1 [llvm-mca][X86] Add missing vperm2i128 tests
llvm-svn: 351828
2019-01-22 14:54:24 +00:00
Simon Pilgrim 1d8d6c3bfb [llvm-mca][X86] Add missing tzcntw tests
llvm-svn: 351827
2019-01-22 14:53:52 +00:00
Haojian Wu 32cd41f229 [clangd] Followup fix of rL351818
ClangTidyOptions::getDefaults is not free, it will initialize all
clang-tidy modules to get check-specific options, and we don't use this
information in CodeComplete, so using an empty one (constructed by
default constructor) is sufficient.

llvm-svn: 351826
2019-01-22 14:48:04 +00:00
Sanjay Patel effee52c59 [DAGCombiner] narrow vector binop with 2 insert subvector operands
vecbo (insertsubv undef, X, Z), (insertsubv undef, Y, Z) --> insertsubv VecC, (vecbo X, Y), Z

This is another step in generic vector narrowing. It's also a step towards more horizontal op 
formation specifically for x86 (although we still failed to match those in the affected tests).

The scalarization cases are also not optimal (we should be scalarizing those), but it's still 
an improvement to use a narrower vector op when we know part of the result must be constant 
because both inputs are undef in some vector lanes.

I think a similar match but checking for a constant operand might help some of the cases in 
D51553.

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

llvm-svn: 351825
2019-01-22 14:24:13 +00:00
George Rimar 121fcd7ec6 [llvm-objdump] - Introduce getRelocsMap() helper. NFCI.
Currently disassembleObject() is a ~550 lines length function.
This patch extracts the code that creates a section->their relocation
mapping into a new helper function to simplify/reduce it a bit.

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

llvm-svn: 351824
2019-01-22 14:09:37 +00:00