platform/upstream/llvm.git
4 years ago[llvm-objcopy] [COFF] Fix a typo in a comment. NFC.
Martin Storsjö [Mon, 25 Nov 2019 11:59:08 +0000 (13:59 +0200)]
[llvm-objcopy] [COFF] Fix a typo in a comment. NFC.

4 years ago[MC] Produce proper section relative relocations for COFF in .debug_frame
Martin Storsjö [Fri, 22 Nov 2019 22:46:24 +0000 (00:46 +0200)]
[MC] Produce proper section relative relocations for COFF in .debug_frame

The third parameter to Streamer.EmitSymbolValue() is "bool
IsSectionRelative = false".

For ELF, these debug sections are mapped to address zero, so a normal,
absolute address relocation works just fine, but COFF needs a section
relative relocation, and COFF is the only target where
needsDwarfSectionOffsetDirective() returns true. This matches how
EmitSymbolValue is called elsewhere in the same source file.

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

4 years ago[X86] [Win64] Avoid truncating large (> 32 bit) stack allocations
Martin Storsjö [Tue, 26 Nov 2019 20:41:40 +0000 (22:41 +0200)]
[X86] [Win64] Avoid truncating large (> 32 bit) stack allocations

This fixes PR44129, which was broken in a7adc3185b (in 7.0.0
and newer).

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

4 years ago[LLDB] Avoid using InitializeContext for zero-initializing a CONTEXT. NFC.
Martin Storsjö [Wed, 16 Oct 2019 08:41:59 +0000 (11:41 +0300)]
[LLDB] Avoid using InitializeContext for zero-initializing a CONTEXT. NFC.

InitializeContext is useful for allocating a (potentially variable
size) CONTEXT struct in an unaligned byte buffer. In this case, we
already have a fixed size CONTEXT we want to initialize, and we only
used this as a very roundabout way of zero initializing it.

Instead just memset the CONTEXT we have, and set the ContextFlags field
manually.

This matches how it is done in NativeRegisterContextWindows_*.cpp.

This also makes LLDB run successfully in Wine (for a trivial tested
case at least), as Wine hasn't implemented the InitializeContext
function.

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

4 years ago[lldb][NFC] Early exit in DWARFASTParserClang::ParseArrayType
Raphael Isemann [Wed, 27 Nov 2019 07:09:52 +0000 (08:09 +0100)]
[lldb][NFC] Early exit in DWARFASTParserClang::ParseArrayType

4 years agoUpdate build_llvm_package.bat to build from the monorepo
Hans Wennborg [Wed, 27 Nov 2019 08:04:04 +0000 (09:04 +0100)]
Update build_llvm_package.bat to build from the monorepo

4 years ago[PowerPC] [NFC] change PPCLoopPreIncPrep class name after D67088.
czhengsz [Tue, 26 Nov 2019 02:18:32 +0000 (21:18 -0500)]
[PowerPC] [NFC] change PPCLoopPreIncPrep class name after D67088.
Afer https://reviews.llvm.org/D67088, PPCLoopPreIncPrep pass can prepare more instruction forms except pre inc form, like DS/DQ forms.

This patch is a follow-up of https://reviews.llvm.org/D67088 to rename the pass name.

Reviewed by: jsji

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

4 years agoRevert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass...
Eric Christopher [Wed, 27 Nov 2019 04:28:52 +0000 (20:28 -0800)]
Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there.""

This reapplies: 8ff85ed905a7306977d07a5cd67ab4d5a56fafb4

Original commit message:

As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there.

This change doesn't include any change to move from selection dag to fast isel
and that will come with other numbers that should help inform that decision.
There also haven't been any real debuggability studies with this pipeline yet,
this is just the initial start done so that people could see it and we could start
tweaking after.

Test updates: Outside of the newpm tests most of the updates are coming from either
optimization passes not run anymore (and without a compelling argument at the moment)
that were largely used for canonicalization in clang.

Original post:

http://lists.llvm.org/pipermail/llvm-dev/2019-April/131494.html

Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65410

This reverts commit c9ddb02659e3ece7a0d9d6b4dac7ceea4ae46e6d.

4 years agoXFAIL a test on Windows
Fangrui Song [Wed, 27 Nov 2019 03:52:15 +0000 (19:52 -0800)]
XFAIL a test on Windows

http://45.33.8.238/win/3052/step_6.txt

C:\src\llvm-project\clang\test\Preprocessor\file_test.c:9:11: error: CHECK: expected string not found in input
// CHECK: filename: "/UNLIKELY_PATH/empty{{/|\\\\}}file_test.c"
          ^
<stdin>:1:1: note: scanning from here
^
<stdin>:1:28: note: possible intended match here
                           ^

4 years ago[Fuchsia] Don't fail for unknown architectures
Petr Hosek [Tue, 26 Nov 2019 22:56:31 +0000 (14:56 -0800)]
[Fuchsia] Don't fail for unknown architectures

When selecting the set of default sanitizers, don't fail for unknown
architectures. This may be the case e.g. with x86_64-unknown-fuchsia
-m32 target that's used to build the bootloader.

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

4 years agoWorkaround for EvalInfo ctor for MSVC 2017
Yaxun (Sam) Liu [Tue, 26 Nov 2019 18:13:47 +0000 (13:13 -0500)]
Workaround for EvalInfo ctor for MSVC 2017

Current EvalInfo ctor causes EnableNewConstInterp to be true even though
it is supposed to be false on MSVC 2017. This is because a virtual function
getLangOpts() is called in member initializer lists, whereas on MSVC
member ctors are called before function virtual function pointers are
initialized.

This patch fixes that.

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

4 years ago[LegalizeTypes] Add SoftenFloatOp_Unary to reduce some duplication for softening...
Craig Topper [Wed, 27 Nov 2019 01:37:51 +0000 (17:37 -0800)]
[LegalizeTypes] Add SoftenFloatOp_Unary to reduce some duplication for softening LRINT/LLRINT/LROUND/LLROUND

Summary: This will be enhanced in a follow up to add strict fp support

Reviewers: efriedma

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[Preprocessor] Fix backslash tests on Windows after D49466
Fangrui Song [Wed, 27 Nov 2019 01:27:16 +0000 (17:27 -0800)]
[Preprocessor] Fix backslash tests on Windows after D49466

See http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/29442/steps/test-check-all/logs/stdio

4 years ago[ELF] Adjust test to work for zlib 1.2.8
Shoaib Meenai [Wed, 27 Nov 2019 01:17:21 +0000 (17:17 -0800)]
[ELF] Adjust test to work for zlib 1.2.8

The previous data had the same length with compression levels 1 and 6
for zlib 1.2.8. Adjust the test to work for this library version. I've
also tested this with zlib 1.2.7 and zlib 1.2.11.

4 years ago[PowerPC] [NFC] rename PPCLoopPreIncPrep.cpp to PPCLoopInstrFormPrep.cpp after D67088
Jinsong Ji [Wed, 27 Nov 2019 00:30:29 +0000 (00:30 +0000)]
[PowerPC] [NFC] rename PPCLoopPreIncPrep.cpp to PPCLoopInstrFormPrep.cpp after D67088

Summary:
This is NFC code clean work after D67088. In that patch, we extend loop instructions prep for ds/dq form.

This patch only changes the file name PPCLoopPreIncPrep.cpp to PPCLoopInstrFormPrep.cpp for better reviewing of the content change of file PPCLoopInstrFormPrep.cpp.

Reviewers: #powerpc, nemanjai, steven.zhang, shchenz

Reviewed By: #powerpc, shchenz

Subscribers: wuzish, mgorny, hiraditya, kbarton, shchenz, llvm-commits

Tags: #llvm

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

4 years ago[CodeMoverUtils] clang-format the test
Vitaly Buka [Wed, 27 Nov 2019 00:21:07 +0000 (16:21 -0800)]
[CodeMoverUtils] clang-format the test

4 years ago[CodeMoverUtils] Don't dereference nullptr in test
Vitaly Buka [Wed, 27 Nov 2019 00:18:29 +0000 (16:18 -0800)]
[CodeMoverUtils] Don't dereference nullptr in test

4 years agoFix tests on Windows after D49466
Fangrui Song [Wed, 27 Nov 2019 00:09:22 +0000 (16:09 -0800)]
Fix tests on Windows after D49466

It is tricky to use replace_path_prefix correctly on Windows which uses
backslashes as native path separators. Switch back to the old approach
(startswith is not ideal) to appease build bots for now.

4 years ago[X86] Add test cases for constrained lrint/llrint/lround/llround to fp128-libcalls...
Craig Topper [Tue, 26 Nov 2019 23:39:33 +0000 (15:39 -0800)]
[X86] Add test cases for constrained lrint/llrint/lround/llround to fp128-libcalls-strict. NFC

4 years ago[unittest] Fix unittests/Support/Path.cpp after D49466
Fangrui Song [Tue, 26 Nov 2019 23:34:48 +0000 (15:34 -0800)]
[unittest] Fix unittests/Support/Path.cpp after D49466

4 years agoInitial implementation of -fmacro-prefix-map and -ffile-prefix-map
Dan McGregor [Tue, 26 Nov 2019 22:23:07 +0000 (14:23 -0800)]
Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

GCC 8 implements -fmacro-prefix-map. Like -fdebug-prefix-map, it replaces a string prefix for the __FILE__ macro.
-ffile-prefix-map is the union of -fdebug-prefix-map and -fmacro-prefix-map

Reviewed By: rnk, Lekensteyn, maskray

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

4 years ago[InstSimplify] fold copysign with same args to the arg
Sanjay Patel [Tue, 26 Nov 2019 22:35:10 +0000 (17:35 -0500)]
[InstSimplify] fold copysign with same args to the arg

This is correct for any value including NaN/inf.

We don't have this fold directly in the backend either,
but x86 manages to get it after converting things to bitops.

4 years ago[InstSimplify] add tests for copysign; NFC
Sanjay Patel [Tue, 26 Nov 2019 22:23:30 +0000 (17:23 -0500)]
[InstSimplify] add tests for copysign; NFC

4 years ago[ConstFolding] move tests for copysign; NFC
Sanjay Patel [Tue, 26 Nov 2019 21:52:18 +0000 (16:52 -0500)]
[ConstFolding] move tests for copysign; NFC

InstCombine doesn't have any transforms for copysign currently.

4 years ago[mips] Fix sc, scs, ll, lld instructions expanding
Simon Atanasyan [Thu, 21 Nov 2019 22:33:46 +0000 (01:33 +0300)]
[mips] Fix sc, scs, ll, lld instructions expanding

There are a couple of bugs with the sc, scs, ll, lld instructions expanding:

1. On R6 these instruction pack immediate offset into a 9-bit field. Now
if an immediate exceeds 9-bits assembler does not perform expansion and
just rejects such instruction.

2. On 64-bit non-PIC code if an operand is a symbol assembler generates
incorrect sequence of instructions. It uses R_MIPS_HI16 and R_MIPS_LO16
relocations and skips R_MIPS_HIGHEST and R_MIPS_HIGHER ones.

To solve these problems this patch:
- Introduces `mem_simm9_exp` to mark 9-bit memory immediate operands
which require expansion. Probably later all `mem_simm9` operands will be
able to migrate on `mem_simm9_exp` and we rename it to `mem_simm9`.

- Adds new `OPERAND_MEM_SIMM9` operand type and assigns it to the
`mem_simm9_exp`. That allows to know operand size in the `processInstruction`
method and decide whether we need to expand instruction.

- Adds `expandMem9Inst` method to expand instructions with 9-bit memory
immediate operand. This method just load immediate into a "base"
register used by origibal instruction:

   sc $2, 256($sp) => addiu  $1, $sp, 256
                      sc     $2, 0($1)

- Fix `expandMem16Inst` to support a correct set of relocations for
symbol loading in case of 64-bit non-PIC code.

   ll $12, symbol => lui    $12, 0
                         R_MIPS_HIGHEST symbol
                     daddiu $12, $12, 0
                         R_MIPS_HIGHER symbol
                     dsll   $12, $12, 16
                     daddiu $12, $12, 0
                         R_MIPS_HI16 symbol
                     dsll   $12, $12, 16
                     ll     $12, 0($12)
                         R_MIPS_LO16 symbol

- Fix `expandMem16Inst` to unify handling of 3 and 4 operands
instructions.

- Delete unused now `MipsTargetStreamer::emitSCWithSymOffset` method.

Task for next patches - implement expanding for other instructions use
`mem_simm9` operand and other `mem_simm##` operands.

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

4 years ago[LegalizeTypes] Add SoftenFloatRes_Unary and SoftenFloatRes_Binary functions to facto...
Craig Topper [Tue, 26 Nov 2019 20:52:17 +0000 (12:52 -0800)]
[LegalizeTypes] Add SoftenFloatRes_Unary and SoftenFloatRes_Binary functions to factor repeated patterns out of many of the SoftenFloatRes_* functions

This has been factored out of D70654 which will add strict FP support to these functions. By making the helpers we avoid repeating even more code.

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

4 years ago[AIX] Disable clang python binding tests
David Tenty [Tue, 26 Nov 2019 20:29:49 +0000 (15:29 -0500)]
[AIX] Disable clang python binding tests

Summary:
The Python ctypes FFI interface is broken on AIX, it cannot properly pass
structures containing  arrays ( https://bugs.python.org/issue38628). So
disable the clang python binding tests on AIX till this is resolved.

Reviewers: stevewan, jasonliu, hubert.reinterpretcast, mgorny

Reviewed By: jasonliu, hubert.reinterpretcast

Subscribers: mgorny, cfe-commits

Tags: #clang

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

4 years ago[LegalizeDAG] Use getOperationAction instead of getStrictFPOperationAction for STRICT...
Craig Topper [Tue, 26 Nov 2019 19:57:45 +0000 (11:57 -0800)]
[LegalizeDAG] Use getOperationAction instead of getStrictFPOperationAction for STRICT_LRINT/LROUND/LLRINT/LLROUND.

4 years agoTargetPassConfig: const char * -> const char []
Fangrui Song [Tue, 26 Nov 2019 19:20:57 +0000 (11:20 -0800)]
TargetPassConfig: const char * -> const char []

The latter has better codegen in non-optimized builds, which do not run
ipsccp.

4 years ago[X86] Add strict fp support for operations of X87 instructions
Craig Topper [Tue, 26 Nov 2019 18:59:18 +0000 (10:59 -0800)]
[X86] Add strict fp support for operations of X87 instructions

This is the following patch of D68854.

This patch adds basic operations of X87 instructions, including +, -, *, / , fp extensions and fp truncations.

Patch by Chen Liu(LiuChen3)

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

4 years ago[X86] Pre-commit test modifications for D68857. NFC
Craig Topper [Tue, 26 Nov 2019 18:32:40 +0000 (10:32 -0800)]
[X86] Pre-commit test modifications for D68857. NFC

Patch by Chen Liu(LiuChen3)

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

4 years ago[Object][RISCV][test] Improve DebugInfo/RISCV/relax-debug-frame.ll
Fangrui Song [Fri, 22 Nov 2019 01:05:27 +0000 (17:05 -0800)]
[Object][RISCV][test] Improve DebugInfo/RISCV/relax-debug-frame.ll

Reviewed By: luismarques

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

4 years ago[ELF] Add a corrector for case mismatch problems
Fangrui Song [Wed, 20 Nov 2019 18:55:04 +0000 (10:55 -0800)]
[ELF] Add a corrector for case mismatch problems

Reviewed By: grimar, peter.smith

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

4 years ago[ELF] Replace SymbolTable::forEachSymbol with iterator_range symbols()
Fangrui Song [Wed, 20 Nov 2019 19:16:15 +0000 (11:16 -0800)]
[ELF] Replace SymbolTable::forEachSymbol with iterator_range symbols()

D62381 introduced forEachSymbol(). It seems that many call sites cannot
be parallelized because the body shared some states. Replace
forEachSymbol with iterator_range<filter_iterator<...>> symbols() to
simplify code and improve debuggability (std::function calls take some
frames).

It also allows us to use early return to simplify code added in D69650.

Reviewed By: grimar

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

4 years ago[OPENMP]Remove tab in message, NFC.
Alexey Bataev [Tue, 26 Nov 2019 16:37:36 +0000 (11:37 -0500)]
[OPENMP]Remove tab in message, NFC.

4 years ago[OPENMP]Simplify printing of declare variant attribute, NFC.
Alexey Bataev [Tue, 26 Nov 2019 16:10:58 +0000 (11:10 -0500)]
[OPENMP]Simplify printing of declare variant attribute, NFC.

4 years ago[ARM] Clean up the load and store code. NFC
David Green [Tue, 26 Nov 2019 16:18:58 +0000 (16:18 +0000)]
[ARM] Clean up the load and store code. NFC

Some of these patterns have grown quite organically. I've tried to
organise them a little here, moving all the PatFlags together and giving
them a more consistent naming scheme, to allow some of the later
patterns to be merged into a single multiclass.

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

4 years ago[Codegen][ARM] Add addressing modes from masked loads and stores
David Green [Thu, 21 Nov 2019 14:56:37 +0000 (14:56 +0000)]
[Codegen][ARM] Add addressing modes from masked loads and stores

MVE has a basic symmetry between it's normal loads/store operations and
the masked variants. This means that masked loads and stores can use
pre-inc and post-inc addressing modes, just like the standard loads and
stores already do.

To enable that, this patch adds all the relevant infrastructure for
treating masked loads/stores addressing modes in the same way as normal
loads/stores.

This involves:
- Adding an AddressingMode to MaskedLoadStoreSDNode, along with an extra
   Offset operand that is added after the PtrBase.
- Extending the IndexedModeActions from 8bits to 16bits to store the
   legality of masked operations as well as normal ones. This array is
   fairly small, so doubling the size still won't make it very large.
   Offset masked loads can then be controlled with
   setIndexedMaskedLoadAction, similar to standard loads.
- The same methods that combine to indexed loads, such as
   CombineToPostIndexedLoadStore, are adjusted to handle masked loads in
   the same way.
- The ARM backend is then adjusted to make use of these indexed masked
   loads/stores.
- The X86 backend is adjusted to hopefully be no functional changes.

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

4 years ago[ARM] Lots of MVE offset masked load and store tests. NFC
David Green [Thu, 21 Nov 2019 14:06:54 +0000 (14:06 +0000)]
[ARM] Lots of MVE offset masked load and store tests. NFC

4 years ago[DebugInfo] Disallow fragmenting DIExpressions with shift operators
stozer [Fri, 22 Nov 2019 16:40:32 +0000 (16:40 +0000)]
[DebugInfo] Disallow fragmenting DIExpressions with shift operators

DIExpressions with shift operators should not be fragmented for the same
reason as arithmetic operators: carry over cannot be expressed from one
fragment to the other, so an invalid result would be produced.

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

4 years ago[XCOFF][AIX] Check linkage on the function, and two fixes for comments
jasonliu [Tue, 26 Nov 2019 16:05:26 +0000 (16:05 +0000)]
[XCOFF][AIX] Check linkage on the function, and two fixes for comments

This is a follow up commit to address post-commit comment in D70443

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

4 years ago[AMDGPU] Fix emitIfBreak CF lowering: use temp reg to make register coalescer life...
vpykhtin [Mon, 18 Nov 2019 17:06:48 +0000 (20:06 +0300)]
[AMDGPU] Fix emitIfBreak CF lowering: use temp reg to make register coalescer life easier.

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

4 years ago[OPENMP]Fix PR44133: crash on lambda reductions in templates.
Alexey Bataev [Mon, 25 Nov 2019 21:25:27 +0000 (16:25 -0500)]
[OPENMP]Fix PR44133: crash on lambda reductions in templates.

Need to perform the instantiation of the combiner/initializer even if
the resulting type is not dependent, if the construct is defined in
templates in some cases.

4 years ago[lldb] [test] Un-XFAIL lldb-server tests fixed on NetBSD
Michał Górny [Tue, 26 Nov 2019 15:45:43 +0000 (16:45 +0100)]
[lldb] [test] Un-XFAIL lldb-server tests fixed on NetBSD

4 years ago[clang-tidy] Use range-for for check registration. NFC
Alexander Kornienko [Fri, 22 Nov 2019 11:22:40 +0000 (12:22 +0100)]
[clang-tidy] Use range-for for check registration. NFC

Actually, just testing GitHub commit rights.

4 years ago[LegalizeTypes][RISCV] Soften FCOPYSIGN operand
Luís Marques [Sun, 24 Nov 2019 15:23:29 +0000 (15:23 +0000)]
[LegalizeTypes][RISCV] Soften FCOPYSIGN operand

Summary: Adds support for softening FCOPYSIGN operands.
Adds RISC-V tests that exercise the new softening code.

Reviewers: asb, lenary, efriedma
Reviewed By: efriedma
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70679

4 years ago[RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32)
Luís Marques [Tue, 26 Nov 2019 14:24:59 +0000 (14:24 +0000)]
[RISCV] Handle fcopysign(f32, f64) and fcopysign(f64, f32)

Summary: Adds tablegen patterns to explicitly handle fcopysign where the
magnitude and sign arguments have different types, due to the sign value casts
being removed the by DAGCombiner. Support for RV32IF follows in a separate
commit. Adds tests for all relevant scenarios except RV32IF.

Reviewers: lenary
Reviewed By: lenary
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70678

4 years ago[llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.
Georgii Rymar [Wed, 20 Nov 2019 14:37:56 +0000 (17:37 +0300)]
[llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.

Currently we have following issues:
1) We have 2 different implementations with a different behaviors for GNU/LLVM styles.
2) Errors are either not handled at all or we call report_fatal_error with not helpfull messages.
3) There is no test coverage even for those errors that are reported.

This patch reimplements parsing of the SHT_GNU_verdef section entries
in a single place, adds a few error messages and test coverage.

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

4 years ago[lldb] Avoid snprintf in PlatformRemoteDarwinDevice
Pavel Labath [Tue, 26 Nov 2019 14:11:16 +0000 (15:11 +0100)]
[lldb] Avoid snprintf in PlatformRemoteDarwinDevice

This quashes a -Wformat-truncation warning.

4 years ago[InferFuncAttributes][Attributor] add tests for 'dereferenceable'; NFC
Sanjay Patel [Tue, 26 Nov 2019 14:07:17 +0000 (09:07 -0500)]
[InferFuncAttributes][Attributor] add tests for 'dereferenceable'; NFC

Pulling a couple of extra tests out of
D64258
before abandoning in favor of
D70714

4 years ago[lldb][NFC] Modernize string handling in DWARFASTParserClang::ParseTypeModifier
Raphael Isemann [Tue, 26 Nov 2019 13:23:32 +0000 (14:23 +0100)]
[lldb][NFC] Modernize string handling in DWARFASTParserClang::ParseTypeModifier

4 years ago[lldb] Use llvm::format in AppleObjCRuntimeV2.cpp
Pavel Labath [Tue, 26 Nov 2019 14:00:15 +0000 (15:00 +0100)]
[lldb] Use llvm::format in AppleObjCRuntimeV2.cpp

Crushing a "sprintf" buffer is null warning.

4 years ago[llvm-readobj][test] - Cleanup the many-sections.s test case.
Georgii Rymar [Tue, 26 Nov 2019 12:29:30 +0000 (15:29 +0300)]
[llvm-readobj][test] - Cleanup the many-sections.s test case.

It removes 2 precompiled binaries used which are now
can be crafted with the use of yaml2obj.

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

4 years ago[lldb] fix a -Wcast-qual warning
Pavel Labath [Tue, 26 Nov 2019 13:48:47 +0000 (14:48 +0100)]
[lldb] fix a -Wcast-qual warning

4 years ago[lldb] remove a superfluous semicolon
Pavel Labath [Tue, 26 Nov 2019 13:47:28 +0000 (14:47 +0100)]
[lldb] remove a superfluous semicolon

4 years agoPartially reland "[Diagnostics] Put "deprecated copy" warnings into -Wdeprecated...
Dávid Bolvanský [Tue, 26 Nov 2019 11:13:13 +0000 (12:13 +0100)]
Partially reland "[Diagnostics] Put "deprecated copy" warnings into -Wdeprecated-copy""

But do not enable it under -Wextra until libcxx issue is solved.

4 years ago[lldb] remove unsigned Stream::operator<< overloads
Pavel Labath [Thu, 14 Nov 2019 14:31:26 +0000 (15:31 +0100)]
[lldb] remove unsigned Stream::operator<< overloads

Summary:
I recently re-discovered that the unsinged stream operators of the
lldb_private::Stream class have a surprising behavior in that they print
the number in hex. This is all the more confusing because the "signed"
versions of those operators behave normally.

Now that, thanks to Raphael, each Stream class has a llvm::raw_ostream
wrapper, I think we should delete most of our formatting capabilities
and just delegate to that. This patch tests the water by just deleting
the operators with the most surprising behavior.

Most of the code using these operators was printing user_id_t values. It
wasn't fully consistent about prefixing them with "0x", but I've tried
to consistenly print it without that prefix, to make it more obviously
different from pointer values.

Reviewers: teemperor, JDevlieghere, jdoerfert

Subscribers: lldb-commits

Tags: #lldb

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

4 years ago[lldb/symbolvendorelf] Copy more sections from separate debug files
Pavel Labath [Mon, 25 Nov 2019 13:33:25 +0000 (14:33 +0100)]
[lldb/symbolvendorelf] Copy more sections from separate debug files

Include the fancier DWARF5 sections too.

4 years ago[lldb][NFC] Remove no longer unused variable in DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann [Tue, 26 Nov 2019 13:17:06 +0000 (14:17 +0100)]
[lldb][NFC] Remove no longer unused variable in DWARFASTParserClang::ParseTypeFromDWARF

4 years ago[yaml2obj] - Fix BB after «[yaml2obj] - Teach tool to describe SHT_GNU_verdef section...
Georgii Rymar [Tue, 26 Nov 2019 13:01:47 +0000 (16:01 +0300)]
[yaml2obj] - Fix BB after «[yaml2obj] - Teach tool to describe SHT_GNU_verdef section with a "Content" property.»

Fixed a temporary file name.

BB: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-ubuntu/builds/669

4 years ago[lldb][NFC] Simplify structure parsing code in DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann [Tue, 26 Nov 2019 13:01:10 +0000 (14:01 +0100)]
[lldb][NFC] Simplify structure parsing code in DWARFASTParserClang::ParseTypeFromDWARF

This way it looks more like the code around it. The assert is also gone as it just
checks that the variables we declare directly above were not initialized by anyone.
That made more sense when this was one large function.

4 years ago[lldb] Add boilerplate to recognize the .debug_rnglists.dwo section
Pavel Labath [Tue, 26 Nov 2019 10:00:23 +0000 (11:00 +0100)]
[lldb] Add boilerplate to recognize the .debug_rnglists.dwo section

4 years ago[lldb][NFC] Extract type modifier parsing from DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann [Tue, 26 Nov 2019 12:42:16 +0000 (13:42 +0100)]
[lldb][NFC] Extract type modifier parsing from DWARFASTParserClang::ParseTypeFromDWARF

Part of the work to split up this monolithic parsing function.

4 years ago[clangd] Speed up when building rename edit.
Haojian Wu [Tue, 19 Nov 2019 14:23:36 +0000 (15:23 +0100)]
[clangd] Speed up when building rename edit.

Summary:
We used to scan the code everytime when computing the LSP position to the offset
(respect the LSP encoding). Now we only scan the source code once.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[NFC] ASSERT_EQ before accessing items in containers
Kirill Bobyrev [Tue, 26 Nov 2019 12:45:04 +0000 (13:45 +0100)]
[NFC] ASSERT_EQ before accessing items in containers

As discussed offline, something different from `EXPECT_EQ` should be
used to check if the container contains enough items before accessing
them so that other tests can still be run even if the assertion fails as
opposed to having `EXPECT_EQ` failing and then aborting the run due to
the errors caused by out-of-bounds memory access.

Reviewed by: ilya-biryukov

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

4 years ago[yaml2obj] - Teach tool to describe SHT_GNU_verdef section with a "Content" property.
Georgii Rymar [Tue, 26 Nov 2019 10:59:37 +0000 (13:59 +0300)]
[yaml2obj] - Teach tool to describe SHT_GNU_verdef section with a "Content" property.

There is no way to set raw content for SHT_GNU_verdef section.
This patch implements it.

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

4 years ago[openmp] Recognise ARMv7ve machine arch.
AndreyChurbanov [Tue, 26 Nov 2019 11:37:24 +0000 (14:37 +0300)]
[openmp] Recognise ARMv7ve machine arch.

Patch by raj.khem (Khem Raj)

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

4 years ago[X86][MC] no error diagnostic for out-of-range jrcxz/jecxz/jcxz
Alexey Lapshin [Fri, 15 Nov 2019 18:48:55 +0000 (21:48 +0300)]
[X86][MC] no error diagnostic for out-of-range jrcxz/jecxz/jcxz

Fix for PR24072:

X86 instructions jrcxz/jecxz/jcxz performs short jumps if rcx/ecx/cx register is 0
The maximum relative offset for a forward short jump is 127 Bytes (0x7F).
The maximum relative offset for a backward short jump is 128 Bytes (0x80).

Gnu assembler warns when the distance of the jump exceeds the maximum but llvm-as does not.

Patch by Konstantin Belochapka and Alexey Lapshin

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

4 years ago[lldb][NFC] Extract enum parsing from DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann [Tue, 26 Nov 2019 11:21:31 +0000 (12:21 +0100)]
[lldb][NFC] Extract enum parsing from DWARFASTParserClang::ParseTypeFromDWARF

Part of the work to split up this monolithic parsing function.

4 years ago[lldb][NFCI] Extract subroutine parsing from DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann [Tue, 26 Nov 2019 10:54:30 +0000 (11:54 +0100)]
[lldb][NFCI] Extract subroutine parsing from DWARFASTParserClang::ParseTypeFromDWARF

Part of the work to split up this monolithic parsing function.

Should be NFC but due to the kafkaesque control flow in this case statement this might
have some unintended side effects.

4 years ago[lldb][NFC] Extract array type parsing from DWARFASTParserClang::ParseTypeFromDWARF
Raphael Isemann [Tue, 26 Nov 2019 10:27:22 +0000 (11:27 +0100)]
[lldb][NFC] Extract array type parsing from DWARFASTParserClang::ParseTypeFromDWARF

Part of the work to split up this monolithic parsing function.

4 years ago[OpenCL] Add work-group and miscellaneous vector builtin functions
Sven van Haastregt [Tue, 26 Nov 2019 10:44:49 +0000 (10:44 +0000)]
[OpenCL] Add work-group and miscellaneous vector builtin functions

Add the work-group and miscellaneous vector builtin functions from the
OpenCL C specification.

Patch by Pierre Gondois and Sven van Haastregt.

4 years ago[AArch64][SVE] Implement floating-point conversion intrinsics
Kerry McLaughlin [Tue, 26 Nov 2019 10:21:20 +0000 (10:21 +0000)]
[AArch64][SVE] Implement floating-point conversion intrinsics

Summary:
Adds intrinsics for the following:
  - fcvt
  - fcvtzs & fcvtzu
  - scvtf & ucvtf
  - fcvtlt, fcvtnt
  - fcvtx & fcvtxnt

Reviewers: huntergr, sdesmalen, dancgr, mgudim, efriedma

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cameron.mcinally, cfe-commits, llvm-commits

Tags: #llvm

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

4 years ago[ARM][ReachingDefs] Remove dead code in loloops.
Sam Parker [Tue, 26 Nov 2019 10:25:04 +0000 (10:25 +0000)]
[ARM][ReachingDefs] Remove dead code in loloops.

Add some more helper functions to ReachingDefs to query the uses of
a given MachineInstr and also to query whether two MachineInstrs use
the same def of a register.

For Arm, while tail-predicating, these helpers are used in the
low-overhead loops to remove the dead code that calculates the number
of loop iterations.

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

4 years ago[SystemZ] Don't build a PPA instruction with an immediate 0 operand.
Jonas Paulsson [Tue, 26 Nov 2019 10:16:48 +0000 (11:16 +0100)]
[SystemZ]  Don't build a PPA instruction with an immediate 0 operand.

The improvement in the machine verifier for operand types (D63973) discovered
a bad operand in a test using a PPA instruction. It was an immediate 0 where
a register was expected.

This patch fixes this (NFC) by now making the PPA second register operand
NoRegister instead of a zero immediate in the MIR.

Review: Ulrich Weigand
https://reviews.llvm.org/D70501

4 years ago[ARM][ReachingDefs] RDA in LoLoops
Sam Parker [Tue, 26 Nov 2019 10:03:25 +0000 (10:03 +0000)]
[ARM][ReachingDefs] RDA in LoLoops

Add several new methods to ReachingDefAnalysis:
- getReachingMIDef, instead of returning an integer, return the
  MachineInstr that produces the def.
- getInstFromId, return a MachineInstr for which the given integer
  corresponds to.
- hasSameReachingDef, return whether two MachineInstr use the same
  def of a register.
- isRegUsedAfter, return whether a register is used after a given
  MachineInstr.

These methods have been used in ARMLowOverhead to replace searching
for uses/defs.

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

4 years ago[lldb][NFC] Extract pointer to member type parsing from DWARFASTParserClang::ParseTyp...
Raphael Isemann [Tue, 26 Nov 2019 09:45:35 +0000 (10:45 +0100)]
[lldb][NFC] Extract pointer to member type parsing from DWARFASTParserClang::ParseTypeFromDWARF

Part of the work to split up this monolithic parsing function.

4 years ago[InstCombine] Fixed std::min on some bots. NFCI
Dávid Bolvanský [Tue, 26 Nov 2019 10:06:06 +0000 (11:06 +0100)]
[InstCombine] Fixed std::min on some bots. NFCI

4 years ago[ARM][ConstantIslands] Correct block size update
Sam Parker [Thu, 21 Nov 2019 14:29:15 +0000 (14:29 +0000)]
[ARM][ConstantIslands] Correct block size update

When inserting a non-decrementing LE, the basic block was being
resized to take into consideration that a tCMP and tBcc had been
combined into one T1 instruction. This is not true in the LE case
where we generate a CBN?Z and an LE.

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

4 years ago[InstCombine] Optimize some memccpy calls to memcpy/null
Dávid Bolvanský [Mon, 25 Nov 2019 19:15:25 +0000 (20:15 +0100)]
[InstCombine] Optimize some memccpy calls to memcpy/null

Summary:
return memccpy(d, "helloworld", 'r', 20)
=>
return memcpy(d, "helloworld", 8 /* pos of 'r' in string */), d + 8

Reviewers: efriedma, jdoerfert

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[lldb][NFC] NULL -> nullptr in DWARFASTParserClang::UpdateSymbolContextScopeForType
Raphael Isemann [Mon, 25 Nov 2019 13:44:51 +0000 (14:44 +0100)]
[lldb][NFC] NULL -> nullptr in DWARFASTParserClang::UpdateSymbolContextScopeForType

4 years agoRecommit ARM-NEON: make type modifiers orthogonal and allow multiple modifiers.
Tim Northover [Fri, 11 Oct 2019 12:46:47 +0000 (13:46 +0100)]
Recommit ARM-NEON: make type modifiers orthogonal and allow multiple modifiers.

The modifier system used to mutate types on NEON intrinsic definitions had a
separate letter for all kinds of transformations that might be needed, and we
were quite quickly running out of letters to use. This patch converts to a much
smaller set of orthogonal modifiers that can be applied together to achieve the
desired effect.

When merging with downstream it is likely to cause a conflict with any local
modifications to the .td files. There is a new script in
utils/convert_arm_neon.py that was used to convert all .td definitions and I
would suggest running it on the last downstream version of those files before
this commit rather than resolving conflicts manually.

The original version broke vcreate_* because it became a macro and didn't
apply the normal integer promotion rules before bitcasting to a vector.
This adds a temporary.

4 years agoclang-format-vs : Fix typo NUGET_EXE_DIR on README
Hans Wennborg [Tue, 26 Nov 2019 09:16:06 +0000 (10:16 +0100)]
clang-format-vs : Fix typo NUGET_EXE_DIR on README

Match with the CMake variable.

Patch by empty2fill!

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

4 years ago[clangd] Implement cross-file rename.
Haojian Wu [Wed, 23 Oct 2019 12:40:20 +0000 (14:40 +0200)]
[clangd] Implement cross-file rename.

Summary:
This is the initial version. The cross-file rename is purely based on
the index.

It is hidden under a command-line flag, and only available for a small set
of symbols.

Reviewers: ilya-biryukov, sammccall

Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

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

4 years ago[LLD][ELF] - Make compression level be dependent on -On.
Georgii Rymar [Mon, 25 Nov 2019 09:39:03 +0000 (12:39 +0300)]
[LLD][ELF] - Make compression level be dependent on -On.

Currently LLD always use zlib compression level 6.
This patch changes it to use 1 for -O0, -O1 and 6 for -O2.

It fixes https://bugs.llvm.org/show_bug.cgi?id=44089.

There was also a thread in llvm-dev on this topic:
https://lists.llvm.org/pipermail/llvm-dev/2018-August/125020.html

Here is a table with results of building clang mentioned there:

```
Level   Time            Size
0       0m17.128s       2045081496   Z_NO_COMPRESSION
1       0m31.471s       922618584    Z_BEST_SPEED
2       0m32.659s       903642376
3       0m36.749s       890805856
4       0m41.532s       876697184
5       0m48.383s       862778576
6       1m3.176s        855251640    Z_DEFAULT_COMPRESSION
7       1m15.335s       853755920
8       2m0.561s        852497560
9       2m33.972s       852397408    Z_BEST_COMPRESSION
```

It shows that it is probably not reasonable to use values greater than 6.

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

4 years ago[Attributor] Track a GEP Instruction in align deduction
Hideto Ueno [Tue, 26 Nov 2019 07:51:59 +0000 (07:51 +0000)]
[Attributor] Track a GEP Instruction in align deduction

Summary:
This patch enables us to track GEP instruction in align deduction.
If a pointer `B` is defined as `A+Offset` and known to have alignment `C`, there exists some integer Q such that
```
 A + Offset = C * Q = B
```
 So we can say that the maximum power of two which is a divisor of gcd(Offset, C) is an alignment.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: lebedev.ri, hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[X86] Return Op instead of SDValue() for lowering flags_read/write intrinsics
Craig Topper [Tue, 26 Nov 2019 07:07:43 +0000 (23:07 -0800)]
[X86] Return Op instead of SDValue() for lowering flags_read/write intrinsics

Returning SDValue() means we didn't handle it and the common
code should try to expand it. But its a target intrinsic so
expanding won't do anything and just leave the node alone. But
it will print confusing debug messages.

By returning Op we tell the common code that the node is legal
and shouldn't receive any further processing.

4 years ago[ELF] Support input section description .rel[a].dyn in /DISCARD/
Fangrui Song [Mon, 25 Nov 2019 21:24:18 +0000 (13:24 -0800)]
[ELF] Support input section description .rel[a].dyn in /DISCARD/

Reviewed By: ruiu

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

4 years ago[X86] Updated strict fp scalar tests and add fp80 tests for D68857, NFC.
Wang, Pengfei [Tue, 26 Nov 2019 05:40:28 +0000 (13:40 +0800)]
[X86] Updated strict fp scalar tests and add fp80 tests for D68857, NFC.

4 years ago[BPF] add "llvm." prefix to BPF internally created globals
Yonghong Song [Tue, 26 Nov 2019 00:31:33 +0000 (16:31 -0800)]
[BPF] add "llvm." prefix to BPF internally created globals

Currently, BPF backend creates some global variables with name like
  <type_name>:<reloc_type>:<patch_imm>$<access_str>
to carry certain information to BPF backend.

With direct clang compilation, the following code in
   llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
is triggered and the above globals are emitted to the ELF file.
(clang enabled this as opt flag -faddrsig is on by default.)
   if (TM.Options.EmitAddrsig) {
    // Emit address-significance attributes for all globals.
    OutStreamer->EmitAddrsig();
    for (const GlobalValue &GV : M.global_values())
      if (!GV.use_empty() && !GV.isThreadLocal() &&
          !GV.hasDLLImportStorageClass() && !GV.getName().startswith("llvm.") &&
          !GV.hasAtLeastLocalUnnamedAddr())
        OutStreamer->EmitAddrsigSym(getSymbol(&GV));
  }
...
 10162: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tcp_sock:0:2048$0:117
 10163: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tcp_sock:0:2112$0:126:0
 10164: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT   UND tcp_sock:1:8$0:31:6
...
While in llc, those globals are not emited since EmitAddrsig
default option is false for llc. The llc flag "-addrsig" can be used to
enable the above code.

This patch added "llvm." prefix to these internal globals so that
they can be ignored in the above codes and possible other
places.

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

4 years agoRevert "As a follow-up to my initial mail to llvm-dev here's a first pass at the...
Muhammad Omair Javaid [Tue, 26 Nov 2019 04:32:13 +0000 (09:32 +0500)]
Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there."

This reverts commit 8ff85ed905a7306977d07a5cd67ab4d5a56fafb4.

This commit introduced 9 new failures on lldb buildbot host at http://lab.llvm.org:8014/builders/lldb-aarch64-ubuntu

Following tests were failing:
    lldb-api :: functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py
    lldb-api :: functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py
    lldb-api :: functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
    lldb-api :: functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
    lldb-api :: functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
    lldb-api :: functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
    lldb-api :: functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
    lldb-api :: functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
    lldb-api :: functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
    lldb-api :: functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py

Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65410

4 years ago[LegalizeTypes] Remove code to create ISD::FP_TO_FP16 from SoftenFloatRes_FTRUNC.
Craig Topper [Tue, 26 Nov 2019 02:13:29 +0000 (18:13 -0800)]
[LegalizeTypes] Remove code to create ISD::FP_TO_FP16 from SoftenFloatRes_FTRUNC.

There seems to have been a misunderstanding of what ISD::FTRUNC
represents. ISD::FTRUNC is equivalent to llvm.trunc which takes
a floating point value, truncates it without changing the size
of the value and returns it.

Despite its similar name, its different than the fptrunc instruction
in IR which changes a floating point value to a smaller floating
point value. fptrunc is represented by ISD::FP_ROUND in SelectionDAG.

Since the ISD::FP_TO_FP16 node takes a floating point value and
converts it to f16 its more similar to ISD::FP_ROUND. In fact there
is identical code to what is being removed here in SoftenFloatRes_FP_ROUND.

I assume this bug was never encountered because it would require
f16 to be legalized by softening rather than the default of
promoting.

4 years ago[X86] Add support for STRICT_FP_ROUND/STRICT_FP_EXTEND from/to fp128 to/from f32...
Craig Topper [Tue, 26 Nov 2019 01:14:52 +0000 (17:14 -0800)]
[X86] Add support for STRICT_FP_ROUND/STRICT_FP_EXTEND from/to fp128 to/from f32/f64/f80 in 64-bit mode.

These need to emit a libcall like we do for the non-strict version.

32-bit mode needs to SoftenFloat support to be implemented for strict FP nodes.

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

4 years ago[clang][CodeGen] Fix wrong memcpy size of no_unique_address in FieldMemcpyizer
Senran Zhang [Tue, 26 Nov 2019 02:15:14 +0000 (10:15 +0800)]
[clang][CodeGen] Fix wrong memcpy size of no_unique_address in FieldMemcpyizer

When generating ctor, FieldMemcpyizer wrongly treated zero-sized class members
as what should be copied, and generated wrong memcpy size under some special
circumstances. This patch tries to fix it.

Reviewed By: MaskRay, rjmccall

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

4 years agoRevert "Use InitLLVM to setup a pretty stack printer"
Nico Weber [Tue, 26 Nov 2019 02:06:56 +0000 (21:06 -0500)]
Revert "Use InitLLVM to setup a pretty stack printer"

This reverts commit 3f76260dc0674cc0acb25f550a0f0c594cf537ea.
Breaks at least these tests on Windows:
    Clang :: Driver/clang-offload-bundler.c
    Clang :: Driver/clang-offload-wrapper.c

4 years agoUse InitLLVM to setup a pretty stack printer
Rui Ueyama [Tue, 26 Nov 2019 01:15:47 +0000 (10:15 +0900)]
Use InitLLVM to setup a pretty stack printer

InitLLVM does not only save a few lines from main() but also makes the
commands do the right thing for multibyte character pathnames on
Windows (i.e. canonicalize argv's to UTF-8) because of the code we
have in this file:

https://github.com/llvm/llvm-project/blob/master/llvm/lib/Support/InitLLVM.cpp#L32

For many LLVM commands, we already have calls of InitLLVM, but there
are still remainings.

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

4 years agoSpeculative fix for frame-loclist.s test on Windows.
Evgenii Stepanov [Tue, 26 Nov 2019 01:50:02 +0000 (17:50 -0800)]
Speculative fix for frame-loclist.s test on Windows.

"echo -e" treats windows paths as special characters (ex. "\b").

4 years agoAs a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described...
Eric Christopher [Tue, 26 Nov 2019 00:33:19 +0000 (16:33 -0800)]
As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there.

This change doesn't include any change to move from selection dag to fast isel
and that will come with other numbers that should help inform that decision.
There also haven't been any real debuggability studies with this pipeline yet,
this is just the initial start done so that people could see it and we could start
tweaking after.

Test updates: Outside of the newpm tests most of the updates are coming from either
optimization passes not run anymore (and without a compelling argument at the moment)
that were largely used for canonicalization in clang.

Original post:

http://lists.llvm.org/pipermail/llvm-dev/2019-April/131494.html

Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65410

4 years ago[X86] Add proper execution domain information to the avx512vnni instructions.
Craig Topper [Tue, 26 Nov 2019 00:56:50 +0000 (16:56 -0800)]
[X86] Add proper execution domain information to the avx512vnni instructions.

4 years ago[X86] Remove forward declaration of _invpcid from intrin.h. Rely on inline version...
Craig Topper [Tue, 26 Nov 2019 00:07:37 +0000 (16:07 -0800)]
[X86] Remove forward declaration of _invpcid from intrin.h. Rely on inline version from immintrin.h

The forward declaration had a cdecl calling convention, but the
inline version did not. This leads to a conflict if the default
calling convention is not cdecl. Fix this by just removing the
forward declaration.

Fixes PR41503