Commit Graph

283435 Commits

Author SHA1 Message Date
George Rimar 4e6f52c9a4 [ELF] - Add testcase documenting flags assigned when empty synthetic section is removed.
This responds to PR36475,

r325763 led to unexprected layout change, though
new behavior seems to be more correct.

Previously we could have following script:

.foo : { *(.foo) } 
.bar : { *(.synthetic_empty) BYTE(0x11) }}
where synthetic_empty is a synthetic section which is empty and
hence removed by linker.

Before r325763 .bar would receive section flags from .synthetic_empty,
but after this revision it receives flags the same as .foo section has.

It is the same as if there would not be any synthetic_empty section in a script,
so looks reasonable and consistent behavior:
.foo : { *(.foo) } 
.bar : { BYTE(0x11) }}

Patch adds testcase to document it.

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

llvm-svn: 325873
2018-02-23 09:57:17 +00:00
Stefan Maksimovic 3cd76b1448 [mips] Reland r310704
Recommit this change which was previously reverted
for the 5.0.0 release since the failures identified
were dealt with in r325782.

llvm-svn: 325872
2018-02-23 08:37:48 +00:00
Jonas Paulsson 07d6aea61a [Mips] Return true in enableMultipleCopyHints().
Enable multiple COPY hints to eliminate more COPYs during register allocation.

Note that this is something all targets should do, see
https://reviews.llvm.org/D38128.

Review: Simon Dardis
llvm-svn: 325870
2018-02-23 08:30:15 +00:00
Hans Wennborg ff52eb5927 ReleaseNotes: user lower-case for lld in the text
llvm-svn: 325869
2018-02-23 08:27:38 +00:00
Sam McCall 091557d2a8 [clangd] BindWithForward -> Bind. NFC
llvm-svn: 325868
2018-02-23 07:54:17 +00:00
Jan Vesely 86db4302e0 utils: Adapt to llvm r325155
r325155 ("Pass a reference to a module to the bitcode writer.")
changed bit writer interface from pointer to reference

Reviewer: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325867
2018-02-23 07:37:03 +00:00
Jan Vesely 1ad6a94676 amdgcn: Fix build after GDS/const AS swap in r325030
Acked-by: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325866
2018-02-23 07:37:01 +00:00
Jan Vesely eda1872d04 amdgcn: Fix datalayout after addition of 32bit const AS in r324747
Acked-by: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325865
2018-02-23 07:36:54 +00:00
Jan Vesely 83cd840010 r600: Fix datalayout after clang r324101
r324101 switched around AS numbering

Acked-by: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325864
2018-02-23 07:36:51 +00:00
Jan Vesely 911666f3fa amdgcn: Fix datalayout after clang r324101
r324101 switched around AS numbering

Acked-by: Aaron Watry <awatry@gmail.com>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 325863
2018-02-23 07:36:39 +00:00
Frederic Riss 0fda3a8721 Fix TestMultithreaded when there's no debugserver specified
r325858 was bogus and would error out with a KeyError when --server
was not passed to dotest.py.

llvm-svn: 325862
2018-02-23 05:29:27 +00:00
Sam Clegg 9310297438 [WebAssembly] Add explicit symbol table
This change modified lld to in response the llvm change which
moved to a more explicit symbol table in the object format.

Based on patches by Nicholas Wilson:
 1. https://reviews.llvm.org/D41955
 2. https://reviews.llvm.org/D42585

The primary difference that we see in the test output is that
for relocatable (-r) output we now have symbol table which
replaces exports/imports and globals.

See: https://github.com/WebAssembly/tool-conventions/issues/38
Differential Revision: https://reviews.llvm.org/D43264

llvm-svn: 325861
2018-02-23 05:08:53 +00:00
Sam Clegg 6c899ba6de [WebAssembly] Add first claass symbol table to wasm objects
This is combination of two patches by Nicholas Wilson:
  1. https://reviews.llvm.org/D41954
  2. https://reviews.llvm.org/D42495

Along with a few local modifications:
- One change I made was to add the UNDEFINED bit to the binary format
  to avoid the extra byte used when writing data symbols.  Although this
  bit is redundant for other symbols types (i.e. undefined can be
  implied if a function or global is a wasm import)
- I prefer to be explicit and consistent and not have derived flags.
- Some field renaming.
- Some reverting of unrelated minor changes.
- No test output differences.

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

llvm-svn: 325860
2018-02-23 05:08:34 +00:00
Frederic Riss 0fd6a530a0 Fix TestUbsanBasic
Summary:
Potentially due to the recent testuite refactorings, this test now reports
a full absolute path but expect just the filename. For some reason this
test is skipped on GreenDragon so we've never seen the issue.

Reviewers: vsk

Subscribers: kubamracek, lldb-commits

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

llvm-svn: 325859
2018-02-23 05:03:10 +00:00
Frederic Riss 8492f2081d Fix TestMultithreaded when specifying an alternative debugserver.
Summary:
This test launches a helper that uses the debugserver. The environment
variable sepcifying the debug server wasn't passed to this helper, thus
it was using the default one.

Subscribers: lldb-commits

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

llvm-svn: 325858
2018-02-23 05:03:09 +00:00
Sam Clegg 6c4dbfeec1 [WebAssembly] Move lambda declaration output of loop. NFC.
Differential Revision: https://reviews.llvm.org/D43534

llvm-svn: 325857
2018-02-23 04:59:57 +00:00
Ed Maste 7129ae39bd remove FreeBSD xfail from lit TestCallStdStringFunction
This test is consistently reporting unexpected pass for me, and the
expectedFailure decorator was removed from the legacy test in r310626.
Apply the same change to the lit version of this test.

Will investigate further if this fails once the new buildbot is running
tests.

llvm.org/pr17807

llvm-svn: 325856
2018-02-23 02:50:07 +00:00
Fangrui Song 9cd5df0e15 [ELF] Add comment for preemptible and fix typo. NFC
Subscribers: emaste, arichardson, llvm-commits

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

llvm-svn: 325855
2018-02-23 02:05:48 +00:00
Richard Smith 9ff1bfe480 Add a test to ensure we don't permit mutable access on temporaries outside the evaluation in which they were created.
llvm-svn: 325854
2018-02-23 02:03:26 +00:00
Richard Smith 1a9a404fb0 Remove file missed by r325852 due to merge conflict.
llvm-svn: 325853
2018-02-23 01:57:28 +00:00
Richard Smith ade53736b0 Revert r325128 ("[X86] Reduce Store Forward Block issues in HW").
This is causing miscompiles in some situations. See the llvm-commits thread for the commit for details.

llvm-svn: 325852
2018-02-23 01:43:46 +00:00
Davide Italiano f2ff789e99 [testsuite] Throw away test/debug_info/apple_types.
This test was only testing that clang produced the correct informations
for __apple accelerated tables. So, it's a clang test. Also, it
doesn't require any debugger intervention, the object file can
be analyzed statically with a dumper. Also, the input program
was highly verbose (unnecessarily).

r325850 commits a clang test instead, so it's time to retire this.

llvm-svn: 325851
2018-02-23 01:33:20 +00:00
Davide Italiano 7b16df0a72 [Darwin] Add a test to check clang produces accelerator tables.
This test was previously in lldb, and was only checking that clang
was emitting the correct section. So, it belongs here and not
in the debugger.

llvm-svn: 325850
2018-02-23 01:25:03 +00:00
Rui Ueyama c30927411c Make undefined symbol in DSO to pull out object files from archive files.
We have an internal program that does't link without this patch. I don't
know of any open-source program that needs this, but there might be.
Since this patch improves compatibility with GNU linkers with a few lines
of code, I think it's worth to be committed.

The problem is about undefined symbols in DSOs. Some programs depend on
the GNU linkers' behavior that they pull out object files from archive
files to resolve undefined symbols in DSOs. We already allow that kind of
"reverse" dependency (from DSOs to the main executable) for regular
symbols, in particular, for "__progname" symbol (which is usually in
crt0.o), but that doesn't work if the symbol is in an archive file.
This patch is to make it work.

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

llvm-svn: 325849
2018-02-23 01:16:57 +00:00
Aditya Nandakumar cf85f31172 [GISel]: Fix base case for m_any_of PatternMatcher.
The base case for any_of was incorrectly returning true. Also add test
case which uses m_any_of(preds...) where none of the predicates are
true.

llvm-svn: 325848
2018-02-23 01:01:59 +00:00
Vedant Kumar 1c3b05ad79 Delete some unused #includes of CleanUp.h, NFC
llvm-svn: 325847
2018-02-23 00:29:40 +00:00
Rafael Espindola 3dd4981298 Simplify setting dso_local. NFC.
The value of dso_local can be computed from just IR properties and
global information (object file type, command line options, etc).

With this patch we no longer pass in the Decl. It was almost unused
and making it fully unused guarantees that dso_local is consistent
with the rest of the IR.

llvm-svn: 325846
2018-02-23 00:22:15 +00:00
Craig Topper 0dcc88a500 [X86] Turn setne X, signedmax into setgt signedmax, X in LowerVSETCC to avoid an invert
We won't be able to fold the constant pool load, but its still better than materialing ones and xoring for the invert if we used PCMPEQ.

This will fix another regression from D42948.

llvm-svn: 325845
2018-02-23 00:21:39 +00:00
Evandro Menezes 5c986b010b [AArch64] Refactor macro fusion (NFC)
Move checks for each fusion case into separate functions for better
legibility and maintainability.

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

llvm-svn: 325844
2018-02-23 00:14:39 +00:00
Aaron Smith 89a19ac38d [PDB] Check the result of setLoadAddress()
Summary: Change setLoadAddress() to return true or false on failure.

Reviewers: zturner, llvm-commits

Reviewed By: zturner

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

llvm-svn: 325843
2018-02-23 00:02:27 +00:00
Rafael Espindola ba02f3f242 Fix grammar. NFC.
Thank to Eric Christopher for noticing.

llvm-svn: 325842
2018-02-22 23:59:46 +00:00
Vedant Kumar 6d2b435d80 [ObjC] Fix the NSConcreteData formatter and test it
The length field of an NSConcreteData lives one word past the start of
the object, not two.

llvm-svn: 325841
2018-02-22 23:48:21 +00:00
Craig Topper d2fab30827 [X86] Turn setne X, signedmin into setgt X, signedmin in LowerVSETCC to avoid an invert
This will fix one of the regressions from D42948.

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

llvm-svn: 325840
2018-02-22 23:46:28 +00:00
Evandro Menezes c0571bd065 [AArch64] Improve macro fusion test case
Improve a vector in the test case for the fusion of address generation and
loads or stores.  Otherwise, NFC.

llvm-svn: 325839
2018-02-22 23:32:06 +00:00
Adrian McCarthy 4b1a89fa92 Fix llvm-pdbutil to handle new built-in types
Summary:
The built-in PDB types enum has been extended to include char16_t and char32_t.
llvm-pdbutil was hitting an llvm_unreachable because it didn't know about these
new values.  The new values are not yet in the DIA documentation, but are
listed in the cvconst.h header that comes as part of the DIA SDK.

Reviewers: asmith, zturner, rnk

Subscribers: stella.stamenova, llvm-commits, sanjoy

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

llvm-svn: 325838
2018-02-22 23:16:56 +00:00
Eric Christopher 675dcf02a8 Update comment for whether or not we can optimize an alias - we're
checking the alias and not the aliasee. If the alias can be interposed
then we shouldn't do anything.

llvm-svn: 325837
2018-02-22 23:12:11 +00:00
Adrian McCarthy 7de450033b Fix TestMoveNearest on Windows
The header file for the DLL tried to declare inline functions and a local
function as dllexport which broke the compile and link.  Removing the bad
declarations solves the problem, and the test passes on Windows now.

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

llvm-svn: 325836
2018-02-22 22:47:47 +00:00
Adrian McCarthy 3db5d7e124 Fix TestSBData.py on Windows
Ensure that the test data is an array of bytes rather than a string that gets
encoded differently between Python 2 and Python 3.

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

llvm-svn: 325835
2018-02-22 22:47:14 +00:00
Eugene Zelenko 82eb70f0d9 [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 325834
2018-02-22 22:35:17 +00:00
Benjamin Kramer a01e97d748 Fix the build of the wasm backend.
toString conflicts with llvm::toString here. Yay for overly generic
function names.

llvm-svn: 325833
2018-02-22 22:29:27 +00:00
Sanjay Patel 0d8f5d1720 [InstrTypes] add frem and fneg with FMF creators
The more popular opcodes were added at r325730, but we
should have everything here for symmetry. I think both
of these can be used in InstCombine already, but I'll
make those changes as separate clean-ups for InstCombine.

llvm-svn: 325832
2018-02-22 21:46:13 +00:00
Paul Robinson 70def12a96 [DWARFv5] Turn an assert into a diagnostic. Hand-coded assembler files
should not trigger assertions.

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

llvm-svn: 325831
2018-02-22 21:03:33 +00:00
Teresa Johnson fd6fcbc006 [ThinLTO/gold] Perform cache pruning when cache directory specified
Summary:
As pointed out in the review for D37993, for consistency with other
linkers, gold plugin should perform cache pruning whenever there is a
cache directory specified, which will use the default cache policy.

Reviewers: pcc

Subscribers: llvm-commits, inglorion

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

llvm-svn: 325830
2018-02-22 20:57:05 +00:00
Craig Topper a2cc3c055c [TargetLowering] Rename isCondCodeLegal to isCondCodeLegalOrCustom. Add real isCondCodeLegal. Update callers to use one or the other.
isCondCodeLegal internally checked Legal or Custom which is misleading. Though no targets set any cond code action to Custom today.

So I've renamed isCondCodeLegal to isCondCodeLegalOrCustom and added a real isCondCodeLegal that only checks Legal.

I've changed legalization code to use isCondCodeLegalOrCustom and left things reachable via DAG combine as isCondCodeLegal. I've also changed some places that called getCondCodeAction and compared to Legal to just use isCondCodeLegal.

I'm looking at trying to keep SETCC all the way to isel for the AVX512 integer comparisons and I suspect I'll need to make some condition codes Custom to stop DAG combine from changing things post LegalizeOps. Prior to this only Expand stopped DAG combine, but that causes LegalizeOps to try to swap operands or invert rather than calling our Custom handler.

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

llvm-svn: 325829
2018-02-22 20:51:26 +00:00
Aaron Smith 9930e900e9 [PDB] Add missing override to silence buildbots
llvm-svn: 325828
2018-02-22 20:28:40 +00:00
Craig Topper 1aed540ea2 [X86] Make the subus special case in LowerVSETCC self contained
Previously this code overrode the flags and opcode used by the later code in LowerVSETCC. This makes the code difficult to read and follow.

This patch moves all the SUBUS code into its own function and makes it responsible for creating its own SDNodes on success.

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

llvm-svn: 325827
2018-02-22 20:24:18 +00:00
Aaron Smith 9161a6cb25 [PDB] Fix buildbot failure from missing include for DIAEnumLineNumbers
llvm-svn: 325826
2018-02-22 20:00:07 +00:00
Sander de Smalen a86f3cfb49 Revert "[DebugInfo][FastISel] Fix dropping dbg.value()"
This patch reverts r325440 and r325438 because it triggers an
assertion in SelectionDAGBuilder.cpp. Also having debug enabled
may unintentionally affect code-gen. The patch is reverted until
we find a better solution.

llvm-svn: 325825
2018-02-22 19:53:59 +00:00
Aaron Smith fbe65404fd [PDB] Implement more find methods for PDB symbols
Summary:
Add additional find methods on PDB raw symbols.

findChildrenByAddr()
findChildrenByVA()
findInlineFramesByAddr()
findInlineFramesByVA()
findInlineLines()
findInlineLinesByAddr()
findInlineLinesByRVA()
findInlineLinesByVA()




Reviewers: zturner, llvm-commits

Reviewed By: zturner

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

llvm-svn: 325824
2018-02-22 19:47:43 +00:00
Easwaran Raman 385d8ea8b5 [ThinLTO] Represent relative BF using a scaled representation .
Summary:
The current integer representation of relative block frequency prevents
representing relative block frequencies below 1. This change uses a 8 of
the 29 bits to represent the decimal part by using a fixed scale of -8.

Reviewers: tejohnson, davidxl

Subscribers: mehdi_amini, inglorion, llvm-commits

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

llvm-svn: 325823
2018-02-22 19:44:08 +00:00