platform/upstream/llvm.git
4 years ago[BasicAA] New basic-aa-recphi test. NFC
David Green [Thu, 2 Jul 2020 07:03:37 +0000 (08:03 +0100)]
[BasicAA] New basic-aa-recphi test. NFC

4 years ago[gn build] Port 804d9687443
LLVM GN Syncbot [Thu, 2 Jul 2020 09:46:36 +0000 (09:46 +0000)]
[gn build] Port 804d9687443

4 years ago[VE] Rename VE toolchain source files
Kazushi (Jam) Marukawa [Wed, 1 Jul 2020 14:17:27 +0000 (23:17 +0900)]
[VE] Rename VE toolchain source files

Summary:
Rename VE.cpp and VE.h to VEToolchain.cpp and VEToolchain.h respectively
in order to avoid link warning message.  Linker warns that VE.cpp.o and
Arch/VE.cpp.o have the same name.

Reviewers: simoll, k-ishizaka

Reviewed By: simoll

Subscribers: mgorny, cfe-commits

Tags: #llvm, #ve, #clang

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

4 years ago[SVE] Add warnings checks in four more LLVM SVE tests
David Sherwood [Wed, 1 Jul 2020 14:20:01 +0000 (15:20 +0100)]
[SVE] Add warnings checks in four more LLVM SVE tests

I have added CHECK lines to the following tests:

  llvm/test/CodeGen/AArch64/sve-breakdown-scalable-vectortype.ll
  llvm/test/CodeGen/AArch64/sve-calling-convention-tuple-types.ll
  llvm/test/CodeGen/AArch64/sve-intrinsics-create-tuple.ll
  llvm/test/CodeGen/AArch64/sve-intrinsics-loads.ll

since they are now free of warnings related to invalid use of
EVT::getVectorNumElements() and VectorType::getNumElements().

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

4 years ago[Support][Windows] Prevent 2s delay when renaming a file that does not exist
Ben Dunbobbin [Wed, 1 Jul 2020 16:49:30 +0000 (17:49 +0100)]
[Support][Windows] Prevent 2s delay when renaming a file that does not exist

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

4 years agoDSE: fix builtin function recognition to take decl into account
Nuno Lopes [Thu, 2 Jul 2020 09:27:09 +0000 (10:27 +0100)]
DSE: fix builtin function recognition to take decl into account

4 years ago[AMDGPU] Fix formatting in MIR tests
Jay Foad [Thu, 2 Jul 2020 09:17:03 +0000 (10:17 +0100)]
[AMDGPU] Fix formatting in MIR tests

4 years ago[CodeGen][SVE] Don't drop scalable flag in DAGCombiner::visitEXTRACT_SUBVECTOR
Sander de Smalen [Thu, 2 Jul 2020 09:06:41 +0000 (10:06 +0100)]
[CodeGen][SVE] Don't drop scalable flag in DAGCombiner::visitEXTRACT_SUBVECTOR

There was a rogue 'assert' in AArch64ISelLowering for the tuple.get intrinsics,
that shouldn't really have been there (I suspect this was a remnant from when
we expected the wider vector always to have come from a vector CONCAT).

When I tried to create a more minimal reproducer, I found a bug in
DAGCombiner where it drops the scalable flag when trying to fold:

      extract_subv (bitcast X), Index --> bitcast (extract_subv X, Index')

This patch fixes both issues.

Reviewers: david-arm, efriedma, spatel

Reviewed By: efriedma

Tags: #llvm

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

4 years ago[AArch64][SVE] Add unpred load/store patterns for bf16 types
Sander de Smalen [Thu, 2 Jul 2020 08:59:49 +0000 (09:59 +0100)]
[AArch64][SVE] Add unpred load/store patterns for bf16 types

Reviewers: kmclaughlin, c-rhodes, efriedma

Reviewed By: efriedma

Tags: #llvm

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

4 years ago[SVE] ACLE: Fix builtins for svdup_lane_bf16 and svcvtnt_bf16_f32_x
Sander de Smalen [Thu, 2 Jul 2020 08:26:52 +0000 (09:26 +0100)]
[SVE] ACLE: Fix builtins for svdup_lane_bf16 and svcvtnt_bf16_f32_x

bfloat16 variants of svdup_lane were missing, and svcvtnt_bf16_x
was implemented incorrectly (it takes an operand for the inactive
lanes)

Reviewers: fpetrogalli, efriedma

Reviewed By: fpetrogalli

Tags: #clang

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

4 years ago[lldb][NFC] Don't pass around passthrough from ClangDiagnosticManagerAdapter
Raphael Isemann [Thu, 2 Jul 2020 07:41:09 +0000 (09:41 +0200)]
[lldb][NFC] Don't pass around passthrough from ClangDiagnosticManagerAdapter

The passthrough DiagnosticConsumer is an implementation detail of
ClangDiagnosticManagerAdapter and we can just hide it behind the normal
DiagnosticConsumer interface that ClangDiagnosticManagerAdapter is supposed
to implement.

4 years ago[NFC] Fix typo in triples from unkown to unknown
Qiu Chaofan [Thu, 2 Jul 2020 08:06:54 +0000 (16:06 +0800)]
[NFC] Fix typo in triples from unkown to unknown

4 years ago[ARM] Rearrange SizeReduction when using -Oz
Nicholas Guy [Thu, 18 Jun 2020 09:25:24 +0000 (10:25 +0100)]
[ARM] Rearrange SizeReduction when using -Oz

Move the Thumb2SizeReduce pass to before IfConversion when optimising
for minimal code size.

Running the Thumb2SizeReduction pass before IfConversionallows T1
instructions to propagate to the final output, rather than the
ifConverter modifying T2 instructions and preventing them from being
reduced later.

This change does introduce a regression regarding execution time, so
it's only applied when optimising for size.

Running the LLVM Test Suite with this change produces a geomean
difference of -0.1% for the size..text metric.

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

4 years agoFix missing build dependency on omp_gen.
Simon Tatham [Thu, 2 Jul 2020 08:16:13 +0000 (09:16 +0100)]
Fix missing build dependency on omp_gen.

Summary:
`include/llvm/Frontend/OpenMP/CMakeLists.txt` creates a new target
called `omp_gen` which builds the generated include file `OMP.h.inc`.
This target must therefore be a dependency of every compilation step
whose transitive #include dependencies contain `OMP.h.inc`, or else
it's possible for builds to fail if Ninja (or make or whatever)
schedules that compilation step before building `OMP.h.inc` at all.

A few of those dependencies are currently missing, which leads to
intermittent build failures, depending on the order that Ninja (or
whatever) happens to schedule its commands. As far as I can see,
compiles in `clang/lib/CodeGen`, `clang/lib/Frontend`, and
`clang/examples` all depend transitivily on `OMP.h.inc` (usually via
`clang/AST/AST.h`), but don't have the formal dependency in the ninja
graph.

Adding `omp_gen` to the dependencies of `clang-tablegen-targets` seems
to be the way to get the missing dependency into the `clang/examples`
subdirectory. This also fixes the other two clang subdirectories, as
far as I can see.

Reviewers: clementval, thakis, chandlerc, jdoerfert

Reviewed By: clementval

Subscribers: cfe-commits, jdenny, mgorny, sstefan1, llvm-commits

Tags: #llvm, #clang

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

4 years ago[CodeGen] Fix warnings in getCopyToPartsVector
David Sherwood [Mon, 29 Jun 2020 06:48:23 +0000 (07:48 +0100)]
[CodeGen] Fix warnings in getCopyToPartsVector

Whilst trying to assemble the following test:

  clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2.c

I discovered we were hitting some warnings about possible invalid
calls to getVectorNumElements() in getCopyToPartsVector(). I've
tried to fix these by using ElementCount types where possible and
I've made the assumption that we don't support using a fixed width
vector to copy parts of a scalable vector, and vice versa. Looking
at how the copy is implemented I think that's the right thing for
now.

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

4 years agoRevert "[clang-tidy] For `run-clang-tidy.py` escape the paths that are used for analy...
Nathan James [Thu, 2 Jul 2020 07:54:55 +0000 (08:54 +0100)]
Revert "[clang-tidy] For `run-clang-tidy.py` escape the paths that are used for analysis."

This reverts commit 068fa35746637fde29355a43d17d554a92b32cdf.

Based on a regression reported in https://bugs.llvm.org/show_bug.cgi?id=46536

4 years ago[lldb][NFC] Fix a variable name in ClangDiagnosticManagerAdapter
Raphael Isemann [Thu, 2 Jul 2020 07:10:07 +0000 (09:10 +0200)]
[lldb][NFC] Fix a variable name in ClangDiagnosticManagerAdapter

4 years ago[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment.
Craig Topper [Thu, 2 Jul 2020 06:59:01 +0000 (23:59 -0700)]
[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment.

The default CPU used by llvm-mc doesn't have the NOPL feature, but
if we know we're compiling in 64-bit mode we should be able to
use nopl.

4 years ago[clang] Re-add deleted forward declaration.
Alexander Belyaev [Thu, 2 Jul 2020 06:56:51 +0000 (08:56 +0200)]
[clang] Re-add deleted forward declaration.

4 years agoThis patch adds basic debug info support with basic block sections.
Krzysztof Pszeniczny [Thu, 2 Jul 2020 06:47:30 +0000 (23:47 -0700)]
This patch adds basic debug info support with basic block sections.

This patch uses ranges for debug information when a function contains basic block sections rather than using [lowpc, highpc]. This is also the first in a series of patches for debug info and does not contain the support for linker relaxation. That will be done as a follow up patch.

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

4 years agoAdd parenthesized expression to SyntaxTree
Eduardo Caldas [Wed, 1 Jul 2020 13:58:18 +0000 (13:58 +0000)]
Add parenthesized expression to SyntaxTree

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[mlir][OpFormatGen] Add support for resolving variadic types from non-variadic
River Riddle [Thu, 2 Jul 2020 05:24:36 +0000 (22:24 -0700)]
[mlir][OpFormatGen] Add support for resolving variadic types from non-variadic

This enables better support for traits such as SameOperandsAndResultType, and other situations in which a variadic operand may be resolved from a non-variadic.

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

4 years agold64.lld: Add janky support for tbd files
Nico Weber [Thu, 2 Jul 2020 04:02:09 +0000 (00:02 -0400)]
ld64.lld: Add janky support for tbd files

With this, a simple hello world links against libSystem.tbd and the
old ld64.lld linker kind of works again with newer SDKs.

The motivation here is to have an arm64 cross linker that's good
enough to be able to run simple configure link checks on non-mac
systems for generating config.h files. Once -flavor darwinnew can
link arm64, we'll switch to that.

4 years agolld/MachO: Remove a useless temporary
Nico Weber [Thu, 2 Jul 2020 04:04:51 +0000 (00:04 -0400)]
lld/MachO: Remove a useless temporary

4 years ago[lldb/build.py] Always pass an SDK to the compiler on Darwin
Fred Riss [Thu, 2 Jul 2020 02:54:11 +0000 (19:54 -0700)]
[lldb/build.py] Always pass an SDK to the compiler on Darwin

On macOS 11, system libraries which are part of the shared cache
are not present on the filesystem anymore. This causes issues
with build.py, because it fails to link binaries with libSystem
or libc++.

The real issue is that build.py was not passing an SDK to the
compiler. The script accepts an argument for the SDK, but it
is currently unused. This patch just threads the SDK through
to the compile and link steps and this fixes a bunch of Shell
test failures on very recent macOS builds.

4 years ago[lldb/ObjC] Add support for direct selector references
Fred Riss [Fri, 13 Mar 2020 23:28:23 +0000 (16:28 -0700)]
[lldb/ObjC] Add support for direct selector references

On macOS 11 (and other aligned OSs), the shared cache method
lists get an additional optimization which removes one level
of indirection to get to the selector.
This patch supports this new optimization. Both codepaths are
covered byt the existing Objective-C tests.

4 years ago[lldb/ObjCRuntime] Implement support for small method lists
Fred Riss [Wed, 26 Feb 2020 22:57:50 +0000 (14:57 -0800)]
[lldb/ObjCRuntime] Implement support for small method lists

On macOS 11 (and other aligned Apple OSs), the Objective-C runtime
has a new optimization which saves memory by making the method
lists smaller.
This patch adds support for this new method list encoding (while
also keeping backward compatibility). This is implicitely covered
by some existing Objective-C tests.

4 years ago[AMDGPU] Control num waves per EU for implicit work-group size
Pushpinder Singh [Wed, 17 Jun 2020 04:06:48 +0000 (00:06 -0400)]
[AMDGPU] Control num waves per EU for implicit work-group size

Summary:
If amdgpu-flat-work-group-size is not specified in LLVM IR, the backend
uses default value of 1024. For this, minimum waves per EU should be 4.
However, backend is still setting minimum value to 1 instead of calculated
value. This is not observed normally as frontend always provide
amdgpu-flat-work-group-size attribute.

Reviewers: rampitec, b-sumner, sameerds, msearles

Reviewed By: rampitec

Subscribers: qcolombet, arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

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

4 years ago[lld-macho] Make sure ZeroFill sections are at the end of their segments
Jez Ng [Mon, 15 Jun 2020 22:00:27 +0000 (15:00 -0700)]
[lld-macho] Make sure ZeroFill sections are at the end of their segments

Summary:
ld64 does this, and references an internal rdar:// number as an explanation. No
idea what that rdar issue is, but in practice, it seems that not putting a BSS
section at the end can cause subsequent sections in the same segment to be
overwritten with zeroes.

Reviewers: #lld-macho

Subscribers: llvm-commits

Tags: #llvm

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

4 years ago[PowerPC]Implement Vector Shift Double Bit Immediate Builtins
Biplob Mishra [Thu, 2 Jul 2020 00:48:44 +0000 (19:48 -0500)]
[PowerPC]Implement Vector Shift Double Bit Immediate Builtins

Implement Vector Shift Double Bit Immediate Builtins in LLVM/Clang.
  * vec_sldb ();
  * vec_srdb ();

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

4 years ago[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Valentin Clement [Thu, 2 Jul 2020 00:57:11 +0000 (20:57 -0400)]
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend

Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.

Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx

Reviewed By: DavidTruby, ichoyjx

Subscribers: jholewinski, cfe-commits, dblaikie, MaskRay, ymandel, ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm, #flang, #clang

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

4 years ago[X86-64] Support Intel AMX instructions
Xiang1 Zhang [Thu, 2 Jul 2020 00:36:45 +0000 (08:36 +0800)]
[X86-64] Support Intel AMX instructions

Summary:
INTEL ADVANCED MATRIX EXTENSIONS (AMX).
AMX is a new programming paradigm, it has a set of 2-dimensional registers
(TILES) representing sub-arrays from a larger 2-dimensional memory image and
operate on TILES.

Spec can be found in Chapter 3 here https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html

Reviewers: LuoYuanke, annita.zhang, pengfei, RKSimon, xiangzhangllvm

Reviewed By: xiangzhangllvm

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

4 years ago[PowerPC][NFC] Update doc for FeatureISA3_1/FeatureISA3_0 definitions
Lei Huang [Thu, 2 Jul 2020 00:36:19 +0000 (19:36 -0500)]
[PowerPC][NFC] Update doc for FeatureISA3_1/FeatureISA3_0 definitions

4 years ago[flang] Add more support for alternate returns
Tim Keith [Thu, 2 Jul 2020 00:28:00 +0000 (17:28 -0700)]
[flang] Add more support for alternate returns

Add `hasAlternateReturns` to `evaluate::ProcedureRef`.

Add `HasAlternateReturns` to test subprogram symbols.

Fix `label01.F90` test: It was checking that "error: " didn't appear in
the output. But that was erroneously matching a warning that ends
"would be in error:". So change it to check for ": error: " instead.

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

4 years ago[PowerPC] Exploit xxspltiw and xxspltidp instructions
Anil Mahmud [Wed, 1 Jul 2020 19:16:27 +0000 (14:16 -0500)]
[PowerPC] Exploit xxspltiw and xxspltidp instructions

Exploits the VSX Vector Splat Immediate Word and
VSX Vector Splat Immediate Double Precision instructions:

  xxspltiw XT,IMM32
  xxspltidp XT,IMM32

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

4 years ago[mlir][spirv] Add support for lowering scf.for scf/if with return value
Thomas Raoux [Thu, 2 Jul 2020 00:08:08 +0000 (17:08 -0700)]
[mlir][spirv] Add support for lowering scf.for scf/if with return value

This allow lowering to support scf.for and scf.if with results. As right now
spv region operations don't have return value the results are demoted to
Function memory. We create one allocation per result right before the region
and store the yield values in it. Then we can load back the value from
allocation to be able to use the results.

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

4 years ago[mlir][NFC] Move conversion of scf to spir-v ops in their own file
Thomas Raoux [Wed, 1 Jul 2020 23:54:26 +0000 (16:54 -0700)]
[mlir][NFC] Move conversion of scf to spir-v ops in their own file

Move patterns for scf to spir-v ops in their own file/folder.

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

4 years ago[flang][NFC] Get formatting in sync with latest clang-format
Tim Keith [Wed, 1 Jul 2020 23:51:44 +0000 (16:51 -0700)]
[flang][NFC] Get formatting in sync with latest clang-format

flang/module only contains Fortran files and one is a .h so disable
formatting on that directory.

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

4 years ago[gcov] Move llvm_writeout_files from atexit to a static destructor
Fangrui Song [Wed, 1 Jul 2020 23:40:31 +0000 (16:40 -0700)]
[gcov] Move llvm_writeout_files from atexit to a static destructor

atexit registered functions run earlier so `__attribute__((destructor))`
annotated functions cannot be tracked.

Set a priority of 100 (compatible with GCC 7 onwards) to track
destructors and destructors whose priorities are greater than 100.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7970

Reviewed By: calixte, marco-c

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

4 years agoRevert "Update lto.ll test after 3367e9da enabled multibyte NOPs in 64-bit mode."
Douglas Yung [Wed, 1 Jul 2020 23:34:57 +0000 (16:34 -0700)]
Revert "Update lto.ll test after 3367e9da enabled multibyte NOPs in 64-bit mode."

This reverts commit 79f6a814ab9383094a5ffea75bb7aca55292ff15.

Didn't notice that someone had reverted the commit that caused the problem.

4 years agoUpdate lto.ll test after 3367e9da enabled multibyte NOPs in 64-bit mode.
Douglas Yung [Wed, 1 Jul 2020 23:25:25 +0000 (16:25 -0700)]
Update lto.ll test after 3367e9da enabled multibyte NOPs in 64-bit mode.

This should fix the PS4 linux build bot:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/70409

4 years agotypo fixes to cycle bots
Nico Weber [Wed, 1 Jul 2020 23:20:05 +0000 (19:20 -0400)]
typo fixes to cycle bots

4 years agoclang CoverageMapping tests bot cleanup
Xun Li [Wed, 1 Jul 2020 23:06:31 +0000 (16:06 -0700)]
clang CoverageMapping tests bot cleanup

Summary:
D82928 generated unexpected tmp files in the CoverageMapping test directory. This patch cleans it up and remove the file in the test bots.
It will be revered after a week.

Reviewers: thakis

Reviewed By: thakis

Subscribers: cfe-commits

Tags: #clang

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

4 years ago[NFCI] Actually provide correct check lines in sdiv.ll
Roman Lebedev [Wed, 1 Jul 2020 22:59:16 +0000 (01:59 +0300)]
[NFCI] Actually provide correct check lines in sdiv.ll

4 years agoAMDGPU: Set more mov flags on V_ACCVGPR_{READ|WRITE}_B32
Matt Arsenault [Wed, 1 Jul 2020 20:34:51 +0000 (16:34 -0400)]
AMDGPU: Set more mov flags on V_ACCVGPR_{READ|WRITE}_B32

This fixes extra copies when materializing constants in AGPRs. This
made it a lot harder to trigger the spilling in spill-agpr.ll

4 years agoRegAllocGreedy: Use TargetInstrInfo already in the class
Matt Arsenault [Wed, 1 Jul 2020 22:13:51 +0000 (18:13 -0400)]
RegAllocGreedy: Use TargetInstrInfo already in the class

4 years agoAMDGPU: Fix missing tracksRegLiveness in tests
Matt Arsenault [Wed, 1 Jul 2020 18:46:07 +0000 (14:46 -0400)]
AMDGPU: Fix missing tracksRegLiveness in tests

I have no idea why this is considered optional, or why it's not the
default. Also add uses of the copied registers for more useful
liveness testing.

4 years ago[AMDGPU] Limit promote alloca to vector with VGPR budget
Stanislav Mekhanoshin [Wed, 1 Jul 2020 19:08:22 +0000 (12:08 -0700)]
[AMDGPU] Limit promote alloca to vector with VGPR budget

Allow only up to 1/4 of available VGPRs for the vectorization
of any given alloca.

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

4 years agoRevert "[flang][openmp] Use common Directive and Clause enum from llvm/Frontend"
clementval [Wed, 1 Jul 2020 22:49:07 +0000 (18:49 -0400)]
Revert "[flang][openmp] Use common Directive and Clause enum from llvm/Frontend"

This reverts commit 7f1e7767952233d1b6af1feef1371d127de5fa50.

4 years ago[NFC][ScalarEvolution] Add udiv-disguised-as-sdiv test
Roman Lebedev [Mon, 29 Jun 2020 19:15:28 +0000 (22:15 +0300)]
[NFC][ScalarEvolution] Add udiv-disguised-as-sdiv test

Much like 25521150d7b577f6f1b402826f2afbb0ec5fb59b,
but with division instead of remainder.

See https://reviews.llvm.org/D82721

4 years agoRevert "[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment."
Craig Topper [Wed, 1 Jul 2020 22:20:53 +0000 (15:20 -0700)]
Revert "[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment."

Looks like lld tests need updates too

This reverts commit 3367e9dac56024147bbd916c40bfe6a4ee61079b.

4 years ago[RISCV][NFC] Pre-commit tests for D82660
Ben Shi [Wed, 1 Jul 2020 21:35:46 +0000 (22:35 +0100)]
[RISCV][NFC] Pre-commit tests for D82660

4 years ago[lldb/API] Add missing LLDB_RECORD_RESULT
Jonas Devlieghere [Wed, 1 Jul 2020 21:41:04 +0000 (14:41 -0700)]
[lldb/API] Add missing LLDB_RECORD_RESULT

4 years ago[InstSimplify] Move assume icmp test (NFC)
Nikita Popov [Wed, 1 Jul 2020 21:35:06 +0000 (23:35 +0200)]
[InstSimplify] Move assume icmp test (NFC)

Move this test from InstCombine into InstSimplify.

4 years ago[compiler-rt][Android] Use correct builtins library name for tests
Ryan Prichard [Wed, 1 Jul 2020 21:30:25 +0000 (14:30 -0700)]
[compiler-rt][Android] Use correct builtins library name for tests

The builtins library name is special on Android:

 * There is an "-android" suffix.

 * For the compiler-rt i386 architecture, Android targets i686 (in the
   triple and in the builtins library filename)

With this change, check-builtins works with Android.

Reviewed By: compnerd

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

4 years ago[flang] Implement cross-set EQUIVALENCE impossibility checking
peter klausler [Wed, 1 Jul 2020 18:45:38 +0000 (11:45 -0700)]
[flang] Implement cross-set EQUIVALENCE impossibility checking

Implement cross-set EQUIVALENCE impossibility checking; fixes
an infinite loop on an erroneous test.  Also fix substring
reference offset calculations in EQUIVALENCE discovered to
be incorrect during testing.

Reviewed By: tskeith

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

4 years ago[CallGraph] Add support for callback call sites
Sergey Dmitriev [Mon, 29 Jun 2020 23:11:16 +0000 (16:11 -0700)]
[CallGraph] Add support for callback call sites

Summary:
This patch changes call graph analysis to recognize callback call sites
and add an artificial 'reference' call record from the broker function
caller to the callback function in the call graph. A presence of such
reference enforces bottom-up traversal order for callback functions in
CG SCC pass manager because callback function logically becomes a callee
of the broker function caller.

Reviewers: jdoerfert, hfinkel, sstefan1, baziotis

Reviewed By: jdoerfert

Subscribers: hiraditya, kuter, sstefan1, llvm-commits

Tags: #llvm

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

4 years agoTest commit
Anatoly Trosinenko [Wed, 1 Jul 2020 20:42:50 +0000 (23:42 +0300)]
Test commit

Test the commit access to LLVM repository.

4 years ago[libTooling] Fix `maybeExtendRange` to support `CharRange`s.
Gabriel Matute [Wed, 1 Jul 2020 20:40:48 +0000 (20:40 +0000)]
[libTooling] Fix `maybeExtendRange` to support `CharRange`s.

Currently, `maybeExtendRange` takes a `CharSourceRange`, but only works
correctly for the `TokenRange` case. This change adds proper support for the
`CharRange` case.

Reviewed By: gribozavr2

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

4 years ago[ELF] Don't resolve a relocation in .debug_line referencing an ICF folded symbol...
Fangrui Song [Wed, 1 Jul 2020 20:37:20 +0000 (13:37 -0700)]
[ELF] Don't resolve a relocation in .debug_line referencing an ICF folded symbol to the tombstone value

After D81784, we resolve a relocation in .debug_* referencing an ICF folded
section symbol to a tombstone value.

Doing this for .debug_line has a problem (https://reviews.llvm.org/D81784#2116925 ):
.debug_line may describe folded lines as having addresses UINT64_MAX or
some wraparound small addresses.

```
int foo(int x) {
  return x; // line 2
}

int bar(int x) {
  return x; // line 6
}
```

```
Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x00000000002016c0      1      0      1   0             0  is_stmt
0x00000000002016c7      2      9      1   0             0  is_stmt
prologue_end
0x00000000002016ca      2      2      1   0             0
0x00000000002016cc      2      2      1   0             0  end_sequence
// UINT64_MAX and wraparound small addresses
0xffffffffffffffff      5      0      1   0             0  is_stmt
0x0000000000000006      6      9      1   0             0  is_stmt
prologue_end
0x0000000000000009      6      2      1   0             0
0x000000000000000b      6      2      1   0             0  end_sequence
0x00000000002016d0      9      0      1   0             0  is_stmt
0x00000000002016df     10      6      1   0             0  is_stmt prologue_end
0x00000000002016e6     11     11      1   0             0  is_stmt
...
```

These entries can confuse debuggers:

gdb before 2020-07-01 (binutils-gdb a8caed5d7faa639a1e6769eba551d15d8ddd9510 "Recognize -1 as a tombstone value in .debug_line")
(can't continue due to a breakpoint in an invalid region of memory):
```
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x6
```
lldb (breakpoint has no effect):
```
(lldb) b 6
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
```

This patch special cases .debug_line to not use the tombstone value,
restoring the previous behavior: .debug_line will have entries with the
same addresses (ICF) but different line numbers. A breakpoint on line 2
or 6 will trigger on both functions.

Reviewed By: dblaikie, jhenderson

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

4 years ago[AMDGPU] Update DWARF proposal
Tony [Wed, 1 Jul 2020 20:21:58 +0000 (20:21 +0000)]
[AMDGPU] Update DWARF proposal

- Add reference to implicit conversion description.

4 years ago[flang] Add the Runtime.h to prepare for more code being upstreamed.
Eric Schweitz [Wed, 1 Jul 2020 19:34:55 +0000 (12:34 -0700)]
[flang] Add the Runtime.h to prepare for more code being upstreamed.

This is the header file for lowering Fortran statements that depend on
the Fortran runtime support library. The implementation of the lowering
of these constructs will follow in a subsequent diff.

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

4 years ago[flang][openmp] Use common Directive and Clause enum from llvm/Frontend
Valentin Clement [Wed, 1 Jul 2020 19:58:14 +0000 (15:58 -0400)]
[flang][openmp] Use common Directive and Clause enum from llvm/Frontend

Summary:
This patch is removing the custom enumeration for OpenMP Directives and Clauses and replace them
with the newly tablegen generated one from llvm/Frontend. This is a first patch and some will follow to share the same
infrastructure where possible. The next patch should use the clauses allowance defined in the tablegen file.

Reviewers: jdoerfert, DavidTruby, sscalpone, kiranchandramohan, ichoyjx

Reviewed By: DavidTruby, ichoyjx

Subscribers: ichoyjx, mgorny, yaxunl, guansong, jfb, sstefan1, aaron.ballman, llvm-commits

Tags: #llvm, #flang

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

4 years ago[clang-tidy] Allows the prevailing include header guard in Flang to be recognized...
Eric Schweitz [Mon, 29 Jun 2020 21:15:59 +0000 (14:15 -0700)]
[clang-tidy] Allows the prevailing include header guard in Flang to be recognized rather than flagged as a violation in phabricator.

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

4 years ago[X86] Speculatively apply the same fix from 361853c96f46848d2ad0739dfa7613e62e7fb530...
Craig Topper [Wed, 1 Jul 2020 18:56:56 +0000 (11:56 -0700)]
[X86] Speculatively apply the same fix from 361853c96f46848d2ad0739dfa7613e62e7fb530 to PromoteIntOp_MGATHER.

The UpdateNodeOperands here is also subject to CSE.

4 years ago[IR] Add classof methods to ConstantExpr subclasses.
Eli Friedman [Wed, 1 Jul 2020 18:54:18 +0000 (11:54 -0700)]
[IR] Add classof methods to ConstantExpr subclasses.

I didn't notice these were missing when I wrote 1544019.

4 years ago[LegalizeTypes] Properly handle the case when UpdateNodeOperands in PromoteIntOp_MLOA...
Craig Topper [Wed, 1 Jul 2020 18:40:07 +0000 (11:40 -0700)]
[LegalizeTypes] Properly handle the case when UpdateNodeOperands in PromoteIntOp_MLOAD triggers CSE instead of updating the node in place.

The caller can't handle the node having multiple results like a
masked load does. So we need to detect the case and do our own
result replacement.

Fixes PR46532.

4 years ago[LVI][CVP] Handle (x | y) < C style conditions
Nikita Popov [Sun, 28 Jun 2020 12:47:29 +0000 (14:47 +0200)]
[LVI][CVP] Handle (x | y) < C style conditions

InstCombine may convert conditions like (x < C) && (y < C) into
(x | y) < C (for some C). This patch teaches LVI to recognize that
in this case, it can infer either x < C or y < C along the edge.

This fixes the issue reported at
https://github.com/rust-lang/rust/issues/73827.

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

4 years ago[Sanitizers] Disable sysmsg interceptors on Android
Gui Andrade [Wed, 1 Jul 2020 18:27:49 +0000 (18:27 +0000)]
[Sanitizers] Disable sysmsg interceptors on Android

4 years ago[Coroutines] Fix test breakage in D82928
Xun Li [Wed, 1 Jul 2020 18:08:26 +0000 (11:08 -0700)]
[Coroutines] Fix test breakage in D82928

Summary: The test file in D82928 generated temp files within the test directory, causing test failures. Fix it.

Reviewers: modocache, fhahn

Reviewed By: modocache

Subscribers: cfe-commits

Tags: #clang

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

4 years agodebugserver: Return a nullptr in GetPlatformString()
Adrian Prantl [Wed, 1 Jul 2020 18:03:10 +0000 (11:03 -0700)]
debugserver: Return a nullptr in GetPlatformString()

This un-breaks the testsuite after https://reviews.llvm.org/D82616

4 years agoRevert "Revert "Improve the detection of iOS/tvOS/watchOS simulator binaries in""
Adrian Prantl [Wed, 1 Jul 2020 18:06:15 +0000 (11:06 -0700)]
Revert "Revert "Improve the detection of iOS/tvOS/watchOS simulator binaries in""

This reverts commit 98c3a38a1967ece4e70891aa188c51e29ca0f8d3.

4 years ago[CodeGen] Add public function to emit C++ destructor call.
zoecarver [Wed, 1 Jul 2020 17:57:45 +0000 (10:57 -0700)]
[CodeGen] Add public function to emit C++ destructor call.

Adds `CodeGen::getCXXDestructorImplicitParam`, to retrieve a C++ destructor's implicit parameter (after the "this" pointer) based on the ABI in the given CodeGenModule.

This will allow other frontends (Swift, for example) to easily emit calls to object destructors with correct ABI semantics and calling convetions.

This is needed for Swift C++ interop. Here's the corresponding Swift change: https://github.com/apple/swift/pull/32291

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

4 years agoAMDGPU: Convert AGPR copy test to generated checks
Matt Arsenault [Wed, 1 Jul 2020 17:42:13 +0000 (13:42 -0400)]
AMDGPU: Convert AGPR copy test to generated checks

4 years agoAMDGPU: Support commuting register and global operand
Matt Arsenault [Wed, 1 Jul 2020 14:55:37 +0000 (10:55 -0400)]
AMDGPU: Support commuting register and global operand

4 years agoAMDGPU: Fix handling of target flags when commuting instruction
Matt Arsenault [Wed, 1 Jul 2020 13:11:53 +0000 (09:11 -0400)]
AMDGPU: Fix handling of target flags when commuting instruction

If the original register operand had a subregister, it wasn't getting
cleared. This resulted in reinterpreted the subreg index as
unrecognized target flags, which produced unparseable MIR.

4 years agoAMDGPU: Clear subreg when folding immediate copies
Matt Arsenault [Wed, 1 Jul 2020 02:27:34 +0000 (22:27 -0400)]
AMDGPU: Clear subreg when folding immediate copies

This was getting reinterpreted as operand target flags, and appearing
as as <unknown target flag>, resulting in unparseable MIR.

4 years ago[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment.
Craig Topper [Wed, 1 Jul 2020 17:56:31 +0000 (10:56 -0700)]
[X86] Enable multibyte NOPs in 64-bit mode for padding/alignment.

The default CPU used by llvm-mc doesn't have the NOPL feature, but
if we know we're compiling in 64-bit mode we should be able to
use nopl.

4 years ago[CodeGen] Fix warnings in DAGCombiner::visitSCALAR_TO_VECTOR
David Sherwood [Tue, 30 Jun 2020 06:23:52 +0000 (07:23 +0100)]
[CodeGen] Fix warnings in DAGCombiner::visitSCALAR_TO_VECTOR

In visitSCALAR_TO_VECTOR we try to optimise cases such as:

  scalar_to_vector (extract_vector_elt %x)

into vector shuffles of %x. However, it led to numerous warnings
when %x is a scalable vector type, so for now I've changed the
code to only perform the combination on fixed length vectors.
Although we probably could change the code to work with scalable
vectors in certain cases, without a proper profit analysis it
doesn't seem worth it at the moment.

This change fixes up one of the warnings in:

  llvm/test/CodeGen/AArch64/sve-merging-stores.ll

I've also added a simplified version of the same test to:

  llvm/test/CodeGen/AArch64/sve-fp.ll

which already has checks for no warnings.

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

4 years agoRevert "Improve the detection of iOS/tvOS/watchOS simulator binaries in"
Jonas Devlieghere [Wed, 1 Jul 2020 17:42:49 +0000 (10:42 -0700)]
Revert "Improve the detection of iOS/tvOS/watchOS simulator binaries in"

This reverts commit 0da0437b2afbd8ebef6b11f114cca33b118e7639 to unbreak
the following tests:

lldb-api.tools/lldb-server.TestAppleSimulatorOSType.py
lldb-api.tools/lldb-server.TestGdbRemoteAttach.py
lldb-api.tools/lldb-server.TestGdbRemoteProcessInfo.py
lldb-api.tools/lldb-server.TestGdbRemoteRegisterState.py
lldb-api.tools/lldb-server.TestGdbRemoteThreadsInStopReply.py
lldb-api.tools/lldb-server.TestLldbGdbServer.py

4 years agosanitizer_common_interceptors: Fix lint errors
Gui Andrade [Wed, 1 Jul 2020 17:33:01 +0000 (17:33 +0000)]
sanitizer_common_interceptors: Fix lint errors

4 years ago[AArch64] Remove unnecessary CostKindCheck (NFC).
Florian Hahn [Wed, 1 Jul 2020 17:20:01 +0000 (18:20 +0100)]
[AArch64] Remove unnecessary CostKindCheck (NFC).

Simplification suggested post-commit.

4 years ago[Coroutines] Fix code coverage for coroutine
Xun Li [Wed, 1 Jul 2020 00:07:45 +0000 (17:07 -0700)]
[Coroutines] Fix code coverage for coroutine

Summary:
Previously, source-based coverage analysis does not work properly for coroutine.
This patch adds processing of coroutine body and co_return in the coverage analysis, so that we can handle them properly.
For coroutine body, we should only look at the actual function body and ignore the compiler-generated things; for co_return, we need to terminate the region similar to return statement.
Added a test, and confirms that it now works properly. (without this patch, the statement after the if statement will be treated wrongly)

Reviewers: lewissbaker, modocache, junparser

Reviewed By: modocache

Subscribers: cfe-commits

Tags: #clang

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

4 years agoTest commit
Zixu Wang [Wed, 1 Jul 2020 16:58:09 +0000 (09:58 -0700)]
Test commit

Testing commit access to llvm-project.

4 years ago[BPF] Fix a BTF gen bug related to a pointer struct member
Yonghong Song [Wed, 1 Jul 2020 14:51:55 +0000 (07:51 -0700)]
[BPF] Fix a BTF gen bug related to a pointer struct member

Currently, BTF generation stops at pointer struct members
if the pointee type is a struct. This is to avoid bloating
generated BTF size. The following is the process to
correctly record types for these pointee struct types.
  - During type traversal stage, when a struct member, which
    is a pointer to another struct, is encountered,
    the pointee struct type, keyed with its name, is
    remembered in a Fixup map.
  - Later, when all type traversal is done, the Fixup map
    is scanned, based on struct name matching, to either
    resolve as pointing to a real already generated type
    or as a forward declaration.

Andrii discovered a bug if the struct member pointee struct
is anonymous. In this case, a struct with empty name is
recorded in Fixup map, and later it happens another anonymous
struct with empty name is defined in BTF. So wrong type
resolution happens.

To fix the problem, if the struct member pointee struct
is anonymous, pointee struct type will be generated in
stead of being put in Fixup map.

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

4 years agoChange the INLINEASM_BR MachineInstr to be a non-terminating instruction.
James Y Knight [Sat, 16 May 2020 03:43:30 +0000 (23:43 -0400)]
Change the INLINEASM_BR MachineInstr to be a non-terminating instruction.

Before this instruction supported output values, it fit fairly
naturally as a terminator. However, being a terminator while also
supporting outputs causes some trouble, as the physreg->vreg COPY
operations cannot be in the same block.

Modeling it as a non-terminator allows it to be handled the same way
as invoke is handled already.

Most of the changes here were created by auditing all the existing
users of MachineBasicBlock::isEHPad() and
MachineBasicBlock::hasEHPadSuccessor(), and adding calls to
isInlineAsmBrIndirectTarget or mayHaveInlineAsmBr, as appropriate.

Reviewed By: nickdesaulniers, void

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

4 years ago[NFC] Clean up uses of MachineModuleInfoWrapperPass
Yuanfang Chen [Wed, 1 Jul 2020 02:10:01 +0000 (19:10 -0700)]
[NFC] Clean up uses of MachineModuleInfoWrapperPass

4 years ago[CVP] Use different number in test (NFC)
Nikita Popov [Wed, 1 Jul 2020 16:35:25 +0000 (18:35 +0200)]
[CVP] Use different number in test (NFC)

To make it clear that this is not intended to be specific to
mask / bit tests.

4 years ago[ms] [llvm-ml] Use default RIP-relative addressing for x64 MASM.
Eric Astor [Wed, 1 Jul 2020 16:39:28 +0000 (12:39 -0400)]
[ms] [llvm-ml] Use default RIP-relative addressing for x64 MASM.

Summary:
When parsing 64-bit MASM, treat memory operands with unspecified base register as RIP-based.

Documented in several places, including https://software.intel.com/en-us/articles/introduction-to-x64-assembly: "Unfortunately, MASM does not allow this form of opcode, but other assemblers like FASM and YASM do. Instead, MASM embeds RIP-relative addressing implicitly."

Reviewed By: thakis

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

4 years ago[Alignment][NFC] Use Align for BPFAbstractMemberAccess::RecordAlignment
Guillaume Chatelet [Wed, 1 Jul 2020 16:23:52 +0000 (16:23 +0000)]
[Alignment][NFC] Use Align for BPFAbstractMemberAccess::RecordAlignment

This patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

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

4 years ago[InstCombine] Don't let an alignment assume prevent new/delete removals.
Hiroshi Yamauchi [Mon, 15 Jun 2020 16:37:07 +0000 (09:37 -0700)]
[InstCombine] Don't let an alignment assume prevent new/delete removals.

Remove allocations with alignment assume.

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

4 years ago[Outliner] Set nounwind for outlined functions
David Green [Wed, 1 Jul 2020 14:28:44 +0000 (15:28 +0100)]
[Outliner] Set nounwind for outlined functions

This prevents the outlined functions from pulling in a lot of unnecessary code
in our downstream libraries/linker. Which stops outlining making codesize
worse in c++ code with no-exceptions.

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

4 years ago[DWARFYAML][debug_abbrev] Emit 0 byte for terminating abbreviations.
Xing GUO [Wed, 1 Jul 2020 15:17:18 +0000 (23:17 +0800)]
[DWARFYAML][debug_abbrev] Emit 0 byte for terminating abbreviations.

The abbreviations for a given compilation unit end with an entry
consisting of a 0 byte for the abbreviation code.

Reviewed By: jhenderson

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

4 years agoMake dyn_cast results explicitly auto* instead of just auto.
Simon Pilgrim [Wed, 1 Jul 2020 14:46:43 +0000 (15:46 +0100)]
Make dyn_cast results explicitly auto* instead of just auto.

Noticed by clang-tidy llvm-qualified-auto warning.

4 years agoPass DebugLoc::appendInlinedAt DebugLoc arg by const reference not value.
Simon Pilgrim [Wed, 1 Jul 2020 13:04:01 +0000 (14:04 +0100)]
Pass DebugLoc::appendInlinedAt DebugLoc arg by const reference not value.

Noticed by clang-tidy performance-unnecessary-value-param warning.

4 years ago[RISCV] Add mcountinhibit CSR
Pengxuan Zheng [Tue, 30 Jun 2020 21:32:37 +0000 (14:32 -0700)]
[RISCV] Add mcountinhibit CSR

Summary:
The mcountinhibit CSR is defined in the ratified 1.11 version of the privileged
spec.

Reviewers: apazos, asb, lenary, luismarques

Reviewed By: asb

Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, sameer.abuasal, evandro, llvm-commits

Tags: #llvm

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

4 years ago[RISCV] Temporarily move riscv-expand-pseudo pass to PreEmitPass2
Luís Marques [Wed, 1 Jul 2020 15:24:15 +0000 (16:24 +0100)]
[RISCV] Temporarily move riscv-expand-pseudo pass to PreEmitPass2

The pass to split atomic and non-atomic RISC-V pseudo-instructions was itself
split into two passes in D79635 / commit rG2cb0644f90b7, with the splitting of
non-atomic instructions being moved to the PreSched2 phase. A comment was
added to D79635 detailing a case where this caused problems, so this commit
moves the non-atomic split pass back to the PreEmitPass2 phase. This allows
the bulk of the changes from D79635 to remain committed, while addressing the
the reported problem (the pass split is now almost NFC). Once the root problem
is fixed we can move the (non-atomic) instruction splitting pass back to
earlier in the pipeline.

4 years ago[lldb] Replace StringConvert with llvm::to_integer when parsing integer values in...
Raphael Isemann [Wed, 1 Jul 2020 15:00:12 +0000 (17:00 +0200)]
[lldb] Replace StringConvert with llvm::to_integer when parsing integer values in CommandObjects

Summary:

This replaces the current use of LLDB's own `StringConvert` with LLVM's
`to_integer` which has a less error-prone API and doesn't use special 'error
values' to designate parsing problems.

Where needed I also added missing error handling code that prints a parsing
error instead of continuing with the error value returned from `StringConvert`
(which either gave a cryptic error message or just took the error value
performed an incorrect action with it. For example, `frame recognizer delete -1`
just deleted the frame recognizer at index 0).

Reviewers: #lldb, labath

Reviewed By: labath

Subscribers: labath, abidh, JDevlieghere

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

4 years agoRevert "[RISCV] Temporarily move riscv-expand-pseudo pass to PreEmitPass2"
Luís Marques [Wed, 1 Jul 2020 15:01:40 +0000 (16:01 +0100)]
Revert "[RISCV] Temporarily move riscv-expand-pseudo pass to PreEmitPass2"

This reverts commit 05a20a9e9aba301a828bcbd72b0ed724755752d1.

4 years ago[lldb] Attempt to fix TestLimitDebugInfo on windows
Pavel Labath [Wed, 1 Jul 2020 14:55:34 +0000 (16:55 +0200)]
[lldb] Attempt to fix TestLimitDebugInfo on windows

The test fails due to link errors. I believe this change should fix
that.