oota-llvm.git
10 years agoFix a small typo, NFC
Timur Iskhodzhanov [Fri, 10 Oct 2014 12:52:58 +0000 (12:52 +0000)]
Fix a small typo, NFC

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

10 years agoAPInt: Unfold return expressions so RVO can work.
Benjamin Kramer [Fri, 10 Oct 2014 10:18:12 +0000 (10:18 +0000)]
APInt: Unfold return expressions so RVO can work.

Saves a couple of expensive deep copies. NFC.

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

10 years ago[ADT] Add an (ADL-friendly) abs free function for APFloat that returns
Chandler Carruth [Fri, 10 Oct 2014 08:27:22 +0000 (08:27 +0000)]
[ADT] Add an (ADL-friendly) abs free function for APFloat that returns
by value having cleared the sign bit.

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

10 years agoDon't use an unqualified 'abs' function call with a builtin type.
Chandler Carruth [Fri, 10 Oct 2014 08:27:19 +0000 (08:27 +0000)]
Don't use an unqualified 'abs' function call with a builtin type.

This is dangerous for numerous reasons. The primary risk here is with
floating point or double types where if the wrong header files are
included in a strange order this can implicitly convert to integers and
then call the C abs function on the integers. There is a secondary risk
that even impacts integers where if the namespace the code is written in
ever defines an abs overload for types within that namespace the global
abs will be hidden. The correct form is to call std::abs or write 'using
std::abs' for builtin types (and only the latter is correct in any
generic context).

I've also added the requisite header to be a bit more explicit here.

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

10 years agoAdd tests for r219479.
David Majnemer [Fri, 10 Oct 2014 06:59:05 +0000 (06:59 +0000)]
Add tests for r219479.

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

10 years agoObject, COFF: Relax aux symbols for section definitions
David Majnemer [Fri, 10 Oct 2014 06:58:11 +0000 (06:58 +0000)]
Object, COFF: Relax aux symbols for section definitions

We, I suppose naïvely, believed the COFF specification with regard to
auxiliary symbol records which defined sections: they specified that the
symbol value should be zero.  However, dumpbin and MinGW's objdump do
not consider the symbol value as a restriction.  Relaxing this allows us
to properly dump MinGW linked executables.

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

10 years agoSink the per-CU part of DwarfDebug::finishSubprogramDefinitions into DwarfCompileUnit.
David Blaikie [Fri, 10 Oct 2014 06:39:29 +0000 (06:39 +0000)]
Sink the per-CU part of DwarfDebug::finishSubprogramDefinitions into DwarfCompileUnit.

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

10 years agoSink most of DwarfDebug::constructAbstractSubprogramScopeDIE down into DwarfCompileUnit.
David Blaikie [Fri, 10 Oct 2014 06:39:26 +0000 (06:39 +0000)]
Sink most of DwarfDebug::constructAbstractSubprogramScopeDIE down into DwarfCompileUnit.

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

10 years agoAdd minnum / maxnum to APFloat
Matt Arsenault [Fri, 10 Oct 2014 05:21:32 +0000 (05:21 +0000)]
Add minnum / maxnum to APFloat

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

10 years ago[ADT] Replace the logb implementation with the simpler and much closer
Chandler Carruth [Fri, 10 Oct 2014 05:14:12 +0000 (05:14 +0000)]
[ADT] Replace the logb implementation with the simpler and much closer
to what we actually want ilogb implementation. This makes everything
*much* easier to deal with and is actually what we want when using it
anyways.

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

10 years ago[ADT] Add the scalbn function for APFloat.
Chandler Carruth [Fri, 10 Oct 2014 04:54:30 +0000 (04:54 +0000)]
[ADT] Add the scalbn function for APFloat.

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

10 years ago[ADT] Implement the 'logb' functionality for APFloat. This is necessary
Chandler Carruth [Fri, 10 Oct 2014 04:17:04 +0000 (04:17 +0000)]
[ADT] Implement the 'logb' functionality for APFloat. This is necessary
to implement complex division in the constant folder of Clang.

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

10 years ago[LVI] Revert the remainder of "r218231 - Add two thresholds lvi-overdefined-BB-thresh...
Hal Finkel [Fri, 10 Oct 2014 03:56:24 +0000 (03:56 +0000)]
[LVI] Revert the remainder of "r218231 - Add two thresholds lvi-overdefined-BB-threshold and lvi-overdefined-threshold"

Some of r218231 was reverted with the code that used it in r218971, but not all
of it. This removes the rest (which is now dead).

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

10 years agoAvoid unnecessary map lookup/insertion.
David Blaikie [Fri, 10 Oct 2014 03:09:38 +0000 (03:09 +0000)]
Avoid unnecessary map lookup/insertion.

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

10 years agoAdd isInfinity to ConstantFP
Matt Arsenault [Fri, 10 Oct 2014 02:15:04 +0000 (02:15 +0000)]
Add isInfinity to ConstantFP

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

10 years agoSimplifyCFG: Don't convert phis into selects if we could remove undef behavior
Arnold Schwaighofer [Fri, 10 Oct 2014 01:27:02 +0000 (01:27 +0000)]
SimplifyCFG: Don't convert phis into selects if we could remove undef behavior
instead

We used to transform this:

  define void @test6(i1 %cond, i8* %ptr) {
  entry:
    br i1 %cond, label %bb1, label %bb2

  bb1:
    br label %bb2

  bb2:
    %ptr.2 = phi i8* [ %ptr, %entry ], [ null, %bb1 ]
    store i8 2, i8* %ptr.2, align 8
    ret void
  }

into this:

  define void @test6(i1 %cond, i8* %ptr) {
    %ptr.2 = select i1 %cond, i8* null, i8* %ptr
    store i8 2, i8* %ptr.2, align 8
    ret void
  }

because the simplifycfg transformation into selects would happen to happen
before the simplifycfg transformation that removes unreachable control flow
(We have 'unreachable control flow' due to the store to null which is undefined
behavior).

The existing transformation that removes unreachable control flow in simplifycfg
is:

  /// If BB has an incoming value that will always trigger undefined behavior
  /// (eg. null pointer dereference), remove the branch leading here.
  static bool removeUndefIntroducingPredecessor(BasicBlock *BB)

Now we generate:

  define void @test6(i1 %cond, i8* %ptr) {
    store i8 2, i8* %ptr.2, align 8
    ret void
  }

I did not see any impact on the test-suite + externals.

rdar://18596215

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

10 years agoFix gcc warning in gold-plugin.cpp.
Rafael Espindola [Fri, 10 Oct 2014 00:48:13 +0000 (00:48 +0000)]
Fix gcc warning in gold-plugin.cpp.

Patch by Markus Trippelsdorf!

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

10 years agoobj2yaml, COFF: Handle long section names
David Majnemer [Fri, 10 Oct 2014 00:17:57 +0000 (00:17 +0000)]
obj2yaml, COFF: Handle long section names

Long section names are represented as a slash followed by a numeric
ASCII string.  This number is an offset into a string table.

Print the appropriate entry in the string table instead of the less
enlightening /4.

N.B.  yaml2obj already does the right thing, this test exercises both
sides of the (de-)serialization.

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

10 years ago[ADT] Add basic operator overloads for arithmetic to APFloat to make
Chandler Carruth [Thu, 9 Oct 2014 23:26:15 +0000 (23:26 +0000)]
[ADT] Add basic operator overloads for arithmetic to APFloat to make
code using it more readable.

Also add a copySign static function that works more like the standard
function by accepting the value and sign-carying value as arguments.

No interesting logic here, but tests added to cover the basic API
additions and make sure they do something plausible.

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

10 years agoImprove sqrt estimate algorithm (fast-math)
Sanjay Patel [Thu, 9 Oct 2014 21:26:35 +0000 (21:26 +0000)]
Improve sqrt estimate algorithm (fast-math)

This patch changes the fast-math implementation for calculating sqrt(x) from:
y = 1 / (1 / sqrt(x))
to:
y = x * (1 / sqrt(x))

This has 2 benefits: less code / faster code and one less estimate instruction
that may lose precision.

The only target that will be affected (until http://reviews.llvm.org/D5658 is approved)
is PPC. The difference in codegen for PPC is 2 less flops for a single-precision sqrtf
or vector sqrtf and 4 less flops for a double-precision sqrt.
We also eliminate a constant load and extra register usage.

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

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

10 years agodelete function names from comments
Sanjay Patel [Thu, 9 Oct 2014 21:24:46 +0000 (21:24 +0000)]
delete function names from comments

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

10 years agodelete function name from comment
Sanjay Patel [Thu, 9 Oct 2014 21:23:39 +0000 (21:23 +0000)]
delete function name from comment

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

10 years agoAdd ApplePropertyString dump helper to Dwarf.{h|cpp}.
Frederic Riss [Thu, 9 Oct 2014 20:43:04 +0000 (20:43 +0000)]
Add ApplePropertyString dump helper to Dwarf.{h|cpp}.

Reviewers: dblaikie

Subscribers: llvm-commits

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

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

10 years agoFix bug in GPR to FPR moves in PPC64LE.
Samuel Antao [Thu, 9 Oct 2014 20:42:56 +0000 (20:42 +0000)]
Fix bug in GPR to FPR moves in PPC64LE.

The current implementation of GPR->FPR register moves uses a stack slot. This mechanism writes a double word and reads a word. In big-endian the load address must be displaced by 4-bytes in order to get the right value. In little endian this is no longer required. This patch fixes the issue and adds LE regression tests to fast-isel-conversion which currently expose this problem.

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

10 years agoRemove unused parameter
David Blaikie [Thu, 9 Oct 2014 20:36:27 +0000 (20:36 +0000)]
Remove unused parameter

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

10 years agoSink DwarfDebug::createAndAddScopeChildren down into DwarfCompileUnit.
David Blaikie [Thu, 9 Oct 2014 20:26:15 +0000 (20:26 +0000)]
Sink DwarfDebug::createAndAddScopeChildren down into DwarfCompileUnit.

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

10 years agoSink DwarfDebug::constructSubprogramScopeDIE down into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 20:21:36 +0000 (20:21 +0000)]
Sink DwarfDebug::constructSubprogramScopeDIE down into DwarfCompileUnit

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

10 years ago[Reassociate] Don't canonicalize X - undef to X + (-undef).
Chad Rosier [Thu, 9 Oct 2014 20:06:29 +0000 (20:06 +0000)]
[Reassociate] Don't canonicalize X - undef to X + (-undef).

Phabricator Revision: http://reviews.llvm.org/D5674
PR21205

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

10 years agoRemove a compiler bug workaround from 2007. The affected versions of gcc are long...
Benjamin Kramer [Thu, 9 Oct 2014 19:50:39 +0000 (19:50 +0000)]
Remove a compiler bug workaround from 2007. The affected versions of gcc are long gone.

NFC.

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

10 years agoRevert "[BasicAA] Revert "Revert r218714 - Make better use of zext and sign informati...
Hal Finkel [Thu, 9 Oct 2014 19:48:12 +0000 (19:48 +0000)]
Revert "[BasicAA] Revert "Revert r218714 - Make better use of zext and sign information.""

This reverts commit r219135 -- still causing miscompiles in SPEC it seems...

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

10 years agoRemove unused field from Operand
Matt Arsenault [Thu, 9 Oct 2014 19:15:18 +0000 (19:15 +0000)]
Remove unused field from Operand

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

10 years agoFix typo
Matt Arsenault [Thu, 9 Oct 2014 19:15:15 +0000 (19:15 +0000)]
Fix typo

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

10 years agoR600/SI: Legalize CopyToReg during instruction selection
Tom Stellard [Thu, 9 Oct 2014 19:06:00 +0000 (19:06 +0000)]
R600/SI: Legalize CopyToReg during instruction selection

The instruction emitter will crash if it encounters a CopyToReg
node with a non-register operand like FrameIndex.

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

10 years ago[PBQP] Add missing headers from r219421.
Lang Hames [Thu, 9 Oct 2014 18:36:59 +0000 (18:36 +0000)]
[PBQP] Add missing headers from r219421.

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

10 years agoSink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.
David Blaikie [Thu, 9 Oct 2014 18:24:28 +0000 (18:24 +0000)]
Sink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.

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

10 years ago[PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).
Lang Hames [Thu, 9 Oct 2014 18:20:51 +0000 (18:20 +0000)]
[PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).

This patch removes the PBQPBuilder class and its subclasses and replaces them
with a composable constraints class: PBQPRAConstraint. This allows constraints
that are only required for optimisation (e.g. coalescing, soft pairing) to be
mixed and matched.

This patch also introduces support for target writers to supply custom
constraints for their targets by overriding a TargetSubtargetInfo method:

std::unique_ptr<PBQPRAConstraints> getCustomPBQPConstraints() const;

This patch should have no effect on allocations.

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

10 years agoR600/SI: Legalize INSERT_SUBREG instructions during PostISelFolding
Tom Stellard [Thu, 9 Oct 2014 18:09:15 +0000 (18:09 +0000)]
R600/SI: Legalize INSERT_SUBREG instructions during PostISelFolding

LLVM assumes INSERT_SUBREG will always have register operands, so
we need to legalize non-register operands, like FrameIndexes, to
avoid random assertion failures.

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

10 years agoSink DwarfDebug.cpp::constructVariableDIE into DwarfCompileUnit.
David Blaikie [Thu, 9 Oct 2014 17:56:39 +0000 (17:56 +0000)]
Sink DwarfDebug.cpp::constructVariableDIE into DwarfCompileUnit.

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

10 years agoMove DwarfUnit::constructVariableDIE down to DwarfCompileUnit, since it's only needed...
David Blaikie [Thu, 9 Oct 2014 17:56:36 +0000 (17:56 +0000)]
Move DwarfUnit::constructVariableDIE down to DwarfCompileUnit, since it's only needed there.

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

10 years ago[PPC64] VSX indexed-form loads use wrong instruction format
Bill Schmidt [Thu, 9 Oct 2014 17:51:35 +0000 (17:51 +0000)]
[PPC64] VSX indexed-form loads use wrong instruction format

The VSX instruction definitions for lxsdx, lxvd2x, lxvdsx, and lxvw4x
incorrectly use the XForm_1 instruction format, rather than the
XX1Form instruction format.  This is likely a pasto when creating
these instructions, which were based on lvx and so forth.  This patch
uses the correct format.

The existing reformatting test (test/MC/PowerPC/vsx.s) missed this
because the two formats differ only in that XX1Form has an extension
to the target register field in bit 31.  The tests for these
instructions used a target register of 7, so the default of 0 in bit
31 for XForm_1 didn't expose a problem.  For register numbers 32-63
this would be noticeable.  I've changed the test to use higher
register numbers to verify my change is effective.

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

10 years agoSink DwarfDebug::constructLexicalScopeDIE into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 17:08:42 +0000 (17:08 +0000)]
Sink DwarfDebug::constructLexicalScopeDIE into DwarfCompileUnit

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

10 years agoMissing reformatting
David Blaikie [Thu, 9 Oct 2014 17:08:38 +0000 (17:08 +0000)]
Missing reformatting

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

10 years agoSink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 16:50:53 +0000 (16:50 +0000)]
Sink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnit

This introduces access to the AbstractSPDies map from DwarfDebug so
DwarfCompileUnit can access it. Eventually this'll sink down to
DwarfFile, but it'll still be generically accessible - not much
encapsulation to provide it. (constructInlinedScopeDIE could stay
further up, in DwarfFile to avoid exposing this - but I don't think
that's particularly better)

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

10 years ago[InstCombine] Fix wrong folding of constant comparisons involving ashr and negative...
Andrea Di Biagio [Thu, 9 Oct 2014 12:41:49 +0000 (12:41 +0000)]
[InstCombine] Fix wrong folding of constant comparisons involving ashr and negative values.

This patch fixes a bug in method InstCombiner::FoldCmpCstShrCst where we
wrongly computed the distance between the highest bits set of two negative
values.

This fixes PR21222.

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

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

10 years ago[AArch64] Enable partial & runtime unrolling on cortex-a57.
Kevin Qin [Thu, 9 Oct 2014 10:13:27 +0000 (10:13 +0000)]
[AArch64] Enable partial & runtime unrolling on cortex-a57.

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

10 years agoObject, COFF: Move the VirtualSize/SizeOfRawData logic to getSectionSize
David Majnemer [Thu, 9 Oct 2014 08:42:31 +0000 (08:42 +0000)]
Object, COFF: Move the VirtualSize/SizeOfRawData logic to getSectionSize

While getSectionContents was updated to do the right thing,
getSectionSize wasn't.  Move the logic to getSectionSize and leverage it
from getSectionContents.

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

10 years ago[AVX512] Extended avx512_binop_rm for AVX512VL subsets.
Robert Khasanov [Thu, 9 Oct 2014 08:38:48 +0000 (08:38 +0000)]
[AVX512] Extended avx512_binop_rm for AVX512VL subsets.
Added avx512_binop_rm_vl multiclass for VL subset
Added encoding tests

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

10 years agoObject, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)
David Majnemer [Thu, 9 Oct 2014 07:49:28 +0000 (07:49 +0000)]
Object, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)

It is not useful to return the data beyond VirtualSize it's less than
SizeOfRawData.

An implementation detail of COFF requires the section size to be rounded
up to a multiple of FileAlignment; this means that SizeOfRawData is not
representative of how large the section is.  Instead, we should cap it
to VirtualSize when this occurs as it represents the true size of the
section.

Note that this is only relevant in executable files because this
rounding doesn't occur in object files (and VirtualSize is always zero).

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

10 years agoRemove more calls to getSubtargetImpl from the schedulers and
Eric Christopher [Thu, 9 Oct 2014 06:28:06 +0000 (06:28 +0000)]
Remove more calls to getSubtargetImpl from the schedulers and
remove cached or unnecessary TargetMachines.

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

10 years agoUse triple's isiOS() and isOSDarwin() methods.
Bob Wilson [Thu, 9 Oct 2014 05:43:30 +0000 (05:43 +0000)]
Use triple's isiOS() and isOSDarwin() methods.

These methods are already used in lots of places. This makes things more
consistent. NFC.

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

10 years agoObject: Add range iterators for COFF import/export table
Rui Ueyama [Thu, 9 Oct 2014 02:16:38 +0000 (02:16 +0000)]
Object: Add range iterators for COFF import/export table

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

10 years agoRemove unused argument to CreateTargetScheduleState and change
Eric Christopher [Thu, 9 Oct 2014 01:59:35 +0000 (01:59 +0000)]
Remove unused argument to CreateTargetScheduleState and change
the TargetMachine to a TargetSubtargetInfo since everything
we wanted is off of that.

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

10 years agoRemove uses of getSubtargetImpl from ResourcePriorityQueue and
Eric Christopher [Thu, 9 Oct 2014 01:59:31 +0000 (01:59 +0000)]
Remove uses of getSubtargetImpl from ResourcePriorityQueue and
replace them with calls off of the MachineFuncton.

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

10 years agoRemove the uses of getSubtargetImpl from InstrEmitter and remove
Eric Christopher [Thu, 9 Oct 2014 01:35:29 +0000 (01:35 +0000)]
Remove the uses of getSubtargetImpl from InstrEmitter and remove
the now unused TargetMachine variable.

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

10 years agoUse the subtarget on the dag to get TargetFrameLowering rather
Eric Christopher [Thu, 9 Oct 2014 01:35:27 +0000 (01:35 +0000)]
Use the subtarget on the dag to get TargetFrameLowering rather
than off the target machine.

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

10 years agoRemove uses of the TargetMachine from FunctionLoweringInfo
Eric Christopher [Thu, 9 Oct 2014 00:57:31 +0000 (00:57 +0000)]
Remove uses of the TargetMachine from FunctionLoweringInfo
via caching TargetLowering and using the MachineFunction.

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

10 years agoPush DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 00:21:42 +0000 (00:21 +0000)]
Push DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnit

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

10 years agoSink DwarfDebug::addScopeRangeList down into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 00:11:39 +0000 (00:11 +0000)]
Sink DwarfDebug::addScopeRangeList down into DwarfCompileUnit

(& add a few accessors/make a couple of things public for this - it's a
bit of a toss-up, but I think I prefer it this way, keeping some more of
the meaty code down in DwarfCompileUnit - if only to make for smaller
implementation files, etc)

I think we could simplify range handling a bit if we removed the range
lists from each unit and just put a single range list on DwarfDebug,
similar to address pooling.

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

10 years agoRemove unnecessary include.
Eric Christopher [Wed, 8 Oct 2014 23:38:40 +0000 (23:38 +0000)]
Remove unnecessary include.

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

10 years agoUse both the cached TLI and the subtarget off of the DAG in
Eric Christopher [Wed, 8 Oct 2014 23:38:39 +0000 (23:38 +0000)]
Use both the cached TLI and the subtarget off of the DAG in
the DAG combiner.

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

10 years agoRemove getSubtargetImpl calls from FastISel, we can get it from
Eric Christopher [Wed, 8 Oct 2014 23:38:33 +0000 (23:38 +0000)]
Remove getSubtargetImpl calls from FastISel, we can get it from
the MachineFunction where it's already cached.

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

10 years agoFix typo in comment
Robin Morisset [Wed, 8 Oct 2014 23:30:45 +0000 (23:30 +0000)]
Fix typo in comment

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

10 years agoSink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's needed.
David Blaikie [Wed, 8 Oct 2014 23:30:05 +0000 (23:30 +0000)]
Sink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's needed.

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

10 years ago[AVX512] Rename AVX512_masking* to AVX512_maskable*
Adam Nemet [Wed, 8 Oct 2014 23:25:39 +0000 (23:25 +0000)]
[AVX512] Rename AVX512_masking* to AVX512_maskable*

No functional change.

This is the current AVX512_maskable multiclass hierarchy:

                 maskable_custom
                    /       \
                   /         \
          maskable_common   maskable_in_asm
            /         \
           /           \
      maskable        maskable_3src

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

10 years ago[AVX512] Intrinsics for vextract*x4
Adam Nemet [Wed, 8 Oct 2014 23:25:37 +0000 (23:25 +0000)]
[AVX512] Intrinsics for vextract*x4

This adds the Pat<>'s for the intrinsics.  These are necessary because we
don't lower these intrinsics to SDNodes but match them directly.  See the
rational in the previous commit.

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

10 years ago[AVX512] Add asm-only support for vextract*x4 masking variants
Adam Nemet [Wed, 8 Oct 2014 23:25:33 +0000 (23:25 +0000)]
[AVX512] Add asm-only support for vextract*x4 masking variants

These derive from the new asm-only masking definitions.

Unfortunately I wasn't able to find a ISel pattern that we could legally
generate for the masking variants.  The problem is that since the destination
is v4* we would need VK4 register classes and v4i1 value types to express the
masking.  These are however not legal types/classes in AVX512f but only in VL,
so things get complicated pretty quickly.  We can revisit this question later
if we have a more pressing need to express something like this.

So the ISel patterns are empty for the masking instructions and the next patch
will add Pat<>s instead to match the intrinsics calls with instructions.

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

10 years ago[AVX512] Move DAG for all-zero node to X86VectorVTInfo
Adam Nemet [Wed, 8 Oct 2014 23:25:31 +0000 (23:25 +0000)]
[AVX512] Move DAG for all-zero node to X86VectorVTInfo

No functional change.

No change in X86.td.expanded except for the appearance of the new attributes.

The new attributes will be used in the subsequent patch.

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

10 years ago[AVX512] Support mask register in MRMDestReg format
Adam Nemet [Wed, 8 Oct 2014 23:25:29 +0000 (23:25 +0000)]
[AVX512] Support mask register in MRMDestReg format

This is necessary for masking vextract*x4.

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

10 years ago[AVX512] Peel off an asm-only class from AVX512_masking_common.
Adam Nemet [Wed, 8 Oct 2014 23:25:23 +0000 (23:25 +0000)]
[AVX512] Peel off an asm-only class from AVX512_masking_common.

No functional change.

This enables the generation of masking instructions that don't provide a
ISel pattern.

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

10 years ago[X86] Don't transform atomic-load-add into an inc/dec when inc/dec is slow
Robin Morisset [Wed, 8 Oct 2014 23:16:23 +0000 (23:16 +0000)]
[X86] Don't transform atomic-load-add into an inc/dec when inc/dec is slow

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

10 years agoReformat some stuff I missed in recent previous commits
David Blaikie [Wed, 8 Oct 2014 23:09:42 +0000 (23:09 +0000)]
Reformat some stuff I missed in recent previous commits

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

10 years agoRevert r219354. It seems to break some buildbots.
Alexey Samsonov [Wed, 8 Oct 2014 23:07:59 +0000 (23:07 +0000)]
Revert r219354. It seems to break some buildbots.

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

10 years agoUse llvm-symbolizer to symbolize LLVM/Clang crash dumps.
Alexey Samsonov [Wed, 8 Oct 2014 22:57:47 +0000 (22:57 +0000)]
Use llvm-symbolizer to symbolize LLVM/Clang crash dumps.

This change modifies fatal signal handler used in LLVM tools.
Now it attempts to find llvm-symbolizer binary and communicates
with it in order to turn instruction addresses into
function/file/line info entries. This should significantly improve
stack traces readability in Debug builds.

This feature only works on selected platforms (including Darwin
and Linux). If the symbolization fails for some reason, signal
handler will fallback to the original behavior.

Reviewed in http://reviews.llvm.org/D5610

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

10 years agoSink and coalesce DwarfDebug.cpp::addSectionLabel and DwarfUnit::addSectionLabel...
David Blaikie [Wed, 8 Oct 2014 22:46:27 +0000 (22:46 +0000)]
Sink and coalesce DwarfDebug.cpp::addSectionLabel and DwarfUnit::addSectionLabel down into DwarfCompileUnit::addSectionLabel

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

10 years agoRemove dead call to getTypeToTransformTo. The result is
Eric Christopher [Wed, 8 Oct 2014 22:25:45 +0000 (22:25 +0000)]
Remove dead call to getTypeToTransformTo. The result is
unused.

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

10 years agoDebugInfo: The rest of pushing DwarfDebug::constructScopeDIE down into DwarfCompileUnit
David Blaikie [Wed, 8 Oct 2014 22:23:10 +0000 (22:23 +0000)]
DebugInfo: The rest of pushing DwarfDebug::constructScopeDIE down into DwarfCompileUnit

Funnily enough, I copied it, but didn't actually remove the original in
r219345. Let's do that.

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

10 years agoPush DwarfDebug::constructScopeDIE down into DwarfCompileUnit
David Blaikie [Wed, 8 Oct 2014 22:20:02 +0000 (22:20 +0000)]
Push DwarfDebug::constructScopeDIE down into DwarfCompileUnit

One of many steps to generalize subprogram emission to both the DWO and
non-DWO sections (to emit -gmlt-like data under fission). Once the
functions are pushed down into DwarfCompileUnit some of the data
structures will be pushed at least into DwarfFile so that they can be
unique per-file, allowing emission to both files independently.

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

10 years agoRemove a bunch of getSubtargetImpl calls since we already have
Eric Christopher [Wed, 8 Oct 2014 21:08:32 +0000 (21:08 +0000)]
Remove a bunch of getSubtargetImpl calls since we already have
a cached TLI instance.

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

10 years ago[X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())
Robin Morisset [Wed, 8 Oct 2014 19:38:18 +0000 (19:38 +0000)]
[X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())

Summary:
I had forgotten to check for NotSlowIncDec in the patterns that can generate
inc/dec for the above pattern (added in D4796).
This currently applies to Atom Silvermont, KNL and SKX.

Test Plan: New checks on atomic_mi.ll

Reviewers: jfb, nadav

Subscribers: llvm-commits

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

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

10 years agoInliner: Non-local functions in COMDATs shouldn't be dropped
David Majnemer [Wed, 8 Oct 2014 19:32:32 +0000 (19:32 +0000)]
Inliner: Non-local functions in COMDATs shouldn't be dropped

A function with discardable linkage cannot be discarded if its a member
of a COMDAT group without considering all the other COMDAT members as
well.  This sort of thing is already handled by GlobalOpt/GlobalDCE.

This fixes PR21206.

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

10 years agoFix COFF section index relocation should be 16 bits, not 32
Timur Iskhodzhanov [Wed, 8 Oct 2014 18:01:49 +0000 (18:01 +0000)]
Fix COFF section index relocation should be 16 bits, not 32

Original patch by Andrey Guskov!
http://reviews.llvm.org/D5651

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

10 years agoCorrectly compute the size of common symbols in COFF.
Rafael Espindola [Wed, 8 Oct 2014 17:37:19 +0000 (17:37 +0000)]
Correctly compute the size of common symbols in COFF.

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

10 years agoPrint symbol sizes in this test in preparation for fixing COFF common sizes.
Rafael Espindola [Wed, 8 Oct 2014 17:19:42 +0000 (17:19 +0000)]
Print symbol sizes in this test in preparation for fixing COFF common sizes.

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

10 years agoRevert "[InstCombine] re-commit r218721 with fix for pr21199"
Justin Bogner [Wed, 8 Oct 2014 16:30:22 +0000 (16:30 +0000)]
Revert "[InstCombine] re-commit r218721 with fix for pr21199"

This seems to cause a miscompile when building clang, which causes a
bootstrapped clang to fail or crash in several of its tests.

See:
  http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-RA/builds/1184
  http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/7813

This reverts commit r219282.

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

10 years ago[AVX512] Added intrinsics for 128-, 256- and 512-bit versions of VPCMP/VPCMPU{BWDQ}
Robert Khasanov [Wed, 8 Oct 2014 15:49:26 +0000 (15:49 +0000)]
[AVX512] Added intrinsics for 128-, 256- and 512-bit versions of VPCMP/VPCMPU{BWDQ}
Added CMP_MASK_CC intrinsic type.
Added tests for intrinsics.

Patch by Sergey Lisitsyn <sergey.lisitsyn@intel.com>

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

10 years agoRemove bogus std::error_code returns form SectionRef.
Rafael Espindola [Wed, 8 Oct 2014 15:28:58 +0000 (15:28 +0000)]
Remove bogus std::error_code returns form SectionRef.

There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.

Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.

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

10 years agoFix indentation.
Rafael Espindola [Wed, 8 Oct 2014 15:12:20 +0000 (15:12 +0000)]
Fix indentation.

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

10 years agoUpdate dwarf::ApplePropertyAttributes enum to meaningful values.
Frederic Riss [Wed, 8 Oct 2014 14:59:44 +0000 (14:59 +0000)]
Update dwarf::ApplePropertyAttributes enum to meaningful values.

Summary:
We currently emit an DW_AT_APPLE_property_attribute with a value that is a
bitfield describing the various attributes applied to an ObjectiveC property.
While trying to add testing to one of my dwarfdump patches that would pretty
print that, I realized this information looks totally broken and has maybe
never been correct.

As with every DWARF info, we have some enum in Dwarf.h that describes this
attribute (enum ApplePropertyAttributes). It seems however that the attribute
value is set from another definition of these flags in Sema/DeclSpec.h (enum
ObjCPropertyAttributeKind). And these 2 enums aren't in sync.

This patch updates the Dwarf.h values to the ones we are (and have been for
a very long time) emitting. We change some publicly (and even documented
in SourceLevelDebugging.rst) values, but I doubt this could be an issue as
the information has been wrong for so long...

Reviewers: echristo, dblaikie, aprantl

Subscribers: llvm-commits

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

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

10 years ago[AVX512] Refactoring of avx512_binop_rm multiclass through AVX512_masking.
Robert Khasanov [Wed, 8 Oct 2014 14:37:45 +0000 (14:37 +0000)]
[AVX512] Refactoring of avx512_binop_rm multiclass through AVX512_masking.
Added new argrument for AVX512_masking: InstrItinClass and bit isCommutable.
No functional change.

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

10 years agoRemove an out of date comment.
Rafael Espindola [Wed, 8 Oct 2014 14:27:05 +0000 (14:27 +0000)]
Remove an out of date comment.

After 4 years there is still no normalization library. We do support
disassembly and relocations, so it doesn't look like we need it.

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

10 years agoEmit unaligned access build attribute for ARM
Renato Golin [Wed, 8 Oct 2014 12:26:22 +0000 (12:26 +0000)]
Emit unaligned access build attribute for ARM

Patch by Charlie Turner.

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

10 years agoRefactor isThumb1Only() && isMClass() into a predicate called isV6M()
Renato Golin [Wed, 8 Oct 2014 12:26:16 +0000 (12:26 +0000)]
Refactor isThumb1Only() && isMClass() into a predicate called isV6M()

This must be enforced for all v6M cores, not just the cortex-m0,
irregardless of the user-specified alignment.

Patch by Charlie Turner.

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

10 years agoSimplify switch statement in ARM subtarget align access
Renato Golin [Wed, 8 Oct 2014 12:26:13 +0000 (12:26 +0000)]
Simplify switch statement in ARM subtarget align access

This switch can be reduced to a simpler if/else statement.

Patch by Charlie Turner.

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

10 years agoUse the TargetLowering information we already have on the
Eric Christopher [Wed, 8 Oct 2014 09:50:54 +0000 (09:50 +0000)]
Use the TargetLowering information we already have on the
SelectionDAG in SelectionDAGBuilder rather than going through
the TargetMachine for lookup.

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

10 years agoGrab the TargetRegisterInfo off of the subtarget from the
Eric Christopher [Wed, 8 Oct 2014 09:50:52 +0000 (09:50 +0000)]
Grab the TargetRegisterInfo off of the subtarget from the
MachineFunction rather than a lookup on the TargetMachine
to avoid unnecessary lookups.

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

10 years agoUpdate git-svnrevert to accept git and svn revisions
Renato Golin [Wed, 8 Oct 2014 09:32:47 +0000 (09:32 +0000)]
Update git-svnrevert to accept git and svn revisions

Interchangeable commit ids can now be used on this git-svnrevert, which
will figure out what kind of commit that is (if you use format rNNNN for SVN
commits) and make sure the right ids are used in the right places.

It's a little bit more robust and user-friendly.

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

10 years agoUnix/Process: Don't use pthread_sigmask if we aren't built with threads
David Majnemer [Wed, 8 Oct 2014 08:48:43 +0000 (08:48 +0000)]
Unix/Process: Don't use pthread_sigmask if we aren't built with threads

We won't link in pthreads if we weren't built with LLVM_ENABLE_THREADS
which means we won't get access to pthread_sigmask.  Use sigprocmask
instead.

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

10 years agoReplace calls to get the subtarget and TargetFrameLowering with
Eric Christopher [Wed, 8 Oct 2014 08:46:34 +0000 (08:46 +0000)]
Replace calls to get the subtarget and TargetFrameLowering with
cached variables and a single call in the constructor.

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

10 years agoFormat spacing and remove extra lines to comply with standards. NFC.
Suyog Sarda [Wed, 8 Oct 2014 08:37:49 +0000 (08:37 +0000)]
Format spacing and remove extra lines to comply with standards. NFC.

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

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

10 years agoUse cached subtarget rather than looking it up on the
Eric Christopher [Wed, 8 Oct 2014 07:51:41 +0000 (07:51 +0000)]
Use cached subtarget rather than looking it up on the
TargetMachine again.

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