]> granicus.if.org Git - llvm/log
llvm
5 years agoAppend an executable suffix to the toolchain tool paths on Windows platform.
Galina Kistanova [Wed, 7 Aug 2019 03:19:40 +0000 (03:19 +0000)]
Append an executable suffix to the toolchain tool paths on Windows platform.

Append a default CMake suffix (CMAKE_EXECUTABLE_SUFFIX) for the build host to the toolchain tool path when adding a LLVM external project.
The tool binary files should contain .exe suffix to run them properly on Windows platform when building the projects.

Patch by Vlad Vereschaka.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368121 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFixes failing test cases on Windows for rL368119
Alex Brachet [Wed, 7 Aug 2019 03:18:23 +0000 (03:18 +0000)]
Fixes failing test cases on Windows for rL368119

Windows test cases were failing because the executable is called yaml2obj.exe
not just yaml2obj. I removed FileCheck patterns including yaml2obj so they
start matching at the error message not the program name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368120 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Wed, 7 Aug 2019 02:44:49 +0000 (02:44 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: gribozavr, mgrang, seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368119 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdded Tool as Dependency to tests & fixed warnings
Diego Trevino Ferrer [Wed, 7 Aug 2019 01:51:56 +0000 (01:51 +0000)]
Added Tool as Dependency to tests & fixed warnings

Summary: Fixes http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/14002 and http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/35392/steps/build_Lld/logs/stdio

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368117 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Bugpoint redesign] Added Pass to Remove Global Variables
Diego Trevino Ferrer [Wed, 7 Aug 2019 00:42:50 +0000 (00:42 +0000)]
[Bugpoint redesign] Added Pass to Remove Global Variables

Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368115 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTLI: darwin does not support _bcmp
Alex Lorenz [Wed, 7 Aug 2019 00:03:37 +0000 (00:03 +0000)]
TLI: darwin does not support _bcmp

Not all Darwin targets support _bcmp in all circumstances.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368113 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdded Delta IR Reduction Tool
Diego Trevino Ferrer [Wed, 7 Aug 2019 00:00:52 +0000 (00:00 +0000)]
Added Delta IR Reduction Tool

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368071

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368112 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRegenerate mmx-arith.ll.
Mitch Phillips [Tue, 6 Aug 2019 23:39:07 +0000 (23:39 +0000)]
Regenerate mmx-arith.ll.

This test golden file has become out of date since the rollback of
rL368081. Update the test to have the correct values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368110 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[X86] Add more extract subvector cost model tests for smaller element sizes...
Mitch Phillips [Tue, 6 Aug 2019 23:38:14 +0000 (23:38 +0000)]
Revert "[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors."

This reverts commit fc33e33776b7a7ce22e539f0ec2e3bfdb09ad361.

This commit depends on the rolled back commit rL367901, and thus needs
to be rolled back.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368109 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[X86] Enable -x86-experimental-vector-widening-legalization by default."
Mitch Phillips [Tue, 6 Aug 2019 23:00:43 +0000 (23:00 +0000)]
Revert "[X86] Enable -x86-experimental-vector-widening-legalization by default."

This reverts commit 3de33245d2c992c9e0af60372043540b60f3a810.

This commit broke the MSan buildbots. See
https://reviews.llvm.org/rL367901 for more information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368107 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag...
Mitch Phillips [Tue, 6 Aug 2019 23:00:30 +0000 (23:00 +0000)]
Revert "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/"

This reverts commit 3f572c7b8405f36993ec8a226dcddd57283a7c1e.

The MSan sanitizer buildbot was broken by rL367901. This commit
(rL368079) depends on the broken commit that need to be reverted, and
thus itself is being reverted.

See https://reviews.llvm.org/rL367901 for more information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368106 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoUse parenthses to silence warning.
Bill Wendling [Tue, 6 Aug 2019 22:47:47 +0000 (22:47 +0000)]
Use parenthses to silence warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368105 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agohwasan: Instrument globals.
Peter Collingbourne [Tue, 6 Aug 2019 22:07:29 +0000 (22:07 +0000)]
hwasan: Instrument globals.

Globals are instrumented by adding a pointer tag to their symbol values
and emitting metadata into a special section that allows the runtime to tag
their memory when the library is loaded.

Due to order of initialization issues explained in more detail in the comments,
shadow initialization cannot happen during regular global initialization.
Instead, the location of the global section is marked using an ELF note,
and we require libc support for calling a function provided by the HWASAN
runtime when libraries are loaded and unloaded.

Based on ideas discussed with @evgeny777 in D56672.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368102 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Lower ASan constructor priority on Emscripten
Guanzhong Chen [Tue, 6 Aug 2019 21:52:58 +0000 (21:52 +0000)]
[WebAssembly] Lower ASan constructor priority on Emscripten

Summary:
This change gives Emscripten the ability to use more than one constructor
priorities that runs before ASan. By convention, constructor priorites 0-100
are reserved for use by the system. ASan on Emscripten now uses priority 50,
leaving plenty of room for use by Emscripten before and after ASan.

This change is done in response to:
https://github.com/emscripten-core/emscripten/pull/9076#discussion_r310323723

Reviewers: kripken, tlively, aheejin

Reviewed By: tlively

Subscribers: cfe-commits, dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm, #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368101 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368065.
Peter Collingbourne [Tue, 6 Aug 2019 21:48:06 +0000 (21:48 +0000)]
gn build: Merge r368065.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368099 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368052.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:55 +0000 (21:47 +0000)]
gn build: Merge r368052.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368098 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368054.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:46 +0000 (21:47 +0000)]
gn build: Merge r368054.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368097 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368086.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:37 +0000 (21:47 +0000)]
gn build: Merge r368086.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368096 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368070.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:27 +0000 (21:47 +0000)]
gn build: Merge r368070.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368095 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoIR: Disable verifier check for GlobalValues with private linkage named after a comdat...
Peter Collingbourne [Tue, 6 Aug 2019 21:47:18 +0000 (21:47 +0000)]
IR: Disable verifier check for GlobalValues with private linkage named after a comdat for non-COFF.

This check is only meaningful for COFF and it is perfectly valid to create
such a GlobalValue in ELF.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368094 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.
Craig Topper [Tue, 6 Aug 2019 21:43:15 +0000 (21:43 +0000)]
[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.

If we're after type legalization we should only be trying to turn
v2i64 into v2i32. So bitcast to v4i32, shuffle the even elements
together. Then use X86ISD::CVTSI2P. The alternative is to leave
the v2i64 type alone and let it scalarized. Hopefully keeping
it packed is better.

Fixes PR42905.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368091 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert [InstCombine] Shift amount reassociation: shl-trunc-shl pattern
Reid Kleckner [Tue, 6 Aug 2019 20:32:07 +0000 (20:32 +0000)]
Revert [InstCombine] Shift amount reassociation: shl-trunc-shl pattern

This reverts r368059 (git commit 0f957109761913c563922f1afd4ceb29ef21bbd0)

This caused Clang to assert while self-hosting and compiling
SystemZInstrInfo.cpp. Reduction is running.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368084 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Add more extract subvector cost model tests for smaller element sizes and small...
Craig Topper [Tue, 6 Aug 2019 20:12:41 +0000 (20:12 +0000)]
[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors.

With the switch to widening legalization, we need to a better
job of costing extractions of less than 128-bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368081 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove tests for -x86-experimental-vector-widening-legalization from test/Analy...
Craig Topper [Tue, 6 Aug 2019 20:12:34 +0000 (20:12 +0000)]
[X86] Remove tests for -x86-experimental-vector-widening-legalization from test/Analysis/CostModel/X86/

This flag is now the default behavior so we don't need separate
tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368080 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from...
Craig Topper [Tue, 6 Aug 2019 20:12:20 +0000 (20:12 +0000)]
[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/

This flag is now the default behavior so we no longer need to
set it in tests.

Some redundant tests have been removed after verifying we have
an equivalent test that didn't use the flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368079 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor][modulemap] Revert r368064 but fix the build
Kristina Brooks [Tue, 6 Aug 2019 19:53:19 +0000 (19:53 +0000)]
[Attributor][modulemap] Revert r368064 but fix the build

Commit r368064 was necessary after r367953 (D65712) broke the module
build. That happened, apparently, because the template class IRAttribute
defined in the header had a virtual method defined in the corresponding
source file (IRAttribute::manifest). To unbreak the situation this patch
introduces a helper function IRAttributeManifest::manifestAttrs which
is used to implement IRAttribute::manifest in the header. The deifnition
of the helper function is still in the source file.

Patch by jdoerfert (Johannes Doerfert)

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368076 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd order-dependencies to object libraries
Chris Bieneman [Tue, 6 Aug 2019 19:41:23 +0000 (19:41 +0000)]
Add order-dependencies to object libraries

Summary: If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic.

Reviewers: compnerd, hintonda, smeenai

Reviewed By: smeenai

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368074 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "Added Delta IR Reduction Tool"
Dmitri Gribenko [Tue, 6 Aug 2019 19:40:37 +0000 (19:40 +0000)]
Revert "Added Delta IR Reduction Tool"

This reverts commit r368071, it broke buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368073 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdded Delta IR Reduction Tool
Diego Trevino Ferrer [Tue, 6 Aug 2019 18:59:11 +0000 (18:59 +0000)]
Added Delta IR Reduction Tool

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368071 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GISel]: Fix trivial build breakage
Aditya Nandakumar [Tue, 6 Aug 2019 17:53:04 +0000 (17:53 +0000)]
[GISel]: Fix trivial build breakage

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368067 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GISel]: Add GISelKnownBits analysis
Aditya Nandakumar [Tue, 6 Aug 2019 17:18:29 +0000 (17:18 +0000)]
[GISel]: Add GISelKnownBits analysis

https://reviews.llvm.org/D65698

This adds a KnownBits analysis pass for GISel. This was done as a
pass (compared to static functions) so that we can add other features
such as caching queries(within a pass and across passes) in the future.
This patch only adds the basic pass boiler plate, and implements a lazy
non caching knownbits implementation (ported from SelectionDAG). I've
also hooked up the AArch64PreLegalizerCombiner pass to use this - there
should be no compile time regression as the analysis is lazy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368065 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[modulemap] exclude a non-module friendly header
Kristina Brooks [Tue, 6 Aug 2019 17:16:56 +0000 (17:16 +0000)]
[modulemap] exclude a non-module friendly header

Exclude Attributor.h from LLVM_Transforms to avoid
a link failure when building modular LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368064 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand...
Daniel Sanders [Tue, 6 Aug 2019 17:16:27 +0000 (17:16 +0000)]
[globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand (MO.isImm() == true)

Summary:
This is tested by D61289 but has been pulled into a separate patch at
a reviewers request.

Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, arsenm, rovka

Reviewed By: arsenm

Subscribers: javed.absar, hiraditya, wdng, kristof.beyls, Petar.Avramovic, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368063 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Move CPU features for Barcelona/K10 out of line
Roman Lebedev [Tue, 6 Aug 2019 17:04:02 +0000 (17:04 +0000)]
[X86] Move CPU features for Barcelona/K10 out of line

Summary:
Cleans X86.td's Barcelona entry to be more like the others,
by moving the features out of the `Proc<>`, thus potentially
making it possible to inherit from them.
Split off from D63628

Reviewers: craig.topper, RKSimon

Reviewed By: craig.topper

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368061 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TableGen] FieldInit: improve assertion message
Roman Lebedev [Tue, 6 Aug 2019 17:03:50 +0000 (17:03 +0000)]
[TableGen] FieldInit: improve assertion message

Summary:
When fiddling with sched profiles, especially creating new ones, it's amazingly easy
to end up with malformed .td that crashes tablegen, without explanation of the bug.
This changes the most common assertion i have encountered to dump enough information
to be able to fix the .td

Split of from D63628

Reviewers: RKSimon, craig.topper, nhaehnle

Reviewed By: craig.topper

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368060 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] Shift amount reassociation: shl-trunc-shl pattern
Roman Lebedev [Tue, 6 Aug 2019 17:03:40 +0000 (17:03 +0000)]
[InstCombine] Shift amount reassociation: shl-trunc-shl pattern

Summary:
Currently `reassociateShiftAmtsOfTwoSameDirectionShifts()` only handles
two shifts one after another. If the shifts are `shl`, we still can
easily perform the fold, with no extra legality checks:
https://rise4fun.com/Alive/OQbM

If we have right-shift however, we won't be able to make it
any simpler than it already is.

After this the only thing missing here is constant-folding: (`NewShAmt >= bitwidth(X)`)
* If it's a logical shift, then constant-fold to `0` (not `undef`)
* If it's a `ashr`, then a splat of original signbit
https://rise4fun.com/Alive/E1K
https://rise4fun.com/Alive/i0V

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368059 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][EarlyCSE] Pre-commit unary FNeg tests.
Cameron McInally [Tue, 6 Aug 2019 16:41:30 +0000 (16:41 +0000)]
[NFC][EarlyCSE] Pre-commit unary FNeg tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368056 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-land D65760/r367944
Diego Caballero [Tue, 6 Aug 2019 16:24:17 +0000 (16:24 +0000)]
Re-land D65760/r367944

Fixed most vexing parse ambiguation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368055 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Path] Fix bug in make_absolute logic
Jonas Devlieghere [Tue, 6 Aug 2019 15:46:45 +0000 (15:46 +0000)]
[Path] Fix bug in make_absolute logic

This fixes a bug for making path with a //net style root absolute. I
discovered the bug while writing a test case for the VFS, which uses
these paths because they're both legal absolute paths on Windows and
Unix.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368053 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[CMake] Add mapping for IBM XL -qnoeh and -qnortti
Hubert Tong [Tue, 6 Aug 2019 15:08:13 +0000 (15:08 +0000)]
[CMake] Add mapping for IBM XL -qnoeh and -qnortti

Summary:
This patch maps in the `-qnoeh` and `-qnortti` options for building with
IBM XL compilers.

Reviewers: daltenty, xingxue, jasonliu

Reviewed By: daltenty

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368050 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64] NFC: Generalize emitFrameOffset to support more than byte offsets.
Sander de Smalen [Tue, 6 Aug 2019 15:06:31 +0000 (15:06 +0000)]
[AArch64] NFC: Generalize emitFrameOffset to support more than byte offsets.

Refactor emitFrameOffset to accept a StackOffset struct as its offset argument.
This method currently only supports byte offsets (MVT::i8) but will be extended
in a later patch to support scalable offsets (MVT::nxv1i8) as well.

Reviewers: thegameg, rovka, t.p.northover, efriedma, greened

Reviewed By: efriedma

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368049 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[XCOFF][MC] report_fatal_error before dereferencing NULL
Hubert Tong [Tue, 6 Aug 2019 15:05:20 +0000 (15:05 +0000)]
[XCOFF][MC] report_fatal_error before dereferencing NULL

This patch replaces a TODO comment with a call to `report_fatal_error`.
The path that reaches the added call to `report_fatal_error` manifestly
dereferences a null pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368048 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[test/Object] - Cleanup the Object\obj2yaml.test a bit.
George Rimar [Tue, 6 Aug 2019 14:34:39 +0000 (14:34 +0000)]
[test/Object] - Cleanup the Object\obj2yaml.test a bit.

This makes 2 changes:

1) Removes unwind-section.elf-x86-64 object and the corresponding test case,
because SHT_X86_64_UNWIND is already tested here:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/section-type.yaml

2) Removes/partially moves "No such file or directory" test, because we already have a similar test here:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/invalid_input_file.test

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368044 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for undemanded ops
Simon Pilgrim [Tue, 6 Aug 2019 14:30:42 +0000 (14:30 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for undemanded ops

If we demand no bits/elts from an Op, just return UNDEF

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368043 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default
Tim Renouf [Tue, 6 Aug 2019 14:30:19 +0000 (14:30 +0000)]
[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default

D62198 introduced an option to relax the checks for
hasOnlyUniformBranches. This commit turns the option on by default, for
better code generation in some cases in AMDGPU.

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

Change-Id: I9cbff002a1e74d3b7eb96b4192dc8129936d537d

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368042 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "Fixed failing test cases"
Dmitri Gribenko [Tue, 6 Aug 2019 13:50:28 +0000 (13:50 +0000)]
Revert "Fixed failing test cases"

This reverts commit r368030, which depends on r368021 that I reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368036 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"
Dmitri Gribenko [Tue, 6 Aug 2019 13:39:50 +0000 (13:39 +0000)]
Revert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"

This reverts commit r368021, it broke tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368035 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "gn build: Merge r368021"
Dmitri Gribenko [Tue, 6 Aug 2019 13:39:27 +0000 (13:39 +0000)]
Revert "gn build: Merge r368021"

This reverts commit r368025, which depends on r368021, which needs to be
reverted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368034 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.
Tim Northover [Tue, 6 Aug 2019 13:34:08 +0000 (13:34 +0000)]
AArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368031 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFixed failing test cases
Alex Brachet [Tue, 6 Aug 2019 13:29:55 +0000 (13:29 +0000)]
Fixed failing test cases

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368030 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] add tests for binop with FMF with select operands; NFC
Sanjay Patel [Tue, 6 Aug 2019 13:19:13 +0000 (13:19 +0000)]
[InstCombine] add tests for binop with FMF with select operands; NFC

Baseline coverage for D65658.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368028 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368024
Nico Weber [Tue, 6 Aug 2019 13:12:26 +0000 (13:12 +0000)]
gn build: Merge r368024

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368027 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.
Simon Pilgrim [Tue, 6 Aug 2019 13:10:42 +0000 (13:10 +0000)]
[X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.

This mainly helps to replace unused arguments with UNDEF in the case where they have multiple users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368026 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r368021
Nico Weber [Tue, 6 Aug 2019 13:08:54 +0000 (13:08 +0000)]
gn build: Merge r368021

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368025 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64] NFC: Add generic StackOffset to describe scalable offsets.
Sander de Smalen [Tue, 6 Aug 2019 13:06:40 +0000 (13:06 +0000)]
[AArch64] NFC: Add generic StackOffset to describe scalable offsets.

To support spilling/filling of scalable vectors we need a more generic
representation of a stack offset than simply 'int'.

For this we introduce the StackOffset struct, which comprises multiple
offsets sized by their respective MVTs. Byte-offsets will thus be a simple
tuple such as { offset, MVT::i8 }. Adding two byte-offsets will result in a
byte offset { offsetA + offsetB, MVT::i8 }. When two offsets have different
types, we can canonicalise them to use the same MVT, as long as their
runtime sizes are guaranteed to have the same size-ratio as they would have
at compile-time.

When we have both scalable- and fixed-size objects on the stack, we can
create an offset that is:

  ({ offset_fixed, MVT::i8 } + { offset_scalable, MVT::nxv1i8 })

The struct also contains a getForFrameOffset() method that is specific to
AArch64 and decomposes the frame-offset to be used directly in instructions
that operate on the stack or index into the stack.

Note: This patch adds StackOffset as an AArch64-only concept, but we would
like to make this a generic concept/struct that is supported by all
interfaces that take or return stack offsets (currently as 'int'). Since
that would be a bigger change that is currently pending on D32530 landing,
we thought it makes sense to first show/prove the concept in the AArch64
target before proposing to roll this out further.

Reviewers: thegameg, rovka, t.p.northover, efriedma, greened

Reviewed By: rovka, greened

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368024 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm/test/Object] Remove redundant test case. NFC
Simon Atanasyan [Tue, 6 Aug 2019 12:41:43 +0000 (12:41 +0000)]
[llvm/test/Object] Remove redundant test case. NFC

Remove redundant `yaml2obj-elf-file-headers-with-e_flags.yaml` test
case. The same functionality is checked by the `Mips/elf-flags.yaml`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368023 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity
Simon Pilgrim [Tue, 6 Aug 2019 12:41:29 +0000 (12:41 +0000)]
[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity

If we don't demand any non-undef shuffle elements then the assert will fail as all shuffle inputs would still be flagged as 'identity' safe.

Exposed by an incoming patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368022 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Tue, 6 Aug 2019 12:15:18 +0000 (12:15 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368021 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTry to unbreak buildbots after r368014
Igor Kudrin [Tue, 6 Aug 2019 11:12:13 +0000 (11:12 +0000)]
Try to unbreak buildbots after r368014

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368018 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][SSE] Enable min/max partial reduction
Simon Pilgrim [Tue, 6 Aug 2019 11:00:34 +0000 (11:00 +0000)]
[X86][SSE] Enable min/max partial reduction

As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368016 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][SSE] Add tests for min/max partial reduction
Simon Pilgrim [Tue, 6 Aug 2019 10:52:44 +0000 (10:52 +0000)]
[X86][SSE] Add tests for min/max partial reduction

As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368015 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSwitch LLVM to use 64-bit offsets (2/5)
Igor Kudrin [Tue, 6 Aug 2019 10:49:40 +0000 (10:49 +0000)]
Switch LLVM to use 64-bit offsets (2/5)

This updates all libraries and tools in LLVM Core to use 64-bit offsets
which directly or indirectly come to DataExtractor.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368014 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSupport 64-bit offsets in utility classes (1/5)
Igor Kudrin [Tue, 6 Aug 2019 10:47:20 +0000 (10:47 +0000)]
Support 64-bit offsets in utility classes (1/5)

Using 64-bit offsets is required to fully implement 64-bit DWARF.
As these classes are used in many different libraries they should
temporarily support both 32- and 64-bit offsets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368013 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Strict FP] Allow custom operation actions
Ulrich Weigand [Tue, 6 Aug 2019 10:43:13 +0000 (10:43 +0000)]
[Strict FP] Allow custom operation actions

This patch changes the DAG legalizer to respect the operation actions
set by the target for strict floating-point operations. (Currently, the
legalizer will usually fall back to mutate to the non-strict action
(which is assumed to be legal), and only skip mutation if the strict
operation is marked legal.)

With this patch, if whenever a strict operation is marked as Legal or
Custom, it is passed to the target as usual. Only if it is marked as
Expand will the legalizer attempt to mutate to the non-strict operation.
Note that this will now fail if the non-strict operation is itself
marked as Custom -- the target will have to provide a Custom definition
for the strict operation then as well.

Reviewed By: hfinkel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368012 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoChange two unnecessary uses of llvm::size(C) to C.size()
Fangrui Song [Tue, 6 Aug 2019 10:24:36 +0000 (10:24 +0000)]
Change two unnecessary uses of llvm::size(C) to C.size()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368011 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER
Cullen Rhodes [Tue, 6 Aug 2019 09:46:13 +0000 (09:46 +0000)]
[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER

Summary:
Before this patch MGATHER/MSCATTER is capable of representing all
common addressing modes, but only when illegal types are used.
This patch adds an IndexType property so more representations
are available when using legal types only.

Original modes:
 vector of bases
 base + vector of signed scaled offsets

New modes:
 base + vector of signed unscaled offsets
 base + vector of unsigned scaled offsets
 base + vector of unsigned unscaled offsets

The current behaviour of addressing modes for gather/scatter remains
unchanged.

Patch by Paul Walker.

Reviewed By: craig.topper

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368008 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[UpdateTestChecks] Fix an incorrect %s added in r368006
Fangrui Song [Tue, 6 Aug 2019 09:44:18 +0000 (09:44 +0000)]
[UpdateTestChecks] Fix an incorrect %s added in r368006

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368007 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[UpdateTestChecks] Apply some string concatenation cleanup
Fangrui Song [Tue, 6 Aug 2019 09:42:00 +0000 (09:42 +0000)]
[UpdateTestChecks] Apply some string concatenation cleanup

Some were what I suggested in D65610.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368006 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agotest-release.sh: Reorder sed commands for the binary comparison
Hans Wennborg [Tue, 6 Aug 2019 09:30:10 +0000 (09:30 +0000)]
test-release.sh: Reorder sed commands for the binary comparison

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368004 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAArch64: use xzr/wzr for constant 0 in GlobalISel.
Tim Northover [Tue, 6 Aug 2019 09:18:41 +0000 (09:18 +0000)]
AArch64: use xzr/wzr for constant 0 in GlobalISel.

COPYs from xzr and wzr can often be folded away entirely during register
allocation, unlike a movz.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368003 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM][Alignment] Introduce Alignment In Attributes
Guillaume Chatelet [Tue, 6 Aug 2019 09:16:33 +0000 (09:16 +0000)]
[LLVM][Alignment] Introduce Alignment In Attributes

Summary:
This is patch is part of a serie 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

Reviewers: jfb

Subscribers: hiraditya, dexonsmith, llvm-commits, courbet

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368002 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM][Alignment] Introduce Alignment In GlobalObject
Guillaume Chatelet [Tue, 6 Aug 2019 09:03:21 +0000 (09:03 +0000)]
[LLVM][Alignment] Introduce Alignment In GlobalObject

Summary:
This is patch is part of a serie 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

Reviewers: jfb

Subscribers: hiraditya, dexonsmith, llvm-commits, courbet

Tags: #llvm

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

Address comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368000 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert r367941 "Add a note to the release not about a potentially breaking optimization"
Hans Wennborg [Tue, 6 Aug 2019 08:32:33 +0000 (08:32 +0000)]
Revert r367941 "Add a note to the release not about a potentially breaking optimization"

The note was moved to the release_90 branch in r367997.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367998 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm/test/Object] - Cleanup and move out the yaml2obj tests.
George Rimar [Tue, 6 Aug 2019 08:02:25 +0000 (08:02 +0000)]
[llvm/test/Object] - Cleanup and move out the yaml2obj tests.

There are multiple yaml2obj-* tests in llvm/test/Object
folder. This is not correct place to have them and my intention
was to move them out to test\tools\yaml2obj folder. I reviewed
them, made some changes, and my comments are below.

For all tests I:

Added comments when needed.
Moved them from llvm/test/Object to yaml2obj tests.
Another changes performed:

1) yaml2obj-invalid.yaml. It was a test for an invalid YAML input.
I just moved it.

2) yaml2obj-coff-multi-doc.test/yaml2obj-elf-multi-doc.test:
these were a tests for testing --docnum=x functionality,
one was for COFF and one for ELF. I merged them into one.

3) yaml2obj-elf-bits-endian.test:
I removed its 4 YAML inputs (merged into the main test).

4) yaml2obj-readobj.test:
This file has a long history. It was added to check the
"parsing of header charactestics" initially. Then was used to test
how yaml2obj writes the relocations. Then was upgraded to check how
yaml2obj handle "-o" option. I think it should be heavily splitted
and refactored in a separate patch. For now I leaved it as is, but restyled
to reduce the changes in a follow-ups.

5) yaml2obj-elf-alignment.yaml: its intention was to check we
can set sh-addralign field. I moved, renamed (to elf-sh-addralign.yaml)
and updated this test.

6) yaml2obj-elf-file-headers.yaml: I removed it.
It's intention was to check that
yaml2obj handles OS/ABI and ELF type (e.g Relocatable).
We are testing this already, for example in D64800. We might want
to add a better (more complete) test, but keeping the existent test
does not have much sense I think.

7) yaml2obj-elf-file-headers-with-e_flags.yaml: I would describe its intention
as "testing MIPS e_flags". It is far from being complete and tests only
a few flags. I leaved it alone for now.

8) yaml2obj-elf-rel.yaml: its intention is to check the MIPS32 relocations.
We have a version for MIPS64 here: test\Object\Mips\elf-mips64-rel.yaml
Seems them both are incomplete. I leaved them alone for now.

9) yaml2obj-elf-rel-noref.yaml: was introduced to check the support of arm32
R_ARM_V4BX relocatiion. I leaved it alone for now.

10) yaml2obj-elf-section-basic.yaml: it just checked that we are able to recognise
trivial fields like section 'Name', 'Type', 'Flags' and others. All of our yaml2obj
tests are heavily using it. I just removed this test.

11) yaml2obj-elf-section-invalid-size.yaml: its intention was to check the
"Section size must be greater than or equal to the content size" error.
I moved this test to `tools\yaml2obj\section-size-content.yaml'

12) yaml2obj-elf-symbol-basic.yaml: its intention seems was to support declarations
of the symbols in yaml2obj. I removed it. We use this in almost each test we already have.

13) yaml2obj-elf-symbol-LocalGlobalWeak.yaml: its intention was to check that we can
declare different symbol bindings. I moved it to tools\yaml2obj\elf-symbol-binding.yaml.

14) yaml2obj-coff-invalid-alignment.test: check that error is reported for a too large coff
section alignment. Moved it to tools\yaml2obj\coff-invalid-alignment.test

15) yaml2obj-elf-symbol-visibility.yaml: tests ELF symbols visibility. I improved it and
moved to tools\yaml2obj\elf-symbol-visibility.yaml and tools\obj2yaml\elf-symbol-visibility.yaml

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367988 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoUse "isa" since the variable isn't used.
Bill Wendling [Tue, 6 Aug 2019 07:27:26 +0000 (07:27 +0000)]
Use "isa" since the variable isn't used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367985 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LV][NFC] Share the LV illegality reporting with LoopVectorize.
Hideki Saito [Tue, 6 Aug 2019 06:08:48 +0000 (06:08 +0000)]
[LV][NFC] Share the LV illegality reporting with LoopVectorize.

Reviewers: hsaito, fhahn, rengolin

Reviewed By: rengolin

Patch by psamolysov, thanks!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367980 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoCodeGen: Migration to using Register
Matt Arsenault [Tue, 6 Aug 2019 03:59:31 +0000 (03:59 +0000)]
CodeGen: Migration to using Register

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367974 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Add AMDGPU target
Nico Weber [Tue, 6 Aug 2019 02:25:49 +0000 (02:25 +0000)]
gn build: Add AMDGPU target

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367972 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Leave a comment why "-gen-searchable-table" tablegen()s are not called...
Nico Weber [Tue, 6 Aug 2019 02:21:50 +0000 (02:21 +0000)]
gn build: Leave a comment why "-gen-searchable-table" tablegen()s are not called FooGenSearchableTable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367971 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r367917
Nico Weber [Tue, 6 Aug 2019 02:17:05 +0000 (02:17 +0000)]
gn build: Merge r367917

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367970 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-commit: [AMDGPU] Use S_DENORM_MODE for gfx10
Austin Kerbow [Tue, 6 Aug 2019 02:16:11 +0000 (02:16 +0000)]
Re-commit: [AMDGPU] Use S_DENORM_MODE for gfx10

Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10.

Reviewers: arsenm, rampitec

Reviewed By: arsenm, rampitec

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367969 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix another MSVC issue after 367965
Daniel Sanders [Tue, 6 Aug 2019 01:16:29 +0000 (01:16 +0000)]
Fix another MSVC issue after 367965

Repeated the fix for MCRegister in Register

This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367967 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor][NFC] Outline common pattern into helper method
Johannes Doerfert [Tue, 6 Aug 2019 00:55:11 +0000 (00:55 +0000)]
[Attributor][NFC] Outline common pattern into helper method

This helper will also allow to also place logic to determine if an
abstract attribute is necessary in the first place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367966 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-commit Register/MCRegister: Add conversion operators to avoid use of implicit...
Daniel Sanders [Tue, 6 Aug 2019 00:53:47 +0000 (00:53 +0000)]
Re-commit Register/MCRegister: Add conversion operators to avoid use of implicit convert to unsigned. NFC

Added two more conversions to satisfy MSVC and moved the declaration of
MCPhysReg to MCRegister.h to enable that

This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367965 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor][Fix] Add const qualifier
Johannes Doerfert [Tue, 6 Aug 2019 00:46:02 +0000 (00:46 +0000)]
[Attributor][Fix] Add const qualifier

I forgot to add this as part of the last commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367964 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Provide a generic interface to check live instructions
Johannes Doerfert [Tue, 6 Aug 2019 00:32:43 +0000 (00:32 +0000)]
[Attributor] Provide a generic interface to check live instructions

Summary:
Similar to `Attributor::checkForAllCallSites`, we now provide such
functionality for instructions of a certain opcode through
`Attributor::checkForAllInstructions` and the convenient wrapper
`Attributor::checkForAllCallLikeInstructions`. This cleans up code,
avoids duplication, and simplifies the usage of liveness information.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367961 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions
Shiva Chen [Tue, 6 Aug 2019 00:24:00 +0000 (00:24 +0000)]
[RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367960 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoSilence ubsan after r367926.
Peter Collingbourne [Tue, 6 Aug 2019 00:21:30 +0000 (00:21 +0000)]
Silence ubsan after r367926.

Fixes e.g.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/14273

We can't left shift here because left shifting of a negative number is UB.
The same doesn't apply to unsigned arithmetic, but switching to unsigned
doesn't appear to stop ubsan from complaining, so we need to mask out the
high bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367959 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Remove useless static
JF Bastien [Mon, 5 Aug 2019 23:52:38 +0000 (23:52 +0000)]
[NFC] Remove useless static

The function is already inline in the header, static isn't what we want.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367955 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReverting D65760/r367944 due to buildbot failure.
Puyan Lotfi [Mon, 5 Aug 2019 23:47:07 +0000 (23:47 +0000)]
Reverting D65760/r367944 due to buildbot failure.

http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15952/steps/build/logs/stdio

JITTargetMachineBuilder.cpp fails to build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367954 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Introduce the IRAttribute helper struct
Johannes Doerfert [Mon, 5 Aug 2019 23:35:12 +0000 (23:35 +0000)]
[Attributor] Introduce the IRAttribute helper struct

Summary:
Certain properties, e.g., an AttrKind, are not shared among all abstract
attributes. This patch extracts the functionality into a helper struct.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367953 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Make abstract attributes stateless
Johannes Doerfert [Mon, 5 Aug 2019 23:32:31 +0000 (23:32 +0000)]
[Attributor] Make abstract attributes stateless

To remove boilerplate, mostly passing through values to the
AbstractAttriubute base class, we extract the state into an IRPosition
helper. There is no function change intended but the IRPosition struct
will provide more functionality down the line.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, jfb, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367952 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Use proper ID for attribute lookup
Johannes Doerfert [Mon, 5 Aug 2019 23:30:01 +0000 (23:30 +0000)]
[Attributor] Use proper ID for attribute lookup

Summary:
The new scheme is similar to the pass manager and dyn_cast scheme where
we identify classes by the address of a static member. This is better
than the old scheme in which we had to "invent" new Attributor enums if
there was no corresponding one.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367951 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor][NFCI] Avoid duplication of the InformationCache reference
Johannes Doerfert [Mon, 5 Aug 2019 23:26:06 +0000 (23:26 +0000)]
[Attributor][NFCI] Avoid duplication of the InformationCache reference

Summary:
Instead of storing the reference to the InformationCache we now pass it
whenever it might be needed.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367950 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Attributor] Deduce the "no-return" attribute for functions
Johannes Doerfert [Mon, 5 Aug 2019 23:22:05 +0000 (23:22 +0000)]
[Attributor] Deduce the "no-return" attribute for functions

A function is "no-return" if we never reach a return instruction, either
because there are none or the ones that exist are dead.

Test have been adjusted:
  - either noreturn was added, or
  - noreturn was avoided by modifying the code.

The new noreturn_{sync,async} test make sure we do handle invoke
instructions with a noreturn (and potentially nowunwind) callee
correctly, even in the presence of potential asynchronous exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367948 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GlobalISel][CallLowering] Rename isArgumentHandler() -> isIncomingArgumentHandler()
Amara Emerson [Mon, 5 Aug 2019 23:05:28 +0000 (23:05 +0000)]
[GlobalISel][CallLowering] Rename isArgumentHandler() -> isIncomingArgumentHandler()

Previous name and comment incorrectly implied it was just for formal arg handlers,
which is not true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367945 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ORC] Add CPU name and sub-target features to detectHost
Diego Caballero [Mon, 5 Aug 2019 23:02:12 +0000 (23:02 +0000)]
[ORC] Add CPU name and sub-target features to detectHost

This commit adds host CPU name and sub-target features to the
`JITTargetMachineBuilder` created by `JITTargetMachineBuilder::detectHost()`.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367944 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-readelf] Support dumping of stack sizes sections with readelf --stack-sizes
Wolfgang Pieb [Mon, 5 Aug 2019 22:47:07 +0000 (22:47 +0000)]
[llvm-readelf] Support dumping of stack sizes sections with readelf --stack-sizes

Reviewers: jhenderson, grimar, rupprecht

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367942 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd a note to the release not about a potentially breaking optimization
Philip Reames [Mon, 5 Aug 2019 22:34:59 +0000 (22:34 +0000)]
Add a note to the release not about a potentially breaking optimization

This has come up twice already (once in pr42763 and once in the commit thread), so give warning of a new way in which UB can result in unexpected program behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367941 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd "REQUIRES: x86-registered-target" to test.
Peter Collingbourne [Mon, 5 Aug 2019 21:44:45 +0000 (21:44 +0000)]
Add "REQUIRES: x86-registered-target" to test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367937 91177308-0d34-0410-b5e6-96231b3b80d8