]> granicus.if.org Git - llvm/log
llvm
6 years ago[X86] Add additional RUN lines to prepare for D56156. NFC
Craig Topper [Mon, 31 Dec 2018 19:09:32 +0000 (19:09 +0000)]
[X86] Add additional RUN lines to prepare for D56156. NFC

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

6 years ago[SelectionDAG] Add SIGN_EXTEND_VECTOR_INREG support to computeKnownBits.
Craig Topper [Mon, 31 Dec 2018 19:09:30 +0000 (19:09 +0000)]
[SelectionDAG] Add SIGN_EXTEND_VECTOR_INREG support to computeKnownBits.

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

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

6 years ago[X86] Add X86ISD::VSRAI to computeKnownBitsForTargetNode.
Craig Topper [Mon, 31 Dec 2018 19:09:27 +0000 (19:09 +0000)]
[X86] Add X86ISD::VSRAI to computeKnownBitsForTargetNode.

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

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

6 years agoKeep tablegen commands in alphabetical order. NFCI.
Simon Pilgrim [Mon, 31 Dec 2018 14:51:53 +0000 (14:51 +0000)]
Keep tablegen commands in alphabetical order. NFCI.

Mentioned on D56167.

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

6 years ago[test] Fix propagating HOME envvar to unittests
Michal Gorny [Mon, 31 Dec 2018 13:48:12 +0000 (13:48 +0000)]
[test] Fix propagating HOME envvar to unittests

Propagate HOME environment variable to unittests.  This is necessary
to fix test failures resulting from pw_home pointing to a non-existing
directory while being overriden with HOME.  Apparently Gentoo users
hit this sometimes when they override build directory for Portage.

Original bug report: https://bugs.gentoo.org/674088

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

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

6 years ago[AArch64] Accept "sve" as arch feature in assembler
Martin Storsjo [Mon, 31 Dec 2018 10:22:04 +0000 (10:22 +0000)]
[AArch64] Accept "sve" as arch feature in assembler

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

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

6 years ago[MSan] Handle llvm.is.constant intrinsic
Alexander Potapenko [Mon, 31 Dec 2018 09:42:23 +0000 (09:42 +0000)]
[MSan] Handle llvm.is.constant intrinsic

MSan used to report false positives in the case the argument of
llvm.is.constant intrinsic was uninitialized.
In fact checking this argument is unnecessary, as the intrinsic is only
used at compile time, and its value doesn't depend on the value of the
argument.

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

6 years ago[DAGCombiner] Add missing one use check on the shuffle in the bitcast(shuffle(bitcast...
Craig Topper [Mon, 31 Dec 2018 05:40:46 +0000 (05:40 +0000)]
[DAGCombiner] Add missing one use check on the shuffle in the bitcast(shuffle(bitcast(s0),bitcast(s1))) -> shuffle(s0,s1) transform.

Found while trying out some other changes so I don't really have a test case.

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

6 years ago[gn build] Make `ninja check-clang` also run Clang's unit tests
Nico Weber [Mon, 31 Dec 2018 00:10:47 +0000 (00:10 +0000)]
[gn build] Make `ninja check-clang` also run Clang's unit tests

Also add a build file for clang/lib/ASTMatchers/Dynamic, which is only needed
by tests (and clang/tools/extra).

Also make llvm/utils/gn/build/sync_source_lists_from_cmake.py check that every
CMakeLists.txt file below {lld,clang}/unittests has a corresponding BUILD.gn
file, so we notice if new test binaries get added (since the failure mode for
missing GN build files for tests is just the tests silently not running in the
GN build).

Also add a unittest() macro for defining unit test targets, and add a lengthy
comment there about where the unit test binaries go and why.

With this, the build files for //clang are complete.

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

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

6 years ago[AArch64] Implement the .arch_extension directive
Martin Storsjo [Sun, 30 Dec 2018 21:06:32 +0000 (21:06 +0000)]
[AArch64] Implement the .arch_extension directive

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

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

6 years ago[llvm-objcopy] [COFF] Use Error/Expected returns instead of calling reportError....
Martin Storsjo [Sun, 30 Dec 2018 20:35:43 +0000 (20:35 +0000)]
[llvm-objcopy] [COFF] Use Error/Expected returns instead of calling reportError. NFC.

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

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

6 years ago[PowerPC] Fix machine verify pass error for PATCHPOINT pseudo instruction that bad...
Kang Zhang [Sun, 30 Dec 2018 15:13:51 +0000 (15:13 +0000)]
[PowerPC] Fix machine verify pass error for PATCHPOINT pseudo instruction that bad machine code

Summary:
For SDAG, we pretend patchpoints aren't special at all until we emit the code for the pseudo.
Then the verifier runs and it seems like we have a use of an undefined register (the register will
be reserved later, but the verifier doesn't know that).

So this patch call setUsesTOCBasePtr before emit the code for the pseudo, so verifier can know
X2 is a reserved register.

Reviewed By: nemanjai

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

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

6 years ago[NFC] Fixed extra semicolon warning
David Bolvansky [Sun, 30 Dec 2018 13:18:17 +0000 (13:18 +0000)]
[NFC] Fixed extra semicolon warning
-This line, and those below, will be ignored--

M    lib/Support/Error.cpp

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

6 years ago[PowerPC] Fix ADDE, SUBE do not know how to promote operator
Kang Zhang [Sun, 30 Dec 2018 07:48:09 +0000 (07:48 +0000)]
[PowerPC] Fix ADDE, SUBE do not know how to promote operator

Summary:
This patch is created to fix the Bugzilla bug 39815:
https://bugs.llvm.org/show_bug.cgi?id=39815

This patch is to support promotion integer result for the instruction ADDE, SUBE.

Reviewed By: hfinkel

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

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

6 years ago[X86] Don't mark SEXTLOAD from v4i8/v4i16/v8i8 as Custom on pre-sse4.1.
Craig Topper [Sun, 30 Dec 2018 03:05:07 +0000 (03:05 +0000)]
[X86] Don't mark SEXTLOAD from v4i8/v4i16/v8i8 as Custom on pre-sse4.1.

This seems to be getting in the way more than its helping. This does mean we stop scalarizing some cases, but I'm not convinced the scalarization was really better.

Some of the changes to vsel-cmp-load.ll are a regression but D56156 should fix it.

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

6 years ago[X86] Add custom type legalization for SIGN_EXTEND_VECTOR_INREG from 16i16/v32i8...
Craig Topper [Sun, 30 Dec 2018 02:30:34 +0000 (02:30 +0000)]
[X86] Add custom type legalization for SIGN_EXTEND_VECTOR_INREG from 16i16/v32i8 to v4i64 when v4i64 needs splitting.

This allows us to sign extend to v4i32 first. And then share that extension to implement the final steps to v4i64 using a pcmpgt and punpckl and punpckh.

We already do something similar for SIGN_EXTEND with -x86-experimental-vector-widening-legalization.

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

6 years ago[PowerPC][NFC] Macro for register set defs for the Asm Parser
Nemanja Ivanovic [Sat, 29 Dec 2018 16:13:11 +0000 (16:13 +0000)]
[PowerPC][NFC] Macro for register set defs for the Asm Parser

We have some unfortunate code in the back end that defines a bunch of register
sets for the Asm Parser. Every time another class is needed in the parser, we
have to add another one of those definitions with explicit lists of registers.
This NFC patch simply provides macros to use to condense that code a little bit.

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

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

6 years ago[PowerPC] Complete the custom legalization of vector int to fp conversion
Nemanja Ivanovic [Sat, 29 Dec 2018 13:40:48 +0000 (13:40 +0000)]
[PowerPC] Complete the custom legalization of vector int to fp conversion

A recent patch has added custom legalization of vector conversions of
v2i16 -> v2f64. This just rounds it out for other types where the input vector
has an illegal (narrower) type than the result vector. Specifically, this will
handle the following conversions:

v2i8 -> v2f64
v4i8 -> v4f32
v4i16 -> v4f32

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

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

6 years ago[InstCombine] [NFC] update testcases for canonicalize MUL with NEG operand
Chen Zheng [Sat, 29 Dec 2018 12:18:15 +0000 (12:18 +0000)]
[InstCombine] [NFC] update testcases for canonicalize MUL with NEG operand

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

6 years ago[PowerPC] Fix CR Bit spill pseudo expansion
Nemanja Ivanovic [Sat, 29 Dec 2018 11:43:54 +0000 (11:43 +0000)]
[PowerPC] Fix CR Bit spill pseudo expansion

The current CRBIT spill pseudo-op expansion creates a KILL instruction
that kills the CRBIT and defines the enclosing CR field. However, this
paints a false picture to the register allocator that all bits in the CR
field are killed so copies of other bits out of the field become dead and
removable.
This changes the expansion to preserve the KILL flag on the CRBIT as an
implicit use and to treat the CR field as an undef input.

Thanks to Hal Finkel for the review and Uli Weigand for implementation input.

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

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

6 years ago[mips] Show an error on attempt to use 64-bit PC-relative relocation
Simon Atanasyan [Sat, 29 Dec 2018 10:10:02 +0000 (10:10 +0000)]
[mips] Show an error on attempt to use 64-bit PC-relative relocation

The following code requests 64-bit PC-relative relocations unsupported
by MIPS ABI. Now it triggers an assertion. It's better to show an error
message.
```
foo:
  .quad bar - foo
```

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

6 years ago[mips] Show a regular error message on attempt to use one byte relocation
Simon Atanasyan [Sat, 29 Dec 2018 10:09:55 +0000 (10:09 +0000)]
[mips] Show a regular error message on attempt to use one byte relocation

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

6 years ago[X86] Add test case from PR38217. NFC
Craig Topper [Sat, 29 Dec 2018 07:14:30 +0000 (07:14 +0000)]
[X86] Add test case from PR38217. NFC

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

6 years agoDrop SE cache early because loop parent can change in LoopSimplifyCFG
Max Kazantsev [Sat, 29 Dec 2018 04:26:22 +0000 (04:26 +0000)]
Drop SE cache early because loop parent can change in LoopSimplifyCFG

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

6 years ago[WebAssembly] Fix comments in ExplicitLocals (NFC)
Heejin Ahn [Sat, 29 Dec 2018 02:42:04 +0000 (02:42 +0000)]
[WebAssembly] Fix comments in ExplicitLocals (NFC)

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

6 years agoAdd vtable anchor to classes.
Richard Trieu [Sat, 29 Dec 2018 02:02:13 +0000 (02:02 +0000)]
Add vtable anchor to classes.

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

6 years ago[X86] Don't mark SEXTLOAD v4i8->v4i64 and v8i8->v8i64 as custom under vector widening...
Craig Topper [Sat, 29 Dec 2018 01:17:11 +0000 (01:17 +0000)]
[X86] Don't mark SEXTLOAD v4i8->v4i64 and v8i8->v8i64 as custom under vector widening legalization.

This was tricking us into making these operations and then letting them get scalarized later. But I can't prove that the scalarized version is actually better.

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

6 years ago[UnrollRuntime] NFC: Updated exiting tests and added more tests
Anna Thomas [Fri, 28 Dec 2018 19:21:50 +0000 (19:21 +0000)]
[UnrollRuntime] NFC: Updated exiting tests and added more tests

Added more tests for multiple exiting blocks to the LatchExit.
Today these cases are not supported. Patch to follow soon.

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

6 years ago[X86] Directly emit X86ISD::PMULUDQ from the ReplaceNodeResults handling of v2i8...
Craig Topper [Fri, 28 Dec 2018 19:19:39 +0000 (19:19 +0000)]
[X86] Directly emit X86ISD::PMULUDQ from the ReplaceNodeResults handling of v2i8/v2i16/v2i32 multiply.

Previously we emitted a multiply and some masking that was supposed to matched to PMULUDQ, but the masking could sometimes be removed before we got a chance to match it. So instead just emit the PMULUDQ directly.

Remove the DAG combine that was added when the ReplaceNodeResults code was originally added. Add a new DAG combine to avoid regressions in shrink_vmul.ll

Some of the shrink_vmul.ll test cases now pick PMULUDQ instead of PMADDWD/PMULLD, but I think this should be an improvement on most CPUs.

I think all of this can go away if/when we switch to -x86-experimental-vector-widening-legalization

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

6 years ago[UnrollRuntime] NFC: Add comment and verify LCSSA
Anna Thomas [Fri, 28 Dec 2018 18:52:16 +0000 (18:52 +0000)]
[UnrollRuntime] NFC: Add comment and verify LCSSA

Added -verify-loop-lcssa to test cases.
Updated comments in ConnectProlog.

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

6 years ago[AArch64] Add command-line option for SB
Diogo N. Sampaio [Fri, 28 Dec 2018 17:14:58 +0000 (17:14 +0000)]
[AArch64] Add command-line option for SB

SB (Speculative Barrier) is only mandatory from 8.5
onwards but is optional from Armv8.0-A. This patch adds a command
line option to enable SB, as it was previously only possible to
enable by selecting -march=armv8.5-a.

This patch also moves to FeatureSB the old FeatureSpecRestrict.

Reviewers: pbarrio, olista01, t.p.northover, LukeCheeseman

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

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

6 years ago[CodeView] Extend the `MemberAttributes` interface with the `isStatic` method
Aleksandr Urakov [Fri, 28 Dec 2018 17:03:24 +0000 (17:03 +0000)]
[CodeView] Extend the `MemberAttributes` interface with the `isStatic` method

Summary:
This patch extends the MemberAttributes interface with the isStatic method.
It is needed for D56126.

Reviewers: zturner, rnk

Reviewed By: zturner

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

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

6 years ago[AMDGPU][MC][DOC] Updated AMD GPU assembler description.
Dmitry Preobrazhensky [Fri, 28 Dec 2018 11:48:23 +0000 (11:48 +0000)]
[AMDGPU][MC][DOC] Updated AMD GPU assembler description.

Minor bugfixing and improvements.

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

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

6 years ago[NFC] Add failing test on LCSSA form preservation of LoopSimplifyCFG
Max Kazantsev [Fri, 28 Dec 2018 10:43:37 +0000 (10:43 +0000)]
[NFC] Add failing test on LCSSA form preservation of LoopSimplifyCFG

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

6 years ago[PowerPC] handle ISD:TRUNCATE in BitPermutationSelector
Hiroshi Inoue [Fri, 28 Dec 2018 08:00:39 +0000 (08:00 +0000)]
[PowerPC] handle ISD:TRUNCATE in BitPermutationSelector

This is the last one in a series of patches to support better code generation for bitfield insert.
BitPermutationSelector already support ISD::ZERO_EXTEND but not TRUNCATE.
This patch adds support for ISD:TRUNCATE in BitPermutationSelector.

For example of this test case,
struct s64b {
  int a:4;
  int b:16;
  int c:24;
};
void bitfieldinsert64b(struct s64b *p, unsigned char v) {
  p->b = v;
}

the selection DAG loos like:

t14: i32,ch = load<(load 4 from %ir.0)> t0, t2, undef:i64
       t18: i32 = and t14, Constant:i32<-1048561>
            t4: i64,ch = CopyFromReg t0, Register:i64 %1
          t22: i64 = AssertZext t4, ValueType:ch:i8
        t23: i32 = truncate t22
      t16: i32 = shl nuw nsw t23, Constant:i32<4>
    t19: i32 = or t18, t16
  t20: ch = store<(store 4 into %ir.0)> t14:1, t19, t2, undef:i64

By handling truncate in the BitPermutationSelector, we can use information from AssertZext when selecting t19 and skip the mask operation corresponding to t18.
So the generated sequences with and without this patch are

without this patch
rlwinm 5, 5, 0, 28, 11 # corresponding to t18
rlwimi 5, 4, 4, 20, 27
with this patch
rlwimi 5, 4, 4, 12, 27

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

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

6 years agoTemporarily disable term folding in LoopSimplifyCFG, add tests
Max Kazantsev [Fri, 28 Dec 2018 06:22:39 +0000 (06:22 +0000)]
Temporarily disable term folding in LoopSimplifyCFG, add tests

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

6 years ago[LoopSimplifyCFG] Delete dead blocks in RPO
Max Kazantsev [Fri, 28 Dec 2018 06:08:51 +0000 (06:08 +0000)]
[LoopSimplifyCFG] Delete dead blocks in RPO

Deletion of dead blocks in arbitrary order may lead to failure
of assertion in `DeleteDeadBlock` that requires that we have
deleted all predecessors before we can delete the current block.
We should instead delete them in RPO order.

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

6 years ago[PowerPC] Remove the implicit use of the register if it is replaced by Imm
QingShan Zhang [Fri, 28 Dec 2018 03:38:09 +0000 (03:38 +0000)]
[PowerPC] Remove the implicit use of the register if it is replaced by Imm
If we are changing the MI operand from Reg to Imm, we need also handle its implicit use if have.

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

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

6 years ago[NFC] clang-format functions related to r350113
Zi Xuan Wu [Fri, 28 Dec 2018 02:45:17 +0000 (02:45 +0000)]
[NFC] clang-format functions related to r350113

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

6 years ago[PowerPC] Fix assert from machine verify pass that atomic pseudo expanding causes...
Zi Xuan Wu [Fri, 28 Dec 2018 02:12:55 +0000 (02:12 +0000)]
[PowerPC] Fix assert from machine verify pass that atomic pseudo expanding causes mismatched register class

For atomic value operand which less than 4 bytes need to be masked.
And the related operation to calculate the newvalue can be done in 32 bit gprc.
So just use gprc for mask and value calculation.

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

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

6 years ago[PowerPC] fix register class after converting X-FORM instruction to D-FORM instruction
Chen Zheng [Fri, 28 Dec 2018 01:02:35 +0000 (01:02 +0000)]
[PowerPC] fix register class after converting X-FORM instruction to D-FORM instruction
Differential Revision: https://reviews.llvm.org/D55806

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

6 years ago[CallSite removal] Add and flesh out APIs on the new `CallBase` base class that previ...
Chandler Carruth [Thu, 27 Dec 2018 23:40:17 +0000 (23:40 +0000)]
[CallSite removal] Add and flesh out APIs on the new `CallBase` base class that previously were only available on the `CallSite` wrapper.

Summary:
This will make migrating code easier and generally seems like a good collection
of API improvements.

Some of these APIs seem like more consistent / better naming of existing
ones. I've retained the old names for migration simplicit and am just
adding the new ones in this commit. I'll try to garbage collect these
once CallSite is gone.

Subscribers: sanjoy, mcrosier, hiraditya, llvm-commits

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

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

6 years ago[gn build] Add check-clang target and make it work
Nico Weber [Thu, 27 Dec 2018 23:38:58 +0000 (23:38 +0000)]
[gn build] Add check-clang target and make it work

With this, check-clang runs and passes all of clang's lit tests. It doesn't run
any of its unit tests yet.

Like with check-lld, running just ninja -C out/gn will build all prerequisites
needed to run tests, but it won't run the tests (so that the build becomes
clean after one build). Running ninja -C out/gn check-clang will build
prerequisites if needed and run the tests. The check-clang target never becomes
clean and runs tests every time.

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

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

6 years ago[X86] Remove check that avoids creating PMULDQ with illegal types. Rely on SplitOpsAn...
Craig Topper [Thu, 27 Dec 2018 03:37:04 +0000 (03:37 +0000)]
[X86] Remove check that avoids creating PMULDQ with illegal types. Rely on SplitOpsAndApply to legalize it.

Create PMULDQ/PMULUDQ as long as the number of elements is a power of 2.

This seems to give some improvements in our ability to use SimplifyDemandedBits.

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

6 years ago[X86] Factor the core code out of LowerSETCC into a helper that can create CMP/BT...
Craig Topper [Thu, 27 Dec 2018 01:50:40 +0000 (01:50 +0000)]
[X86] Factor the core code out of LowerSETCC into a helper that can create CMP/BT/PTEST/KORTEST etc. without making an X86ISD::SETCC node. NFCI

Make each of the helper functions only return their comparison node and the condition code. Leave X86ISD::SETCC creation to the LowerSETCC function itself.

Looking into whether we can use this code directly in BRCOND and SELECT lowering instead of going through LowerSETCC which creates an X86ISD::SETCC node we need to look through.

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

6 years ago[X86] Merge getBitTestCondition into LowerAndToBT. Don't create X86ISD::SETCC node...
Craig Topper [Thu, 27 Dec 2018 01:50:38 +0000 (01:50 +0000)]
[X86] Merge getBitTestCondition into LowerAndToBT. Don't create X86ISD::SETCC node in the merged function. NFCI

Only one of the 3 callers of LowerAndToBT need the SETCC node. Two of them have to look through it to find the operands they really need. Instead create it after the one call that needs it.

LowerAndToBT now returns both the BT node and the X86 specific condition code separately.

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

6 years ago[WebAssembly] Added basic support for if/else/end_if in MC layer.
Wouter van Oortmerssen [Wed, 26 Dec 2018 22:55:26 +0000 (22:55 +0000)]
[WebAssembly] Added basic support for if/else/end_if in MC layer.

Summary:
These instructions are currently unused in our backend, but for
completeness it is good to support them, so they can be used with
the assembler in hand-written code.

Tests are very basic, signature support missing much like other blocks.

Reviewers: dschuff, aheejin

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

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

6 years ago[WebAssembly] Make assembler check for proper nesting of control flow.
Wouter van Oortmerssen [Wed, 26 Dec 2018 22:46:18 +0000 (22:46 +0000)]
[WebAssembly] Make assembler check for proper nesting of control flow.

Summary:
It does so using a simple nesting stack, and gives clear errors upon
violation. This is unique to wasm, since most CPUs do not have
any nested constructs.

Had to add an end of file check to the general assembler for this.

Note: if/else/end instructions are not currently supported in our
tablegen defs, so these tests will be enabled in a follow-up.
They already pass the nesting check.

Reviewers: dschuff, aheejin

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

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

6 years agomanpages: Update the URL for https
Sylvestre Ledru [Wed, 26 Dec 2018 22:34:44 +0000 (22:34 +0000)]
manpages: Update the URL for https

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

6 years ago[WebAssembly] Delete an unnecessary line in RegStackify
Heejin Ahn [Wed, 26 Dec 2018 22:33:35 +0000 (22:33 +0000)]
[WebAssembly] Delete an unnecessary line in RegStackify

`OneUseInst` is set outside of the loop before and `OneUse` does not
change throughout the loop, so this line is not necessary.

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

6 years ago[WebAssembly] Fix typos in comments in RegStackify (NFC)
Heejin Ahn [Wed, 26 Dec 2018 22:27:46 +0000 (22:27 +0000)]
[WebAssembly] Fix typos in comments in RegStackify (NFC)

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

6 years ago[LoopIdiomRecognize] Add CTTZ support
Craig Topper [Wed, 26 Dec 2018 21:59:48 +0000 (21:59 +0000)]
[LoopIdiomRecognize] Add CTTZ support

Summary:
Existing LIR recognizes CTLZ where shifting input variable right until it is zero. (Shift-Until-Zero idiom)

This commit:
1. Augments Shift-Until-Zero idiom to recognize CTTZ where input variable is shifted left.
2. Prepare for BitScan idiom recognition.

Patch by Yuanfang Chen (tabloid.adroit)

Reviewers: craig.topper, evstupac

Reviewed By: craig.topper

Subscribers: llvm-commits

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

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

6 years ago[codeview] Check if this 'this' type of a method is a pointer
Reid Kleckner [Wed, 26 Dec 2018 21:52:17 +0000 (21:52 +0000)]
[codeview] Check if this 'this' type of a method is a pointer

Fixes crash reported after r347354 for frontends that don't always emit
'this' pointers for methods. Now we will silently produce debug info
that makes functions like this look like static methods, which seems
reasonable.

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

6 years ago[NVPTX] Allow libcalls that are defined in the current module.
Justin Lebar [Wed, 26 Dec 2018 19:12:31 +0000 (19:12 +0000)]
[NVPTX] Allow libcalls that are defined in the current module.

The patch adds a possibility to make library calls on NVPTX.

An important thing about library functions - they must be defined within
the current module. This basically should guarantee that we produce a
valid PTX assembly (without calls to not defined functions). The one who
wants to use the libcalls is probably will have to link against
compiler-rt or any other implementation.

Currently, it's completely impossible to make library calls because of
error LLVM ERROR: Cannot select: i32 = ExternalSymbol '...'. But we can
lower ExternalSymbol to TargetExternalSymbol and verify if the function
definition is available.

Also, there was an issue with a DAG during legalisation. When we expand
instruction into libcall, the inner call-chain isn't being "integrated"
into outer chain. Since the last "data-flow" (call retval load) node is
located in call-chain earlier than CALLSEQ_END node, the latter becomes
a leaf and therefore a dead node (and is being removed quite fast).
Proposed here solution relies on another data-flow pseudo nodes
(ProxyReg) which purpose is only to keep CALLSEQ_END at legalisation and
instruction selection phases - we remove the pseudo instructions before
register scheduling phase.

Patch by Denys Zariaiev!

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

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

6 years ago[AMDGPU] Regenerate i64 shift tests.
Simon Pilgrim [Wed, 26 Dec 2018 12:09:10 +0000 (12:09 +0000)]
[AMDGPU] Regenerate i64 shift tests.

To show codegen diff due to a future SimplifyDemandedBits patch.

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

6 years ago[NFC] Use utility function for guards detection
Max Kazantsev [Wed, 26 Dec 2018 08:22:25 +0000 (08:22 +0000)]
[NFC] Use utility function for guards detection

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

6 years ago[MIPS GlobalISel] Select G_SELECT
Petar Avramovic [Tue, 25 Dec 2018 14:42:30 +0000 (14:42 +0000)]
[MIPS GlobalISel] Select G_SELECT

Add widen scalar for type index 1 (i1 condition) for G_SELECT.
Select G_SELECT for pointer, s32(integer) and smaller low level
types on MIPS32.

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

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

6 years ago[NFC] Reuse variables instead of re-calling getParent
Max Kazantsev [Tue, 25 Dec 2018 07:20:06 +0000 (07:20 +0000)]
[NFC] Reuse variables instead of re-calling getParent

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

6 years ago[PowerPC] Fix the bug of ISD::ADDE to set its second return type to glue
Kang Zhang [Tue, 25 Dec 2018 03:29:51 +0000 (03:29 +0000)]
[PowerPC] Fix the bug of ISD::ADDE to set its second return type to glue

Summary:
This patch is to fix the bug imported by rL341634.
In above submit , the the return type of ISD::ADDE is
14224: SDVTList VTs = DAG.getVTList(MVT::i64, MVT::i64),
but in fact, the second return type of ISD::ADDE should be
MVT::Glue not MVT::i64.

Reviewed By: hfinkel

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

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

6 years ago[gn build] Make NOSORT line actually work
Nico Weber [Mon, 24 Dec 2018 23:06:29 +0000 (23:06 +0000)]
[gn build] Make NOSORT line actually work

GN wants the NOSORT line to be the first line of a comment block, not the last
line.

I sent https://gn-review.googlesource.com/c/gn/+/3560 to support having it in
the last line too, but since it will be a while until everyone has that change
even if it's expected, use the form that works today.

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

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

6 years ago[X86] Use GetDemandedBits to simplify the operands of PMULDQ/PMULUDQ.
Craig Topper [Mon, 24 Dec 2018 19:40:20 +0000 (19:40 +0000)]
[X86] Use GetDemandedBits to simplify the operands of PMULDQ/PMULUDQ.

This is an alternative to what I attempted in D56057.

GetDemandedBits is a special version of SimplifyDemandedBits that allows simplifications even when the operand has other uses. GetDemandedBits will only do simplifications that allow a node to be bypassed. It won't create new nodes or alter any of the other users.

I had to add support for bypassing SIGN_EXTEND_INREG to GetDemandedBits.

Based on a patch that Simon Pilgrim sent me in email.

Fixes PR40142.

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

6 years ago[X86] Add test cases for PR40142. NFC
Craig Topper [Mon, 24 Dec 2018 19:40:17 +0000 (19:40 +0000)]
[X86] Add test cases for PR40142. NFC

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

6 years ago[HWASAN] Instrument memorty intrinsics by default
Eugene Leviant [Mon, 24 Dec 2018 16:02:48 +0000 (16:02 +0000)]
[HWASAN] Instrument memorty intrinsics by default

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

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

6 years ago[gn build] Add build files for clang/tools/{c-arcmt-test,c-index-test} and their...
Nico Weber [Mon, 24 Dec 2018 15:45:04 +0000 (15:45 +0000)]
[gn build] Add build files for clang/tools/{c-arcmt-test,c-index-test} and their dependency clang/tools/libclang

libclang is somewhat incomplete. It's just enough to get check-clang to pass,
but that requires it to be pretty complete. The biggest thing is that it's not
built as a shared library on Linux. The libclang/BUILD.gn file has a comment
with details on what else is missing.

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

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

6 years agoReleaseNotes: X86 Target: bdver2 sched model was added (D52779)
Roman Lebedev [Mon, 24 Dec 2018 12:12:26 +0000 (12:12 +0000)]
ReleaseNotes: X86 Target: bdver2 sched model was added (D52779)

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

6 years agoRevert rL350048 and rL350050
Max Kazantsev [Mon, 24 Dec 2018 10:30:04 +0000 (10:30 +0000)]
Revert rL350048 and rL350050

These patches have broken almost all buildbots on test
DebugInfo/X86/addr_comments.ll. Reverting to green.

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

6 years agoFix build - follow-up to r350048 which broke headerless (v4) address pool
David Blaikie [Mon, 24 Dec 2018 07:56:40 +0000 (07:56 +0000)]
Fix build - follow-up to r350048 which broke headerless (v4) address pool

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

6 years ago[LoopSimplifyCFG] Delete dead exiting edges
Max Kazantsev [Mon, 24 Dec 2018 07:41:33 +0000 (07:41 +0000)]
[LoopSimplifyCFG] Delete dead exiting edges

This patch teaches LoopSimplifyCFG to remove dead exiting edges
from loops.

Differential Revision: https://reviews.llvm.org/D54025
Reviewed By: fedor.sergeev

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

6 years agoDebugInfo: Use assembly label arithmetic for address pool size for easier reading...
David Blaikie [Mon, 24 Dec 2018 07:35:10 +0000 (07:35 +0000)]
DebugInfo: Use assembly label arithmetic for address pool size for easier reading/editing

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

6 years agoDebugInfo: Add assembly comments for debug_addr contribution header fields
David Blaikie [Mon, 24 Dec 2018 07:09:50 +0000 (07:09 +0000)]
DebugInfo: Add assembly comments for debug_addr contribution header fields

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

6 years agollvm-dwarfdump: Skip address index info (and dump only the address, if found) when...
David Blaikie [Mon, 24 Dec 2018 06:52:31 +0000 (06:52 +0000)]
llvm-dwarfdump: Skip address index info (and dump only the address, if found) when non-verbose dumping addrx forms

There's a few bugs here still - demonstrated with FIXITs in the test.

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

6 years agoReturn "[LoopSimplifyCFG] Delete dead in-loop blocks"
Max Kazantsev [Mon, 24 Dec 2018 06:06:17 +0000 (06:06 +0000)]
Return "[LoopSimplifyCFG] Delete dead in-loop blocks"

The underlying bug that caused the revert should be fixed by rL348567.

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

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

6 years ago[LoopIdioms] More LocationSize::precise annotations; NFC
George Burgess IV [Mon, 24 Dec 2018 05:55:50 +0000 (05:55 +0000)]
[LoopIdioms] More LocationSize::precise annotations; NFC

Both of these places reference memset-like loops. Memset is precise.

Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.

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

6 years ago[X86] Remove unused variables left after r350041. NFC
Craig Topper [Mon, 24 Dec 2018 05:45:45 +0000 (05:45 +0000)]
[X86] Remove unused variables left after r350041. NFC

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

6 years ago[SelectionDAGBuilder] Use ::precise LocationSizes; NFC
George Burgess IV [Mon, 24 Dec 2018 05:34:21 +0000 (05:34 +0000)]
[SelectionDAGBuilder] Use ::precise LocationSizes; NFC

More migration so we can disable the implicit int -> LocationSize
conversion.

All of these are either scatter/gather'ed vector instructions, or direct
loads. Hence, they're all precise.

Perhaps if we see way more getTypeStoreSize calls, we can make a
getTypeStoreLocationSize (or similar) as a wrapper that applies this
::precise. Doesn't appear that it's a good idea to make getTypeStoreSize
return a LocationSize itself, however.

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

6 years ago[X86] Move the optimization that turns 'CMP (AND+IMM64), 0' into SRL/SHL+TEST to...
Craig Topper [Mon, 24 Dec 2018 05:27:13 +0000 (05:27 +0000)]
[X86] Move the optimization that turns 'CMP (AND+IMM64), 0' into SRL/SHL+TEST to X86ISelDAGToDAG.

This cleans more code out of EmitTest.

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

6 years ago[X86] Autogenerate complete checks. NFC
Craig Topper [Mon, 24 Dec 2018 01:59:31 +0000 (01:59 +0000)]
[X86] Autogenerate complete checks. NFC

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

6 years ago[X86] Remove the ANDN check from EmitTest.
Craig Topper [Mon, 24 Dec 2018 01:10:13 +0000 (01:10 +0000)]
[X86] Remove the ANDN check from EmitTest.

Remove the TESTmr isel patterns and add another postprocessing combine for TESTrr+ANDrm->TESTmr. We already have a postprocessing combine for TESTrr+ANDrr->TESTrr. With this we can give ANDN a chance to match first. And clean it up during post processing if we ended up with just a regular AND.

This is another step towards my plan to gut EmitTest and do more flag handling during isel matching or by using optimizeCompare.

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

6 years ago[llvm-exegesis] Clustering: don't enqueue a point multiple times
Fangrui Song [Sun, 23 Dec 2018 20:48:52 +0000 (20:48 +0000)]
[llvm-exegesis] Clustering: don't enqueue a point multiple times

Summary:
SetVector uses both DenseSet and vector, which is time/memory inefficient. The points are represented as natural numbers so we can replace the DenseSet part by indexing into a vector<char> instead.

Don't cargo cult the pseudocode on the wikipedia DBSCAN page. This is a standard BFS style algorithm (the similar loops have been used several times in other LLVM components): every point is processed at most once, thus the queue has at most NumPoints elements. We represent it with a vector and allocate it outside of the loop to avoid allocation in the loop body.

We check `Processed[P]` to avoid enqueueing a point more than once, which also nicely saves us a `ClusterIdForPoint_[Q].isUndef()` check.

Many people hate the oneshot abstraction but some favor it, therefore we make a compromise, use a lambda to abstract away the neighbor adding process.

Delete the comment `assert(Neighbors.capacity() == (Points_.size() - 1));` as it is wrong.

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

6 years ago[DAGCombiner] limit shuffle to extend transform (PR40146)
Sanjay Patel [Sun, 23 Dec 2018 20:48:31 +0000 (20:48 +0000)]
[DAGCombiner] limit shuffle to extend transform (PR40146)

It's dangerous to knowingly create an illegal vector type
no matter what stage of combining we're in.

This prevents the missed folding/scalarization seen in:
https://bugs.llvm.org/show_bug.cgi?id=40146

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

6 years ago[x86] add test for vector shuffle --> extend transform (PR40146); NFC
Sanjay Patel [Sun, 23 Dec 2018 20:36:52 +0000 (20:36 +0000)]
[x86] add test for vector shuffle --> extend transform (PR40146); NFC

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

6 years ago[DAGCombiner] allow hoisting vector bitwise logic ahead of extends
Sanjay Patel [Sun, 23 Dec 2018 19:58:16 +0000 (19:58 +0000)]
[DAGCombiner] allow hoisting vector bitwise logic ahead of extends

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

6 years ago[x86] add tests for vector extend + logic ops; NFC
Sanjay Patel [Sun, 23 Dec 2018 18:37:44 +0000 (18:37 +0000)]
[x86] add tests for vector extend + logic ops; NFC

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

6 years ago[gn build] Add build files for clang/tools/{arcmt-test,clang-check,clang-func-mapping}
Nico Weber [Sun, 23 Dec 2018 14:19:53 +0000 (14:19 +0000)]
[gn build] Add build files for clang/tools/{arcmt-test,clang-check,clang-func-mapping}

Needed for check-clang.

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

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

6 years ago[gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, clang/utils...
Nico Weber [Sun, 23 Dec 2018 14:17:13 +0000 (14:17 +0000)]
[gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, clang/utils/hmaptool, clang/lib/Tooling/Refactoring

Needed for check-clang.

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

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

6 years ago[gn build] Add build files for clang/tools/{clang-diff,clang-import-test,diagtool...
Nico Weber [Sun, 23 Dec 2018 14:15:26 +0000 (14:15 +0000)]
[gn build] Add build files for clang/tools/{clang-diff,clang-import-test,diagtool and clang/lib/Tooling, clang/lib/Tooling/ASTDiff

Needed for check-clang.

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

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

6 years ago[ORC] Rename register in the OrcMips64 resolver code comments. NFC
Simon Atanasyan [Sun, 23 Dec 2018 12:05:04 +0000 (12:05 +0000)]
[ORC] Rename register in the OrcMips64 resolver code comments. NFC

The `fp` and `s8` register names are synonyms. But `fp` better reflects
a purpose of the register.

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

6 years ago[ORC] clang-format OrcMips32 and OrcMips64 code. NFC
Simon Atanasyan [Sun, 23 Dec 2018 12:05:00 +0000 (12:05 +0000)]
[ORC] clang-format OrcMips32 and OrcMips64 code. NFC

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

6 years ago[ORC] Remove redundant instruction from MIPS resolver code. NFC
Simon Atanasyan [Sun, 23 Dec 2018 12:04:55 +0000 (12:04 +0000)]
[ORC] Remove redundant instruction from MIPS resolver code. NFC

It's redundant to restore the `$a3` register twice.

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

6 years ago[MemCpyOpt] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 06:40:39 +0000 (06:40 +0000)]
[MemCpyOpt] Use LocationSize instead of ints; NFC

Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.

srcSize is derived from the size of an alloca, and we quit out if the
size of that is > the size of the thing we're copying to. Hence, we
should always copy everything over, so these sizes are precise.

Don't make srcSize itself a LocationSize, since optionality isn't
helpful, and we do some comparisons against other sizes elsewhere in
that function.

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

6 years ago[X86] Return false from hasAndNotCompare if the comparision value is a constant.
Craig Topper [Sun, 23 Dec 2018 05:52:55 +0000 (05:52 +0000)]
[X86] Return false from hasAndNotCompare if the comparision value is a constant.

We won't end up using an ANDN instruction in this case so we should generate the same code we do for pre-BMI targets.

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

6 years ago[MemoryLocation] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 03:36:44 +0000 (03:36 +0000)]
[MemoryLocation] Use LocationSize instead of ints; NFC

Trying to keep these patches super small so they're easily post-commit
verifiable, as requested in D44748.

This one sadly isn't *super* small, but all of the changes here are
either to:
- libfuncs that are passed a constant size (memcpy, memset, ...)
- instructions that store/load a constant size

So they have to be precise

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

6 years ago[Loads] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 03:10:56 +0000 (03:10 +0000)]
[Loads] Use LocationSize instead of ints; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

This tries to find literal loads/stores of the given type, so this has
to be precise.

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

6 years ago[Lint] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 02:50:08 +0000 (02:50 +0000)]
[Lint] Use LocationSize instead of ints; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

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

6 years ago[AAEval] Use LocationSize instead of ints; NFC
George Burgess IV [Sun, 23 Dec 2018 02:39:58 +0000 (02:39 +0000)]
[AAEval] Use LocationSize instead of ints; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

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

6 years ago[X86] Fix an old FIXME about folding the zero constant into the OR instruction we...
Craig Topper [Sun, 23 Dec 2018 01:54:43 +0000 (01:54 +0000)]
[X86] Fix an old FIXME about folding the zero constant into the OR instruction we use for sequentially consistent fence in 32-bit mode without SSE2.

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

6 years ago[X86] Autogenerate complete checks. NFC
Craig Topper [Sun, 23 Dec 2018 01:54:41 +0000 (01:54 +0000)]
[X86] Autogenerate complete checks. NFC

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

6 years agoDebugInfo: Accurately propagate the section used by a relocation when accessing range...
David Blaikie [Sat, 22 Dec 2018 22:20:40 +0000 (22:20 +0000)]
DebugInfo: Accurately propagate the section used by a relocation when accessing ranges defined by low/high_pc

This is difficult/not possible to test in LLVM, but is visible as a
crash in LLD when parsing DWARF to generate gdb-index.

This function is called by llvm-dwarfdump when parsing high_pc for
non-verbose output (to print the actual high_pc rather than the low_pc
relative value), but in that case llvm-dwarfdump doesn't print section
names (if it did, it would hit this problem).

We could add some other features to llvm-dwarfdump to expose this, but
nothing really springs to my mind. I will add a test to lld, though.

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

6 years agollvm-dwarfdump: Dump the section name/number for addr attributes
David Blaikie [Sat, 22 Dec 2018 20:34:58 +0000 (20:34 +0000)]
llvm-dwarfdump: Dump the section name/number for addr attributes

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

6 years ago[Analysis] More LocationSize cleanup; NFC
George Burgess IV [Sat, 22 Dec 2018 18:23:21 +0000 (18:23 +0000)]
[Analysis] More LocationSize cleanup; NFC

Keeping these patches super small so they're easily post-commit
verifiable, as requested in D44748.

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