Commit Graph

225049 Commits

Author SHA1 Message Date
Rui Ueyama 2df72898c8 Remove `else` after `return`.
llvm-svn: 263392
2016-03-13 20:54:38 +00:00
Rui Ueyama 54945f692b Simplify. NFC.
llvm-svn: 263391
2016-03-13 20:34:34 +00:00
Rui Ueyama a0752a5b25 Remove unused #include.
llvm-svn: 263390
2016-03-13 20:28:29 +00:00
Rui Ueyama 98a4b8b05c Remove a local variable. NFC.
llvm-svn: 263389
2016-03-13 20:18:12 +00:00
Simon Atanasyan 0295bb42c0 [ELF][MIPS] Use TargetInfo::needsGot call to check necessity of GOT for local symbols. NFC.
llvm-svn: 263388
2016-03-13 20:13:24 +00:00
Rui Ueyama 6c5638b01a ELF: Add `Rela` member variable to Config.
The member is true if we want to create relocatin sections with RELA
instead of REL.

llvm-svn: 263387
2016-03-13 20:10:20 +00:00
Rui Ueyama c4466605d8 ELF: Redefine canBeDefined as a member function of SymbolBody.
We want to make SymbolBody the central place to query symbol information.
This patch also renames canBePreempted to isPreemptible because I feel that
the latter is slightly better (the former is three words and the latter
is two words.)

llvm-svn: 263386
2016-03-13 19:48:18 +00:00
Rui Ueyama 22b5d1f901 ELF: Set e_flags header only when MIPS.
The field is zero by default, so this is NFC.

llvm-svn: 263385
2016-03-13 19:29:17 +00:00
Simon Pilgrim 5f1326f8cc [X86][SSE] Added truncated vector arithmetic tests.
For cases where we are truncating an integer vector arithmetic result, it may be better to pre-truncate the input operands - no code to support this yet (scalar is done with SimplifyDemandedBits but adding vector support could be a lot of work) but these tests represent the current codegen status.

Example bugs: PR14666, PR22703

llvm-svn: 263384
2016-03-13 19:08:01 +00:00
Simon Pilgrim 035b19ecf5 [X86][SSE41] Avoid variable blend for constant v8i16 shifts
The SSE41 v8i16 shift lowering using (v)pblendvb is great for non-constant shift amounts, but if it is constant then we can efficiently reduce the VSELECT to shuffles with the pre-SSE41 lowering.

llvm-svn: 263383
2016-03-13 18:35:59 +00:00
Simon Atanasyan d27e61c591 [ELF][MIPS] Add elf namespace name to the ObjectFile.
NFC. Follow-up to r263381.

llvm-svn: 263382
2016-03-13 15:48:41 +00:00
Simon Atanasyan 604aee134a [ELF][MIPS] Factor out SumVA adjustments into a couple of separate functions. NFC.
The patch does not reduce the size of the code but makes
InputSectionBase::relocate cleaner a bit.

Differential Revision: http://reviews.llvm.org/D18119

llvm-svn: 263381
2016-03-13 15:37:38 +00:00
Amjad Aboud 13d7a70657 Added test that covers changes in r263379.
llvm-svn: 263380
2016-03-13 11:12:57 +00:00
Amjad Aboud 62f6f5cc80 Fixed DIBuilder to verify that same imported entity will not be added twice to the "imports" list of the DICompileUnit.
Differential Revision: http://reviews.llvm.org/D17884

llvm-svn: 263379
2016-03-13 11:11:39 +00:00
David Majnemer 1256125fb7 [CodeView] Truncate display names
Fundamentally, the length of a variable or function name is bound by the
maximum size of a record: 0xffff.  However, the name doesn't live in a
vacuum; other data is associated with the name, lowering the bound
further.

We would naively attempt to emit the name, causing us to assert because
the record would no-longer fit in 16-bits.  Instead, truncate the name
but preserve as much as we can.

While I have tested this locally, I've decided to not commit it due to
the test's size.

N.B.  While this behavior is undesirable, it is better than MSVC's
behavior.  They seem to truncate to ~4000 characters.

llvm-svn: 263378
2016-03-13 10:53:30 +00:00
David Majnemer 90a021fb02 [Bitcode] Make writeComdats less strange
It had a weird artificial limitation on the write side: the comdat name
couldn't be bigger than 2**16.  However, the reader had no such
limitation.  Make the reader and the writer agree.

llvm-svn: 263377
2016-03-13 08:01:03 +00:00
Rui Ueyama 1e720b9c0c Cosmetic change. NFC.
llvm-svn: 263376
2016-03-13 06:50:34 +00:00
Rui Ueyama c63c1dbd6a Move an OutputSectionBase member function to the top.
llvm-svn: 263375
2016-03-13 06:50:33 +00:00
Fiona Glaser 2e5c0c2858 ConstantFoldInstruction: avoid wasted calls to ConstantFoldConstantExpression
Check to see if all operands are constant before calling simplify on them
so that we don't perform wasted simplifications.

llvm-svn: 263374
2016-03-13 05:36:15 +00:00
Rui Ueyama 614be59692 Simplify. NFC.
llvm-svn: 263373
2016-03-13 05:23:40 +00:00
Matt Arsenault cb5af451b3 Fix build
llvm-svn: 263372
2016-03-13 05:22:08 +00:00
Matt Arsenault c477f48f03 Update for new argument to scalbn
llvm-svn: 263371
2016-03-13 05:12:47 +00:00
Matt Arsenault 69fdf9b2e4 APFloat: Fix ilogb for denormals
llvm-svn: 263370
2016-03-13 05:12:32 +00:00
Matt Arsenault afa31cf4cc APFloat: Fix scalbn handling of denormals
This was incorrect for denormals, and also failed
on longer exponent ranges.

llvm-svn: 263369
2016-03-13 05:11:51 +00:00
Rui Ueyama fc467e77b8 Use RelTy instead of Elf_Rel_Impl<ELFT, isRela> for readability.
llvm-svn: 263368
2016-03-13 05:06:50 +00:00
Rui Ueyama cb1d961385 Define IsRela static const member to Elf_Rel type.
So that we can write RelTy::IsRela to query its type.

llvm-svn: 263367
2016-03-13 04:55:44 +00:00
Rui Ueyama a777e01f02 Cosmetic change to reduce repetitions. NFC.
llvm-svn: 263366
2016-03-13 04:40:17 +00:00
Rui Ueyama 7ede54310a Redefine isGnuIfunc as a member function of SymbolBody.
llvm-svn: 263365
2016-03-13 04:40:14 +00:00
Rui Ueyama cb8fd3ac68 Body can never be null in this context.
Because of the recent commit to allocate SymbolBodies for local symbols.

llvm-svn: 263364
2016-03-13 04:40:12 +00:00
Rui Ueyama 860b13fc02 Remove dead code.
llvm-svn: 263363
2016-03-13 04:25:43 +00:00
Rui Ueyama 6eafa7fb23 Do not return a bool value from error().
error returned true if there was an error. This allows us to replace
the code like this

  if (EC) {
    error(EC, "something failed");
    return;
  }

with

  if (error(EC, "something failed"))
    return;

I thought that that was a good idea, but it turned out that we only
have two places to use this pattern. So this patch removes that feature.

llvm-svn: 263362
2016-03-13 04:25:41 +00:00
Rui Ueyama b30f73568f The difference of getBss() and Out<ELFT>::Bss is subtle, so remove that function.
llvm-svn: 263361
2016-03-13 04:11:53 +00:00
Rui Ueyama a969218f91 Split addCopyRelSymbols. NFC.
llvm-svn: 263360
2016-03-13 04:05:42 +00:00
Rui Ueyama 84be8c5219 Remove redundant check.
The control reaches here only when linking MIPS binaries.

llvm-svn: 263359
2016-03-13 03:43:32 +00:00
Rui Ueyama 3ed2f06913 Fix spelling.
llvm-svn: 263358
2016-03-13 03:17:44 +00:00
Rui Ueyama 7f4a492f98 "Windows" is a product name, so it should be spelled correctly.
llvm-svn: 263357
2016-03-13 03:17:42 +00:00
Rui Ueyama 2039847062 Simplify findMipsPairedReloc function signature. NFC.
llvm-svn: 263356
2016-03-13 03:09:40 +00:00
Nico Weber deed64e52c Also test that the pch file is not printed in /showIncludes
llvm-svn: 263355
2016-03-13 03:04:46 +00:00
Craig Topper 955308fbee [X86] Remove many operands that represent memory stores from outs to ins. These operands are the registers and immediates that specify the memory address not the memory itself thus they are inputs.
llvm-svn: 263354
2016-03-13 02:56:31 +00:00
Nico Weber efe190a6eb Make test a bit stricter to check not just the file basename is printed.
llvm-svn: 263353
2016-03-13 02:48:51 +00:00
Nico Weber 4b5aedef16 clang-cl: Add /Yc argument to /showIncludes output.
To make this work, delay printing of ExtraDeps in HeaderIncludesCallback a bit,
so that it happens after CompilerInstance::InitializeSourceManager() has run.

General /FI arguments are still missing from /showIncludes output, this still
needs to be fixed.

llvm-svn: 263352
2016-03-13 02:44:13 +00:00
Rui Ueyama 28286cdfc7 ELF: Include the build ID section in the first page.
At least Linux has the kernel configuration to include the first page
of the executable into core files. We want build ID section to be
included in core files to identify them.

Here is the link to the description about the kernel configuration.

097f70b3c4/fs/Kconfig.binfmt (L46)

llvm-svn: 263351
2016-03-13 01:54:48 +00:00
Amaury Sechet b325686764 Add echo test for constant data arrays in the LLVM C API
llvm-svn: 263350
2016-03-13 00:58:25 +00:00
Amaury Sechet 006ce6327e Use templated version of unwrap instead of cats in the Core.cpp. NFC
llvm-svn: 263349
2016-03-13 00:54:40 +00:00
Amaury Sechet c78768f17d Move LLVMConstStructInContext so that declarationa nd definition order match. NFC
llvm-svn: 263348
2016-03-13 00:40:12 +00:00
Sanjay Patel 610da4fbaf update test to use FileCheck
llvm-svn: 263347
2016-03-12 21:09:26 +00:00
Sanjay Patel 9da9c76627 fix documentation comments; NFC
llvm-svn: 263346
2016-03-12 20:44:58 +00:00
Sanjay Patel 17c2690146 fix documentation comments; NFC
llvm-svn: 263345
2016-03-12 20:44:30 +00:00
Nico Weber 1f8bad5198 clang-cl: Add a test for the interaction of /Yc and /showIncludes.
We almost get this right, but not completely (see FIXME).  It looks like /FI
headers generally aren't included in /showIncludes yet, but they should be.
But it seems good to have test coverage for the bits that already work.

llvm-svn: 263344
2016-03-12 19:55:59 +00:00
Sanjay Patel 5658b58936 remove unnecessary cast; NFC
llvm-svn: 263343
2016-03-12 18:17:41 +00:00