Commit Graph

310553 Commits

Author SHA1 Message Date
Lang Hames ecfac6cd2c [Kaleidoscope] Re-enable Kaleidoscope tests.
These were disabled in r246267 (back in 2015). I suspect that the Win32 issues
that caused them to be disabled at the time have been resovlved, but if not
we can disable them again while we sort those out.

llvm-svn: 354630
2019-02-21 22:24:53 +00:00
Evgeniy Stepanov 45eea20d2a Revert "[asan] Fix vfork handling.", +1
Revert r354625, r354627 - multiple build failures.

llvm-svn: 354629
2019-02-21 22:02:24 +00:00
Craig Topper 2b34fdc67f [X86] Remove hasSideEffects=1 from the X87 pseudos with folded load.
This was done in r321424 to prevent scheduling from reordering things. But now that we model FPCW as a dependency, I don't think the same scheduling we were trying to prevent can occur.

llvm-svn: 354628
2019-02-21 22:00:15 +00:00
Evgeniy Stepanov b5321d7d0b [asan] Fix vfork handling.
__asan_handle_vfork was unpoisoning the wrong part of the stack.
Adjust the test to catch this reliably (current failure is
non-deterministic).

llvm-svn: 354627
2019-02-21 21:55:06 +00:00
Reid Kleckner 50ac8459ec [clang-cl] Whitelist -fbracket-depth=123 in clang-cl
Users apparently need it when expanding large quantities of macros.

Fixes PR38685

llvm-svn: 354626
2019-02-21 21:53:12 +00:00
Evgeniy Stepanov df91386806 [hwasan,asan] Intercept vfork.
Summary: AArch64 only for now.

Reviewers: vitalybuka, pcc

Subscribers: srhines, kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, jdoerfert, #sanitizers, llvm-commits, kcc

Tags: #sanitizers, #llvm

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

llvm-svn: 354625
2019-02-21 21:32:24 +00:00
Matt Arsenault d91bb4831b AMDGPU: Don't emit debugger subtarget features
Keep the flag around for compatability.

llvm-svn: 354624
2019-02-21 21:31:43 +00:00
Alina Sbirlea 97468e9282 [MemorySSA & LoopPassManager] Update MemorySSA in formDedicatedExitBlocks.
MemorySSA is now updated when forming dedicated exit blocks.
Resolves PR40037.

llvm-svn: 354623
2019-02-21 21:13:34 +00:00
Dan Albert 475042d5b1 [Driver] Fix float ABI default for Android ARMv8.
Summary: Android doesn't regress back to soft float after ARMv7 :)

Reviewers: srhines, pirama

Reviewed By: srhines, pirama

Subscribers: javed.absar, kristof.beyls, cfe-commits

Tags: #clang

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

llvm-svn: 354622
2019-02-21 21:13:03 +00:00
Leonard Chan ce1d4f1bec [Fixed Point Arithmetic] Fixed Point Comparisons
This patch implements fixed point comparisons with other fixed point types and
integers. This also provides constant expression evaluation for them.

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

llvm-svn: 354621
2019-02-21 20:50:09 +00:00
Konstantin Zhuravlyov c2650178a1 AMDGPU/NFC: Cleanup subtarget predicates
Differential Revision: https://reviews.llvm.org/D58522

llvm-svn: 354620
2019-02-21 20:43:43 +00:00
Sanjay Patel 234a5e8ea4 [x86] vectorize more cast ops in lowering to avoid register file transfers
This is a follow-up to D56864.

If we're extracting from a non-zero index before casting to FP,
then shuffle the vector and optionally narrow the vector before doing the cast:

cast (extelt V, C) --> extelt (cast (extract_subv (shuffle V, [C...]))), 0

This might be enough to close PR39974:
https://bugs.llvm.org/show_bug.cgi?id=39974

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

llvm-svn: 354619
2019-02-21 20:40:39 +00:00
Evgeniy Stepanov e497f3e4cd [gn] Add target flags to asmflags.
Reviewers: pcc, thakis

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 354618
2019-02-21 20:35:31 +00:00
Michal Gorny 65ebfaf0be [lldb] [test] Do not link -ldl on NetBSD
Fix the load_* using test Makefiles not to link -ldl on NetBSD.
There is no such a library on NetBSD, and dlopen() is available
without a library.  Quoting the manpage:

    (These functions are not in a library.  They are included in every
    dynamically linked program automatically.)

To resolve this portably, introduce a new USE_LIBDL option.  If it set
to 1, Makefile.rules automatically appends -ldl on platforms needing it.

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

llvm-svn: 354617
2019-02-21 20:28:21 +00:00
Amara Emerson 1abe05c0dd Re-land "[AArch64][GlobalISel] Implement partial support for G_SHUFFLE_VECTOR""
Thanks to Richard Trieu for pointing out that the failures were due to a
use-after-free of an ArrayRef.

llvm-svn: 354616
2019-02-21 20:20:16 +00:00
Yaxun Liu 8d7cf0e2d4 [HIP] change kernel stub name
Add .stub to kernel stub function name so that it is different from kernel
name in device code. This is necessary to let debugger find correct symbol
for kernel

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

llvm-svn: 354615
2019-02-21 20:12:16 +00:00
Mandeep Singh Grang 096fae32b3 [llvm] Fix typo: 's/ ot / to /' [NFC]
llvm-svn: 354614
2019-02-21 20:04:20 +00:00
Alina Sbirlea d2d3244363 [LoopSimplifyCFG] Update MemorySSA after r353911.
Summary:
MemorySSA is not properly updated in LoopSimplifyCFG after recent changes. Use SplitBlock utility to resolve that and clear all updates once handleDeadExits is finished.
All updates that follow are removal of edges which are safe to handle via the removeEdge() API.
Also, deleting dead blocks is done correctly as is, i.e. delete from MemorySSA before updating the CFG and DT.

Reviewers: mkazantsev, rtereshin

Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits

Tags: #llvm

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

llvm-svn: 354613
2019-02-21 19:54:05 +00:00
Alina Sbirlea 73446cd567 [EarlyCSE] Cleanup deadcode. [NFCI]
Summary: Cleanup nop assignments.

Reviewers: george.burgess.iv, davide

Subscribers: sanjoy, jlebar, llvm-commits

Tags: #llvm

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

llvm-svn: 354612
2019-02-21 19:49:57 +00:00
Krzysztof Parzyszek f6e875bacf [Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

This reapplies r354606 with a fix.

llvm-svn: 354611
2019-02-21 19:42:39 +00:00
Michael Liao 0ee7bd4ac5 [CodeGen] Fix string literal address space casting.
Summary:
- If a string literal is reused directly, need to add necessary address
  space casting if the target requires that.

Reviewers: yaxunl

Subscribers: jvesely, cfe-commits

Tags: #clang

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

llvm-svn: 354610
2019-02-21 19:40:20 +00:00
Krzysztof Parzyszek 948c9f93c4 Revert r354606, it breaks asan tests
llvm-svn: 354609
2019-02-21 19:33:58 +00:00
Mandeep Singh Grang 3b75622fd2 [test] Fix typo: 's/ ot / to /' [NFC]
llvm-svn: 354608
2019-02-21 19:11:15 +00:00
Peter Collingbourne f9232b0c00 ELF: Remove dead code. NFCI.
RelocationBaseSection is not used in -r links, so Config->Relocatable will
always be false.

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

llvm-svn: 354607
2019-02-21 18:53:58 +00:00
Krzysztof Parzyszek 5f47fac3a2 [Hexagon] Use misaligned load instead of trap0(#0) for __builtin_trap
The trap instruction is intercepted by various runtime environments,
and instead of a crash it creates confusion.

llvm-svn: 354606
2019-02-21 18:39:22 +00:00
Rui Ueyama 04661e1084 Update `ld.lld --version` string for monorepo.
This patch basically does the same thing as
https://reviews.llvm.org/rL352729 did to clang.

With this patch, lld now prints out a correct version string including
a git commit id like this:

  $ bin/ld.lld --version
  LLD 9.0.0 (https://github.com/llvm/llvm-project.git c027658504fa9e68173f53dedaf223695a65e910) (compatible with GNU linkers)

Fixes https://bugs.llvm.org/show_bug.cgi?id=40780

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

llvm-svn: 354605
2019-02-21 18:37:26 +00:00
Mark Searles 599ce44d3f [AMDGPU] remove unused AssemblerPredicates
An internal build is hitting asserts complaining about too many subtarget
features:
  llvm/utils/TableGen/Types.cpp:42:
    const char* llvm::getMinimalTypeForEnumBitfield(uint64_t):
    Assertion `MaxIndex <= 64 && "Too many bits"' failed.

  llvm/utils/TableGen/AsmMatcherEmitter.cpp:1476:
    void {anonymous}::AsmMatcherInfo::buildInfo():
    Assertion `SubtargetFeatures.size() <= 64 && "Too many subtarget features!"'
    failed.

The short-term solution is to remove a few unused AssemblerPredicates to get
under the limit.

The long-term solution seems to be to revisit these asserts. E.g., rather than
hardcoded '64', use the standard sized std::bitset like the other places that
track subtarget features.

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

llvm-svn: 354604
2019-02-21 18:19:54 +00:00
Jordan Rupprecht 93ad8b3aa5 [llvm-objcopy][NFC] Add std::move() to fix older BB
llvm-svn: 354603
2019-02-21 17:24:55 +00:00
Jonas Devlieghere e0ccb403c2 [unittest] Fix missing user-provided default constructor
error: default initialization of an object of const type 'const Pod'
without a user-provided default constructor

llvm-svn: 354602
2019-02-21 17:18:06 +00:00
Matt Morehouse 9b900dc7de Revert "[sanitizers] Restore internal_readlink for x32"
This reverts r354451 since it broke the Windows sanitizer bot.

llvm-svn: 354601
2019-02-21 17:06:23 +00:00
Jordan Rupprecht ad29d29130 [llvm-objcopy][NFC] More error cleanup
Summary:
This removes calls to `error()`/`reportError()` in the main driver (llvm-objcopy.cpp) as well as the associated argv-parsing (CopyConfig.cpp). `logAllUnhandledErrors()` is now the main way to print errors.

There are still a few uses from within the per-arch drivers, so we can't delete them yet... but almost!

Reviewers: jhenderson, alexshap, espindola

Reviewed By: jhenderson

Subscribers: emaste, arichardson, jakehehrlich, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 354600
2019-02-21 17:05:19 +00:00
Sam Clegg 1ed3a0467c [WebAssembly] Don't create MSSymbolWasm object for non-symbols
`__linear_memory` and `__indirect_function_table` are both generated
as imports in wasm object files but are actually symbols and don't
appear in any symbols table or relocation entry.  Indeed we
don't have any symbol type to meaningfully represent either of them.

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

llvm-svn: 354599
2019-02-21 17:05:19 +00:00
Lang Hames ddf91af5a6 [Kaleidoscope] Fix symbol resolver to search in reverse order.
This should allow more recent definitions of functions in the Kaleidoscope REPL
to override old ones, as the tutorial text promises.

llvm-svn: 354598
2019-02-21 16:53:04 +00:00
Jordan Rupprecht 52d5781c87 [llvm-objcopy] Make removeSectionReferences batched
Summary:
Removing a large number of sections from a file with a lot of symbols can have abysmal (i.e. O(n^2)) performance, e.g. when running `--only-section` to extract one section out of a large file.

This comes from iterating over all symbols in the symbol table each time we remove a section, to remove references to the section we just removed.
Instead, do just one pass of symbol removal by passing a hash set of all the sections we'd like to remove references to.

This fixes a regression when running llvm-objcopy -j <one section> on an object file with many sections and symbols -- on my machine, running `objcopy -j .keep_me huge-input.o /tmp/foo.o` takes .3s with GNU objcopy, 1.3s with an updated llvm-objcopy, and 7+ minutes with llvm-objcopy prior to this patch.

Reviewers: MaskRay, jhenderson, jakehehrlich, alexshap, espindola

Reviewed By: MaskRay, jhenderson

Subscribers: echristo, emaste, arichardson, mgrang, jdoerfert, llvm-commits

Tags: #llvm

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

llvm-svn: 354597
2019-02-21 16:45:42 +00:00
Alexey Bataev 12a21e4b69 Revert "[CUDA]Delayed diagnostics for the asm instructions."
This reverts commit r354593 to fix the problem with the crash on
windows.

llvm-svn: 354596
2019-02-21 16:40:21 +00:00
Nirav Dave 43a7600a7f [PPC] Add store merging testcase.
llvm-svn: 354595
2019-02-21 16:34:48 +00:00
Sanjay Patel ba5ee817e9 [DAGCombiner] prevent infinite looping by truncating 'and' (PR40793)
This fold can occur during legalization, so it can fight with promotion
to the larger type. It apparently takes a special sequence and subtarget
to avoid more basic simplifications that would hide the problem.

But there's a bigger question raised here: why does distributeTruncateThroughAnd()
even exist? It duplicates functionality from a more minimal pattern that we
already have. But getting rid of this function requires some preliminary steps.

https://bugs.llvm.org/show_bug.cgi?id=40793

llvm-svn: 354594
2019-02-21 16:01:48 +00:00
Alexey Bataev 16d3e1a4d2 [CUDA]Delayed diagnostics for the asm instructions.
Summary:
Adapted targetDiag for the CUDA and used for the delayed diagnostics in
asm constructs. Works for both host and device compilation sides.

Reviewers: tra, jlebar

Subscribers: jdoerfert, cfe-commits

Tags: #clang

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

llvm-svn: 354593
2019-02-21 15:51:30 +00:00
Matt Arsenault 2e0ee47712 AMDGPU/GlobalISel: Make phis legal
llvm-svn: 354592
2019-02-21 15:48:13 +00:00
Matt Arsenault 8df2f3dab2 RegBankSelect: Allow targets to introduce control flow for mapping
For AMDGPU, if an operand requires an SGPR but is only available as a
VGPR, a loop needs to be introduced to execute the instruction with
each unique combination of values across all lanes. The rest of the
instructions in the block will be moved to a new block following the
loop. Check if the next instruction's parent changed, and update the
iterators and insertion block if this happened.

Tests will be included in a future patch.

llvm-svn: 354591
2019-02-21 15:48:13 +00:00
Matt Arsenault e1cbabaff0 Fix missing C++ mode comments
llvm-svn: 354590
2019-02-21 15:48:10 +00:00
Sanjay Patel d288687676 [x86] regenerate checks; NFC
llvm-svn: 354589
2019-02-21 15:30:28 +00:00
Nirav Dave dce91c1edb [X86] Fix copy-paste error in @ccz flag.
@ccz operand should be equivalent to @cce.

llvm-svn: 354588
2019-02-21 15:28:31 +00:00
Matt Arsenault b10fa8df3f AMDGPU/GlobalISel: Fix bit count ops for non-power-of-2 types
llvm-svn: 354587
2019-02-21 15:22:20 +00:00
Ilya Biryukov 411a55f79b [llvm-readobj] Weaken a check in the test added by r354567
The check includes a substring, configurable by PACKAGE_NAME in CMake.
This leads to failures if PACKAGE_NAME is not the default.

llvm-svn: 354586
2019-02-21 14:51:17 +00:00
Kadir Cetinkaya 748211a81f [clangd] Only report explicitly typed symbols during code navigation
Summary:
Clangd was reporting implicit symbols, like results of implicit cast
expressions during code navigation, which is not desired. For example:

```
struct Foo{ Foo(int); };
void bar(Foo);
vod foo() {
  int x;
  bar(^x);
}
```
Performing a GoTo on the point specified by ^ would give two results one
pointing to line `int x` and the other for definition of `Foo(int);`

Reviewers: ilya-biryukov, sammccall

Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits

Tags: #clang

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

llvm-svn: 354585
2019-02-21 14:48:33 +00:00
Alex Bradbury db67be889d [RISCV][NFC] IsEligibleForTailCallOptimization -> isEligibleForTailCallOptimization
Also clang-format the modified hunks.

llvm-svn: 354584
2019-02-21 14:31:41 +00:00
Alex Bradbury 047170cfc3 [RISCV] Add implied zero offset load/store alias patterns
Allow load/store instructions with implied zero offset for compatibility with
GNU assembler.

Differential Revision: https://reviews.llvm.org/D57141
Patch by James Clarke.

llvm-svn: 354581
2019-02-21 14:09:34 +00:00
Joey Gouly fdf651ee8d [InferAddressSpaces] Fix fallthrough error
llvm-svn: 354580
2019-02-21 13:10:37 +00:00
Diana Picus dcaa939ab7 [ARM GlobalISel] Support G_FRAME_INDEX for Thumb2
Same as arm mode.

llvm-svn: 354579
2019-02-21 13:00:02 +00:00