Commit Graph

139726 Commits

Author SHA1 Message Date
Victor Leschuk
58be60c483 DebugInfo: change alignment type from uint64_t to uint32_t to save space.
In futher patches we shall have alignment field added to DIVariable family
and switching from uint64_t to uint32_t will save 4 bytes per variable.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284482 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 14:31:22 +00:00
Simon Dardis
05fe9f3914 [mips] Macro expansion for ld, sd for O32
ld and sd when assembled for the O32 ABI expand to a pair of 32 bit word loads
or stores using the specified source or destination register and the next
register.

This patch does not add support for the cases where the offset is greater than
a 16 bit signed immediate as that would lead to a wrong/misleading error
message as the assembler would report "instruction requires a CPU feature
not currently enabled" for ld & sd for MIPS64 when their offset is not a signed
16 bit number.

This fixes PR/29159.

Thanks to Sean Bruno for reporting this issue!

Reviewers: vkalintiris, seanbruno, zoran.jovanovic

Differential Review: https://reviews.llvm.org/D24556


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284481 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 14:28:00 +00:00
Michael Zuckerman
d5f902eb11 [x86][inline-asm][avx512] allow swapping of '{k<num>}' & '{z}' marks
Committing on behalf of Coby Tayree: After check-all and LGTM

Desc:

AVX512 allows dest operand to be followed by an op-mask register specifier ('{k<num>}', which in turn may be followed by a merging/zeroing specifier ('{z}')
 Currently, the following forms are allowed:
 {k<num>}
 {k<num>}{z}

This patch allows the following forms:
 {z}{k<num>}

and ignores the next form:
 {z}

Justification would be quite simple - GCC

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 13:52:39 +00:00
Simon Pilgrim
ede854370c Strip trailing whitespace (NFCI)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284478 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 13:44:00 +00:00
Vasileios Kalintiris
289f83a7d4 [mips][FastISel] Instantiate the MipsFastISel class only for targets that support FastISel.
Summary:
Instead of instantiating the MipsFastISel class and checking if the
target is supported in the overriden methods, we should perform that
check before creating the class. This allows us to enable FastISel *only*
for targets that truly support it, ie. MIPS32 to MIPS32R5.

Reviewers: sdardis

Subscribers: ehostunreach, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284475 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 13:05:42 +00:00
George Rimar
f1fdd33269 [llvm-readobj] - Teach readobj to print PT_OPENBSD_RANDOMIZE/PT_OPENBSD_WXNEEDED headers.
These are OpenBSD specific program headers and 
currently we support them in LLD.

Description of headers (just in case) available here:
http://man.openbsd.org/OpenBSD-current/man5/elf.5

OpenBSD commits were:
For PT_OPENBSD_RANDOMIZE:
c494713c45
For PT_OPENBSD_WXNEEDED:
2a5a8fc7e3

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284471 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 10:54:56 +00:00
John Brawn
a6faf3af51 [SCEV] More accurate calculation of max backedge count of some less-than loops
In loops that look something like
 i = n;
 do {
  ...
 } while(i++ < n+k);
where k is a constant, the maximum backedge count is k (in fact the backedge
count will be either 0 or k, depending on whether n+k wraps). More generally
for LHS < RHS if RHS-(LHS of first comparison) is a constant then the loop will
iterate either 0 or that constant number of times.

This allows for more loop unrolling with the recent upper bound loop unrolling
changes, and I'm working on a patch that will let loop unrolling additionally
make use of the loop being executed either 0 or k times (we need to retain the
loop comparison only on the first unrolled iteration).

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 10:10:53 +00:00
Renato Golin
8bb4ccc94b Revert "Resubmit "Add support for advanced number formatting.""
This reverts commits 284436 and 284437 because they still break AArch64 bots:

Value of: format_number(-10, IntegerStyle::Integer, 1)
  Actual: "-0"
  Expected: "-10"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 09:30:18 +00:00
Simon Pilgrim
1ba4231962 [X86][SSE] Added extra (mul x, (1 << c)) -> x << c style vector tests
vXi64 will benefit more from lowering to shifts than multiplies

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 09:29:13 +00:00
Javed Absar
729751583a [ARM] Assign cost of scaling for Cortex-R52
This patch assigns cost of the scaling used in addressing for Cortex-R52.

On Cortex-R52 a negated register offset takes longer than a non-negated
register offset, in a register-offset addressing mode.

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

Reviewer: jmolloy



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284460 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 09:08:54 +00:00
Simon Pilgrim
e615ec6e15 [X86][SSE] Add lowering to cvttpd2dq/cvttps2dq for sitofp v2f64/2f32 to 2i32
As discussed on PR28461 we currently miss the chance to lower "fptosi <2 x double> %arg to <2 x i32>" to cvttpd2dq due to its use of illegal types.

This patch adds support for fptosi to 2i32 from both 2f64 and 2f32.

It also recognises that cvttpd2dq zeroes the upper 64-bits of the xmm result (similar to D23797) - we still don't do this for the cvttpd2dq/cvttps2dq intrinsics - this can be done in a future patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 07:42:15 +00:00
Dean Michael Berris
dfab4815c7 [XRay] Support for for tail calls for ARM no-Thumb
This patch adds simplified support for tail calls on ARM with XRay instrumentation.

Known issue: compiled with generic flags: `-O3 -g -fxray-instrument -Wall
-std=c++14  -ffunction-sections -fdata-sections` (this list doesn't include my
specific flags like --target=armv7-linux-gnueabihf etc.), the following program

    #include <cstdio>
    #include <cassert>
    #include <xray/xray_interface.h>

    [[clang::xray_always_instrument]] void __attribute__ ((noinline)) fC() {
      std::printf("In fC()\n");
    }

    [[clang::xray_always_instrument]] void __attribute__ ((noinline)) fB() {
      std::printf("In fB()\n");
      fC();
    }

    [[clang::xray_always_instrument]] void __attribute__ ((noinline)) fA() {
      std::printf("In fA()\n");
      fB();
    }

    // Avoid infinite recursion in case the logging function is instrumented (so calls logging
    //   function again).
    [[clang::xray_never_instrument]] void simplyPrint(int32_t functionId, XRayEntryType xret)
    {
      printf("XRay: functionId=%d type=%d.\n", int(functionId), int(xret));
    }

    int main(int argc, char* argv[]) {
      __xray_set_handler(simplyPrint);

      printf("Patching...\n");
      __xray_patch();
      fA();

      printf("Unpatching...\n");
      __xray_unpatch();
      fA();

      return 0;
    }

gives the following output:

    Patching...
    XRay: functionId=3 type=0.
    In fA()
    XRay: functionId=3 type=1.
    XRay: functionId=2 type=0.
    In fB()
    XRay: functionId=2 type=1.
    XRay: functionId=1 type=0.
    XRay: functionId=1 type=1.
    In fC()
    Unpatching...
    In fA()
    In fB()
    In fC()

So for function fC() the exit sled seems to be called too much before function
exit: before printing In fC().

Debugging shows that the above happens because printf from fC is also called as
a tail call. So first the exit sled of fC is executed, and only then printf is
jumped into. So it seems we can't do anything about this with the current
approach (i.e. within the simplification described in
https://reviews.llvm.org/D23988 ).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 05:54:15 +00:00
Craig Topper
7873b5e86b [AVX-512] Add test case to check shuffle decoding for masked vpermilps for r284450.
This is harder to do for vpermilpd as shuffle combining turns the constant vector into an immediate since all vpermilpd's inputs with constant vector can also be encoded with the immediate form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284455 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 05:44:04 +00:00
Justin Bogner
b3c2bab0a7 Object: Add a missing return in ObjectFile::createObjectFile
When Error was threaded through these APIs back in r265606 the
"return" was missed here, which triggers a warning if/when I add
LLVM_NODISCARD to the Error type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284454 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 05:17:23 +00:00
Craig Topper
63ae3007f1 [X86] Fix DecodeVPERMVMask to handle cases where the constant pool entry has a different type than the shuffle itself.
This is especially important for 32-bit targets with 64-bit shuffle elements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284453 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 04:48:33 +00:00
Andrew Trick
3c59fd410e Improve tablegen gen-subtarget diagnostics for missing machine models.
-debug-only=subtarget-emitter prints a lot of machine model diagnostics.
This prunes the output so that the "No machine model for XXX on processor YYY"
only appears when there is definitely no machine model for that opcode.
Previously it was printing that error even if the opcode was covered by
a more general scheduling class.

<rdar://problem/15919845> [TableGen][CodeGenSchedule] Debug output does not help spotting the missing scheduling classes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 04:17:44 +00:00
Craig Topper
a97a64ce70 [AVX-512] Fix DecodeVPERMV3Mask to handle cases where the constant pool entry has a different type than the shuffle itself.
Summary: This is especially important for 32-bit targets with 64-bit shuffle elements.This is similar to how PSHUFB and VPERMIL handle the same problem.

Reviewers: RKSimon

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 04:00:32 +00:00
Craig Topper
d02b25359b [AVX-512] Add support for decoding shuffle mask from constant pool for masked VPERMILPS/PD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284450 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 03:36:52 +00:00
Mandeep Singh Grang
0480c1bb9f Fix differences in codegen between Linux and Windows toolchains
Summary:
    There are differences in codegen between Linux and Windows due to:
    1. Using std::sort which uses quicksort which is a non-stable sort.

    2. Iterating over Set data structure where the iteration order is
       non deterministic.

Reviewers: arsenm, grosbach, junbuml, zinob, MatzeB

Subscribers: MatzeB, wdng

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284441 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 00:11:19 +00:00
Zachary Turner
88bc637ad2 Rename HexStyle -> HexFormatStyle, and remove a constexpr.
This should fix the remaining broken builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 23:08:47 +00:00
Zachary Turner
b3a18516ab Resubmit "Add support for advanced number formatting."
This resubmits commits 284425 and r284428, which were reverted
in r284429 due to some infinite recursion caused by an incorrect
selection of function overloads.  Reproduced the failure on Linux
using GCC 4.8.4, and confirmed that with the new patch the tests
path on GCC as well as MSVC.  So hopefully this fixes everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 22:49:24 +00:00
Konstantin Zhuravlyov
18560f1ee0 [AMDGPU] Mark .note section SHF_ALLOC so lld creates a segment for it
Differential Revision: https://reviews.llvm.org/D25694


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 22:40:15 +00:00
Justin Lebar
fd7d73fae5 [ADT] Move CachedHashString to its own header in ADT, and rename to CachedHashStringRef.
Summary:
Reclaiming the name 'CachedHashString' will let us add a type with that
name that owns its value.

Reviewers: timshen

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 22:24:36 +00:00
Justin Lebar
afb36183fc [ADT] Add an initializer_list constructor to {Small,}DenseSet.
Reviewers: timshen

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284433 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 22:24:32 +00:00
Justin Lebar
6461aabcfc [ADT] Add SmallDenseSet.
Summary: This matches SmallDenseMap.

Reviewers: timshen

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284432 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 22:24:28 +00:00
Kevin Enderby
9296e5f5f6 Next set of additional error checks for invalid Mach-O files for the
load commands that use the MachO::sub_framework_command,
MachO::sub_umbrella_command, MachO::sub_library_command
and MachO::sub_client_command types but are not used in llvm
libObject code but used in llvm tool code.

This includes the LC_SUB_FRAMEWORK, LC_SUB_UMBRELLA,
LC_SUB_LIBRARY and LC_SUB_CLIENT load commands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 22:09:25 +00:00
Zachary Turner
fdfb1c554e Revert formatting changes.
This reverts r288425 and r284428 as they are causing test crashes
on some systems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284429 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 21:25:41 +00:00
Zachary Turner
d4bb10c270 Try to fix build after invalid pointer conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 21:14:27 +00:00
Sanjay Patel
5a8c8ece66 remove FIXME comment (fixed with r284424); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 21:08:39 +00:00
Zachary Turner
0a7eca8829 [Support] Add support for "advanced" number formatting.
raw_ostream has not afforded a lot of flexibility in terms of
how to format numbers when outputting.  Wrap this all up into
a set of low level helper functions that can be used to output
numbers with arbitrary precision, alignment, format, etc and
then update raw_ostream to use these functions.

This will be useful for upcoming improvements to llvm's string
formatting libraries, but are still useful independently.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 20:57:45 +00:00
Sanjay Patel
8cc4b69873 [DAG] use isConstOrConstSplat in ComputeNumSignBits to optimize SRA
The scalar version of this pattern was noted in:
https://reviews.llvm.org/D25485

and fixed with:
https://reviews.llvm.org/rL284395

More refactoring of the constant/splat helpers is needed and will happen in follow-up patches.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 20:41:39 +00:00
Sanjay Patel
8a2a445fa8 [DAG] make isConstOrConstSplat and isConstOrConstSplatFP more accessible; NFC
As noted in:
https://reviews.llvm.org/D25685

This is the next-to-smallest step needed to enable the ComputeNumSignBits fix in that patch. 
In a minor attempt to keep some structure, we're pulling the FP helper over along with its
integer sibling, but clearly we can and should do more refactoring of the similar helper
functions in DAGCombiner and SelectionDAG to simplify and not duplicate functionality.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284421 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 20:26:46 +00:00
Davide Italiano
ac38a647dc [opt] Strip coverage if debug info is not present.
If -coverage is passed, but -g is not, clang populates the PassManager
pipeline with StripSymbols(debugOnly = true).
The stripSymbol pass therefore scans the list of named metadata,
drops !llvm.dbg.cu, but leaves !llvm.gcov and !0 (the compileUnit MD)
around. The verifier runs, and finds out that there's a CU not listed
in !llvm.dbg.cu (as it was previously dropped) -> crash.
When we strip debug info, so, check if there's coverage data,
and strip it as well, in order to avoid pending metadata left around.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284418 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 20:05:35 +00:00
Dehao Chen
d0ef0440cf Ignore debug info when making optimization decisions in SimplifyCFG.
Summary: Debug info should *not* affect code generation. This patch properly handles debug info to make sure the generated code are the same with or without debug info.

Reviewers: davidxl, mzolotukhin, jmolloy

Subscribers: aprantl, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 19:28:44 +00:00
Rafael Espindola
29dee96fbe Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 19:25:42 +00:00
Mehdi Amini
303d287af0 [doc] use double `` to prevent html output of merging double dash
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 19:23:19 +00:00
Michael LeMay
6b54de2a5a Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284411 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 19:09:19 +00:00
Walter Erquinigo
f68eeb3359 Handle relocations to thumb functions when dynamic linking COFF modules
Summary:
This adds the necessary logic to support relocations to thumb functions in the COFF dynamic linker.
The jumps to function addresses are mostly blx, which requires the ISA selection bit when jumping to a thumb function.

Note: I'm determining if the relocation requires the ISA bit when creating the relocation entries and not when resolving the relocation. I have to do that because I need the ObjectFile and the actual Symbol, which are available only when creating the entries. It would require a gross refactor if I do it otherwise, but I'm okay with doing it if you think it's better.

Reviewers: peter.smith, compnerd

Subscribers: rengolin, sas

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 18:56:18 +00:00
Rafael Espindola
58121fbe76 Return a StringRef instead of a Comdat*.
This is a small step in making this interface compatible with an
bitcode symbol table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284408 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 18:51:02 +00:00
Tim Northover
087ac0bf03 GlobalISel: support wider range of load/store sizes in AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284406 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 18:36:53 +00:00
Tom Stellard
0d8c32f076 AMDGPU/SI: LowerParameter() should be computing align based on memory type
Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 16:56:19 +00:00
Tom Stellard
de864533c8 AMDGPU/SI: Fix LowerParameter() for i16 arguments
Summary:
If we are loading an i16 value from a 32-bit memory location, then
we need to be able to truncate the loaded value to i16.

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 16:21:45 +00:00
Sanjay Patel
6eae33cd6b [DAG] optimize away an arithmetic-right-shift of a 0 or -1 value
This came up as part of:
https://reviews.llvm.org/D25485

Note that the vector case is missed because ComputeNumSignBits() is deficient for vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 15:58:28 +00:00
Sanjay Patel
c595aad3ca [x86] add tests to show missing DAG folds for arithmetic-shift-right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 15:44:59 +00:00
Sanjay Patel
e4e17f8c53 [x86] auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 15:38:41 +00:00
Teresa Johnson
6fb063ad06 Rename interface for querying physical hardware concurrency
Based on post-commit review for D25585/r284180, rename
hardware_physical_concurrency to heavyweight_hardware_concurrency,
to better reflect what type of tasks it should be used for and
to enable other systems to map this to something other than the
number of physical cores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284390 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 14:56:53 +00:00
George Rimar
1a38c9c045 [Object/ELF] - Check Header->e_shoff value earlier and do not crash.
Patch checks that section pointer is aligned properly.
This should be done before getStringTable() call.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 14:28:12 +00:00
Benjamin Kramer
573d9cc8f2 [Support] remove_dots: Remove windows test.
Windows doesn't have roots, so I think this test doesn't make sense
there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 13:57:16 +00:00
Benjamin Kramer
94b3ee41bc [Support] remove_dots: Remove .. from absolute paths.
/../foo is still a proper path after removing the dotdot. This should
now finally match https://9p.io/sys/doc/lexnames.html [Cleaning names].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 13:28:21 +00:00
James Molloy
63b1eba065 [SDAG] Use ABI type alignment for constant pools when optimizing for size
SelectionDAG::getConstantPool will automatically determine an appropriate alignment if one is not specified. It does this by querying the type's preferred alignment. This can end up creating quite a lot of padding when the preferred alignment for vectors is 128.

In optimize-for-size mode, it makes sense to instead query the ABI type alignment which is often smaller and causes less padding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-17 12:54:07 +00:00