platform/upstream/llvm.git
5 years agoFileCheck: Improve FileCheck variable terminology
Thomas Preud'homme [Thu, 23 May 2019 00:10:14 +0000 (00:10 +0000)]
FileCheck: Improve FileCheck variable terminology

Summary:
Terminology introduced by [[#]] blocks is confusing and does not
integrate well with existing terminology.

First, variables referred by [[]] blocks are called "pattern variables"
while the text a CHECK directive needs to match is called a "CHECK
pattern". This is inconsistent with variables in [[#]] blocks since
[[#]] blocks are also found in CHECK pattern yet those variables are
called "numeric variable".

Second, the replacing of both [[]] and [[#]] blocks by the value of the
variable or expression they contain is represented by a
FileCheckPatternSubstitution class. The naming refers to being a
substitution in a CHECK pattern but could be wrongly understood as being
a substitution of a pattern variable.

Third and lastly, comments use "numeric expression" to refer both to the
[[#]] blocks as well as to the numeric expressions these blocks contain
which get evaluated at match time.

This patch solves these confusions by
- calling variables in [[]] and [[#]] blocks as string and numeric
  variables respectively;
- referring to [[]] and [[#]] as substitution *blocks*, with the former
  being a string substitution block and the latter a numeric
  substitution block;
- calling [[]] and [[#]] blocks to be replaced by the value of a
  variable or expression they contain a substitution (as opposed to
  definition when these blocks are used to defined a variable), with the
  former being a string substitution and the latter a numeric
  substitution;
- renaming the FileCheckPatternSubstitution as a FileCheckSubstitution
  class with FileCheckStringSubstitution and
  FileCheckNumericSubstitution subclasses;
- restricting the use of "numeric expression" to refer to the expression
  that is evaluated in a numeric substitution.

While numeric substitution blocks only support numeric substitutions of
numeric expressions at the moment there are plans to augment numeric
substitution blocks to support numeric definitions as well as both a
numeric definition and numeric substitution in the same numeric
substitution block.

Reviewers: jhenderson, jdenny, probinson, arichardson

Subscribers: hiraditya, arichardson, probinson, llvm-commits

Tags: #llvm

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

llvm-svn: 361445

5 years ago[lldb] Fix use-of-uninitialized-value in Driver
Jorge Gorbe Moya [Wed, 22 May 2019 23:37:48 +0000 (23:37 +0000)]
[lldb] Fix use-of-uninitialized-value in Driver

The driver passes by reference an uninitialized num_errors variable to
RunCommandInterpreter. This should be fine, as it's supposed to be
an output argument, but the reproducer instrumentation reads it in order
to record the value of all the arguments to the function.

This change fixes it by initializing num_errors to 0 before calling
RunCommandInterpreter.

llvm-svn: 361444

5 years agoExpression: correct relocation model for Windows
Saleem Abdulrasool [Wed, 22 May 2019 23:23:39 +0000 (23:23 +0000)]
Expression: correct relocation model for Windows

The Windows Code Generation model cannot generation code with the PIC relocation
model - all code is implicitly position independent due to the DLL load slide
that occurs if it is not loaded at the preferred base address.  Invert the
condition and inline the single use of the variable.  This should also aid the
WASM target.  This significantly improves the state of the (swift) repl on
Windows (and should aid in expression evaluation on Windows).

llvm-svn: 361443

5 years ago[Target] Protect Processes' language runtimes map with a mutex
Alex Langford [Wed, 22 May 2019 23:01:18 +0000 (23:01 +0000)]
[Target] Protect Processes' language runtimes map with a mutex

Summary:
From what I understand, it's possible for multiple threads to request
a specific language runtime (e.g. CPPLanguageRuntime). This leads to a data
race.

Reviewers: jingham, JDevlieghere, compnerd, clayborg

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

llvm-svn: 361442

5 years ago[ORC] Remove a stray decl that accidentally found its way in to r361322.
Lang Hames [Wed, 22 May 2019 22:57:40 +0000 (22:57 +0000)]
[ORC] Remove a stray decl that accidentally found its way in to r361322.

llvm-svn: 361441

5 years agoActaully lock accesses to OptionValueFileSpecList objects
Frederic Riss [Wed, 22 May 2019 21:58:52 +0000 (21:58 +0000)]
Actaully lock accesses to OptionValueFileSpecList objects

The patch in r359029 missed a few accessors and mutators. This patch
also changes the lock to a recursive one as OptionValueFileSpecList::Clear()
can be invoked from some of the other methods.

llvm-svn: 361440

5 years agoFix r361428 for Windows buildbots/mangling
David Blaikie [Wed, 22 May 2019 21:58:17 +0000 (21:58 +0000)]
Fix r361428 for Windows buildbots/mangling

llvm-svn: 361439

5 years agoFix new enum-codegen.cpp test
Reid Kleckner [Wed, 22 May 2019 21:52:12 +0000 (21:52 +0000)]
Fix new enum-codegen.cpp test

llvm-svn: 361438

5 years ago[docs] Make a note of the HowToUseLLJIT example in the ORCv2 design doc.
Lang Hames [Wed, 22 May 2019 21:44:46 +0000 (21:44 +0000)]
[docs] Make a note of the HowToUseLLJIT example in the ORCv2 design doc.

llvm-svn: 361437

5 years ago[Runtimes] If LLVM_INCLUDE_TESTS=On depend on gtest
Chris Bieneman [Wed, 22 May 2019 21:42:06 +0000 (21:42 +0000)]
[Runtimes] If LLVM_INCLUDE_TESTS=On depend on gtest

Summary: If we are building the tests for the runtimes we should make them depend on gtest so that gtest is built and ready before we run any of the check-* targets.

Reviewers: phosek, compnerd

Reviewed By: compnerd

Subscribers: mgorny, winksaville, llvm-commits

Tags: #llvm

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

llvm-svn: 361436

5 years agoAdd a HowToUseLLJIT example project.
Lang Hames [Wed, 22 May 2019 21:38:41 +0000 (21:38 +0000)]
Add a HowToUseLLJIT example project.

A very minimal demo of how to use the LLJIT class, along the lines of the old
HowToUseJIT example.

llvm-svn: 361435

5 years agoTableGen: Handle nontrivial foreach range bounds
Matt Arsenault [Wed, 22 May 2019 21:28:20 +0000 (21:28 +0000)]
TableGen: Handle nontrivial foreach range bounds

This allows using anything that isn't a literal integer as the bounds
for a foreach. Some of the diagnostics aren't perfect, but nobody ever
accused tablegen of having good errors. For example, the existing
wording suggests a bitrange is valid, but as far as I can tell this
has never worked.

Fixes bug 41958.

llvm-svn: 361434

5 years agoAdd some notes on immutability and faithfulness to the internals manual.
Richard Smith [Wed, 22 May 2019 21:20:09 +0000 (21:20 +0000)]
Add some notes on immutability and faithfulness to the internals manual.

llvm-svn: 361433

5 years ago[runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++
Petr Hosek [Wed, 22 May 2019 21:08:33 +0000 (21:08 +0000)]
[runtimes] Move libunwind, libc++abi and libc++ to lib/$target/c++ and include/c++

This change is a consequence of the discussion in "RFC: Place libs in
Clang-dedicated directories", specifically the suggestion that
libunwind, libc++abi and libc++ shouldn't be using Clang resource
directory. Tools like clangd make this assumption, but this is
currently not true for the LLVM_ENABLE_PER_TARGET_RUNTIME_DIR build.
This change addresses that by moving the output of these libraries to
lib/$target/c++ and include/c++ directories, leaving resource directory
only for compiler-rt runtimes and Clang builtin headers.

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

llvm-svn: 361432

5 years ago[X86] Explcitly disable VEXTRACT instruction matching for an immediate of 0. Remove...
Craig Topper [Wed, 22 May 2019 21:00:18 +0000 (21:00 +0000)]
[X86] Explcitly disable VEXTRACT instruction matching for an immediate of 0. Remove a bunch of isel patterns that become unnecessary.

We effectively had a second set of isel patterns that tried to use a
regular store instruction and an extract_subreg instruction. Or a masked move
and an extract_subreg. These patterns were intended to override the
matching of VEXTRACT instructions by taking advantage of the priority
of the explicit immediate 0 for the index.

This patch instaed just disables the immediate 0 matchin the VEXTRACT
patterns. This each of the component pieces of the larger patterns will
match by themselves.

This found a bug of sorts were we didn't use 128-bit store for 512->128
extract on KNL. Its unclear what the right thing here should be.
Using the vextract avoids constraining the register allocator to use
xmm0-15. But it always results in a longer encoding if the register
allocator ends up choosing xmm0-15 anyway.

llvm-svn: 361431

5 years agoReverted r361134 because of a failing test left unattended for a long time.
Galina Kistanova [Wed, 22 May 2019 20:42:56 +0000 (20:42 +0000)]
Reverted r361134 because of a failing test left unattended for a long time.

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/17792/steps/test-check-all/logs/stdio
Failing Tests (1):
    LLVM :: CodeGen/AMDGPU/regbank-reassign.mir

llvm-svn: 361430

5 years agoAdd back --sysroot support for darwin header search.
James Y Knight [Wed, 22 May 2019 20:39:51 +0000 (20:39 +0000)]
Add back --sysroot support for darwin header search.

Before e97b5f5cf37e ([clang][Darwin] Refactor header search path logic
into the driver), both --sysroot and -isysroot worked to specify where
to look for system and C++ headers on Darwin. However, that change
caused clang to start ignoring --sysroot.

This fixes the regression, and adds tests.

(I also note that on all other platforms, clang seems to almost
completely ignore -isysroot, but that's another issue...)

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

llvm-svn: 361429

5 years agoModules: Code generation of enum constants for merged enum definitions
David Blaikie [Wed, 22 May 2019 20:36:06 +0000 (20:36 +0000)]
Modules: Code generation of enum constants for merged enum definitions

Found in a bootstrap of LLVM with implicit modules, resulting in a
deadlock of some Orc unit tests with libstdc++ 8.1. An enum was used as
part of the implementation of std::recursive_mutex and this bug resulted
in the constant initialization of zero instead of the desired non-zero
value. => Badness.

Richard Smith tells me neither of these fields are necessarily canonical
& so using declaresSamEntity is the right solution here (rather than
changing both of these Fields to be canonical by construction/from their
source)

llvm-svn: 361428

5 years ago[asan] Fix debug asan build link error
Reid Kleckner [Wed, 22 May 2019 20:29:12 +0000 (20:29 +0000)]
[asan] Fix debug asan build link error

Reviewers: dmajor, vitalybuka, waltl

Subscribers: kubamracek, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 361427

5 years agoRe-land r361206 "[COFF] Store alignment in log2 form, NFC"
Reid Kleckner [Wed, 22 May 2019 20:21:52 +0000 (20:21 +0000)]
Re-land r361206 "[COFF] Store alignment in log2 form, NFC"

The previous patch lost the call to PowerOf2Ceil, which causes LLD to
crash when handling common symbols with a non-power-of-2 size. I tweaked
the existing common.test to make the bsspad16 common symbol be 15 bytes
to add coverage for this case.

llvm-svn: 361426

5 years ago[X86][InstCombine] Remove InstCombine code that turns X86 round intrinsics into llvm...
Craig Topper [Wed, 22 May 2019 20:04:55 +0000 (20:04 +0000)]
[X86][InstCombine] Remove InstCombine code that turns X86 round intrinsics into llvm.ceil/floor. Remove some isel patterns that existed because that was happening.

We were turning roundss/sd/ps/pd intrinsics with immediates of 1 or 2 into
llvm.floor/ceil.  The llvm.ceil/floor intrinsics are supposed to correspond
to the libm functions.  For the libm functions we need to disable the
precision exception so the llvm.floor/ceil functions should always map to
encodings 0x9 and 0xA.

We had a mix of isel patterns where some used 0x9 and 0xA and others used
0x1 and 0x2. We need to be consistent and always use 0x9 and 0xA.

Since we have no way in isel of knowing where the llvm.ceil/floor came
from, we can't map X86 specific intrinsics with encodings 1 or 2 to it.
We could map 0x9 and 0xA to llvm.ceil/floor instead, but I'd really like
to see a use case and optimization advantage first.

I've left the backend test cases to show the blend we now emit without
the extra isel patterns. But I've removed the InstCombine tests completely.

llvm-svn: 361425

5 years agoPart of P1091R3: permit structured bindings to be declared 'static' and
Richard Smith [Wed, 22 May 2019 19:52:55 +0000 (19:52 +0000)]
Part of P1091R3: permit structured bindings to be declared 'static' and
'thread_local' in C++20.

llvm-svn: 361424

5 years ago[X86] Add more icelake model numbers to compiler-rt implementation of __builtin_cpu_is.
Craig Topper [Wed, 22 May 2019 19:51:48 +0000 (19:51 +0000)]
[X86] Add more icelake model numbers to compiler-rt implementation of __builtin_cpu_is.

Using model numbers found in Table 2-1 of the May 2019 version
of the Intel Software Developer's Manual Volume 4.

llvm-svn: 361423

5 years ago[X86] Add more icelake model numbers to getHostCPUName.
Craig Topper [Wed, 22 May 2019 19:51:35 +0000 (19:51 +0000)]
[X86] Add more icelake model numbers to getHostCPUName.

Using model numbers found in Table 2-1 of the May 2019 version
of the Intel Software Developer's Manual Volume 4.

llvm-svn: 361422

5 years ago[OPENMP][NVPTX]Fix barriers and parallel level counters, NFC.
Alexey Bataev [Wed, 22 May 2019 19:50:32 +0000 (19:50 +0000)]
[OPENMP][NVPTX]Fix barriers and parallel level counters, NFC.

Summary:
Parallel level counter should be volatile to prevent some dangerous
optimiations by the ptxas. Otherwise, ptxas optimizations lead to
undefined behaviour in some cases.
Also, use __threadfence() for #pragma omp flush and if the barrier
should not be used (we have only one thread in the team), still perform
flush operation since the standard requires implicit flush when
executing barriers.

Reviewers: gtbercea, kkwli0, grokos

Subscribers: guansong, jfb, jdoerfert, openmp-commits, caomhin

Tags: #openmp

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

llvm-svn: 361421

5 years agoAdd DWARFTypeUnit to the Xcode project.
Jim Ingham [Wed, 22 May 2019 19:05:59 +0000 (19:05 +0000)]
Add DWARFTypeUnit to the Xcode project.

llvm-svn: 361420

5 years agogn build: Fix check-clangd target after r359825
Nico Weber [Wed, 22 May 2019 19:03:45 +0000 (19:03 +0000)]
gn build: Fix check-clangd target after r359825

llvm-svn: 361419

5 years ago[clang-tidy] Add support for writing a check as a Transformer rewrite rule.
Yitzhak Mandelbaum [Wed, 22 May 2019 18:56:18 +0000 (18:56 +0000)]
[clang-tidy] Add support for writing a check as a Transformer rewrite rule.

This revision introduces an adaptor from Transformer's rewrite rules
(`clang::tooling::RewriteRule`) to `ClangTidyCheck`.  For example, given a
RewriteRule `MyCheckAsRewriteRule`, it lets one define a tidy check as follows:

```
class MyTidyCheck : public TransformerClangTidyCheck {
 public:
  MyTidyCheck(StringRef Name, ClangTidyContext *Context)
      : TransformerClangTidyCheck(MyCheckAsRewriteRule, Name, Context) {}
};
```

Reviewers: aaron.ballman

Subscribers: mgorny, xazax.hun, cfe-commits, ilya-biryukov

Tags: #clang

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

llvm-svn: 361418

5 years ago[DebugInfo][AArch64] Recognise target specific instruction as mov instr
Alexey Lapshin [Wed, 22 May 2019 18:48:58 +0000 (18:48 +0000)]
[DebugInfo][AArch64] Recognise target specific instruction as mov instr

This fix is for the problem from https://bugs.llvm.org/show_bug.cgi?id=38714.
Specifically, Simple Register Coalescing creates following conversion :

 undef %0.sub_32:gpr64 = ORRWrs $wzr, %3:gpr32common, 0, debug-location !24;

It copies 32-bit value from gpr32 into gpr64. But Live DEBUG_VALUE analysis
is not able to create debug location record for that instruction. So the problem
is in that debug info for argc variable is incorrect. The fix is
to write custom isCopyInstrImpl() which would recognize the ORRWrs instr.

llvm-svn: 361417

5 years ago[PGO][CHR] Speed up following long use-def chains.
Hiroshi Yamauchi [Wed, 22 May 2019 18:37:34 +0000 (18:37 +0000)]
[PGO][CHR] Speed up following long use-def chains.

Summary: Avoid visiting an instruction more than once by using a map.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 361416

5 years ago[NFC][InstCombine] Add unary fneg tests to maxnum.ll/minnum.ll
Cameron McInally [Wed, 22 May 2019 18:27:43 +0000 (18:27 +0000)]
[NFC][InstCombine] Add unary fneg tests to maxnum.ll/minnum.ll

llvm-svn: 361415

5 years ago[libcxx][test] Fix order checking in some more unordered_multimap tests
Louis Dionne [Wed, 22 May 2019 18:10:32 +0000 (18:10 +0000)]
[libcxx][test] Fix order checking in some more unordered_multimap tests

Some tests assume that iteration through an unordered multimap elements
will return them in the same order as at the container creation. This
assumption is not true since the container is unordered, so that no
specific order of elements is ever guaranteed for such container. This
patch is a continuation of D54838 and introduces checks verifying that
any iteration will return elements exactly from a set of valid values
and without repetition, but in no particular order.

Thanks to Andrey Maksimov for the patch.

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

llvm-svn: 361414

5 years ago[LibTooling] Update Stencil to use RangeSelector
Yitzhak Mandelbaum [Wed, 22 May 2019 18:03:00 +0000 (18:03 +0000)]
[LibTooling] Update Stencil to use RangeSelector

Add support for creating a `StencilPart` from any `RangeSelector`, which
broadens the scope of `Stencil`.

Correspondingly, deprecate Stencil's specialized combinators `node` and `sNode`
in favor of using the new `selection` combinator directly (with the appropriate
range selector).

Reviewers: sbenza

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 361413

5 years ago[EditLine] Rewrite GetHistoryFilePath
Jonas Devlieghere [Wed, 22 May 2019 17:46:59 +0000 (17:46 +0000)]
[EditLine] Rewrite GetHistoryFilePath

Rewrite the GetHistoryFilePath implementation without relying on
FileSpec in the spirit of our discussion in D61994.

It changes LLDBs behavior in two ways:

1. We now only use the -widehistory suffix when LLDB is built with wchar
   support, instead of as the fallback from when the ~/.lldb directory
   isn't writable.

2. When the ~/.lldb directory isn't writable, we don't write any history
   files at all. Previously we would write them to the user's home
   directory (with the incorrect wide suffix), polluting ~ with a
   different file for every IO handler.

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

llvm-svn: 361412

5 years agoFixed a -Wunused-variable warning when assertions are disabled
Dmitri Gribenko [Wed, 22 May 2019 17:45:24 +0000 (17:45 +0000)]
Fixed a -Wunused-variable warning when assertions are disabled

llvm-svn: 361411

5 years agoDisable EHFrameSupport in JITLink/RuntimeDyld on AIX
Xing Xue [Wed, 22 May 2019 17:41:27 +0000 (17:41 +0000)]
Disable EHFrameSupport in JITLink/RuntimeDyld on AIX

Summary:
EH Frames aren't supported on AIX with the system compiler, but the definition of HAVE_EHTABLE_SUPPORT misses this which causes linking problems on AIX. This patch updates the definition of HAVE_EHTABLE_SUPPORT in both JITLink and RuntimeDyld.

Author: daltenty

Reviewers: sfertile, xingxue, hubert.reinterpretcase

Reviewed By: xingxue

Subscribers: hiraditya, jsji, llvm-commits

Tags: #llvm

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

llvm-svn: 361410

5 years ago[NFC][X86][AArch64] Add tests for missing (x - y) + -1 -> not(y) + x fold
Roman Lebedev [Wed, 22 May 2019 16:58:26 +0000 (16:58 +0000)]
[NFC][X86][AArch64] Add tests for missing (x - y) + -1  ->  not(y) + x  fold

https://rise4fun.com/Alive/OaY

llvm-svn: 361409

5 years agoFixed third issue reported in https://bugs.llvm.org/show_bug.cgi?id=41584.
Andrey Churbanov [Wed, 22 May 2019 16:48:05 +0000 (16:48 +0000)]
Fixed third issue reported in https://bugs.llvm.org/show_bug.cgi?id=41584.

Removed wrong debug assertion.

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

llvm-svn: 361408

5 years ago[libFuzzer] Ignore synthetic exceptions on Fuchsia
Petr Hosek [Wed, 22 May 2019 16:36:35 +0000 (16:36 +0000)]
[libFuzzer] Ignore synthetic exceptions on Fuchsia

Fuchsia has several exceptions which are merely informational and should
not be treated as crashes. This patch puts logic that read from the
exception port and handled the exception in a loop, and ignores
non-exceptions and informational exceptions.

Patch By: aarongreen

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

llvm-svn: 361407

5 years agoAMDGPU: Move disassembler support check to constructor
Matt Arsenault [Wed, 22 May 2019 16:28:48 +0000 (16:28 +0000)]
AMDGPU: Move disassembler support check to constructor

Don't check for unsupported targets for every instruction.

llvm-svn: 361406

5 years agoMC: Allow getMaxInstLength to depend on the subtarget
Matt Arsenault [Wed, 22 May 2019 16:28:41 +0000 (16:28 +0000)]
MC: Allow getMaxInstLength to depend on the subtarget

Keep it optional in cases this is ever needed in some global
context. Currently it's only used for getting an upper bound inline
asm code size.

For AMDGPU, gfx10 increases the maximum instruction size to
20-bytes. This avoids penalizing older subtargets when estimating code
size, and making some annoying branch relaxation test adjustments.

llvm-svn: 361405

5 years ago[TargetLowering] Extend bool args to inline-asm according to getBooleanType
Kees Cook [Wed, 22 May 2019 16:16:15 +0000 (16:16 +0000)]
[TargetLowering] Extend bool args to inline-asm according to getBooleanType

Summary:
This extends Krzysztof Parzyszek's X86-specific solution
(https://reviews.llvm.org/D60208) to the generic code pointed out by
James Y Knight.

Reviewers: kparzysz, craig.topper, nickdesaulniers

Subscribers: efriedma, sdardis, nemanjai, javed.absar, eraman, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, llvm-commits, srhines, void, nickdesaulniers, jyknight

Tags: #llvm

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

llvm-svn: 361404

5 years ago[TargetLowering] Add blank line (test commit)
Kees Cook [Wed, 22 May 2019 16:02:13 +0000 (16:02 +0000)]
[TargetLowering] Add blank line (test commit)

llvm-svn: 361403

5 years agollvm-undname: Fix an assert-on-invalid, found by oss-fuzz
Nico Weber [Wed, 22 May 2019 15:53:23 +0000 (15:53 +0000)]
llvm-undname: Fix an assert-on-invalid, found by oss-fuzz

If a template parameter refers to a pointer to member, but the mangling
of that was a string literal instead of a real symbol, llvm-undname used
to crash instead of rejecting the input.

llvm-svn: 361402

5 years ago[IR] allow fast-math-flags on select of FP values
Sanjay Patel [Wed, 22 May 2019 15:50:46 +0000 (15:50 +0000)]
[IR] allow fast-math-flags on select of FP values

This is a minimal start to correcting a problem most directly discussed in PR38086:
https://bugs.llvm.org/show_bug.cgi?id=38086

We have been hacking around a limitation for FP select patterns by using the
fast-math-flags on the condition of the select rather than the select itself.
This patch just allows FMF to appear with the 'select' opcode. No changes are
needed to "FPMathOperator" because it already includes select-of-FP because
that definition is based on the (return) value type.

Once we have this ability, we can start correcting and adding IR transforms
to use the FMF on a 'select' instruction. The instcombine and vectorizer test
diffs only show that the IRBuilder change is behaving as expected by applying
an FMF guard value to 'select'.

For reference:
rL241901 - allowed FMF with fcmp
rL255555 - allowed FMF with FP calls

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

llvm-svn: 361401

5 years agoCombine two if cases because the second one is never reached.
Amy Huang [Wed, 22 May 2019 15:48:59 +0000 (15:48 +0000)]
Combine two if cases because the second one is never reached.

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 361400

5 years agoUnbreak non-PIC builds after r361340/D62174
David Zarzycki [Wed, 22 May 2019 15:48:12 +0000 (15:48 +0000)]
Unbreak non-PIC builds after r361340/D62174

llvm-svn: 361399

5 years ago[NFC][ARM] addsubcarry-promotion.ll: whoops - replace '.' with '-' in check-prefix
Roman Lebedev [Wed, 22 May 2019 15:42:33 +0000 (15:42 +0000)]
[NFC][ARM] addsubcarry-promotion.ll: whoops - replace '.' with '-' in check-prefix

Does not affect update_llc_test_checks, or the actual output,
but is not accepted by the actual FileCheck.

Sorry, i should have noticed this before committing,
not the very next second after..

llvm-svn: 361398

5 years ago[NFC][ARM] Autogenerate addsubcarry-promotion.ll test
Roman Lebedev [Wed, 22 May 2019 15:34:51 +0000 (15:34 +0000)]
[NFC][ARM] Autogenerate addsubcarry-promotion.ll test

Being affected by upcoming patch

llvm-svn: 361397

5 years ago[NFC][X86] Autogenerate negative-offset.ll test
Roman Lebedev [Wed, 22 May 2019 15:34:43 +0000 (15:34 +0000)]
[NFC][X86] Autogenerate negative-offset.ll test

Being affected by upcoming patch

llvm-svn: 361396

5 years ago[llvm-objdump] Dump inline relocations if the relocated section is specified with...
Fangrui Song [Wed, 22 May 2019 15:12:51 +0000 (15:12 +0000)]
[llvm-objdump] Dump inline relocations if the relocated section is specified with --section

This fixes PR41886: llvm-objdump -d -r -j .text doesn't show inline relocations of .text

While here, switch to stable_sort() because we don't want to change the order of relocations applied to the same location. gABI says consecutive relocation records are composed together and their order matters. In practise it is difficult to see relocations applied to the same location not consecutive, we just have to keep the relative order of relocations with the same offset.

Reviewed By: grimar

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

llvm-svn: 361395

5 years ago[mips] Use GNU-style output to make tests smaller. NFC
Simon Atanasyan [Wed, 22 May 2019 15:03:52 +0000 (15:03 +0000)]
[mips] Use GNU-style output to make tests smaller. NFC

llvm-svn: 361394

5 years ago[mips] Replace multiple `-check-prefix` by single `-check-prefixes`. NFC
Simon Atanasyan [Wed, 22 May 2019 15:03:42 +0000 (15:03 +0000)]
[mips] Replace multiple `-check-prefix` by single `-check-prefixes`. NFC

llvm-svn: 361393

5 years ago[LibTooling] Update Transformer to use RangeSelector instead of NodePart enum.
Yitzhak Mandelbaum [Wed, 22 May 2019 14:48:19 +0000 (14:48 +0000)]
[LibTooling] Update Transformer to use RangeSelector instead of NodePart enum.

Transformer provides an enum to indicate the range of source text to be edited.
That support is now redundant with the new (and more general) RangeSelector
library, so we remove the custom enum support in favor of supporting any
RangeSelector.

Reviewers: ilya-biryukov

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 361392

5 years agoReland r361148 with a fix to the buildbot failure.
Ilya Biryukov [Wed, 22 May 2019 14:44:45 +0000 (14:44 +0000)]
Reland r361148 with a fix to the buildbot failure.

Reverted in r361377.
Also reland the '.gn' files (reverted in r361389).

llvm-svn: 361391

5 years ago[NFC][X86][AArch64] Rewrite sink-addsub-of-const.ll tests to have full permutation...
Roman Lebedev [Wed, 22 May 2019 14:42:41 +0000 (14:42 +0000)]
[NFC][X86][AArch64] Rewrite sink-addsub-of-const.ll tests to have full permutation coverage

Somehow missed some patterns initially..
While there, add comments.

llvm-svn: 361390

5 years agogn build: Merge r361377
Nico Weber [Wed, 22 May 2019 14:31:22 +0000 (14:31 +0000)]
gn build: Merge r361377

llvm-svn: 361389

5 years ago[clangd] improve help message for limit-results
Kadir Cetinkaya [Wed, 22 May 2019 14:19:40 +0000 (14:19 +0000)]
[clangd] improve help message for limit-results

Summary: Make it clear that the default is 100.

Patch by Brennan Vincent(@umanwizard)!

Reviewers: #clang-tools-extra, kadircet

Reviewed By: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 361388

5 years agoLoopVectorizationCostModel::selectInterleaveCount - assert we have a non-zero loop...
Simon Pilgrim [Wed, 22 May 2019 14:18:17 +0000 (14:18 +0000)]
LoopVectorizationCostModel::selectInterleaveCount - assert we have a non-zero loop cost. NFCI.

The input LoopCost value can be zero, but if so it should be recalculated with the current VF. After that it should always be non-zero.

llvm-svn: 361387

5 years ago[AMDGPU][MC] Corrected parsing of op_sel* and neg_* modifiers
Dmitry Preobrazhensky [Wed, 22 May 2019 13:59:01 +0000 (13:59 +0000)]
[AMDGPU][MC] Corrected parsing of op_sel* and neg_* modifiers

See bug 41361: https://bugs.llvm.org/show_bug.cgi?id=41361

Reviewers: artem.tamazov, arsenm

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

llvm-svn: 361386

5 years ago[llvm-exegesis] Move native target initialization code to a separate file.
Clement Courbet [Wed, 22 May 2019 13:50:16 +0000 (13:50 +0000)]
[llvm-exegesis] Move native target initialization code to a separate file.

Summary: This helps building internal tools on top of the library.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits, bdb, ondrasej

Tags: #llvm

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

llvm-svn: 361385

5 years ago[llvm-objcopy] Tidy up error messages
James Henderson [Wed, 22 May 2019 13:23:26 +0000 (13:23 +0000)]
[llvm-objcopy] Tidy up error messages

This patch brings various error messages into line with each other, by
removing trailing full stops, and making the first letter lower-case.
This addresses https://bugs.llvm.org/show_bug.cgi?id=40859.

Reviewed by: jhenderson, rupprecht, jakehehrlich

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

Patch by Alex Brachet

llvm-svn: 361384

5 years agoAdded a dot at the end of comment
Konrad Kleine [Wed, 22 May 2019 13:23:15 +0000 (13:23 +0000)]
Added a dot at the end of comment

Summary: to test SVN commit access with a simple change.

Reviewers: jankratochvil

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

llvm-svn: 361383

5 years ago[OpenCL] Support pipe keyword in C++ mode
Sven van Haastregt [Wed, 22 May 2019 13:12:20 +0000 (13:12 +0000)]
[OpenCL] Support pipe keyword in C++ mode

Support the OpenCL C pipe feature in C++ for OpenCL mode, to preserve
backwards compatibility with OpenCL C.

Various changes had to be made in Parse and Sema to enable
pipe-specific diagnostics, so enable a SemaOpenCL test for C++.

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

llvm-svn: 361382

5 years agoUpdateTestChecks: sparc march handling
Roman Lebedev [Wed, 22 May 2019 13:04:34 +0000 (13:04 +0000)]
UpdateTestChecks: sparc march handling

Summary:
Another target that prefers to use `-march` in tests
```
llvm/test/CodeGen/SPARC$ grep -ri mtriple | wc -l
25
llvm/test/CodeGen/SPARC$ grep -ri march | wc -l
165
```

This test is being affected by a further patch,
so regenerate it to better visualize the changes

Reviewers: RKSimon, dcederman, gberry

Reviewed By: RKSimon

Subscribers: jyknight, fedor.sergeev, jrtc27, llvm-commits

Tags: #llvm

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

llvm-svn: 361381

5 years ago[NFC][SystemZ] Autogenerate alloca-03.ll test to make test changes more visible
Roman Lebedev [Wed, 22 May 2019 13:04:24 +0000 (13:04 +0000)]
[NFC][SystemZ] Autogenerate alloca-03.ll test to make test changes more visible

The check lines are being affected by an upcoming patch,
regenerate the checklines to visualize the changes better.

llvm-svn: 361380

5 years ago[CGOpenMPRuntime] emitX86DeclareSimdFunction - assert simdlen/cdtsize is not zero...
Simon Pilgrim [Wed, 22 May 2019 13:02:19 +0000 (13:02 +0000)]
[CGOpenMPRuntime] emitX86DeclareSimdFunction - assert simdlen/cdtsize is not zero. NFCI.

Fixes scan-build division by zero warning.

llvm-svn: 361379

5 years agoClang-formatting the header in advance of other planned changes; NFC.
Aaron Ballman [Wed, 22 May 2019 13:01:28 +0000 (13:01 +0000)]
Clang-formatting the header in advance of other planned changes; NFC.

llvm-svn: 361378

5 years agoRevert r361148 "[Syntax] Introduce TokenBuffer, start clangToolingSyntax library"
Russell Gallop [Wed, 22 May 2019 12:50:52 +0000 (12:50 +0000)]
Revert r361148 "[Syntax] Introduce TokenBuffer, start clangToolingSyntax library"

Also reverted r361264 "[Syntax] Rename TokensTest to SyntaxTests. NFC"
which built on it. This is because there were hitting an assert on bots

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast

llvm-svn: 361377

5 years ago[Frontend] Return an error on bad inputs to PrecompiledPreabmle
Ilya Biryukov [Wed, 22 May 2019 12:50:01 +0000 (12:50 +0000)]
[Frontend] Return an error on bad inputs to PrecompiledPreabmle

Summary:
Instead of failing with assertions. Fixes a crash found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12865

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang

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

llvm-svn: 361376

5 years ago[Hexagon] assert getRegisterBitWidth returns non-zero value. NFCI.
Simon Pilgrim [Wed, 22 May 2019 12:25:46 +0000 (12:25 +0000)]
[Hexagon] assert getRegisterBitWidth returns non-zero value. NFCI.

Fixes scan-build warning.

llvm-svn: 361375

5 years agoMark tests from r361278 as unsupported on Windows.
Russell Gallop [Wed, 22 May 2019 12:07:52 +0000 (12:07 +0000)]
Mark tests from r361278 as unsupported on Windows.

llvm-svn: 361374

5 years agoDWARF: Add debug_ranges/rnglists tests
Pavel Labath [Wed, 22 May 2019 11:44:36 +0000 (11:44 +0000)]
DWARF: Add debug_ranges/rnglists tests

.debug_ranges parsing is not well tested [citation needed] because this
section tends to be only used in optimized code, and we don't build
optimized executables in our tests, as they produce unpredictable
results.

This patch aims to add some very simple tests for parsing static range
data, which can serve as a first line of defense in case things break.

I also include one XFAILed test, which demonstrates that we don't
correctly handle mixed DWARF v5 and v4 ranges in a single file.

llvm-svn: 361373

5 years ago[ARM][AArch64] Fix incorrect handling of alignment in va_arg code generation
John Brawn [Wed, 22 May 2019 11:42:54 +0000 (11:42 +0000)]
[ARM][AArch64] Fix incorrect handling of alignment in va_arg code generation

Overaligned and underaligned types (i.e. types where the alignment has been
increased or decreased using the aligned and packed attributes) weren't being
correctly handled in all cases, as the unadjusted alignment should be used.

This patch also adjusts getTypeUnadjustedAlign to correctly handle typedefs of
non-aggregate types, which it appears it never had to handle before.

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

llvm-svn: 361372

5 years ago[VirtualFileSystem] Fix uninitialized variable warning. NFCI.
Simon Pilgrim [Wed, 22 May 2019 11:20:52 +0000 (11:20 +0000)]
[VirtualFileSystem] Fix uninitialized variable warning. NFCI.

llvm-svn: 361371

5 years ago[TargetMachine] error message unsupported code model
Sjoerd Meijer [Wed, 22 May 2019 10:40:26 +0000 (10:40 +0000)]
[TargetMachine] error message unsupported code model

When the tiny code model is requested for a target machine that does not
support this, we get an error message (which is nice) but also this diagnostic
and request to submit a bug report:

    fatal error: error in backend: Target does not support the tiny CodeModel
    [Inferior 2 (process 31509) exited with code 0106]
    clang-9: error: clang frontend command failed with exit code 70 (use -v to see invocation)
    (gdb) clang version 9.0.0 (http://llvm.org/git/clang.git 29994b0c63a40f9c97c664170244a7bba5ecc15e) (http://llvm.org/git/llvm.git 95606fdf91c2d63a931e865f4b78b2e9828ddc74)
    Target: arm-arm-none-eabi
    Thread model: posix
    clang-9: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
    clang-9: note: diagnostic msg:
    ********************
    PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
    Preprocessed source(s) and associated run script(s) are located at:
    clang-9: note: diagnostic msg: /tmp/tiny-dfe1a2.c
    clang-9: note: diagnostic msg: /tmp/tiny-dfe1a2.sh
    clang-9: note: diagnostic msg:

But this is not a bug, this is a feature. :-) Not only is this not a bug, this
is also pretty confusing. This patch causes just to print the fatal error and
not the diagnostic:

fatal error: error in backend: Target does not support the tiny CodeModel

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

llvm-svn: 361370

5 years ago[Driver][Windows] Add dependent lib argument for -fprofile-generate and -fcs-profile...
Russell Gallop [Wed, 22 May 2019 10:06:49 +0000 (10:06 +0000)]
[Driver][Windows] Add dependent lib argument for -fprofile-generate and -fcs-profile-generate

Follows on from r360674 which added it for -fprofile-instr-generate.

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

llvm-svn: 361368

5 years ago[llvm-dlltool] Respect NONAME keyword
Martin Storsjo [Wed, 22 May 2019 09:49:54 +0000 (09:49 +0000)]
[llvm-dlltool] Respect NONAME keyword

This adds proper handling of the NONAME-keyword, which makes llvm-dlltool
generate an import using the ordinal instead of the name.

Patch by by Jannik Vogel, test added by Stefan Schmidt.

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

llvm-svn: 361367

5 years agoRe-land r361257 "[MergeICmps][NFC] Make BCEAtom move-only.""
Clement Courbet [Wed, 22 May 2019 09:45:40 +0000 (09:45 +0000)]
Re-land r361257 "[MergeICmps][NFC] Make BCEAtom move-only.""

llvm-svn: 361366

5 years ago[PPC64] Fix PPC64TargetInfo ABI on clang side after D61950
Fangrui Song [Wed, 22 May 2019 09:26:46 +0000 (09:26 +0000)]
[PPC64] Fix PPC64TargetInfo ABI on clang side after D61950

llvm-svn: 361365

5 years agoCopy symbol length when we replace a symbol.
Rui Ueyama [Wed, 22 May 2019 09:19:30 +0000 (09:19 +0000)]
Copy symbol length when we replace a symbol.

Symbol's NameSize is computed lazily. Currently, when we replace a symbol,
a cached length value can be discarded. This patch propagates that value.

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

llvm-svn: 361364

5 years ago[PPC64] Fix PPC64TargetInfo after D61950
Fangrui Song [Wed, 22 May 2019 09:17:21 +0000 (09:17 +0000)]
[PPC64] Fix PPC64TargetInfo after D61950

llvm-svn: 361363

5 years agoAdd AST logging
Gabor Marton [Wed, 22 May 2019 09:10:19 +0000 (09:10 +0000)]
Add AST logging

Summary:
Log the AST of the TU associated with LLDB's `expr` command, once a declaration
is completed

Reviewers: shafik

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, lldb-commits

Tags: #lldb

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

llvm-svn: 361362

5 years agoDWARFDebugInfoEntry: remove unused variable
Pavel Labath [Wed, 22 May 2019 09:09:44 +0000 (09:09 +0000)]
DWARFDebugInfoEntry: remove unused variable

llvm-svn: 361361

5 years agoDWARF: Introduce DWARFTypeUnit class
Pavel Labath [Wed, 22 May 2019 09:09:39 +0000 (09:09 +0000)]
DWARF: Introduce DWARFTypeUnit class

Summary:
This patch introduces the DWARFTypeUnit class, and teaches lldb to parse
type units out of both the debug_types section (DWARF v4), and from the
regular debug_info section (DWARF v5).

The most important piece of functionality - resolving DW_AT_signatures
to connect type forward declarations to their definitions - is not
implemented here, but even without that, a lot of functionality becomes
available. I've added tests for the commands that start to work after
this patch.

The changes in this patch were greatly inspired by D61505, which in turn took
over changes from D32167.

Reviewers: JDevlieghere, clayborg, aprantl

Subscribers: mgorny, jankratochvil, lldb-commits

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

llvm-svn: 361360

5 years ago[ELF] Improve error message for relocations to symbols defined in discarded sections
Fangrui Song [Wed, 22 May 2019 09:06:42 +0000 (09:06 +0000)]
[ELF] Improve error message for relocations to symbols defined in discarded sections

Rather than report "undefined symbol: ", give more informative message
about the object file that defines the discarded section.

In particular, PR41133, if the section is a discarded COMDAT, print the
section group signature and the object file with the prevailing
definition. This is useful to track down some ODR issues.

We need to
* add `uint32_t DiscardedSecIdx` to Undefined for this feature.
* make ComdatGroups public and change its type to DenseMap<CachedHashStringRef, const InputFile *>

Reviewed By: ruiu

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

llvm-svn: 361359

5 years agoDelete unnecessary copy ctors
Fangrui Song [Wed, 22 May 2019 08:38:23 +0000 (08:38 +0000)]
Delete unnecessary copy ctors

llvm-svn: 361358

5 years ago[Sanitizer] Add interceptor for wcsdup
Pavel Labath [Wed, 22 May 2019 08:34:56 +0000 (08:34 +0000)]
[Sanitizer] Add interceptor for wcsdup

Summary: The wide-string equivalent of strdup. Implementation trivial.

Reviewers: vitalybuka, eugenis

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

Tags: #llvm, #sanitizers

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

llvm-svn: 361357

5 years ago[MIR] Add simple PRE pass to MachineCSE
Anton Afanasyev [Wed, 22 May 2019 07:41:34 +0000 (07:41 +0000)]
[MIR] Add simple PRE pass to MachineCSE

This is the second part of the commit fixing PR38917 (hoisting
partitially redundant machine instruction). Most of PRE (partitial
redundancy elimination) and CSE work is done on LLVM IR, but some of
redundancy arises during DAG legalization. Machine CSE is not enough
to deal with it. This simple PRE implementation works a little bit
intricately: it passes before CSE, looking for partitial redundancy
and transforming it to fully redundancy, anticipating that the next
CSE step will eliminate this created redundancy. If CSE doesn't
eliminate this, than created instruction will remain dead and eliminated
later by Remove Dead Machine Instructions pass.

The third part of the commit is supposed to refactor MachineCSE,
to make it more clear and to merge MachinePRE with MachineCSE,
so one need no rely on further Remove Dead pass to clear instrs
not eliminated by CSE.

First step: https://reviews.llvm.org/D54839

Fixes llvm.org/PR38917

llvm-svn: 361356

5 years ago[PPC64] Parse -elfv1 -elfv2 when specified on target triple
Fangrui Song [Wed, 22 May 2019 07:29:59 +0000 (07:29 +0000)]
[PPC64] Parse -elfv1 -elfv2 when specified on target triple

Summary:
For big-endian powerpc64, the default ABI is ELFv1. OpenPower ABI ELFv2 is supported when -mabi=elfv2 is specified. FreeBSD support for PowerPC64 ELFv2 ABI with LLVM is in progress[1]. This patch adds an alternative way to specify ELFv2 ABI on target triple [2].

The following results are expected:

ELFv1 when using:
-target powerpc64-unknown-freebsd12.0
-target powerpc64-unknown-freebsd12.0 -mabi=elfv1
-target powerpc64-unknown-freebsd12.0-elfv1

ELFv2 when using:
-target powerpc64-unknown-freebsd12.0 -mabi=elfv2
-target powerpc64-unknown-freebsd12.0-elfv2

[1] https://wiki.freebsd.org/powerpc/llvm-elfv2
[2] https://clang.llvm.org/docs/CrossCompilation.html

Patch by Alfredo Dal'Ava JĂșnior!

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

llvm-svn: 361355

5 years ago[AArch64] Subtarget crypto extension defaults
Sjoerd Meijer [Wed, 22 May 2019 07:10:27 +0000 (07:10 +0000)]
[AArch64] Subtarget crypto extension defaults

The Armv8.2-A crypto extensions all defaulted to true, but should default to
false, like all the other extensions.

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

llvm-svn: 361354

5 years agoFixed a -Wunused-variable warning when assertions are disabled
Dmitri Gribenko [Wed, 22 May 2019 06:57:23 +0000 (06:57 +0000)]
Fixed a -Wunused-variable warning when assertions are disabled

llvm-svn: 361353

5 years ago[X86] Don't compare i128 through vector if construction not cheap (PR41971)
Nikita Popov [Wed, 22 May 2019 06:47:06 +0000 (06:47 +0000)]
[X86] Don't compare i128 through vector if construction not cheap (PR41971)

Fix for https://bugs.llvm.org/show_bug.cgi?id=41971. Make the
combineVectorSizedSetCCEquality() transform more conservative by
checking that the bitcast to the vector type will be cheap/free
for both operands. I'm considering it cheap if it's a constant,
a load or already a vector. I've dropped the explicit check for
f128 because it should fall out naturally (in the cases where
it'd be detrimental).

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

llvm-svn: 361352

5 years agoProperly categorize llvm-objdump options
Serge Guelton [Wed, 22 May 2019 06:30:46 +0000 (06:30 +0000)]
Properly categorize llvm-objdump options

Filters out noise, and distinguish Mach-O related options from others.

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

llvm-svn: 361351

5 years agoSimplify the logic to instantiate Symbols. Should be NFC.
Rui Ueyama [Wed, 22 May 2019 04:56:25 +0000 (04:56 +0000)]
Simplify the logic to instantiate Symbols. Should be NFC.

llvm-svn: 361350

5 years ago[NFC] Remove a blank line (test commit)
Seiya Nuta [Wed, 22 May 2019 04:48:26 +0000 (04:48 +0000)]
[NFC] Remove a blank line (test commit)

llvm-svn: 361349

5 years agoSpeculative fix for std stream destruction order on Windows.
Eric Fiselier [Wed, 22 May 2019 03:45:49 +0000 (03:45 +0000)]
Speculative fix for std stream destruction order on Windows.

The MSVC CRT uses TLS storage to implement per-thread locales.
This storage gets freed during program termination, and if we attempt
to do any io operations (like flushing the std streams) after this occurs
the program may abort.

This patch is a speculative fix for that issue.

The fix tries forcing the initialization of the locale TLS before
initializing the std streams. This should mean that the TLS is freed
after we destroy the streams.

llvm-svn: 361348

5 years ago[PowerPC] use meaningful name for displacement form aligned with x-form - NFC
Chen Zheng [Wed, 22 May 2019 03:17:39 +0000 (03:17 +0000)]
[PowerPC] use meaningful name for displacement form aligned with x-form - NFC

llvm-svn: 361347

5 years ago[PowerPC] [ISEL] select x-form instruction for unaligned offset
Chen Zheng [Wed, 22 May 2019 02:57:31 +0000 (02:57 +0000)]
[PowerPC] [ISEL] select x-form instruction for unaligned offset
Differential Revision: https://reviews.llvm.org/D62173

llvm-svn: 361346

5 years ago[docs] Fix troff macro (.F1 -> .Fl) in ld.lld.1
Fangrui Song [Wed, 22 May 2019 02:15:25 +0000 (02:15 +0000)]
[docs] Fix troff macro (.F1 -> .Fl) in ld.lld.1

llvm-svn: 361345