oota-llvm.git
6 years ago[CMake] set_target_properties doesn't append link flags
Chris Bieneman [Thu, 3 Dec 2015 22:51:08 +0000 (22:51 +0000)]
[CMake] set_target_properties doesn't append link flags

This fixes a bug introduced in r254627, and another occurance of the same bug in this file.

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

6 years ago[Analysis] Become aware of MSVC's new/delete functions
David Majnemer [Thu, 3 Dec 2015 22:45:19 +0000 (22:45 +0000)]
[Analysis] Become aware of MSVC's new/delete functions

The compiler can take advantage of the allocation/deallocation
function's properties.  We knew how to do this for Itanium but had no
support for MSVC-style functions.

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

6 years agoraw_ostream: << operator for callables with raw_stream argument
Matthias Braun [Thu, 3 Dec 2015 22:17:26 +0000 (22:17 +0000)]
raw_ostream: << operator for callables with raw_stream argument

This allows easier construction of print helpers. Example:

Printable PrintLaneMask(unsigned LaneMask) {
  return Printable([LaneMask](raw_ostream &OS) {
    OS << format("%08X", LaneMask);
  });
}

// Usage:
OS << PrintLaneMask(Mask);

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

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

6 years ago[llvm-objdump] Use report_fatal_error() if we can't find a target.
Davide Italiano [Thu, 3 Dec 2015 22:13:40 +0000 (22:13 +0000)]
[llvm-objdump] Use report_fatal_error() if we can't find a target.

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

6 years ago[X86] Part 1 to fix x86-64 fp128 calling convention.
Chih-Hung Hsieh [Thu, 3 Dec 2015 22:02:40 +0000 (22:02 +0000)]
[X86] Part 1 to fix x86-64 fp128 calling convention.

Almost all these changes are conditioned and only apply to the new
x86-64 f128 type configuration, which will be enabled in a follow up
patch. They are required together to make new f128 work. If there is
any error, we should fix or revert them as a whole.
These changes should have no impact to current configurations.

* Relax type legalization checks to accept new f128 type configuration,
  whose TypeAction is TypeSoftenFloat, not TypeLegal, but also has
  TLI.isTypeLegal true.
* Relax GetSoftenedFloat to return in some cases f128 type SDValue,
  which is TLI.isTypeLegal but not "softened" to i128 node.
* Allow customized FABS, FNEG, FCOPYSIGN on new f128 type configuration,
  to generate optimized bitwise operators for libm functions.
* Enhance related Lower* functions to handle f128 type.
* Enhance DAGTypeLegalizer::run, SoftenFloatResult, and related functions
  to keep new f128 type in register, and convert f128 operators to library calls.
* Fix Combiner, Emitter, Legalizer routines that did not handle f128 type.
* Add ExpandConstant to handle i128 constants, ExpandNode
  to handle ISD::Constant node.
* Add one more parameter to getCommonSubClass and firstCommonClass,
  to guarantee that returned common sub class will contain the specified
  simple value type.
  This extra parameter is used by EmitCopyFromReg in InstrEmitter.cpp.
* Fix infinite loop in getTypeLegalizationCost when f128 is the value type.
* Fix printOperand to handle null operand.
* Enhance ISD::BITCAST node to handle f128 constant.
* Expand new f128 type for BR_CC, SELECT_CC, SELECT, SETCC nodes.
* Enhance X86AsmPrinter to emit f128 values in comments.

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

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

6 years ago[Hexagon] Adding shuffling resources for HVX instructions and tests for instruction...
Colin LeMahieu [Thu, 3 Dec 2015 21:44:28 +0000 (21:44 +0000)]
[Hexagon] Adding shuffling resources for HVX instructions and tests for instruction encodings.

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

6 years ago[RuntimeDyld] DenseMap -> std::unordered_map
Keno Fischer [Thu, 3 Dec 2015 21:27:59 +0000 (21:27 +0000)]
[RuntimeDyld] DenseMap -> std::unordered_map

DenseMap is most applicable when both keys and values are small.
In this case, the value violates that assumption, causing quite
significant memory overhead. A std::unordered_map is more appropriate
in this case (or at least fixed the memory problems I was seeing).

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

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

6 years agoInterface to attach maximum function count from PGO to module as module flags.
Easwaran Raman [Thu, 3 Dec 2015 20:57:37 +0000 (20:57 +0000)]
Interface to attach maximum function count from PGO to module as module flags.

This provides interface to get and set maximum function counts to Module. This
would allow things like determination of function hotness. The actual setting
of this max function count will have to be done in the frontend.

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

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

6 years ago[X86] Put no-op ADJCALLSTACK markers around all dynamic lowerings
Reid Kleckner [Thu, 3 Dec 2015 20:46:59 +0000 (20:46 +0000)]
[X86] Put no-op ADJCALLSTACK markers around all dynamic lowerings

Summary:
These ADJCALLSTACK markers don't generate code, but they keep dynamic
alloca code that calls chkstk out of the prologue.

This slightly pessimizes inalloca calls by preventing some register copy
coalescing, but I can live with that.

Reviewers: qcolombet

Subscribers: hans, llvm-commits

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

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

6 years ago[CMake] Removing an unnecessary layer of variable indirection
Chris Bieneman [Thu, 3 Dec 2015 19:47:04 +0000 (19:47 +0000)]
[CMake] Removing an unnecessary layer of variable indirection

This prevents passthrough variables from having values.

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

6 years agoMove branch folding test to a better location.
Andrew Kaylor [Thu, 3 Dec 2015 19:41:25 +0000 (19:41 +0000)]
Move branch folding test to a better location.

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

6 years agoFix buildbot failures
Andrew Kaylor [Thu, 3 Dec 2015 19:30:38 +0000 (19:30 +0000)]
Fix buildbot failures

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

6 years agoSimplify test. NFC.
Rafael Espindola [Thu, 3 Dec 2015 19:10:55 +0000 (19:10 +0000)]
Simplify test. NFC.

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

6 years agoTest commit.
Easwaran Raman [Thu, 3 Dec 2015 19:03:20 +0000 (19:03 +0000)]
Test commit.

Remove blank spaces at the end of comments

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

6 years ago[WinEH] Avoid infinite loop in BranchFolding for multiple single block funclets
Andrew Kaylor [Thu, 3 Dec 2015 18:55:28 +0000 (18:55 +0000)]
[WinEH] Avoid infinite loop in BranchFolding for multiple single block funclets

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

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

6 years ago[CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO
Chris Bieneman [Thu, 3 Dec 2015 18:45:39 +0000 (18:45 +0000)]
[CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO

Summary: This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds.

Reviewers: bogner, friss

Subscribers: llvm-commits

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

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

6 years agodwarfdump: Correctly indentify the indicies for DWP records
David Blaikie [Thu, 3 Dec 2015 18:41:59 +0000 (18:41 +0000)]
dwarfdump: Correctly indentify the indicies for DWP records

The indicies are one-based, not zero-based, per the spec.

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

6 years ago[ThinLTO] Appending linkage fixes
Teresa Johnson [Thu, 3 Dec 2015 18:20:05 +0000 (18:20 +0000)]
[ThinLTO] Appending linkage fixes

Summary:
Fix import from module with appending var, which cannot be imported. The
first fix is to remove an overly-aggressive error check.

The second fix is to deal with restructuring introduced to the module
linker yesterday in r254418 (actually, this fix was included already
in r254559, just added some additional cleanup).

Test by Mehdi Amini.

Reviewers: joker.eph, rafael

Subscribers: joker.eph, llvm-commits

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

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

6 years ago[Hexagon] Remove variable unused in NDEBUG build
Krzysztof Parzyszek [Thu, 3 Dec 2015 17:53:34 +0000 (17:53 +0000)]
[Hexagon] Remove variable unused in NDEBUG build

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

6 years agoAArch64FastISel: Use cbz/cbnz to branch on i1
Matthias Braun [Thu, 3 Dec 2015 17:19:58 +0000 (17:19 +0000)]
AArch64FastISel: Use cbz/cbnz to branch on i1

In the case of a conditional branch without a preceding cmp we used to emit
a "and; cmp; b.eq/b.ne" sequence, use tbz/tbnz instead.

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

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

6 years agoFriendly takeover of the Hexagon backend
Krzysztof Parzyszek [Thu, 3 Dec 2015 17:07:12 +0000 (17:07 +0000)]
Friendly takeover of the Hexagon backend

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

6 years ago[Hexagon] Implement CONCAT_VECTORS for HVX using V6_vcombine
Krzysztof Parzyszek [Thu, 3 Dec 2015 16:47:20 +0000 (16:47 +0000)]
[Hexagon] Implement CONCAT_VECTORS for HVX using V6_vcombine

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

6 years ago[Hexagon] NFC Using canonicalizePacket to compound/duplex/pad packets rather than...
Colin LeMahieu [Thu, 3 Dec 2015 16:37:21 +0000 (16:37 +0000)]
[Hexagon] NFC Using canonicalizePacket to compound/duplex/pad packets rather than doing it separately.  This also ensures the integrated assembler path matches the assembly parser path.

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

6 years agoSimplify ValueMap handling.
Rafael Espindola [Thu, 3 Dec 2015 16:36:16 +0000 (16:36 +0000)]
Simplify ValueMap handling.

We now just return values and let ValueMap handle the map.

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

6 years ago[Hexagon] Fix instruction descriptor flags for memory access size
Krzysztof Parzyszek [Thu, 3 Dec 2015 15:41:33 +0000 (15:41 +0000)]
[Hexagon] Fix instruction descriptor flags for memory access size

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

6 years agoDon't pass member variables to member functions. NFC.
Rafael Espindola [Thu, 3 Dec 2015 14:48:20 +0000 (14:48 +0000)]
Don't pass member variables to member functions. NFC.

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

6 years agoDelete dead code.
Rafael Espindola [Thu, 3 Dec 2015 14:35:15 +0000 (14:35 +0000)]
Delete dead code.

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

6 years ago[X86] MS inline asm: produce error when encountering "<type> ptr <reg name>"
Marina Yatsina [Thu, 3 Dec 2015 12:17:03 +0000 (12:17 +0000)]
[X86] MS inline asm: produce error when encountering "<type> ptr <reg name>"

Currently "<type> ptr <reg name>" treated as <reg name> in MS inline asm, ignoring the "<type> ptr" completely and possibly ignoring the intention of the user.
Fixed llvm to produce an error when encountering "<type> ptr <reg name>" operands.

For example: andpd xmm1,xmmword ptr xmm1 --> andpd xmm1, xmm1
though andpd has 2 possible matching formats - andpd xmm, xmm/m128

Patch by: ziv.izhar@intel.com
Differential Revision: http://reviews.llvm.org/D14607

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

6 years ago[mips][DSP] Add DSPr1 and DSPr2 tests for the standard encodings
Zlatko Buljan [Thu, 3 Dec 2015 09:56:39 +0000 (09:56 +0000)]
[mips][DSP] Add DSPr1 and DSPr2 tests for the standard encodings
Differential Revision: http://reviews.llvm.org/D15141

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

6 years ago[X86] Add support for fcomip, fucomip for Intel syntax
Marina Yatsina [Thu, 3 Dec 2015 08:55:33 +0000 (08:55 +0000)]
[X86] Add support for fcomip, fucomip for Intel syntax

According to x86 spec, fcomip and fucomip should be supported for Intel syntax.

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

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

6 years agoFix class SCEVPredicate has virtual functions and accessible non-virtual destructor.
Andy Gibbs [Thu, 3 Dec 2015 08:20:20 +0000 (08:20 +0000)]
Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor.

It is not enough to simply make the destructor virtual since there is a g++ 4.7
issue (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613) that throws the
error "looser throw specifier for ... overridding ~SCEVPredicate() noexcept".

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

6 years ago[TableGen] Remove an assumption about the order of encodings in the MVT::SimpleValueT...
Craig Topper [Thu, 3 Dec 2015 05:57:37 +0000 (05:57 +0000)]
[TableGen] Remove an assumption about the order of encodings in the MVT::SimpleValueType enum. Instead of assuming the types are sorted by size, scan the typeset arrays to find the smallest/largest type. NFC

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

6 years agoAMDGPU/SI: Emit constant arrays in the .hsrodata_readonly_agent section
Tom Stellard [Thu, 3 Dec 2015 03:34:32 +0000 (03:34 +0000)]
AMDGPU/SI: Emit constant arrays in the .hsrodata_readonly_agent section

Summary: This is done only when targeting HSA.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

6 years agoRevert "ScheduleDAGInstrs: Rework schedule graph builder."
Matthias Braun [Thu, 3 Dec 2015 03:01:10 +0000 (03:01 +0000)]
Revert "ScheduleDAGInstrs: Rework schedule graph builder."

This works mostly fine but breaks some stage 1 builders when compiling
compiler-rt on i386. Revert for further investigation as I can't see an
obvious cause/fix.

This reverts commit r254577.

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

6 years agoclang-format FunctionImport after refactoring (NFC)
Mehdi Amini [Thu, 3 Dec 2015 02:58:14 +0000 (02:58 +0000)]
clang-format FunctionImport after refactoring (NFC)

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agoRename Set variable to be plural
Mehdi Amini [Thu, 3 Dec 2015 02:40:39 +0000 (02:40 +0000)]
Rename Set variable to be plural

Thanks Sean Silva for catching this.

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agoRefactor FunctionImporter::importFunctions with a helper function to process the...
Mehdi Amini [Thu, 3 Dec 2015 02:37:33 +0000 (02:37 +0000)]
Refactor FunctionImporter::importFunctions with a helper function to process the Worklist (NFC)

This precludes some more functional changes to perform bulk imports.

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agoAdapt comment and rename variable in ModuleLinker to describe more accurately the...
Mehdi Amini [Thu, 3 Dec 2015 02:37:30 +0000 (02:37 +0000)]
Adapt comment and rename variable in ModuleLinker to describe more accurately the actual use.

Thanks Sean Silva for the suggestion.

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agoRemove "ExportingModule" from ThinLTO Index (NFC)
Mehdi Amini [Thu, 3 Dec 2015 02:37:23 +0000 (02:37 +0000)]
Remove "ExportingModule" from ThinLTO Index (NFC)

There is no real reason the index has to have the concept of an
exporting Module. We should be able to have one single unique
instance of the Index, and it should be read-only after creation
for the whole ThinLTO processing.
The linker plugin should be able to process multiple modules (in
parallel or in sequence) with the same index.

The only reason the ExportingModule was present seems to be to
implement hasExportedFunctions() that is used by the Module linker
to decide what to do with the current Module.
For now I replaced it with a query to the map of Modules path to
see if this module was declared in the Index and consider that if
it is the case then it is probably exporting function.
On the long term the Linker interface needs to evolve and this
call should not be needed anymore.

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years agoAdd a TODO item that the nop handling before FP conditional branches is
Joerg Sonnenberger [Thu, 3 Dec 2015 02:35:24 +0000 (02:35 +0000)]
Add a TODO item that the nop handling before FP conditional branches is
not enough for SPARCv7.

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

6 years agoScheduleDAGInstrs: Rework schedule graph builder.
Matthias Braun [Thu, 3 Dec 2015 02:05:27 +0000 (02:05 +0000)]
ScheduleDAGInstrs: Rework schedule graph builder.

The new algorithm remembers the uses encountered while walking backwards
until a matching def is found. Contrary to the previous version this:
- Works without LiveIntervals being available
- Allows to increase the precision to subregisters/lanemasks
  (not used for now)

The changes in the AMDGPU tests are necessary because the R600 scheduler
is not stable with respect to the order of nodes in the ready queues.

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

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

6 years agoRegisterPressure: Use range based for, fix else style; NFC
Matthias Braun [Thu, 3 Dec 2015 01:44:45 +0000 (01:44 +0000)]
RegisterPressure: Use range based for, fix else style; NFC

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

6 years ago[PGO] Add v2 format compatibility test
Xinliang David Li [Thu, 3 Dec 2015 01:05:31 +0000 (01:05 +0000)]
[PGO] Add v2 format compatibility test

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

6 years agoMC: Make sure to clear *all* of MCMachOStreamer's state
Justin Bogner [Thu, 3 Dec 2015 00:52:20 +0000 (00:52 +0000)]
MC: Make sure to clear *all* of MCMachOStreamer's state

The CreatedADWARFSection flag was added in r232842, but isn't cleared
properly when resetting the streamer's state. Fix that.

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

6 years ago[WebAssembly] Add a test for wasm-store-results pass
Derek Schuff [Thu, 3 Dec 2015 00:50:30 +0000 (00:50 +0000)]
[WebAssembly] Add a test for wasm-store-results pass

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

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

6 years ago[WebAssembly] Assert that byval and nest are not used for return types.
Dan Gohman [Wed, 2 Dec 2015 23:40:03 +0000 (23:40 +0000)]
[WebAssembly] Assert that byval and nest are not used for return types.

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

6 years agoRename a header guard to be more appropriate
David Majnemer [Wed, 2 Dec 2015 23:28:27 +0000 (23:28 +0000)]
Rename a header guard to be more appropriate

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

6 years agoForgot to add this file with r254562.
David Majnemer [Wed, 2 Dec 2015 23:09:05 +0000 (23:09 +0000)]
Forgot to add this file with r254562.

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

6 years ago[Hexagon] Improve lowering of instructions to the MC layer
Krzysztof Parzyszek [Wed, 2 Dec 2015 23:08:29 +0000 (23:08 +0000)]
[Hexagon] Improve lowering of instructions to the MC layer

- Add extenders when necessary.
- Handle some basic relocations.

This should fix the failure in tools/clang/test/CodeGenCXX/crash.cpp

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

6 years agoMove EH-specific helper functions to a more appropriate place
David Majnemer [Wed, 2 Dec 2015 23:06:39 +0000 (23:06 +0000)]
Move EH-specific helper functions to a more appropriate place

No functionality change is intended.

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

6 years agoFixup for r254547: use format_hex() to simplify code.
Alexey Samsonov [Wed, 2 Dec 2015 22:59:22 +0000 (22:59 +0000)]
Fixup for r254547: use format_hex() to simplify code.

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

6 years agoSwitch the linker to having a whitelist of GVs.
Rafael Espindola [Wed, 2 Dec 2015 22:59:04 +0000 (22:59 +0000)]
Switch the linker to having a whitelist of GVs.

This replaces DoNotLinkFromSource with ValuesToLink. It also moves the
computation of ValuesToLink earlier.

It is a bit simpler and an important step in slitting the linker into an
ir mover and a linker proper.

The test change is because we now avoid creating dead declarations.

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

6 years agoLibfuzzer: do not pass null into user function
Mike Aizatsky [Wed, 2 Dec 2015 22:43:53 +0000 (22:43 +0000)]
Libfuzzer: do not pass null into user function

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

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

6 years agoUse std::string instead of strdup() and free() in WinCodeViewLineTables
Reid Kleckner [Wed, 2 Dec 2015 22:34:30 +0000 (22:34 +0000)]
Use std::string instead of strdup() and free() in WinCodeViewLineTables

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

6 years agoDelete what is now duplicated code.
Rafael Espindola [Wed, 2 Dec 2015 22:22:24 +0000 (22:22 +0000)]
Delete what is now duplicated code.

Having to import an alias as declaration is not thinlto specific.

The test difference are because when we already have a decl and we are
not importing it, we just leave the decl alone.

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

6 years ago[llvm-dwp] Include only the non-empty columns in the cu_index
David Blaikie [Wed, 2 Dec 2015 22:01:56 +0000 (22:01 +0000)]
[llvm-dwp] Include only the non-empty columns in the cu_index

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

6 years ago[PGO] Allow input value node list to be null
Xinliang David Li [Wed, 2 Dec 2015 21:47:43 +0000 (21:47 +0000)]
[PGO] Allow input value node list to be null

This is to handle the case when vp node linked
list array is laziliy initialized at runtime

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

6 years agoFix a typo in LoopVectorize.cpp. NFC.
Cong Hou [Wed, 2 Dec 2015 21:33:47 +0000 (21:33 +0000)]
Fix a typo in LoopVectorize.cpp. NFC.

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

6 years ago[PowerPC] Remove wild call to RegScavenger::initRegState().
Alexey Samsonov [Wed, 2 Dec 2015 21:25:28 +0000 (21:25 +0000)]
[PowerPC] Remove wild call to RegScavenger::initRegState().

This call should in fact be made by RegScavenger::enterBasicBlock()
called below. The first call does nothing except for triggering UB,
indicated by UBSan (passing nullptr to memset()).

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

6 years ago[Hexagon] Remove std::hex in favor of format().
Alexey Samsonov [Wed, 2 Dec 2015 21:13:43 +0000 (21:13 +0000)]
[Hexagon] Remove std::hex in favor of format().

std::hex is not used anywhere in LLVM code base except for this place,
and it has a known undefined behavior (at least in libstdc++ 4.9.3):
https://llvm.org/bugs/show_bug.cgi?id=18156, which fires in UBSan
bootstrap of LLVM.

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

6 years agoTests: PPC: remove unnecessary metadata. NFC
Kyle Butt [Wed, 2 Dec 2015 21:08:03 +0000 (21:08 +0000)]
Tests: PPC: remove unnecessary metadata. NFC

Remove unnecessary metadata from a test case.

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

6 years agoAlso copy private linkage globals when needed.
Rafael Espindola [Wed, 2 Dec 2015 20:57:33 +0000 (20:57 +0000)]
Also copy private linkage globals when needed.

This was an omission when handling COFF style comdats with local keys.
Should fix the sanitizer-windows bot.

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

6 years agoRe-enable UBSan tests for SystemZ: PR20980 was fixed.
Alexey Samsonov [Wed, 2 Dec 2015 20:46:51 +0000 (20:46 +0000)]
Re-enable UBSan tests for SystemZ: PR20980 was fixed.

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

6 years agoDon't copy information from aliasee to alias.
Rafael Espindola [Wed, 2 Dec 2015 20:03:17 +0000 (20:03 +0000)]
Don't copy information from aliasee to alias.

They are independent.

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

6 years agoAMDGPU/SI: Correctly emit agent global segment variables when targeting HSA
Tom Stellard [Wed, 2 Dec 2015 19:47:57 +0000 (19:47 +0000)]
AMDGPU/SI: Correctly emit agent global segment variables when targeting HSA

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

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

6 years ago[Hexagon] Remove TFRI_V4 instruction, use existing A2_tfrsi instead
Krzysztof Parzyszek [Wed, 2 Dec 2015 19:44:35 +0000 (19:44 +0000)]
[Hexagon] Remove TFRI_V4 instruction, use existing A2_tfrsi instead

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

6 years agoFix linking when we copy over only a decl.
Rafael Espindola [Wed, 2 Dec 2015 19:30:52 +0000 (19:30 +0000)]
Fix linking when we copy over only a decl.

We were failing to copy the fact that the GV is weak and in the case of
an alias, producing invalid IR.

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

6 years ago[CodeGen]: Fix bad interaction with AntiDep breaking and inline asm.
Kyle Butt [Wed, 2 Dec 2015 18:58:51 +0000 (18:58 +0000)]
[CodeGen]: Fix bad interaction with AntiDep breaking and inline asm.

AggressiveAntiDepBreaker was renaming registers specified by the user
for inline assembly. While this will work for compiler-specified
registers, it won't work for user-specified registers, and at the time
this runs, I don't currently see a way to distinguish them.

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

6 years agoTest Commit: iteratee
Kyle Butt [Wed, 2 Dec 2015 18:53:33 +0000 (18:53 +0000)]
Test Commit: iteratee

Remove whitespace from blank lines. NFC

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

6 years agoFix accidental off by one change
Fiona Glaser [Wed, 2 Dec 2015 18:46:23 +0000 (18:46 +0000)]
Fix accidental off by one change

Didn't break any tests, but did unnecessary extra work.

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

6 years agoAMDGPU: Fix msan test failure
Tom Stellard [Wed, 2 Dec 2015 18:35:23 +0000 (18:35 +0000)]
AMDGPU: Fix msan test failure

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

6 years agoScheduler / Regalloc: use unique_ptr[] instead of std::vector
Fiona Glaser [Wed, 2 Dec 2015 18:32:59 +0000 (18:32 +0000)]
Scheduler / Regalloc: use unique_ptr[] instead of std::vector

vector.resize() is significantly slower than memset in many STLs
and the cost of initializing these vectors is significant on targets
with many registers. Since we don't need the overhead of a vector,
use a simple unique_ptr instead.

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

6 years ago[llvm-profdata] Change instr prof counter overflow to saturate rather than discard
Nathan Slingerland [Wed, 2 Dec 2015 18:19:24 +0000 (18:19 +0000)]
[llvm-profdata] Change instr prof counter overflow to saturate rather than discard

Summary: This changes overflow handling during instrumentation profile merge. Rathar than throwing away records that would result in counter overflow, merged counts are instead clamped to the maximum representable value. A warning about counter overflow is still surfaced to the user as before.

Reviewers: dnovillo, davidxl, silvas

Subscribers: llvm-commits

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

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

6 years agoAArch64: use ldxp/stxp pair to implement 128-bit atomic loads.
Tim Northover [Wed, 2 Dec 2015 18:12:57 +0000 (18:12 +0000)]
AArch64: use ldxp/stxp pair to implement 128-bit atomic loads.

The ARM ARM is clear that 128-bit loads are only guaranteed to have been atomic
if there has been a corresponding successful stxp. It's less clear for AArch32, so
I'm leaving that alone for now.

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

6 years ago[WebAssembly] Fix comments to say "LIFO" instead of "FIFO" when describing a stack.
Dan Gohman [Wed, 2 Dec 2015 18:08:49 +0000 (18:08 +0000)]
[WebAssembly] Fix comments to say "LIFO" instead of "FIFO" when describing a stack.

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

6 years agoAMDGPU/SI: Don't emit group segment global variables
Tom Stellard [Wed, 2 Dec 2015 17:00:42 +0000 (17:00 +0000)]
AMDGPU/SI: Don't emit group segment global variables

Summary: Only global or readonly segment variables should appear in object files.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

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

6 years agoDo (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1 rather than (A == C1 || A == C2...
David Majnemer [Wed, 2 Dec 2015 16:15:07 +0000 (16:15 +0000)]
Do (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1 rather than (A == C1 || A == C2) -> (A | (C1 ^ C2)) == C2 when C1 ^ C2 is a power of 2.

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

Patch by Amaury SECHET!

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

6 years agoAdd an interesting case we already get right.
Rafael Espindola [Wed, 2 Dec 2015 15:02:43 +0000 (15:02 +0000)]
Add an interesting case we already get right.

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

6 years agoRollback r254508 and r254511 to fix buildbots
Andy Gibbs [Wed, 2 Dec 2015 14:36:48 +0000 (14:36 +0000)]
Rollback r254508 and r254511 to fix buildbots

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

6 years agoBy intel spec
Michael Zuckerman [Wed, 2 Dec 2015 14:34:34 +0000 (14:34 +0000)]
By intel spec

|9B DD /7| FSTSW m2byte| Valid Valid Store FPU status word at m2byteafter checking for pending unmasked floating-point exceptions.|
|9B DF E0| FSTSW AX| Valid Valid Store FPU status word in AX register after checking for pending unmasked floating-point exceptions.|
|DD /7 |FNSTSW *m2byte| Valid Valid Store FPU status word at m2bytewithout checking for pending unmasked floating-point exceptions.|
|DF E0 |FNSTSW *AX| Valid Valid Store FPU status word in AX register without checking for pending unmasked floating-point exceptions|

m2byte is word register, and therefor instruction operand need to be change from f32mem to i16mem.

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

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

6 years agoFix buildbots broken by r254508
Andy Gibbs [Wed, 2 Dec 2015 14:22:18 +0000 (14:22 +0000)]
Fix buildbots broken by r254508

g++ 4.7 does not allow an inline defaulted virtual destructor to be overridden,
giving the error "looser throw specifier for ... overridding ~SCEVPredicate()
noexcept (true)" (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613).

The work-around given in the bug report above has been utilised here.

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

6 years agoFix class SCEVPredicate has virtual functions and accessible non-virtual destructor
Andy Gibbs [Wed, 2 Dec 2015 13:41:24 +0000 (13:41 +0000)]
Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor

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

6 years ago[AArch64]: Add support for Cortex-A35
Christof Douma [Wed, 2 Dec 2015 11:53:44 +0000 (11:53 +0000)]
[AArch64]: Add support for Cortex-A35

Adds support for the new Cortex-A35 ARMv8-A core.

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

6 years agoPatch to fix a crash in the PowerPC back end due to ISD::ROTL and ISD::ROTR
Nemanja Ivanovic [Wed, 2 Dec 2015 10:36:24 +0000 (10:36 +0000)]
Patch to fix a crash in the PowerPC back end due to ISD::ROTL and ISD::ROTR
not being expanded. Test case included.

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

6 years ago[mips][microMIPS] Implement PREPEND, RADDU.W.QB, RDDSP, REPL.PH, REPL.QB, REPLV.PH...
Hrvoje Varga [Wed, 2 Dec 2015 09:31:24 +0000 (09:31 +0000)]
[mips][microMIPS] Implement PREPEND, RADDU.W.QB, RDDSP, REPL.PH, REPL.QB, REPLV.PH, REPLV.QB and MTHLIP instructions
Differential Revision: http://reviews.llvm.org/D14527

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

6 years ago[X86][FMA] Optimize FNEG(FMUL) Patterns
Simon Pilgrim [Wed, 2 Dec 2015 09:07:55 +0000 (09:07 +0000)]
[X86][FMA] Optimize FNEG(FMUL) Patterns

On FMA targets, we can avoid having to load a constant to negate a float/double multiply by instead using a FNMSUB (-(X*Y)-0)

Fix for PR24366

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

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

6 years agoAVX-512: Updated cost of FP/SINT/UINT conversion operations
Elena Demikhovsky [Wed, 2 Dec 2015 08:59:47 +0000 (08:59 +0000)]
AVX-512: Updated cost of FP/SINT/UINT conversion operations

I checked and updated the cost of AVX-512 conversion operations. Added cost of conversion operations in DQ mode.
Conversion of illegal types that requires vector split is not calculated right now (like for other X86 targets).

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

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

6 years ago[X86][AVX512] add comi with Sae
Asaf Badouh [Wed, 2 Dec 2015 08:17:51 +0000 (08:17 +0000)]
[X86][AVX512] add comi with Sae
add builtin_ia32_vcomisd and builtin_ia32_vcomisd

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

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

6 years ago[llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't synthesize...
David Blaikie [Wed, 2 Dec 2015 07:09:26 +0000 (07:09 +0000)]
[llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't synthesize one)

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

6 years ago[AttributeSet] Overload AttributeSet::addAttribute to reduce compile
Akira Hatanaka [Wed, 2 Dec 2015 06:58:49 +0000 (06:58 +0000)]
[AttributeSet] Overload AttributeSet::addAttribute to reduce compile
time.

The new overloaded function is used when an attribute is added to a
large number of slots of an AttributeSet (for example, to function
parameters). This is much faster than calling AttributeSet::addAttribute
once per slot, because AttributeSet::getImpl (which calls
FoldingSet::FIndNodeOrInsertPos) is called only once per function
instead of once per slot.

With this commit, clang compiles a file which used to take over 22
minutes in just 13 seconds.

rdar://problem/23581000

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

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

6 years ago[X86] Change getZeroVector to take an MVT instead of EVT. One minor change needed...
Craig Topper [Wed, 2 Dec 2015 06:39:19 +0000 (06:39 +0000)]
[X86] Change getZeroVector to take an MVT instead of EVT. One minor change needed to only try to perform 256-it shuffle combines on legal vector types.

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

6 years ago[llvm-dwp] Emit a rather fictional debug_cu_index
David Blaikie [Wed, 2 Dec 2015 06:21:34 +0000 (06:21 +0000)]
[llvm-dwp] Emit a rather fictional debug_cu_index

This is very rudimentary support for debug_cu_index, but it is enough to
allow llvm-dwarfdump to find the offsets for  contributions and
correctly dump debug_info.

It will need to actually find the real signature of the unit and build
the real hash table with the right number of buckets, as per the DWP
specification.

It will also need to be expanded to cover the tu_index as well.

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

6 years agoDebugInfo\DWARF: Privatize some accidentally public members
David Blaikie [Wed, 2 Dec 2015 06:21:28 +0000 (06:21 +0000)]
DebugInfo\DWARF: Privatize some accidentally public members

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

6 years ago[X86] Fix weird identation. NFC
Craig Topper [Wed, 2 Dec 2015 05:24:38 +0000 (05:24 +0000)]
[X86] Fix weird identation. NFC

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

6 years agoChange ModuleLinker to take a set of GlobalValues to import instead of a single one
Mehdi Amini [Wed, 2 Dec 2015 04:34:28 +0000 (04:34 +0000)]
Change ModuleLinker to take a set of GlobalValues to import instead of a single one

For efficiency reason, when importing multiple functions for the same Module,
we can avoid reparsing it every time.

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years ago[libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb
Kostya Serebryany [Wed, 2 Dec 2015 02:49:37 +0000 (02:49 +0000)]
[libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb

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

6 years ago[sanitizer coverage] when adding a bb trace instrumentation, do it instead, not in...
Kostya Serebryany [Wed, 2 Dec 2015 02:37:13 +0000 (02:37 +0000)]
[sanitizer coverage] when adding a bb trace instrumentation, do it instead, not in addition to, regular coverage. Do the regular coverage in the run-time instead

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

6 years ago[X86] Fix a think-o when checking if the eflags needs to be preserved.
Quentin Colombet [Wed, 2 Dec 2015 02:07:00 +0000 (02:07 +0000)]
[X86] Fix a think-o when checking if the eflags needs to be preserved.

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

6 years agoModify FunctionImport to take a callback to load modules
Mehdi Amini [Wed, 2 Dec 2015 02:00:29 +0000 (02:00 +0000)]
Modify FunctionImport to take a callback to load modules

When linking static archive, there is no individual module files to
load. Instead they can be mmap'ed and could be initialized from a
buffer directly. The callback provide flexibility to override the
scheme for loading module from the summary.

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

From: Mehdi Amini <mehdi.amini@apple.com>

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

6 years ago[X86] Make sure the prologue does not clobber EFLAGS when it lives accross it.
Quentin Colombet [Wed, 2 Dec 2015 01:22:54 +0000 (01:22 +0000)]
[X86] Make sure the prologue does not clobber EFLAGS when it lives accross it.

This is a superset of the fix done in r254448.

This fixes PR25607.

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