OSDN Git Service
Michael Kuperstein [Sun, 15 Dec 2013 10:01:20 +0000 (10:01 +0000)]
Fix AsmWriter's handling of SPIR calling conventions. Patch by Boaz Ouriel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197335
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sun, 15 Dec 2013 00:12:52 +0000 (00:12 +0000)]
Replace string matching with a switch on Triple::getEnvironment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197332
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 14 Dec 2013 23:06:19 +0000 (23:06 +0000)]
[Stackmap] Refactor operand parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197329
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Dec 2013 18:21:59 +0000 (18:21 +0000)]
Don't manually calculate size in bytes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197327
91177308-0d34-0410-b5e6-
96231b3b80d8
Iain Sandoe [Sat, 14 Dec 2013 13:34:02 +0000 (13:34 +0000)]
[Powerpc darwin] AsmParser Base implementation.
This is a base implementation of the powerpc-apple-darwin asm parser dialect.
* Enables infrastructure (essentially isDarwin()) and fixes up the parsing of asm directives to separate out ELF and MachO/Darwin additions.
* Enables parsing of {r,f,v}XX as register identifiers.
* Enables parsing of lo16() hi16() and ha16() as modifiers.
The changes to the test case are from David Fang (fangism).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197324
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 14 Dec 2013 12:23:14 +0000 (12:23 +0000)]
Remove weak vtables. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197323
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 14 Dec 2013 06:53:06 +0000 (06:53 +0000)]
[Stackmap] Liveness Analysis Pass
This optional register liveness analysis pass can be enabled with either
-enable-stackmap-liveness, -enable-patchpoint-liveness, or both. The pass
traverses each basic block in a machine function. For each basic block the
instructions are processed in reversed order and if a patchpoint or stackmap
instruction is encountered the current live-out register set is encoded as a
register mask and attached to the instruction.
Later on during stackmap generation the live-out register mask is processed and
also emitted as part of the stackmap.
This information is optional and intended for optimization purposes only. This
will enable a client of the stackmap to reason about the registers it can use
and which registers need to be preserved.
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197317
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 14 Dec 2013 06:52:59 +0000 (06:52 +0000)]
[Stackmap] Only the AnyReg calling convention should preserve all registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197316
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Sat, 14 Dec 2013 06:52:56 +0000 (06:52 +0000)]
Convert register liveness tracking to work on a sub-register level instead of just register units.
Reviewed by Andy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197315
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 14 Dec 2013 06:42:48 +0000 (06:42 +0000)]
Refactor NVPTX's computeDataLayout.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197312
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 14 Dec 2013 06:36:30 +0000 (06:36 +0000)]
Turn NVPTXSubtarget::getDataLayout into a static function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197311
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 14 Dec 2013 06:13:44 +0000 (06:13 +0000)]
Turn AMDGPUSubtarget::getDataLayout into a static function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197310
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 02:37:38 +0000 (02:37 +0000)]
[block-freq] Rename getEntryFrequency() -> getEntryFreq() to match getBlockFreq() in all *BlockFrequencyInfo*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197304
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 02:24:25 +0000 (02:24 +0000)]
[block-freq] Teach branch probability how to return the edge weight in between a BasicBlock and one of its successors.
IMHO At some point BasicBlock should be refactored along the lines of
MachineBasicBlock so that successors/weights are actually embedded within the
block. Now is not that time though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197303
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 02:24:22 +0000 (02:24 +0000)]
[block-freq] Add a right shift to BlockFrequency that saturates at 1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197302
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:57:18 +0000 (00:57 +0000)]
[block-freq] Remove old BlockFrequency entry frequency and printing code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197297
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:53:32 +0000 (00:53 +0000)]
[block-freq] Refactor LiveInterals::getSpillWeight to use the new MachineBlockFrequencyInfo methods.
This is slightly more interesting than the previous batch of changes.
Specifically:
1. We refactor getSpillWeight to take a MachineBlockFrequencyInfo (MBFI)
object. This enables us to completely encapsulate the actual manner we
use the MachineBlockFrequencyInfo to get our spill weights. This yields
cleaner code since one does not need to fetch the actual block frequency
before getting the spill weight if all one wants it the spill weight. It
also gives us access to entry frequency which we need for our
computation.
2. Instead of having getSpillWeight take a MachineBasicBlock (as one
might think) to look up the block frequency via the MBFI object, we
instead take in a MachineInstr object. The reason for this is that the
method is supposed to return the spill weight for an instruction
according to the comments around the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197296
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Dec 2013 00:38:04 +0000 (00:38 +0000)]
R600/SI: Minor improvements to test.
Use CHECK-LABEL, add an i64 version, check store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197293
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Dec 2013 00:27:48 +0000 (00:27 +0000)]
Teach MemoryBuiltins about address spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197292
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:25:47 +0000 (00:25 +0000)]
[block-freq] Store MBFI as a field on SpillPlacement so we can access it to get the entry frequency while processing data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197291
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:25:45 +0000 (00:25 +0000)]
[block-freq] Update MachineBlockPlacement and RegAllocGreedy to use the new MachineBlockFrequencyInfo methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197290
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:25:42 +0000 (00:25 +0000)]
[block-freq] Update BlockFrequencyInfo/MachineBlockFrequencyInfo to use the new print methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197289
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 14 Dec 2013 00:24:02 +0000 (00:24 +0000)]
Print the address space of a MachineMemOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197288
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:06:03 +0000 (00:06 +0000)]
[block-freq] Add the equivalent methods to MachineBlockFrequencyInfo and BlockFrequencyInfo that were added to BlockFrequencyImpl in r197285 and r197284.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197287
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Sat, 14 Dec 2013 00:05:59 +0000 (00:05 +0000)]
[block-freq] Convert BlockFrequencyImpl to use the new printing functionality from r197285.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197286
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 13 Dec 2013 23:59:44 +0000 (23:59 +0000)]
[block-freq] Add a print method on BlockFrequencyImpl for printing block frequencies and a convenience method for the common case of getting/printing a basic block.
BlockFrequencies can only be printed relative to their entry frequency. Thus
since the entry frequency is no longer necessarily a static constant on the
BlockFrequency class and is instead a potentially dynamic value taken from
BlockFrequencyImpl, we must necessarily print it via a method on
BlockFrequencyImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197285
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 13 Dec 2013 23:44:36 +0000 (23:44 +0000)]
[block-freq] Begin move of BlockFrequency::EntryFreq -> BlockFrequencyImpl::EntryFreq.
This is a property associated with a function, not with BlockFrequency data.
Additionally it loosens the artifical requirement that the entry frequency
arbitrarily be the same for every function.
There is a series of patches forthcoming updating various code that uses the old
way of getting a block frequency to the new location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197284
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 23:15:20 +0000 (23:15 +0000)]
Pointer sizes are stored in Bytes. Fix variables names to say so.
Also update for the current naming style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197283
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 13 Dec 2013 22:46:54 +0000 (22:46 +0000)]
Fixed a bug in getARMFixupKindMachOInfo() where three ARM fixup kinds
were falling into the cases for 24-bit branch kinds which are not 24-bit
branches. The routine is to return false for fixups are expected to always
be resolvable at assembly time. Which these three fixups are as they have
limited displacement and are for local references within a function.
rdar://
15586725
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197282
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Dec 2013 22:23:54 +0000 (22:23 +0000)]
comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197278
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 13 Dec 2013 22:00:19 +0000 (22:00 +0000)]
Remove APInt::extractBit since it is already implemented via operator[]. Change tests for extractBit to test operator[].
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197277
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Dec 2013 21:33:40 +0000 (21:33 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.
Originally committed as r197073 and reverted in r197079.
Recommitted as r197197 to reproduce the failure and reverted as r197199
Turns out there was unstable ordering in the type unit dumping code.
Fixed by using MapVector in DWARFContext to store the debug_types
comdat sections.
Recommitted as r197210 with a fix to dumping and reverted as r197211
because I was a bit gun shy and thought I saw a failure that turned out
to be unrelated.
So here we go - once more with feeling! \o/
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197275
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 13 Dec 2013 20:47:37 +0000 (20:47 +0000)]
[block-freq] Add the method APInt::nearestLogBase2().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197272
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Gottesman [Fri, 13 Dec 2013 20:47:34 +0000 (20:47 +0000)]
[block-freq] Add the APInt method extractBit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197271
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Dec 2013 19:04:08 +0000 (19:04 +0000)]
Revert "Convert liveness tracking to work on a sub-register level instead of just register units."
This reverts commit r197253.
This was a great change, but Juergen should be the commit author.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197262
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Dec 2013 18:57:20 +0000 (18:57 +0000)]
Revert "Liveness Analysis Pass"
This reverts commit r197254.
This was an accidental merge of Juergen's patch. It will be checked in
shortly, but wasn't meant to go in quite yet.
Conflicts:
include/llvm/CodeGen/StackMaps.h
lib/CodeGen/StackMaps.cpp
test/CodeGen/X86/stackmap-liveness.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197260
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 18:56:34 +0000 (18:56 +0000)]
Use a: and s: instead of a0: and s0: in the DataLayout strings.
They are equivalent and the size of 'a' and 's' is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197259
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Dec 2013 18:37:10 +0000 (18:37 +0000)]
Grow the stackmap/patchpoint format to hold 64-bit IDs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197255
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Dec 2013 18:37:03 +0000 (18:37 +0000)]
Liveness Analysis Pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197254
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 13 Dec 2013 18:36:56 +0000 (18:36 +0000)]
Convert liveness tracking to work on a sub-register level instead of just register units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197253
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 13 Dec 2013 17:56:44 +0000 (17:56 +0000)]
[AArch64] Simplify the Neon Scalar3Same patterns for floating-point reciprocal
step, floating-point reciprocal square root step, floating-point absolute
difference, and integer/floating-point compare instructions. Also, move the
scalar general arithmetic operation patterns closer to similar code. No
functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197250
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 17:56:11 +0000 (17:56 +0000)]
Assume defaults to produce smaller datalayout strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197249
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 16:05:32 +0000 (16:05 +0000)]
Fix pr18235.
The cpp backend is not a reasonable fallback for a missing target. It is a
very special backend, so it is reasonable to use it only if explicitly
requested.
While at it, simplify the interface a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197241
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 13 Dec 2013 15:50:30 +0000 (15:50 +0000)]
[SystemZ] Optimize X [!=]= Y in cases where X - Y or Y - X is also computed
In those cases it's better to compare the result of the subtraction
against zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197239
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 13 Dec 2013 15:46:55 +0000 (15:46 +0000)]
[SystemZ] Make more use of TMHH
This originally came about after noticing that InstCombine turns
some of the TMHH (icmp (and...), ...) tests into plain comparisons.
Since there is no instruction to compare with a 64-bit immediate,
TMHH is generally better than an ordered comparison for the cases
that it can handle.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197238
91177308-0d34-0410-b5e6-
96231b3b80d8
Iain Sandoe [Fri, 13 Dec 2013 15:46:48 +0000 (15:46 +0000)]
test commit.
Amend a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197237
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 13 Dec 2013 15:35:00 +0000 (15:35 +0000)]
[SystemZ] Extend integer absolute selection
This patch makes more use of LPGFR and LNGFR. It builds on top of
the LTGFR selection from r197234. Most of the tests are motivated
by what InstCombine would produce.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197236
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 13 Dec 2013 15:28:45 +0000 (15:28 +0000)]
[SystemZ] Add a structure to represent a selected comparison
...in an attempt to rein back the increasingly complex selection code.
A knock-on effect is that ICmpType is exposed from the outset, which
slightly simplifies adjustSubwordCmp.
The code is no piece of art even after this change, but at least it should
be slightly better. No behavioral change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197235
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Fri, 13 Dec 2013 15:07:39 +0000 (15:07 +0000)]
[SystemZ] Make more use of LTGFR
InstCombine turns (sext (trunc)) into (ashr (shl)), then converts any
comparison of the ashr against zero into a comparison of the shl against zero.
This makes sense in itself, but we want to undo it for z, since the sign-
extension instruction has a CC-setting form.
I've included tests for both the original and InstCombined variants,
but the former already worked. The patch fixes the latter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197234
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Dec 2013 13:40:24 +0000 (13:40 +0000)]
X86: When lowering shl_parts, don't emit shift amounts larger than the bit width.
While it's safe for the X86-specific shift nodes, dag combining will
kill generic nodes. Insert an AND to make it safe, isel will nuke it
as x86's shift instructions have an implicit AND.
Fixes PR16108, which contains a contraption to hit this case in between
constant folders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197228
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 13 Dec 2013 11:16:00 +0000 (11:16 +0000)]
Enabling thumb2 mode used to force support for armv6t2. Replace this
with a temporary assertion and adjust the various test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197224
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Fri, 13 Dec 2013 11:11:02 +0000 (11:11 +0000)]
[mips] Add checks for alignment and maximum displacements for most of the
branch instructions for mips and micromips instruction sets thus avoiding
the situation of generating branches to undesired locations if offsets
cannot be encoded.
This patch also checks if a fixup cannot be applied and returns a fatal error
if that's the case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197223
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 13 Dec 2013 09:39:36 +0000 (09:39 +0000)]
Add ARM to release instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Dec 2013 08:00:01 +0000 (08:00 +0000)]
[inliner] Fix PR18206 by preventing inlining functions that call setjmp
through an invoke instruction.
The original patch for this was written by Mark Seaborn, but I've
reworked his test case into the existing returns_twice test case and
implemented the fix by the prior refactoring to actually run the cost
analysis over invoke instructions, and then here fixing our detection of
the returns_twice attribute to work for both calls and invokes. We never
noticed because we never saw an invoke. =[
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 13 Dec 2013 07:59:56 +0000 (07:59 +0000)]
[inliner] Completely change (and fix) how the inline cost analysis
handles terminator instructions.
The inline cost analysis inheritted some pretty rough handling of
terminator insts from the original cost analysis, and then made it much,
much worse by factoring all of the important analyses into a separate
instruction visitor. That instruction visitor never visited the
terminator.
This works fine for things like conditional branches, but for many other
things we simply computed The Wrong Value. First example are
unconditional branches, which should be free but were counted as full
cost. This is most significant for conditional branches where the
condition simplifies and folds during inlining. We paid a 1 instruction
tax on every branch in a straight line specialized path. =[
Oh, we also claimed that the unreachable instruction had cost.
But it gets worse. Let's consider invoke. We never applied the call
penalty. We never accounted for the cost of the arguments. Nope. Worse
still, we didn't handle the *correctness* constraints of not inlining
recursive invokes, or exception throwing returns_twice functions. Oops.
See PR18206. Sadly, PR18206 requires yet another fix, but this
refactoring is at least a huge step in that direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197215
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Dec 2013 06:43:32 +0000 (06:43 +0000)]
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197210.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197211
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Dec 2013 06:27:38 +0000 (06:27 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.
Originally committed as r197073 and reverted in r197079.
Recommitted as r197197 to reproduce the failure and reverted as r197199
Turns out there was unstable ordering in the type unit dumping code.
Fixed by using MapVector in DWARFContext to store the debug_types
comdat sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197210
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Fri, 13 Dec 2013 05:37:05 +0000 (05:37 +0000)]
Change stack probing code for MingW.
Since gcc 4.6 the compiler uses ___chkstk_ms which has the same semantics as the
MS CRT function __chkstk. This simplifies the prologue generation a bit.
Reviewed by Rafael Espíndola.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197205
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 13 Dec 2013 05:19:17 +0000 (05:19 +0000)]
Object/COFF: ExportAddressTableEntry is a union of two RVAs.
The previous definition was wrong. See Microsoft PE/COFF specification
section 5.3.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197204
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Dec 2013 01:24:54 +0000 (01:24 +0000)]
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197197.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197199
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Fri, 13 Dec 2013 01:15:07 +0000 (01:15 +0000)]
llvm-cov: Added -b option for branch probabilities.
This option tells llvm-cov to print out branch probabilities when
a basic block contains multiple branches. It also prints out some
function summary info including the number of times the function enters,
the percent of time it returns, and how many blocks were executed.
Also updated tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197198
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 13 Dec 2013 01:06:41 +0000 (01:06 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.
Originally committed as r197073 and reverted in r197079.
This commit originally got jumbled up with another build-breaking commit
and I can't find the failures I thought this caused anymore.
Recommitting to hopefully get some clean buildbot results to work from.
I have a sneaking suspicion there's unstable output in the comdat group
output of MCStreamer...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197197
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Thu, 12 Dec 2013 21:26:30 +0000 (21:26 +0000)]
Fix spelling in comment in test: "themselve" -> "themselves"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197180
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Dec 2013 20:45:24 +0000 (20:45 +0000)]
Fix a use-after-free error in GlobalOpt CleanupConstantGlobalUsers
GlobalOpt's CleanupConstantGlobalUsers function uses a worklist array to manage
constant users to be visited. The pointers in this array need to be weak
handles because when we delete a constant array, we may also be holding a
pointer to one of its elements (or an element of one of its elements if we're
dealing with an array of arrays) in the worklist.
Fixes PR17347.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197178
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Dec 2013 20:45:08 +0000 (20:45 +0000)]
Initialize the barrier pass llvm::initializeIPO
The barrier pass is a temporary hack, and should go away soon. Nevertheless, if
we don't initialize it, then opt will not understand -barrier, and this will
break bugpoint (because when it dumps the passes from the default pass manager
-barrier will be there).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197177
91177308-0d34-0410-b5e6-
96231b3b80d8
Yuchen Wu [Thu, 12 Dec 2013 20:29:54 +0000 (20:29 +0000)]
Removed llvm-cov.test from Other folder.
More comprehensive llvm-cov tests were added to tools/llvm-cov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197175
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 17:43:37 +0000 (17:43 +0000)]
Simplify the datalayout string of ARM and AArch64.
No functionality change.
Reviewed by Tim Northover.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197172
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 17:30:07 +0000 (17:30 +0000)]
Simplify the SystemZ datalayout string.
Reviewed by Richard Sandiford.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197170
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 17:21:51 +0000 (17:21 +0000)]
Use "a" instead of "a0" in DataLayout.
It means exactly the same and is just a bit shorter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197169
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 16:17:40 +0000 (16:17 +0000)]
Fix Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197168
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 16:10:48 +0000 (16:10 +0000)]
Convert the other getHostByName implementations to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197166
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 16:06:58 +0000 (16:06 +0000)]
Switch to the new MingW ABI.
GCC 4.7 changed the MingW ABI. On the LLVM side it means that sret functions
don't pop the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197163
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 12 Dec 2013 15:46:29 +0000 (15:46 +0000)]
[AArch64] Removed unnecessary copy patterns with v1fx types.
- Copy patterns with float/double types are enough.
- Fix typos in test case names that were using v1fx.
- There is no ACLE intrinsic that uses v1f32 type. And there is no conflict of
neon and non-neon ovelapped operations with this type, so there is no need to
support operations with this type.
- Remove v1f32 from FPR32 register and disallow v1f32 as a legal type for
operations.
Patch by Ana Pazos!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197159
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 15:45:32 +0000 (15:45 +0000)]
Return a StringRef from getHostCPUName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 12 Dec 2013 11:59:26 +0000 (11:59 +0000)]
[cleanup] Remove trailing whitespace before I start changing this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197149
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 12 Dec 2013 11:51:23 +0000 (11:51 +0000)]
PowerPC: add Linux triple to TLS tests
The tests were failing on OS X.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197146
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 12 Dec 2013 11:50:47 +0000 (11:50 +0000)]
Added new X86 patterns to select SSE scalar fp arithmetic instructions from
a vector packed single/double fp operation followed by a vector insert.
The effect is that the backend coverts the packed fp instruction
followed by a vectro insert into a SSE or AVX scalar fp instruction.
For example, given the following code:
__m128 foo(__m128 A, __m128 B) {
__m128 C = A + B;
return (__m128) {c[0], a[1], a[2], a[3]};
}
previously we generated:
addps %xmm0, %xmm1
movss %xmm1, %xmm0
we now generate:
addss %xmm1, %xmm0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197145
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Thu, 12 Dec 2013 11:18:08 +0000 (11:18 +0000)]
Remove some dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197144
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 12 Dec 2013 08:00:34 +0000 (08:00 +0000)]
typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197136
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Thu, 12 Dec 2013 07:36:26 +0000 (07:36 +0000)]
[AArch64]Fix the problem that AArch64 backend fails to select scalar_to_vector of vector types having more than one element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197135
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 12 Dec 2013 03:31:20 +0000 (03:31 +0000)]
Swap around EXPECT_EQ() arguments orders for more natural gtest Failure messages
Somewhat counterintuitively the first arg in gtest is treated as the
expectation.
No change to the tests themselves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197124
91177308-0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 12 Dec 2013 02:51:58 +0000 (02:51 +0000)]
Add missing escape characters to the new Regex::escape() function
The old AddFixedStringToRegEx() it was based on got away with this for the
longest time, but the problem became easy to spot after the cleanup in r197096.
Also add a quick unit test to cover regex escaping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197121
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Thu, 12 Dec 2013 02:41:11 +0000 (02:41 +0000)]
Check for null pointer before dereferencing. A careless typo on my part.
I don't know why this did not show up earlier. This code has been
around for ages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197119
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Thu, 12 Dec 2013 02:19:13 +0000 (02:19 +0000)]
Fix Incorrect CHECK message [0-31]+ in test case.
In regular expression, [0-31]+ equals to [0-3]+, not the number from
0 to 31. So change it to [0-9]+.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197113
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Thu, 12 Dec 2013 01:55:04 +0000 (01:55 +0000)]
Resubmit r196544: Apply transformation on OS X 10.9+ and iOS 7.0+: pow(10, x) ―> __exp10(x)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197109
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Thu, 12 Dec 2013 01:37:39 +0000 (01:37 +0000)]
Add TargetLibraryInfo in LTO passes builder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197105
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Dec 2013 00:23:29 +0000 (00:23 +0000)]
Remove unused multiclass from PPCInstrInfo.td
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197100
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Dec 2013 00:19:11 +0000 (00:19 +0000)]
Improve instruction scheduling for the PPC POWER7
Aside from a few minor latency corrections, the major change here is a new
hazard recognizer which focuses on better dispatch-group formation on the
POWER7. As with the PPC970's hazard recognizer, the most important thing it
does is avoid load-after-store hazards within the same dispatch group. It uses
the POWER7's special dispatch-group-terminating nop instruction (instead of
inserting multiple regular nop instructions). This new hazard recognizer makes
use of the scheduling dependency graph itself, built using AA information, to
robustly detect the possibility of load-after-store hazards.
significant test-suite performance changes (the error bars are 99.5% confidence
intervals based on 5 test-suite runs both with and without the change --
speedups are negative):
speedups:
MultiSource/Benchmarks/FreeBench/pcompress2/pcompress2
-0.55171% +/- 0.333168%
MultiSource/Benchmarks/TSVC/CrossingThresholds-dbl/CrossingThresholds-dbl
-17.5576% +/- 14.598%
MultiSource/Benchmarks/TSVC/Reductions-dbl/Reductions-dbl
-29.5708% +/- 7.09058%
MultiSource/Benchmarks/TSVC/Reductions-flt/Reductions-flt
-34.9471% +/- 11.4391%
SingleSource/Benchmarks/BenchmarkGame/puzzle
-25.1347% +/- 11.0104%
SingleSource/Benchmarks/Misc/flops-8
-17.7297% +/- 9.79061%
SingleSource/Benchmarks/Shootout-C++/ary3
-35.5018% +/- 23.9458%
SingleSource/Regression/C/uint64_to_float
-56.3165% +/- 25.4234%
SingleSource/UnitTests/Vectorizer/gcc-loops
-18.5309% +/- 6.8496%
regressions:
MultiSource/Benchmarks/ASCI_Purple/SMG2000/smg2000
18.351% +/- 12.156%
SingleSource/Benchmarks/Shootout-C++/methcall
27.3086% +/- 14.4733%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197099
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Dec 2013 00:19:07 +0000 (00:19 +0000)]
Add isBarrier to SDep
SDep had is* functions for the other kinds of order dependencies (isMustAlias,
isWeak, isArtificial, etc.), but not for barrier. Upcoming commits in the
PowerPC backend will make use of this function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197098
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 12 Dec 2013 00:15:47 +0000 (00:15 +0000)]
Fix an over-constrained assertion in MachineFunction::addLiveIn.
The assertion was checking that the virtual register VReg used to represent the
physical register PReg uses the same register class as the one passed to
MachineFunction::addLiveIn.
This is over-constraining because it is sufficient to check that the register
class of VReg (VRegRC) is a subclass of the register class of PReg (PRegRC) and
that VRegRC contains PReg.
Indeed, if VReg gets constrained because of some operation constraints
between two calls of MachineFunction::addLiveIn, the original assertion
cannot match.
This fixes <rdar://problem/
15633429>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197097
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Thu, 12 Dec 2013 00:06:41 +0000 (00:06 +0000)]
Expose FileCheck's AddFixedStringToRegEx as Regex::escape
Both FileCheck and clang's -verify need to escape strings for regexes,
so let's expose this as a utility in the Regex class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 11 Dec 2013 23:21:25 +0000 (23:21 +0000)]
[AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64
intrinsics to use f32 types, rather than their vector equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197090
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 11 Dec 2013 23:12:25 +0000 (23:12 +0000)]
Fix the PPC subsumes-predicate check
For one predicate to subsume another, they must both check the same condition
register. Failure to check this prerequisite was causing miscompiles.
Fixes PR18003.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197089
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 11 Dec 2013 22:33:43 +0000 (22:33 +0000)]
Add two additional hazard recognizer functions
This adds two additional functions to the hazard recognizer interface. These
are optional (in the sense that the default implementations preserve the
current behavior), and used by the post-RA scheduler. Upcoming commits will use
this functionality in order to improve dispatch-group formation on the POWER7
and related cores. Dispatch groups are an odd construct: sometimes we need to
insert nops to force a new one to start (for performance reasons), and some
instructions need to appear in certain positions within a group, but the groups
are not fundamentally cycle based (they can contain instructions with data
dependencies with non-trivial latencies).
Motivation:
unsigned PreEmitNoops(SUnit *) - Used to force the post-RA scheduler to insert
nops to force a new dispatch group to begin. We already have a NoopHazard, and
this is also still needed. However, NoopHazard only causes a nop to be inserted
if there are no other available instructions, and so is not always sufficient.
The number of nops to insert depends on state that only the hazard recognizer
has, so a general callback is necessary.
bool ShouldPreferAnother(SUnit *) - Used to avoid scheduling instructions that
would start a new dispatch group when others are available that could be part
of the current dispatch group. In this case, we don't want to issue nops,
because the non-preferred instruction will implicitly start a new dispatch
group regardless.
Although the motivation for these functions is driven by the PowerPC backend,
they are completely general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197084
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Wed, 11 Dec 2013 22:25:39 +0000 (22:25 +0000)]
Merge all tls tests to two files. One for normal codegen (initial and local
exec) and one for PIC codegen (local and general dynamic).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197081
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 11 Dec 2013 22:18:44 +0000 (22:18 +0000)]
On ELF and COFF treat linker_private like private.
The linkers on these systems don't have anything special to do with these
symbols. Since the intent is for them to be absent from the final object,
just treat them as private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197080
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 11 Dec 2013 22:08:39 +0000 (22:08 +0000)]
Revert "DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers"
This reverts commit r197073.
The test seems to be failing on some buildbots for unknown reasons.
Reverting until I can figure that out. If anyone's got a reproduction
(.s and .o together would be great) - I'd really appreciate it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197079
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Wed, 11 Dec 2013 21:37:04 +0000 (21:37 +0000)]
Remove test thats testing the same thing as tls.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197074
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 11 Dec 2013 21:36:27 +0000 (21:36 +0000)]
DebugInfo: Move type units into the debug_types section with appropriate comdat grouping and type unit headers
This commit does not complete the type units feature - there are issues
around fission support (skeletal type units, pubtypes/pubnames) and
hashing of some types including those containing references to types in
other type units.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197073
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 11 Dec 2013 21:14:02 +0000 (21:14 +0000)]
DwarfUnit: LLVM_OVERRIDE and constify some functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197072
91177308-0d34-0410-b5e6-
96231b3b80d8