platform/upstream/llvm.git
5 years ago[x86] add tests for vector fdiv reciprocal estimate; NFC
Sanjay Patel [Thu, 25 Apr 2019 20:35:47 +0000 (20:35 +0000)]
[x86] add tests for vector fdiv reciprocal estimate; NFC

llvm-svn: 359238

5 years ago[analyzer] Add FIXMEs for alpha.unix.cstring.OutOfBounds false positives.
Artem Dergachev [Thu, 25 Apr 2019 20:30:14 +0000 (20:30 +0000)]
[analyzer] Add FIXMEs for alpha.unix.cstring.OutOfBounds false positives.

Caused by incorrect strlcat() modeling in r332303,
cf. https://bugs.llvm.org/show_bug.cgi?id=37687#c8

llvm-svn: 359237

5 years agoAssigning to a local object in a return statement prevents copy elision. NFC.
David Blaikie [Thu, 25 Apr 2019 20:09:00 +0000 (20:09 +0000)]
Assigning to a local object in a return statement prevents copy elision. NFC.

I added a diagnostic along the lines of `-Wpessimizing-move` to detect `return x = y` suppressing copy elision, but I don't know if the diagnostic is really worth it. Anyway, here are the places where my diagnostic reported that copy elision would have been possible if not for the assignment.

P1155R1 in the post-San-Diego WG21 (C++ committee) mailing discusses whether WG21 should fix this pitfall by just changing the core language to permit copy elision in cases like these.

(Kona update: The bulk of P1155 is proceeding to CWG review, but specifically *not* the parts that explored the notion of permitting copy-elision in these specific cases.)

Reviewed By: dblaikie

Author: Arthur O'Dwyer

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

llvm-svn: 359236

5 years agoSkip type units/type uniquing when we know we're only emitting the type once (vtable...
David Blaikie [Thu, 25 Apr 2019 20:05:47 +0000 (20:05 +0000)]
Skip type units/type uniquing when we know we're only emitting the type once (vtable-based emission when triggered by a strong vtable, with -fno-standalone-debug)

(this would regress size without a corresponding LLVM change that avoids
putting other user defined types inside type units when they aren't in
their own type units - instead emitting declarations inside the type
unit and a definition in the primary CU)

Reviewers: aprantl

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

llvm-svn: 359235

5 years agoTwo tests were using the interactive convenience variable
Jason Molenda [Thu, 25 Apr 2019 20:03:39 +0000 (20:03 +0000)]
Two tests were using the interactive convenience variable
lldb.debugger.  They should not be.
<rdar://problem/50210340>

llvm-svn: 359234

5 years ago[Windows] Separate elements in -print-search-dirs with semicolons
Martin Storsjo [Thu, 25 Apr 2019 20:03:20 +0000 (20:03 +0000)]
[Windows] Separate elements in -print-search-dirs with semicolons

Path lists on windows should always be separated by semicolons, not
colons. Reuse llvm::sys::EnvPathSeparator for this purpose (as that's
also a path list that is separated in the same way).

Alternatively, this could just be a local ifdef _WIN32 in this function,
or generalizing the existing EnvPathSeparator to e.g. a
llvm::sys::path::PathListSeparator?

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

llvm-svn: 359233

5 years agoRemove libc++ checks and workarounds for unsupported old versions of GCC (<4.9).
Richard Smith [Thu, 25 Apr 2019 20:02:10 +0000 (20:02 +0000)]
Remove libc++ checks and workarounds for unsupported old versions of GCC (<4.9).

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

llvm-svn: 359232

5 years ago[GlobalISel][AArch64] Make G_EXTRACT_VECTOR_ELT legal for v8s16s
Jessica Paquette [Thu, 25 Apr 2019 20:00:57 +0000 (20:00 +0000)]
[GlobalISel][AArch64] Make G_EXTRACT_VECTOR_ELT legal for v8s16s

This case was missing before, so we couldn't legalize it.

Add it to AArch64LegalizerInfo.cpp and update select-extract-vector-elt.mir.

llvm-svn: 359231

5 years ago[analyzer][UninitializedObjectChecker] PR41590: Regard _Atomic types as primitive
Kristof Umann [Thu, 25 Apr 2019 20:00:51 +0000 (20:00 +0000)]
[analyzer][UninitializedObjectChecker] PR41590: Regard _Atomic types as primitive

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

For the following code snippet, UninitializedObjectChecker crashed:

struct MyAtomicInt {
  _Atomic(int) x;
  MyAtomicInt() {}
};

void entry() {
  MyAtomicInt b;
}

The problem was that _Atomic types were not regular records, unions,
dereferencable or primitive, making the checker hit the llvm_unreachable at
lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp:347.
The solution is to regard these types as primitive as well. The test case shows
that with this addition, not only are we able to get rid of the crash, but we
can identify x as uninitialized.

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

llvm-svn: 359230

5 years agoFix buildbot failures after r359159.
Richard Smith [Thu, 25 Apr 2019 20:00:06 +0000 (20:00 +0000)]
Fix buildbot failures after r359159.

std::mutex was not actually is_nothrow_default_constructible in C++98/C++03,
because the variable declaration

  std::mutex M;

... could throw an exception from the mutex destructor. Fix it by marking the
destructor as non-throwing. This has no effect in C++11 onwards, because
destructors are non-throwing by default in those language modes.

llvm-svn: 359229

5 years ago[lldb] [lit] Use constexpr and better constraints in Register tests
Michal Gorny [Thu, 25 Apr 2019 19:56:54 +0000 (19:56 +0000)]
[lldb] [lit] Use constexpr and better constraints in Register tests

Use constexpr to explicitly indicate that we're dealing with integer
constants, and provoke clang to assign them straight to registers
whenever possible.  Adjust input constraints in %mmN tests to "rm"
as using integer constants is apparently disallowed there.  Also
use "i" for %rN tests, as we don't want clang to accidentally clobber
those general purpose registers while assigning to them (however
unlikely that is).

llvm-svn: 359228

5 years agoSet _LIBCPP_DLL_VIS on _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS in MinGW mode
Martin Storsjo [Thu, 25 Apr 2019 19:46:28 +0000 (19:46 +0000)]
Set _LIBCPP_DLL_VIS on _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS in MinGW mode

Contrary to MSVC, MinGW compilers wants the dllexport attribute on
the declaration of an explicit template instantiation, not on the
definition.

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

llvm-svn: 359227

5 years ago[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states
Akira Hatanaka [Thu, 25 Apr 2019 19:42:55 +0000 (19:42 +0000)]
[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states
it keeps track of becomes too large

ARC optimizer does a top-down and a bottom-up traversal of the whole
function to pair up retain and release instructions and remove them.
This can be expensive if the number of instructions in the function and
pointer states it tracks are large since it has to look at each pointer
state and determine whether the instruction being visited can
potentially use the pointer.

This patch adds a command line option that sets a limit to the number of
pointers it tracks.

rdar://problem/49477063

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

llvm-svn: 359226

5 years ago[AMDGPU] gfx1010 VOP1 instructions
Stanislav Mekhanoshin [Thu, 25 Apr 2019 19:01:51 +0000 (19:01 +0000)]
[AMDGPU] gfx1010 VOP1 instructions

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

llvm-svn: 359225

5 years ago[AMDGPU] gfx1010 utility functions
Stanislav Mekhanoshin [Thu, 25 Apr 2019 18:53:41 +0000 (18:53 +0000)]
[AMDGPU] gfx1010 utility functions

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

llvm-svn: 359224

5 years ago[libFuzzer] Require linux for libcxx.test
Matt Morehouse [Thu, 25 Apr 2019 18:42:30 +0000 (18:42 +0000)]
[libFuzzer] Require linux for libcxx.test

llvm-svn: 359223

5 years ago[GlobalISel][AArch64] Add generic legalization rule for extends
Jessica Paquette [Thu, 25 Apr 2019 18:42:00 +0000 (18:42 +0000)]
[GlobalISel][AArch64] Add generic legalization rule for extends

This adds a legalization rule for G_ZEXT, G_ANYEXT, and G_SEXT which allows
extends whenever the types will fit in registers (or the source is an s1).

Update tests. Add GISel checks throughout all of arm64-vabs.ll,
where we now select a good portion of the code. Add GISel checks to
arm64-subvector-extend.ll, which has a good number of vector extends in it.

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

llvm-svn: 359222

5 years ago[lldb] [lit] Un-XFAIL Register/x86-64-read.test for Darwin
Michal Gorny [Thu, 25 Apr 2019 18:38:58 +0000 (18:38 +0000)]
[lldb] [lit] Un-XFAIL Register/x86-64-read.test for Darwin

llvm-svn: 359221

5 years ago[libc++][test] Fix noexcept assertions in variant's get tests
Casey Carter [Thu, 25 Apr 2019 18:36:29 +0000 (18:36 +0000)]
[libc++][test] Fix noexcept assertions in variant's get tests

All constant expressions are non-potentially-throwing in C++14, but that is *not* the case in C++17. Change these tests of the `variant`-flavored overloads of `std::get` to expect the correct behavior when the compiler is not GCC or is GCC 9+.

Credit to Jonathan Wakely for providing an improved version of my initial change that validates the incorrect behavior on GCC < 9 as well as validating the correct behavior on other compilers.

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

llvm-svn: 359220

5 years ago[SelectionDAG][X86] Use stack load/store in PromoteIntRes_BITCAST when the input...
Craig Topper [Thu, 25 Apr 2019 18:19:59 +0000 (18:19 +0000)]
[SelectionDAG][X86] Use stack load/store in PromoteIntRes_BITCAST when the input needs to be be split and the output type is a vector.

We had special case handling here, but it uses a scalar any_extend for the
promotion then bitcasts to the final type. This won't split up the input data
into multiple promoted elements like we need.

This patch falls back to doing the conversion through memory.

Fixes PR41594 which I believe was reflected in the bitcast-vector-bool.ll
changes. The changes to vector-half-conversions.ll are fixing a previously
unknown miscompile from this issue.

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

llvm-svn: 359219

5 years ago[compiler-rt] Build custom libc++abi without exceptions.
Matt Morehouse [Thu, 25 Apr 2019 18:14:24 +0000 (18:14 +0000)]
[compiler-rt] Build custom libc++abi without exceptions.

Summary:
Since neither compiler-rt nor the libc++ we build use exceptions, we
don't need libc++abi to have them either.

This resolves an issue where libFuzzer's private libc++ contains
implementations for __cxa_throw and friends, causing fuzz targets built
with their own C++ library to segfault during exception unwinding.

See https://github.com/google/oss-fuzz/issues/2328.

Reviewers: phosek, EricWF, kcc

Reviewed By: phosek

Subscribers: kcc, dberris, mgorny, christof, llvm-commits, metzman

Tags: #llvm

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

llvm-svn: 359218

5 years agoDebugInfo: Fix bitrotted test case
David Blaikie [Thu, 25 Apr 2019 18:11:48 +0000 (18:11 +0000)]
DebugInfo: Fix bitrotted test case

This test was updated with some CHECK suffix variants, but dropped
checking for the unsuffixed 'CHECK'

llvm-svn: 359217

5 years agocreduce-clang-crash: add -F flag to grep to avoid interpreting string as regex
Amy Huang [Thu, 25 Apr 2019 18:00:25 +0000 (18:00 +0000)]
creduce-clang-crash: add -F flag to grep to avoid interpreting string as regex

llvm-svn: 359216

5 years ago[PGO] Enable InstrProf lowering for Clang PGO instrumentation in the new pass manager
Rong Xu [Thu, 25 Apr 2019 17:52:43 +0000 (17:52 +0000)]
[PGO] Enable InstrProf lowering for Clang PGO instrumentation in the new pass manager
Currently InstrProf lowering is not enabled for Clang PGO instrumentation in
the new pass manager. The following command
"-fprofile-instr-generate -fexperimental-new-pass-manager ..." is broken.

This CL enables InstrProf lowering pass for Clang PGO instrumentation in the
new pass manager.

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

llvm-svn: 359215

5 years ago[clangd] Optimize "don't include me" check.
Sam McCall [Thu, 25 Apr 2019 17:47:07 +0000 (17:47 +0000)]
[clangd] Optimize "don't include me" check.

Summary:
llvm::Regex is really slow, and regex evaluation during preamble indexing was
showing up as 25% on a profile of clangd in a codebase with large preambles.

Reviewers: ilya-biryukov

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

Tags: #clang

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

llvm-svn: 359214

5 years ago[NFC][Sanitizer] Extract GetFuncAddr from GetRealFunctionAddress
Julian Lettner [Thu, 25 Apr 2019 17:46:29 +0000 (17:46 +0000)]
[NFC][Sanitizer] Extract GetFuncAddr from GetRealFunctionAddress

Summary:
Hopefully, this will enable cleanup/removal of GetRealFunctionAddress in
follow-up commits.

Subscribers: #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 359213

5 years agoFix bug 37903:MS ABI: handle inline static data member and inline variable as templat...
Jennifer Yu [Thu, 25 Apr 2019 17:45:45 +0000 (17:45 +0000)]
Fix bug 37903:MS ABI: handle inline static data member and inline variable as template static data member

llvm-svn: 359212

5 years agoImplement 'lerp'; which is the last bit of P0811. Mark that paper as complete.
Marshall Clow [Thu, 25 Apr 2019 17:44:18 +0000 (17:44 +0000)]
Implement 'lerp'; which is the last bit of P0811. Mark that paper as complete.

llvm-svn: 359211

5 years ago[lldb] [lit] Add tests for reading new x86_64 registers
Michal Gorny [Thu, 25 Apr 2019 17:42:49 +0000 (17:42 +0000)]
[lldb] [lit] Add tests for reading new x86_64 registers

Add tests covering read operations for the general-purpose and XMM
registers added in x86_64 (r8-r15 and xmm8-xmm15).

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

llvm-svn: 359210

5 years ago[lldb] [lit] Remove unnecessary array use in XMM reading test
Michal Gorny [Thu, 25 Apr 2019 17:42:40 +0000 (17:42 +0000)]
[lldb] [lit] Remove unnecessary array use in XMM reading test

Remove the use of 2-element array for XMM data.  It is an accidental
leftover from previous implementation attempt, and it is unnecessary
with xmm_t.

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

llvm-svn: 359208

5 years ago[WebAssembly] Always take into account added when applying runtime relocations
Sam Clegg [Thu, 25 Apr 2019 17:11:54 +0000 (17:11 +0000)]
[WebAssembly] Always take into account added when applying runtime relocations

The code we generate for applying data relocations at runtime omitted
the symbols with GOT entries.

Also refactor the code to reduce duplication.

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

llvm-svn: 359207

5 years agoFixed typo in CompileUnit::GetImportedModules documentation [NFC]
Raphael Isemann [Thu, 25 Apr 2019 17:08:54 +0000 (17:08 +0000)]
Fixed typo in CompileUnit::GetImportedModules documentation [NFC]

llvm-svn: 359206

5 years ago[Evaluator] Walk initial elements when handling load through bitcast
Robert Lougher [Thu, 25 Apr 2019 17:00:01 +0000 (17:00 +0000)]
[Evaluator] Walk initial elements when handling load through bitcast

When evaluating a store through a bitcast, the evaluator tries to move the
bitcast from the pointer onto the stored value. If the cast is invalid, it
tries to "introspect" the type to get a valid cast by obtaining a pointer to
the initial element (if the type is nested, this may require walking several
initial elements).

In some situations it is possible to get a bitcast on a load (e.g. with
unions, where the bitcast may not be the same type as the store). However,
equivalent logic to the store to introspect the type is missing. This patch
add this logic.

Note, when developing the patch I was unhappy with adding similar logic
directly to the load case as it could get out of step. Instead, I have
abstracted the "introspection" into a helper function, with the specifics
being handled by a passed-in lambda function.

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

llvm-svn: 359205

5 years ago[GlobalISel][AArch64] Legalize G_FNEARBYINT
Jessica Paquette [Thu, 25 Apr 2019 16:44:40 +0000 (16:44 +0000)]
[GlobalISel][AArch64] Legalize G_FNEARBYINT

Add legalizer support for G_FNEARBYINT. It's the same as G_FCEIL etc.

Since the importer allows us to automatically select this after legalization,
also add tests for selection etc. Also update arm64-vfloatintrinsics.ll.

llvm-svn: 359204

5 years ago[GlobalISel] Add IRTranslator support for G_FNEARBYINT
Jessica Paquette [Thu, 25 Apr 2019 16:39:28 +0000 (16:39 +0000)]
[GlobalISel] Add IRTranslator support for G_FNEARBYINT

Translate llvm.nearbyint into G_FNEARBYINT as a simple intrinsic. Update
arm64-irtranslator.ll.

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

llvm-svn: 359203

5 years ago[clangd] Use JSON streaming API for Trace rather than pasting strings. NFC
Sam McCall [Thu, 25 Apr 2019 16:37:07 +0000 (16:37 +0000)]
[clangd] Use JSON streaming API for Trace rather than pasting strings. NFC

llvm-svn: 359202

5 years ago[GlobalISel] Add a G_FNEARBYINT opcode
Jessica Paquette [Thu, 25 Apr 2019 16:36:03 +0000 (16:36 +0000)]
[GlobalISel] Add a G_FNEARBYINT opcode

For eventually selecting llvm.nearbyint. Equivalent to the SelectionDAG
nearbyint node.

Update legalizer-info-validation.mir.

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

llvm-svn: 359201

5 years ago[OPENMP] Improved check for the linear dependency in the non-rectangular
Alexey Bataev [Thu, 25 Apr 2019 16:21:13 +0000 (16:21 +0000)]
[OPENMP] Improved check for the linear dependency in the non-rectangular
loop nests.

Added a checks that the initializer/condition expressions depend only
only of the single previous loop iteration variable.

llvm-svn: 359200

5 years ago[scudo][standalone] Introduce the SizeClassMap
Kostya Kortchinsky [Thu, 25 Apr 2019 15:49:34 +0000 (15:49 +0000)]
[scudo][standalone] Introduce the SizeClassMap

Summary:
As with the sanitizer_common allocator, the SCM allows for efficient
mapping between sizes and size-classes, table-free.

It doesn't depart significantly from the original, except that we
allow the use of size-class 0 for other purposes (as opposed to
chunks of size 0). The Primary will use it to hold TransferBatches.

Reviewers: vitalybuka, eugenis, hctim, morehouse

Reviewed By: vitalybuka

Subscribers: srhines, mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 359199

5 years agoRevert "[JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows."
Lang Hames [Thu, 25 Apr 2019 15:18:31 +0000 (15:18 +0000)]
Revert "[JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows."

This reverts r359169, as it broke one of the windows bots.

llvm-svn: 359198

5 years ago[LLD][ELF] - Convert symbol-index.s testcase to a YAML test case. NFCI.
George Rimar [Thu, 25 Apr 2019 15:08:52 +0000 (15:08 +0000)]
[LLD][ELF] - Convert symbol-index.s testcase to a YAML test case. NFCI.

This removes one more binary object from the inputs and fixes the
test case description.

Previously it said that:
"symbol-index.elf has incorrect type of .symtab section.
There is no symbol bodies because of that and any symbol index becomes incorrect."

But the real reason of the failture was not the incorrect type of a symbol table,
but invalid index of the symbol used in a relocation, what happened because
previous test tried to read .symtab as a SHT_RELA section.

llvm-svn: 359197

5 years agogn build: Document llvm_enable_dia_sdk variable better
Nico Weber [Thu, 25 Apr 2019 14:56:56 +0000 (14:56 +0000)]
gn build: Document llvm_enable_dia_sdk variable better

llvm-svn: 359196

5 years agogn build: Make setting llvm_enable_dia_sdk=true work
Nico Weber [Thu, 25 Apr 2019 14:53:53 +0000 (14:53 +0000)]
gn build: Make setting llvm_enable_dia_sdk=true work

If this is set, %INCLUDE% must contain ".../DIA SDK/include"
and %LIB% must contain ".../DIA SKD/lib/amd64" (assuming you're doing a
64-bit build).

llvm-svn: 359195

5 years ago[LLD][ELF] - Move the test to a correct folder, remove excessive input. NFCI.
George Rimar [Thu, 25 Apr 2019 14:53:23 +0000 (14:53 +0000)]
[LLD][ELF] - Move the test to a correct folder, remove excessive input. NFCI.

This test should live in `invalid` folder.

Also it was possible to avoid adding input
with use of `-docnum=x` yaml2obj argument.

llvm-svn: 359194

5 years ago[OPENMP][AARCH64]Fix the test for declare simd, NFC.
Alexey Bataev [Thu, 25 Apr 2019 14:04:37 +0000 (14:04 +0000)]
[OPENMP][AARCH64]Fix the test for declare simd, NFC.

Renamed function a01 in the test to fix possible problems with the git
hash match during testing.

llvm-svn: 359193

5 years agolld-link: Implement /swaprun: flag
Nico Weber [Thu, 25 Apr 2019 14:02:26 +0000 (14:02 +0000)]
lld-link: Implement /swaprun: flag

r191276 added this to old LLD, but it never made it to new LLD -- except
that the flag was in Options.td, so it was silently ignored. I figured
it should be easy to implement, so I did that instead of removing the
flags from Options.td.

I then discovered that link.exe also supports comma-separated lists of
'cd' and 'net', which made the parsing code a bit annoying.

The Alias technique in Options.td is to get nice help output.

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

llvm-svn: 359192

5 years ago[InstCombine][X86] Tweak generic expansion of PACKSS/PACKUS to shuffle then truncate...
Simon Pilgrim [Thu, 25 Apr 2019 13:51:57 +0000 (13:51 +0000)]
[InstCombine][X86] Tweak generic expansion of PACKSS/PACKUS to shuffle then truncate. NFCI.

This has no effect on constant folding but will be useful when we expand non-saturating PACKSS/PACKUS intrinsics.

llvm-svn: 359191

5 years ago[Support] json::OStream::flush(), which passes through to the underlying stream
Sam McCall [Thu, 25 Apr 2019 13:33:18 +0000 (13:33 +0000)]
[Support] json::OStream::flush(), which passes through to the underlying stream

llvm-svn: 359190

5 years agogn build: Merge r359179
Nico Weber [Thu, 25 Apr 2019 13:29:34 +0000 (13:29 +0000)]
gn build: Merge r359179

llvm-svn: 359189

5 years agogn build: Merge r359174
Nico Weber [Thu, 25 Apr 2019 13:26:54 +0000 (13:26 +0000)]
gn build: Merge r359174

llvm-svn: 359188

5 years agogn build: Merge r359142
Nico Weber [Thu, 25 Apr 2019 13:25:00 +0000 (13:25 +0000)]
gn build: Merge r359142

llvm-svn: 359187

5 years ago[Support] Add JSON streaming output API, faster where the heavy value types aren...
Sam McCall [Thu, 25 Apr 2019 12:51:42 +0000 (12:51 +0000)]
[Support] Add JSON streaming output API, faster where the heavy value types aren't needed.

Summary:
There's still a little bit of constant factor that could be trimmed (e.g.
more overloads to avoid round-tripping primitives through json::Value).
But this solves the memory scaling problem, and greatly improves the performance
constant factor, and the API should leave room for optimization if needed.

Adapt TimeProfiler to use it, eliminating almost all the performance regression
from r358476.

Performance test on my machine:
perf stat -r 5 ~/llvmbuild-opt/bin/clang++ -w -S -ftime-trace -mllvm -time-trace-granularity=0 spirit.cpp

Handcrafted JSON (HEAD=r358532 with r358476 reverted): 2480ms
json::Value (HEAD): 2757ms (+11%)
After this patch: 2520 ms (+1.6%)

Reviewers: anton-afanasyev, lebedev.ri

Subscribers: kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 359186

5 years ago[InstCombine][X86] Add PACKSS/PACKUS tests for truncation where saturation won't...
Simon Pilgrim [Thu, 25 Apr 2019 12:45:11 +0000 (12:45 +0000)]
[InstCombine][X86] Add PACKSS/PACKUS tests for truncation where saturation won't occur

llvm-svn: 359185

5 years agoImplement midpoint for floating point types. Reviewed as https://reviews.llvm.org...
Marshall Clow [Thu, 25 Apr 2019 12:11:43 +0000 (12:11 +0000)]
Implement midpoint for floating point types. Reviewed as https://reviews.llvm.org/D61014.

llvm-svn: 359184

5 years ago[Support] Try to unbreak windows buildbot
Ilya Biryukov [Thu, 25 Apr 2019 11:57:40 +0000 (11:57 +0000)]
[Support] Try to unbreak windows buildbot

After r359179.

llvm-svn: 359183

5 years agoParallel: only allow the first TaskGroup to run tasks parallelly
Fangrui Song [Thu, 25 Apr 2019 11:33:30 +0000 (11:33 +0000)]
Parallel: only allow the first TaskGroup to run tasks parallelly

Summary:
Concurrent (e.g. nested) llvm::parallel::for_each() may lead to dead
locks. See PR35788 (fixed by rLLD322041) and PR41508 (fixed by D60757).

When parallel_for_each() is about to return, in ~Latch() called by
~TaskGroup(), a thread (in the default executor) may block in
Latch::sync() waiting for Count to become zero. If all threads in the
default executor are blocked, it is a dead lock.

To fix this, force serial execution if the current TaskGroup is not the
first one. For a nested llvm::parallel::for_each(), this parallelizes
the outermost loop and serializes inner loops.

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

llvm-svn: 359182

5 years ago[llvm-objdump] Prep for adding newlines before and after "Disassembly of section...
Fangrui Song [Thu, 25 Apr 2019 10:25:52 +0000 (10:25 +0000)]
[llvm-objdump] Prep for adding newlines before and after "Disassembly of section ...:"

llvm-svn: 359181

5 years ago[ConstantRange] [a, b) udiv a full range is [0, umax(b)).
Florian Hahn [Thu, 25 Apr 2019 10:12:43 +0000 (10:12 +0000)]
[ConstantRange] [a, b) udiv a full range is [0, umax(b)).

Reviewers: nikic, spatel, efriedma

Reviewed By: nikic

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

llvm-svn: 359180

5 years ago[Testing] Move clangd::Annotations to llvm testing support
Ilya Biryukov [Thu, 25 Apr 2019 10:08:31 +0000 (10:08 +0000)]
[Testing] Move clangd::Annotations to llvm testing support

Summary:
Annotations allow writing nice-looking unit test code when one needs
access to locations from the source code, e.g. running code completion
at particular offsets in a file. See comments in Annotations.cpp for
more details on the API.

Also got rid of a duplicate annotations parsing code in clang's code
complete tests.

Reviewers: gribozavr, sammccall

Reviewed By: gribozavr

Subscribers: mgorny, hiraditya, ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 359179

5 years ago[yaml2obj] - Don't crash on invalid inputs.
George Rimar [Thu, 25 Apr 2019 09:59:55 +0000 (09:59 +0000)]
[yaml2obj] - Don't crash on invalid inputs.

yaml2obj might crash on invalid input when unable to parse the YAML.

Recently a crash with a very similar nature was fixed for an empty files.
This patch revisits the fix and does it in yaml::Input instead.
It seems to be more correct way to handle such situation.

With that crash for invalid inputs is also fixed now.

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

llvm-svn: 359178

5 years agoFix include order. NFCI.
Simon Pilgrim [Thu, 25 Apr 2019 09:49:37 +0000 (09:49 +0000)]
Fix include order. NFCI.

llvm-svn: 359177

5 years ago[X86][SSE] combineBitcastvxi1 - add support for bitcasting to non-scalar integers
Simon Pilgrim [Thu, 25 Apr 2019 09:34:36 +0000 (09:34 +0000)]
[X86][SSE] combineBitcastvxi1 - add support for bitcasting to non-scalar integers

Truncate the movmsk scalar integer result to the equivalent scalar integer width as before but then bitcast to the requested type.

We still have the issue identified in PR41594 but D61114 should handle this.

llvm-svn: 359176

5 years agoFix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF
Michael Platings [Thu, 25 Apr 2019 09:27:50 +0000 (09:27 +0000)]
Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF

The error is:

libcxxabi/src/cxa_guard_impl.h: In instantiation of ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’:
libcxxabi/src/cxa_guard_impl.h:529:62:   required from here
libcxxabi/src/cxa_guard_impl.h:510:23: error: ‘__cxxabiv1::{anonymous}::LibcppMutex __cxxabiv1::{anonymous}::GlobalStatic<__cxxabiv1::{anonymous}::LibcppMutex>::instance’ has incomplete type
 _LIBCPP_SAFE_STATIC T GlobalStatic<T>::instance = {};
                       ^

llvm-svn: 359175

5 years ago[Support] Add a GTest matcher for Optional<T>
Ilya Biryukov [Thu, 25 Apr 2019 09:03:32 +0000 (09:03 +0000)]
[Support] Add a GTest matcher for Optional<T>

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 359174

5 years ago[NFC][LoopIdiomRecognize] Some basic baseline tests for bcmp loop idiom
Roman Lebedev [Thu, 25 Apr 2019 08:33:47 +0000 (08:33 +0000)]
[NFC][LoopIdiomRecognize] Some basic baseline tests for bcmp loop idiom

Doubt this is the final test coverage, but this appears to have good
coverage already, so i figure i might as well precommit it.

llvm-svn: 359173

5 years ago[NFC] test commit removing excess line
Nikolai Kosjar [Thu, 25 Apr 2019 08:14:39 +0000 (08:14 +0000)]
[NFC] test commit removing excess line

llvm-svn: 359172

5 years ago[MIPS] Use custom bitcast lowering to avoid excessive instructions
Simon Atanasyan [Thu, 25 Apr 2019 07:47:28 +0000 (07:47 +0000)]
[MIPS] Use custom bitcast lowering to avoid excessive instructions

On Mips32r2 bitcast can be expanded to two sw instructions and an ldc1
when using bitcast i64 to double or an sdc1 and two lw instructions when
using bitcast double to i64. By introducing custom lowering that uses
mtc1/mthc1 we can avoid excessive instructions.

Patch by Mirko Brkusanin.

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

llvm-svn: 359171

5 years ago[X86] Remove part of an if condition that should always be true.
Craig Topper [Thu, 25 Apr 2019 06:08:02 +0000 (06:08 +0000)]
[X86] Remove part of an if condition that should always be true.

The IndexReg will always be non-null at this point. Earlier in the function, if
IndexReg was null we set it to CurDAG->getRegister(0, VT) which made it
non-null.

llvm-svn: 359170

5 years ago[JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows.
Lang Hames [Thu, 25 Apr 2019 05:24:40 +0000 (05:24 +0000)]
[JITLink] Make the JITLink MachO/x86-64 eh-frame test work on Windows.

This should fix the MachO/x86-64 eh-frame regression test by ensuring that
the symbols __ZTIi and ___gxx_personality_v0 are defined on all platforms.

llvm-svn: 359169

5 years ago[llvm-rtdyld] Add support for passing command line arguments to rtdyld-run code.
Lang Hames [Thu, 25 Apr 2019 05:02:10 +0000 (05:02 +0000)]
[llvm-rtdyld] Add support for passing command line arguments to rtdyld-run code.

The --args option can now be used to pass arguments to code linked with
llvm-rtdyld. E.g.

$ llvm-rtdyld file1.o file2.o --args a b c

is equivalent to:

$ ld -o program file1.o file2.o
$ ./program a b c

This is the rtdyld counterpart to the jitlink change in r359115, and makes
benchmarking and comparison between the tools easier.

llvm-svn: 359168

5 years agoEnable LoopVectorization by default.
Alina Sbirlea [Thu, 25 Apr 2019 04:49:48 +0000 (04:49 +0000)]
Enable LoopVectorization by default.

Summary:
When refactoring vectorization flags, vectorization was disabled by default in the new pass manager.
This patch re-enables is for both managers, and changes the assumptions opt makes, based on the new defaults.
Comments in opt.cpp should clarify the intended use of all flags to enable/disable vectorization.

Reviewers: chandlerc, jgorbe

Subscribers: jlebar, llvm-commits

Tags: #llvm

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

llvm-svn: 359167

5 years ago[llvm-objdump] errorToErrorCode+message -> toString
Fangrui Song [Thu, 25 Apr 2019 04:31:26 +0000 (04:31 +0000)]
[llvm-objdump] errorToErrorCode+message -> toString

For test/Object/elf-invalid-phdr.test, the intended error message got lost due to errorToErrorCode().

llvm-svn: 359166

5 years ago[PowerPC][NFC]Update licence to Apache 2
Jinsong Ji [Thu, 25 Apr 2019 02:40:06 +0000 (02:40 +0000)]
[PowerPC][NFC]Update licence to Apache 2

llvm-svn: 359164

5 years agoConsolidate existing utilities for interpreting vector predicate maskes [NFC]
Philip Reames [Thu, 25 Apr 2019 02:30:17 +0000 (02:30 +0000)]
Consolidate existing utilities for interpreting vector predicate maskes [NFC]

llvm-svn: 359163

5 years agoUpdate test to better check for the non-constexpr-ness of a move constructor. Fixes...
Marshall Clow [Thu, 25 Apr 2019 02:12:51 +0000 (02:12 +0000)]
Update test to better check for the non-constexpr-ness of a move constructor. Fixes PR#41577.

llvm-svn: 359162

5 years agoFix unused variable warning in LoopFusion pass.
Kit Barton [Thu, 25 Apr 2019 02:10:02 +0000 (02:10 +0000)]
Fix unused variable warning in LoopFusion pass.

Do not wrap the contents of printFusionCandidates in the LLVM_DEBUG macro. This
fixes an unused variable warning generated when compiling without asserts but
with -DENABLE_LLVM_DUMP.

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

llvm-svn: 359161

5 years ago[InstCombine] Be consistent w/handling of masked intrinsics style wise [NFC]
Philip Reames [Thu, 25 Apr 2019 01:18:56 +0000 (01:18 +0000)]
[InstCombine] Be consistent w/handling of masked intrinsics style wise [NFC]

llvm-svn: 359160

5 years agoUse modern type trait implementations when available.
Richard Smith [Thu, 25 Apr 2019 00:35:01 +0000 (00:35 +0000)]
Use modern type trait implementations when available.

Teach libcxx to stop using various deprecated __has_* type traits, in favor of
the ("modern", C++11 era) __is_* type traits.

This is mostly just a simplification, but fixes at least one bug: _Atomic T
should be considered trivially-destructible, but is not considered to be POD by
Clang, and __has_trivial_destructor is specified in the GCC documentation as
returning false for non-POD non-class types.

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

llvm-svn: 359159

5 years agoFix typo in comment in r312851.
Richard Smith [Thu, 25 Apr 2019 00:22:11 +0000 (00:22 +0000)]
Fix typo in comment in r312851.

Thanks to Nico Weber for pointing this out!

llvm-svn: 359158

5 years ago[utils] Add a lldb data formatter for llvm::SmallString.
Davide Italiano [Thu, 25 Apr 2019 00:03:02 +0000 (00:03 +0000)]
[utils] Add a lldb data formatter for llvm::SmallString.

Result:

(lldb) p val
(llvm::SmallString<32>) $31 = "patatino"

llvm-svn: 359157

5 years agoHide stderr output from lldb-argdumper
Adrian Prantl [Wed, 24 Apr 2019 23:52:27 +0000 (23:52 +0000)]
Hide stderr output from lldb-argdumper

Under very specific circumstances the default shell /bin/sh might
print stuff to stderr before launching lldb-argdumper, which then
confuses the JSON parser. This patch suppresses stderr output from
lldb-argdumper to avoid this situation.

rdar://problem/50149390

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

llvm-svn: 359156

5 years agoPR41427: This has apparently been fixed already, just add a regression
Richard Smith [Wed, 24 Apr 2019 23:45:56 +0000 (23:45 +0000)]
PR41427: This has apparently been fixed already, just add a regression
test.

llvm-svn: 359155

5 years agoFix spelling error. NFC
Austin Kerbow [Wed, 24 Apr 2019 23:32:21 +0000 (23:32 +0000)]
Fix spelling error. NFC

Summary: Test commit.

Reviewers: msearles, jkorous

Reviewed By: jkorous

Subscribers: dexonsmith, arsenm, jvesely, nhaehnle, hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 359154

5 years agollvm-cvtres: Make new dupe resource error a bit friendlier
Nico Weber [Wed, 24 Apr 2019 23:26:30 +0000 (23:26 +0000)]
llvm-cvtres: Make new dupe resource error a bit friendlier

For well-known type IDs, include the name of the type.

To not duplicate the ID->name map, make llvm-readobj call this new
function as well.  It has slightly different output, so this also
requires updating a few tests.

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

llvm-svn: 359153

5 years agoposix_spawn should retry upon EINTR
JF Bastien [Wed, 24 Apr 2019 23:24:53 +0000 (23:24 +0000)]
posix_spawn should retry upon EINTR

Summary:
We've seen cases of bots failing with:
  clang: error: unable to execute command: posix_spawn failed: Interrupted system call

Add a small retry loop to posix_spawn in case this happens. Don't retry too much in case there's some systemic problem going on, but retry a few times.
<rdar://problem/50181448>

Reviewers: Bigcheese, arphaman

Subscribers: jkorous, dexonsmith, kristina, llvm-commits

Tags: #llvm

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

llvm-svn: 359152

5 years agoMark new jitlink test XFAIL for windows
Reid Kleckner [Wed, 24 Apr 2019 23:11:17 +0000 (23:11 +0000)]
Mark new jitlink test XFAIL for windows

llvm-svn: 359151

5 years ago[sanitizer_common] Remove some old commented-out printf statements, and fixed up...
Mitch Phillips [Wed, 24 Apr 2019 23:03:32 +0000 (23:03 +0000)]
[sanitizer_common] Remove some old commented-out printf statements, and fixed up the order of includes.

llvm-svn: 359150

5 years agoRecommitting r358783 and r358786 "[MS] Emit S_HEAPALLOCSITE debug info" with fixes...
Amy Huang [Wed, 24 Apr 2019 23:02:48 +0000 (23:02 +0000)]
Recommitting r358783 and r358786 "[MS] Emit S_HEAPALLOCSITE debug info" with fixes for buildbot error (undefined assembler label).

Summary:
This emits labels around heapallocsite calls and S_HEAPALLOCSITE debug
info in codeview. Currently only changes FastISel, so emitting labels still
needs to be implemented in SelectionDAG.

Reviewers: rnk

Subscribers: aprantl, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

llvm-svn: 359149

5 years ago[codeview] Fix symbol names for dynamic initializers and atexit stubs
Reid Kleckner [Wed, 24 Apr 2019 22:45:44 +0000 (22:45 +0000)]
[codeview] Fix symbol names for dynamic initializers and atexit stubs

Summary:
Add a new variant to GlobalDecl for these so that we can detect them
more easily during debug info emission and handle them appropriately.

Reviewers: rsmith, rjmccall, jyu2

Subscribers: aprantl, cfe-commits

Tags: #clang

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

llvm-svn: 359148

5 years ago[DAGCombiner] scale repeated FP divisor by splat factor
Sanjay Patel [Wed, 24 Apr 2019 22:28:58 +0000 (22:28 +0000)]
[DAGCombiner] scale repeated FP divisor by splat factor

If we have a vector FP division with a splatted divisor, use the existing transform
that converts 'x/y' into 'x * (1.0/y)' to allow more conversions. This can then
potentially be converted into a scalar FP division by existing combines (rL358984)
as seen in the tests here.

That can be a potentially big perf difference if scalar fdiv has better timing
(including avoiding possible frequency throttling for vector ops).

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

llvm-svn: 359147

5 years ago[PowerPC] Allow using initial-exec TLS with PIC
Joerg Sonnenberger [Wed, 24 Apr 2019 22:12:22 +0000 (22:12 +0000)]
[PowerPC] Allow using initial-exec TLS with PIC

Using initial-exec TLS variables is a reasonable performance
optimisation for system libraries. Use the correct PIC mechanism to get
hold of the GOT to avoid text relocations.

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

llvm-svn: 359146

5 years agoSkip test introduced in r359140 on windows
Frederic Riss [Wed, 24 Apr 2019 22:00:01 +0000 (22:00 +0000)]
Skip test introduced in r359140 on windows

Not sure what is or is not supposed to work on Windows and I have
no way to investigate this.

llvm-svn: 359145

5 years agoAdd period at end of comment.
Sean Fertile [Wed, 24 Apr 2019 21:51:30 +0000 (21:51 +0000)]
Add period at end of comment.

llvm-svn: 359144

5 years ago[X86] Attempt to fix use-after-poison from r359121.
Craig Topper [Wed, 24 Apr 2019 21:48:24 +0000 (21:48 +0000)]
[X86] Attempt to fix use-after-poison from r359121.

llvm-svn: 359143

5 years ago[clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals
Don Hinton [Wed, 24 Apr 2019 21:25:57 +0000 (21:25 +0000)]
[clang-tidy] Add new checker: llvm-prefer-isa-or-dyn-cast-in-conditionals

Summary:
Looks at conditionals and finds cases of ``cast<>``, which will
assert rather than return a null pointer, and ``dyn_cast<>`` where
the return value is not captured. Additionally, finds cases that
match the pattern ``var.foo() && isa<X>(var.foo())``, where the
method is called twice and could be expensive.

.. code-block:: c++

  // Finds cases like these:
  if (auto x = cast<X>(y)) <...>
  if (cast<X>(y)) <...>

  // But not cases like these:
  if (auto f = cast<Z>(y)->foo()) <...>
  if (cast<Z>(y)->foo()) <...>

Reviewers: alexfh, rjmccall, hokein, aaron.ballman, JonasToth

Reviewed By: aaron.ballman

Subscribers: xbolva00, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits

Tags: #clang-tools-extra, #clang

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

llvm-svn: 359142

5 years ago[SystemInitializerFull] Fix header sorting (NFC)
Jonas Devlieghere [Wed, 24 Apr 2019 21:23:08 +0000 (21:23 +0000)]
[SystemInitializerFull] Fix header sorting (NFC)

Made some changes downstream that touched the header sorting.

llvm-svn: 359141

5 years agoFix infinite recursion when calling C++ template functions
Frederic Riss [Wed, 24 Apr 2019 21:04:23 +0000 (21:04 +0000)]
Fix infinite recursion when calling C++ template functions

Summary:
When we encounter a templated function in the debug information, we
were creating an AST that looked like this:

FunctionTemplateDecl 0x12980ab90 <<invalid sloc>> <invalid sloc> foo<int>
|-TemplateTypeParmDecl 0x12980aad0 <<invalid sloc>> <invalid sloc> class depth 0 index 0 T
|-FunctionDecl 0x12980aa30 <<invalid sloc>> <invalid sloc> foo<int> 'int (int)' extern
| |-TemplateArgument type 'int'
| `-ParmVarDecl 0x12980a998 <<invalid sloc>> <invalid sloc> t1 'int'
`-FunctionDecl 0x12980aa30 <<invalid sloc>> <invalid sloc> foo<int> 'int (int)' extern
  |-TemplateArgument type 'int'
  `-ParmVarDecl 0x12980a998 <<invalid sloc>> <invalid sloc> t1 'int'

Note that the FunctionTemplateDecl has 2 children which are identical (as
in have the same address). This is not what Clang is doing:

FunctionTemplateDecl 0x7f89d206c6f8 </tmp/template.cpp:1:1, line:4:1> line:2:5 foo
|-TemplateTypeParmDecl 0x7f89d206c4a8 <line:1:10, col:19> col:19 referenced typename depth 0 index 0 T
|-FunctionDecl 0x7f89d206c660 <line:2:1, line:4:1> line:2:5 foo 'int (T)'
| `-ParmVarDecl 0x7f89d206c570 <col:9, col:11> col:11 t1 'T'
`-FunctionDecl 0x7f89d206cb60 <line:2:1, line:4:1> line:2:5 used foo 'int (int)'
  |-TemplateArgument type 'int'
  `-ParmVarDecl 0x7f89d206ca68 <col:9, col:11> col:11 t1 'int':'int'

The 2 chidlren are different and actually repesent different things: the first
one is the unspecialized version and the second one is specialized. (Just looking
at the names shows another major difference which is that we create the parent
with a name of "foo<int>" when it should be just "foo".)

The fact that we have those 2 identical children confuses the ClangImporter
and generates an infinite recursion (reported in https://llvm.org/pr41473).
We cannot create the unspecialized version as the debug information doesn't
contain a mapping from the template parameters to their use in the prototype.

This patch just creates 2 different FunctionDecls for those 2 children of the
FunctionTemplateDecl. This avoids the infinite recursion and allows us to
call functions. As the XFAILs in the added test show, we've still got issues
in our handling of templates. I believe they are mostly centered on the fact
that we create do not register "foo" as a template, but "foo<int>". This is
a bigger change that will need changes to the debug information generation.
I believe this change makes sense on its own.

Reviewers: shafik, clayborg, jingham

Subscribers: aprantl, javed.absar, kristof.beyls, lldb-commits

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

llvm-svn: 359140

5 years ago[AMDGPU] gfx1010 SOP instructions
Stanislav Mekhanoshin [Wed, 24 Apr 2019 20:44:34 +0000 (20:44 +0000)]
[AMDGPU] gfx1010 SOP instructions

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

llvm-svn: 359139

5 years ago[ScriptInterpreterPython] find_first_of -> find (NFC)
Jonas Devlieghere [Wed, 24 Apr 2019 20:40:24 +0000 (20:40 +0000)]
[ScriptInterpreterPython] find_first_of -> find (NFC)

Follow up to r357198.

llvm-svn: 359138

5 years ago[COFF] Don't emit .gfids sections when CFG is off
Reid Kleckner [Wed, 24 Apr 2019 20:38:37 +0000 (20:38 +0000)]
[COFF] Don't emit .gfids sections when CFG is off

Put them on the list of GuardFidChunks instead of the main Chunks list,
even with CFG is off. It will be ignored if CFG is disabled.

llvm-svn: 359137