oota-llvm.git
10 years agoUnbreak the gdb buildbot by not lowering dbg.declare intrinsics for arrays.
Adrian Prantl [Fri, 25 Apr 2014 23:00:25 +0000 (23:00 +0000)]
Unbreak the gdb buildbot by not lowering dbg.declare intrinsics for arrays.

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

10 years agoMake sure that rangelists are also relative to the compile unit
Eric Christopher [Fri, 25 Apr 2014 22:23:54 +0000 (22:23 +0000)]
Make sure that rangelists are also relative to the compile unit
low_pc similar to location lists.

Fixes PR19563

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

10 years agoR600: Fix function name printing in LowerCall
Matt Arsenault [Fri, 25 Apr 2014 22:22:01 +0000 (22:22 +0000)]
R600: Fix function name printing in LowerCall

v2: Check both ExternalSymbol and GlobalAddress

Patch by: Jan Vesely <jan.vesely@rutgers.edu>

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

10 years agoDwarfAccelTable: Store the string symbol in the accelerator table to avoid duplicate...
David Blaikie [Fri, 25 Apr 2014 22:21:35 +0000 (22:21 +0000)]
DwarfAccelTable: Store the string symbol in the accelerator table to avoid duplicate lookup.

This also avoids the need for subtly side-effecting calls to manifest
strings in the string table at the point where items are added to the
accelerator tables.

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

10 years agoAdd an -mattr option to the gold plugin to support subtarget features in LTO
Tom Roeder [Fri, 25 Apr 2014 21:46:51 +0000 (21:46 +0000)]
Add an -mattr option to the gold plugin to support subtarget features in LTO

This adds support for an -mattr option to the gold plugin and to llvm-lto. This
allows the caller to specify details of the subtarget architecture, like +aes,
or +ssse3 on x86.  Note that this requires a change to the include/llvm-c/lto.h
interface: it adds a function lto_codegen_set_attr and it increments the
version of the interface.

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

10 years agoFix missing include
Alexey Samsonov [Fri, 25 Apr 2014 21:42:35 +0000 (21:42 +0000)]
Fix missing include

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

10 years agoEncapsulate the DWARF string pool in a separate type.
David Blaikie [Fri, 25 Apr 2014 21:34:35 +0000 (21:34 +0000)]
Encapsulate the DWARF string pool in a separate type.

Pulls out some more code from some of the rather monolithic DWARF
classes. Unlike the address table, the string table won't move up into
DwarfDebug - each DWARF file has its own string table (but there can be
only one address table).

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

10 years ago[DWARF parser] Cleanup code in DWARFDebugAranges.
Alexey Samsonov [Fri, 25 Apr 2014 21:30:03 +0000 (21:30 +0000)]
[DWARF parser] Cleanup code in DWARFDebugAranges.

No functionality change.

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

10 years ago[DWARF parser] Cleanup code in DWARFDebugAbbrev.
Alexey Samsonov [Fri, 25 Apr 2014 21:10:56 +0000 (21:10 +0000)]
[DWARF parser] Cleanup code in DWARFDebugAbbrev.

No functionality change.

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

10 years ago[LoopStrengthReduce] Don't trim formula that uses a subset of required registers
Adam Nemet [Fri, 25 Apr 2014 21:02:21 +0000 (21:02 +0000)]
[LoopStrengthReduce] Don't trim formula that uses a subset of required registers

Consider this use from the new testcase:

  LSR Use: Kind=ICmpZero, Offsets={0}, widest fixup type: i32
    reg({1000,+,-1}<nw><%for.body>)
    -3003 + reg({3,+,3}<nw><%for.body>)
    -1001 + reg({1,+,1}<nuw><nsw><%for.body>)
    -1000 + reg({0,+,1}<nw><%for.body>)
    -3000 + reg({0,+,3}<nuw><%for.body>)
    reg({-1000,+,1}<nw><%for.body>)
    reg({-3000,+,3}<nsw><%for.body>)

This is the last use we consider for a solution in SolveRecurse, so CurRegs is
a large set.  (CurRegs is the set of registers that are needed by the
previously visited uses in the in-progress solution.)

ReqRegs is {
  {3,+,3}<nw><%for.body>,
  {1,+,1}<nuw><nsw><%for.body>
}

This is the intersection of the regs used by any of the formulas for the
current use and CurRegs.

Now, the code requires a formula to contain *all* these regs (the comment is
simply wrong), otherwise the formula is immediately disqualified.  Obviously,
no formula for this use contains two regs so they will all get disqualified.

The fix modifies the check to allow the formula in this case.  The idea is
that neither of these formulae is introducing any new registers which is the
point of this early pruning as far as I understand.

In terms of set arithmetic, we now allow formulas whose used regs are a subset
of the required regs not just the other way around.

There are few more loops in the test-suite that are now successfully LSRed.  I
have benchmarked those and found very minimal change.

Fixes <rdar://problem/13965777>

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

10 years agoSCC: Use the reference typedef
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 20:52:08 +0000 (20:52 +0000)]
SCC: Use the reference typedef

Actually use the `reference` typedef, and remove the private
redefinition of `pointer` since it has no users.

Using `reference` exposes a problem with r207257, which specified the
wrong `value_type` to `iterator_facade_base` (fixed that too).

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

10 years agoThis reapplies r207235 with an additional bugfixes caught by the msan
Adrian Prantl [Fri, 25 Apr 2014 20:49:25 +0000 (20:49 +0000)]
This reapplies r207235 with an additional bugfixes caught by the msan
buildbot - do not insert debug intrinsics before phi nodes.

Debug info for optimized code: Support variables that are on the stack and
described by DBG_VALUEs during their lifetime.

Previously, when a variable was at a FrameIndex for any part of its
lifetime, this would shadow all other DBG_VALUEs and only a single
fbreg location would be emitted, which in fact is only valid for a small
range and not the entire lexical scope of the variable. The included
dbg-value-const-byref testcase demonstrates this.

This patch fixes this by
Local
- emitting dbg.value intrinsics for allocas that are passed by reference
- dropping all dbg.declares (they are now fully lowered to dbg.values)
SelectionDAG
- renamed constructors for SDDbgValue for better readability.
- fix UserValue::match() to handle indirect values correctly
- not inserting an MMI table entries for dbg.values that describe allocas.
- lowering dbg.values that describe allocas into *indirect* DBG_VALUEs.
CodeGenPrepare
- leaving dbg.values for an alloca were they are (see comment)
Other
- regenerated/updated instcombine.ll testcase and included source

rdar://problem/16679879
http://reviews.llvm.org/D3374

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

10 years agoMCAssembler: Simplify implementation of const variants of getSymbolData by calling...
David Blaikie [Fri, 25 Apr 2014 20:19:11 +0000 (20:19 +0000)]
MCAssembler: Simplify implementation of const variants of getSymbolData by calling one implementation from the other.

Code review feedback by Rafael Espindola on r207124.

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

10 years agoBugPoint: Fix some memory leaks.
David Blaikie [Fri, 25 Apr 2014 20:15:16 +0000 (20:15 +0000)]
BugPoint: Fix some memory leaks.

Patch by Kostya Serebryany.

unique_ptr would be nice, but it's a bit too much work for an area I'm
not familiar with, nor invested in, unfortunately.

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

10 years agoDwarfUnit: Remove unused function
David Blaikie [Fri, 25 Apr 2014 20:02:24 +0000 (20:02 +0000)]
DwarfUnit: Remove unused function

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

10 years agoDIE: Pass ownership of children via std::unique_ptr rather than raw pointer.
David Blaikie [Fri, 25 Apr 2014 20:00:34 +0000 (20:00 +0000)]
DIE: Pass ownership of children via std::unique_ptr rather than raw pointer.

This should reduce the chance of memory leaks like those fixed in
r207240.

There's still some unclear ownership of DIEs happening in DwarfDebug.
Pushing unique_ptr and references through more APIs should help expose
the cases where ownership is a bit fuzzy.

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

10 years agoDIEEntry: Refer to the specified DIE via reference rather than pointer.
David Blaikie [Fri, 25 Apr 2014 19:33:43 +0000 (19:33 +0000)]
DIEEntry: Refer to the specified DIE via reference rather than pointer.

Makes some more cases (the unit tests, specifically), lexically
compatible with a change to unique_ptr.

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

10 years agoDwarfUnit: return by reference from createAndAddDIE
David Blaikie [Fri, 25 Apr 2014 18:52:29 +0000 (18:52 +0000)]
DwarfUnit: return by reference from createAndAddDIE

Since this doesn't return ownership (the DIE has been added to the
specified parent already) nor return null, just return by reference.

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

10 years agoblockfreq: Further shift logic to LoopData
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:47:04 +0000 (18:47 +0000)]
blockfreq: Further shift logic to LoopData

Move a lot of the loop-related logic that was sprinkled around the code
into `LoopData`.

<rdar://problem/14292693>

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

10 years agoSCC: Provide operator->() through iterator_facade_base
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:43:41 +0000 (18:43 +0000)]
SCC: Provide operator->() through iterator_facade_base

Use the fancy new `iterator_facade_base` to add
`scc_iterator::operator->()`.  Remove other definitions where
`iterator_facade_base` does the right thing.

<rdar://problem/14292693>

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

10 years agoenable fast isel tablegen files for Mips
Reed Kotler [Fri, 25 Apr 2014 18:36:38 +0000 (18:36 +0000)]
enable fast isel tablegen files for Mips

Reviewers: dsanders

Reviewed By: dsanders

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

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

10 years agoReturn DIE by reference instead of pointer from DwarfUnit::getUnitDie
David Blaikie [Fri, 25 Apr 2014 18:35:57 +0000 (18:35 +0000)]
Return DIE by reference instead of pointer from DwarfUnit::getUnitDie

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

10 years agoSCC: Remove non-const operator*()
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:26:45 +0000 (18:26 +0000)]
SCC: Remove non-const operator*()

<rdar://problem/14292693>

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

10 years agoDwarfUnit: Suddently, DIE references, everywhere.
David Blaikie [Fri, 25 Apr 2014 18:26:14 +0000 (18:26 +0000)]
DwarfUnit: Suddently, DIE references, everywhere.

This'll make changing to unique_ptr ownership of DIEs easier since the
usages will now have '*' on them making them textually compatible
between unique_ptr and raw pointer.

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

10 years agoSCC: Change clients to use const, NFC
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:24:50 +0000 (18:24 +0000)]
SCC: Change clients to use const, NFC

It's fishy to be changing the `std::vector<>` owned by the iterator, and
no one actual does it, so I'm going to remove the ability in a
subsequent commit.  First, update the users.

<rdar://problem/14292693>

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

10 years agoSCC: Doxygen-ize comments, NFC
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:18:46 +0000 (18:18 +0000)]
SCC: Doxygen-ize comments, NFC

<rdar://problem/14292693>

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

10 years agoRevert "This reapplies r207130 with an additional testcase+and a missing check for"
Adrian Prantl [Fri, 25 Apr 2014 18:18:09 +0000 (18:18 +0000)]
Revert "This reapplies r207130 with an additional testcase+and a missing check for"

This reverts commit 207235 to investigate msan buildbot breakage.

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

10 years agoSCC: Un-inline long functions
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:15:50 +0000 (18:15 +0000)]
SCC: Un-inline long functions

These are long functions that really shouldn't be inlined.  Otherwise,
no functionality change.

<rdar://problem/14292693>

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

10 years agoSCC: Remove redundant inline keywords, NFC
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 18:10:23 +0000 (18:10 +0000)]
SCC: Remove redundant inline keywords, NFC

Functions declared in line in a class are inlined by default.  There's
no reason for the `inline` keyword.

<rdar://problem/14292693>

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

10 years agoMake sure that DSUB does not duplicate the pattern of DSUBU
Reed Kotler [Fri, 25 Apr 2014 18:05:00 +0000 (18:05 +0000)]
Make sure that DSUB does not duplicate the pattern of DSUBU

Test Plan:
Run test suite to make sure there is no regression.
https://dmz-portal.mips.com/bb/builders/LLVM%20with%2064bit%20and%20delay%20slot%20optimizer%20and%20direct%20object%20emitter/builds/626

Reviewers: dsanders

Reviewed By: dsanders

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

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

10 years agoARM: remove @llvm.arm.sevl
Saleem Abdulrasool [Fri, 25 Apr 2014 17:51:25 +0000 (17:51 +0000)]
ARM: remove @llvm.arm.sevl

This intrinsic is no longer needed with the new @llvm.arm.hint(i32) intrinsic
which provides a generic, extensible manner for adding hint instructions.  This
functionality can now be represented as @llvm.arm.hint(i32 5).

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

10 years ago[inline cold threshold] Command line argument for inline threshold will
Manman Ren [Fri, 25 Apr 2014 17:34:55 +0000 (17:34 +0000)]
[inline cold threshold] Command line argument for inline threshold will
override the default cold threshold.

When we use command line argument to set the inline threshold, the default
cold threshold will not be used. This is in line with how we use
OptSizeThreshold. When we want a higher threshold for all functions, we
do not have to set both inline threshold and cold threshold.

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

10 years agoRefactor some common logic in DwarfUnit::constructVariableDIE and pass non-null DIE...
David Blaikie [Fri, 25 Apr 2014 17:32:19 +0000 (17:32 +0000)]
Refactor some common logic in DwarfUnit::constructVariableDIE and pass non-null DIE by reference to DbgVariable::setDIE

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

10 years agoARM: provide a new generic hint intrinsic
Saleem Abdulrasool [Fri, 25 Apr 2014 17:24:24 +0000 (17:24 +0000)]
ARM: provide a new generic hint intrinsic

Introduce the llvm.arm.hint(i32) intrinsic that can be used to inject hints into
the instruction stream. This is particularly useful for generating IR from a
compiler where the user may inject an intrinsic (e.g. __yield). These are then
pattern substituted into the correct instruction which already existed.

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

10 years agoPR19554: Fix some memory leaks in DIEHashTest.cpp
David Blaikie [Fri, 25 Apr 2014 17:07:55 +0000 (17:07 +0000)]
PR19554: Fix some memory leaks in DIEHashTest.cpp

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

10 years agoReapply r207135 without modifications.
Adrian Prantl [Fri, 25 Apr 2014 17:01:04 +0000 (17:01 +0000)]
Reapply r207135 without modifications.

Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location
of the dbg.value. This gets rid of tons of redundant variable DIEs in
subscopes.

rdar://problem/14874886, rdar://problem/16679936

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

10 years agoThis reapplies r207130 with an additional testcase+and a missing check for
Adrian Prantl [Fri, 25 Apr 2014 17:01:00 +0000 (17:01 +0000)]
This reapplies r207130 with an additional testcase+and a missing check for
AllocaInst that was missing in one location.
Debug info for optimized code: Support variables that are on the stack and
described by DBG_VALUEs during their lifetime.

Previously, when a variable was at a FrameIndex for any part of its
lifetime, this would shadow all other DBG_VALUEs and only a single
fbreg location would be emitted, which in fact is only valid for a small
range and not the entire lexical scope of the variable. The included
dbg-value-const-byref testcase demonstrates this.

This patch fixes this by
Local
- emitting dbg.value intrinsics for allocas that are passed by reference
- dropping all dbg.declares (they are now fully lowered to dbg.values)
SelectionDAG
- renamed constructors for SDDbgValue for better readability.
- fix UserValue::match() to handle indirect values correctly
- not inserting an MMI table entries for dbg.values that describe allocas.
- lowering dbg.values that describe allocas into *indirect* DBG_VALUEs.
CodeGenPrepare
- leaving dbg.values for an alloca were they are (see comment)
Other
- regenerated/updated instcombine.ll testcase and included source

rdar://problem/16679879
http://reviews.llvm.org/D3374

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

10 years ago[ARM64] When compiling for ELF in PIC mode, local symbols shouldn't go through the GOT
Tilmann Scheller [Fri, 25 Apr 2014 13:43:18 +0000 (13:43 +0000)]
[ARM64] When compiling for ELF in PIC mode, local symbols shouldn't go through the GOT

There's no need for local symbols to go through the GOT, in fact it seems GNU ld is not even emitting GOT entries for local symbols and will error out when trying to resolve a GOT relocation for a local symbol.

This bug triggers when bootstrapping clang on AArch64 Linux with -fPIC and the ARM64 backend. The AArch64 backend is not affected.

With this commit it's now possible to bootstrap clang on AArch64 Linux with the ARM64 backend (-fPIC, -O3).

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

10 years ago[ARM64] Handle fp128 for parameter passing on stack
Jiangning Liu [Fri, 25 Apr 2014 12:07:03 +0000 (12:07 +0000)]
[ARM64] Handle fp128 for parameter passing on stack

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

10 years agoARM64: fix assertion in ISelDAGToDAG
Tim Northover [Fri, 25 Apr 2014 10:48:47 +0000 (10:48 +0000)]
ARM64: fix assertion in ISelDAGToDAG

Also an unused variable, so double bonus!

This should deal with PR19548.

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

10 years ago[ARM64] Print preferred aliases for SFBM/UBFM in InstPrinter
Bradley Smith [Fri, 25 Apr 2014 10:25:29 +0000 (10:25 +0000)]
[ARM64] Print preferred aliases for SFBM/UBFM in InstPrinter

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

10 years ago[LCG] During the incremental update of an SCC, switch to using the
Chandler Carruth [Fri, 25 Apr 2014 09:52:44 +0000 (09:52 +0000)]
[LCG] During the incremental update of an SCC, switch to using the
SCCMap to test for nodes that have been re-added to the root SCC rather
than a set vector. We already have done the SCCMap lookup, we juts need
to test it in two different ways. In turn, do most of the processing of
these nodes as they go into the root SCC rather than lazily. This
simplifies the final loop to just stitch the root SCC into its
children's parent sets. No functionlatiy changed.

However, this makes a few things painfully obvious, which was my intent.
=] There is tons of repeated code introduced here and elsewhere. I'm
splitting the refactoring of that code into helpers from this change so
its clear that this is the change which switches the datastructures used
around, and the other is a pure factoring & deduplication of code
change.

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

10 years ago[ARM64] Add RUN lines for "–target arm64 –mattr=-fp-armv8" on AArch64 no-fp test.
Kevin Qin [Fri, 25 Apr 2014 09:44:20 +0000 (09:44 +0000)]
[ARM64] Add RUN lines for "–target arm64 â€“mattr=-fp-armv8" on AArch64 no-fp test.

This patch is a supplement of implementing predicate of FP, enabling aarch64 backend
no-fp tests on arm64 target for verification. During this, one bug is exposed and
fixed by this patch.

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

10 years ago[ARM64] Support crc predicate on ARM64.
Kevin Qin [Fri, 25 Apr 2014 09:25:42 +0000 (09:25 +0000)]
[ARM64] Support crc predicate on ARM64.

According to the specification, CRC is an optional extension of the
architecture.

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

10 years ago[LCG] During the incremental re-build of an SCC after removing an edge,
Chandler Carruth [Fri, 25 Apr 2014 09:08:10 +0000 (09:08 +0000)]
[LCG] During the incremental re-build of an SCC after removing an edge,
remove the nodes in the SCC from the SCC map entirely prior to the DFS
walk. This allows the SCC map to represent both the state of
not-yet-re-added-to-an-SCC and added-back-to-this-SCC independently. The
first is being missing from the SCC map, the second is mapping back to
'this'. In a subsequent commit, I'm going to use this property to
simplify the new node list for this SCC.

In theory, I think this also makes the contract for orphaning a node
from the graph slightly less confusing. Now it is also orphaned from the
SCC graph. Still, this isn't quite right either, and so I'm not adding
test cases here. I'll add test cases for the behavior of orphaning nodes
when the code *actually* supports it. The change here is mostly
incidental, my goal is simplifying the algorithm.

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

10 years ago[LCG] Rather than doing a linear time SmallSetVector removal of each
Chandler Carruth [Fri, 25 Apr 2014 09:08:05 +0000 (09:08 +0000)]
[LCG] Rather than doing a linear time SmallSetVector removal of each
child from the worklist, wait until we actually need to pop another
element off of the worklist and skip over any that were already visited
by the DFS. This also enables swapping the nodes of the SCC into the
worklist. No functionality changed.

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

10 years ago[LCG] Remove a completely unnecessary loop. It wasn't even doing any
Chandler Carruth [Fri, 25 Apr 2014 06:45:06 +0000 (06:45 +0000)]
[LCG] Remove a completely unnecessary loop. It wasn't even doing any
thing, just mucking up the code. I feel bad that I even wrote this loop.
Very sorry. The diff is huge because of the indent change, but I promise
all this is doing is realizing that the outer two loops were actually
the exact same loops, and we didn't need two of them.

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

10 years ago[LCG] Now that the loop structure of the core SCC finding routine is
Chandler Carruth [Fri, 25 Apr 2014 06:38:58 +0000 (06:38 +0000)]
[LCG] Now that the loop structure of the core SCC finding routine is
factored into a more reasonable form, replace the tail call with
a simple outer-loop continuation. It's sad that C++ makes this so
awkward to write, but it seems more direct and clear than the tail call
at this point.

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

10 years agoX86: convert object streamer selection to a switch
Saleem Abdulrasool [Fri, 25 Apr 2014 06:29:36 +0000 (06:29 +0000)]
X86: convert object streamer selection to a switch

Change the object streamer selection to a switch from a series of if conditions.
Rather than defaulting to ELF, require that an ELF format is requested.  The
Windows/!ELF is maintained as MachO would have been selected first and will
still provide a MachO format.  Add an assertion that if COFF is requested that
the target platform is Windows as only WinCOFF object emission is currently
supported.

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

10 years ago[python] Fix getting section contents.
Anders Waldenborg [Fri, 25 Apr 2014 06:25:15 +0000 (06:25 +0000)]
[python] Fix getting section contents.

The returnvalue was handled as c_char_p which ment that ctypes
handled it as a NUL-terminated string making it cut the contents
at first NUL (or even worse - overrunning the buffer if it doesn't
contain a NUL).

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

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

10 years agoAdd missing cpp file header
David Blaikie [Fri, 25 Apr 2014 06:22:32 +0000 (06:22 +0000)]
Add missing cpp file header

Code review feedback from Paul Robinson on r207022

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

10 years ago[C++] Use 'nullptr'. Target edition.
Craig Topper [Fri, 25 Apr 2014 05:30:21 +0000 (05:30 +0000)]
[C++] Use 'nullptr'. Target edition.

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

10 years ago[C++] Use 'nullptr'. Transforms edition.
Craig Topper [Fri, 25 Apr 2014 05:29:35 +0000 (05:29 +0000)]
[C++] Use 'nullptr'. Transforms edition.

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

10 years agoblockfreq: Only one mass distribution per node
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:43 +0000 (04:38 +0000)]
blockfreq: Only one mass distribution per node

Remove the concepts of "forward" and "general" mass distributions, which
was wrong.  The split might have made sense in an early version of the
algorithm, but it's definitely wrong now.

<rdar://problem/14292693>

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

10 years agoblockfreq: Document assertion
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:40 +0000 (04:38 +0000)]
blockfreq: Document assertion

<rdar://problem/14292693>

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

10 years agoblockfreq: Use better branch weights in multiexit test
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:37 +0000 (04:38 +0000)]
blockfreq: Use better branch weights in multiexit test

The branch weights were even before.  Make them different.

<rdar://problem/14292693>

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

10 years agoblockfreq: Clean up irreducible testcases
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:35 +0000 (04:38 +0000)]
blockfreq: Clean up irreducible testcases

Strip irreducible testcases to pure control flow.  The function calls
made the branch weights more believable but cluttered it up a lot.
There isn't going to be any constant analysis here, so just use dumb
branch logic to clarify the important parts.

<rdar://problem/14292693>

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

10 years agoblockfreq: Document high-level functions
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:32 +0000 (04:38 +0000)]
blockfreq: Document high-level functions

<rdar://problem/14292693>

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

10 years agoblockfreq: Remove dead code
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:30 +0000 (04:38 +0000)]
blockfreq: Remove dead code

<rdar://problem/14292693>

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

10 years agoblockfreq: Scale LoopData::Scale on the way down
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:27 +0000 (04:38 +0000)]
blockfreq: Scale LoopData::Scale on the way down

Rather than scaling loop headers and then scaling all the loop members
by the header frequency, scale `LoopData::Scale` itself, and scale the
loop members by it.  It's much more obvious what's going on this way,
and doesn't cost any extra multiplies.

<rdar://problem/14292693>

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

10 years agoblockfreq: unwrapLoopPackage() => unwrapLoop()
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:25 +0000 (04:38 +0000)]
blockfreq: unwrapLoopPackage() => unwrapLoop()

<rdar://problem/14292693>

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

10 years agoblockfreq: Pass the Loop directly into unwrapLoopPackage()
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:23 +0000 (04:38 +0000)]
blockfreq: Pass the Loop directly into unwrapLoopPackage()

<rdar://problem/14292693>

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

10 years agoblockfreq: Unwrap from Loops
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:20 +0000 (04:38 +0000)]
blockfreq: Unwrap from Loops

When unwrapping loops, just visit the loops rather than all nodes.

<rdar://problem/14292693>

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

10 years agoblockfreq: Separate unwrapLoops() from finalizeMetrics()
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:17 +0000 (04:38 +0000)]
blockfreq: Separate unwrapLoops() from finalizeMetrics()

<rdar://problem/14292693>

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

10 years agoblockfreq: LoopData::MemberList => NodeList
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:15 +0000 (04:38 +0000)]
blockfreq: LoopData::MemberList => NodeList

<rdar://problem/14292693>

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

10 years agoblockfreq: Expose getPackagedNode()
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:12 +0000 (04:38 +0000)]
blockfreq: Expose getPackagedNode()

Make `getPackagedNode()` a member function of
`BlockFrequencyInfoImplBase` so that it's available for templated code.

<rdar://problem/14292693>

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

10 years agoblockfreq: Store the header with the members
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:09 +0000 (04:38 +0000)]
blockfreq: Store the header with the members

<rdar://problem/14292693>

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

10 years agoblockfreq: Encapsulate LoopData::Header
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:06 +0000 (04:38 +0000)]
blockfreq: Encapsulate LoopData::Header

<rdar://problem/14292693>

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

10 years agoblockfreq: Embed Loop hierarchy in LoopData
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:03 +0000 (04:38 +0000)]
blockfreq: Embed Loop hierarchy in LoopData

Continue refactoring to make `LoopData` first-class.  Here I'm making
the `LoopData` hierarchy explicit, instead of bouncing back and forth
with `WorkingData`.  This simplifies the logic and better matches the
`LoopInfo` design.  (Eventually, `LoopInfo` should be restructured so
that it supports this pass, and `LoopData` can be removed.)

<rdar://problem/14292693>

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

10 years agoblockfreq: Use LoopData directly
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:38:01 +0000 (04:38 +0000)]
blockfreq: Use LoopData directly

Instead of passing around loop headers, pass around `LoopData` directly.

<rdar://problem/14292693>

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

10 years agoblockfreq: Stop using range-based for to traverse Loops
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:37:58 +0000 (04:37 +0000)]
blockfreq: Stop using range-based for to traverse Loops

A follow-up commit will need the actual iterators.

<rdar://problem/14292693>

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

10 years agoblockfreq: Use a std::list for Loops
Duncan P. N. Exon Smith [Fri, 25 Apr 2014 04:30:06 +0000 (04:30 +0000)]
blockfreq: Use a std::list for Loops

As pointed out by David Blaikie in code review, a `std::list<T>` is
simpler than a `std::vector<std::unique_ptr<T>>`.  Another option is a
`std::deque<T>` (which allocates in chunks), but I'd like to leave open
the option of inserting in the middle of the sequence for handling
irreducible control flow on the fly.

<rdar://problem/14292693>

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

10 years ago[C++] Use 'nullptr'. Tools edition.
Craig Topper [Fri, 25 Apr 2014 04:24:47 +0000 (04:24 +0000)]
[C++] Use 'nullptr'. Tools edition.

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

10 years agoAllow vectorization of bit intrinsics in BB Vectorizer.
Karthik Bhat [Fri, 25 Apr 2014 03:33:48 +0000 (03:33 +0000)]
Allow vectorization of bit intrinsics in BB Vectorizer.
This patch adds support for vectorization of  bit intrinsics such as bswap,ctpop,ctlz,cttz.

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

10 years agoProfileData: Treat missing function counts as malformed
Justin Bogner [Fri, 25 Apr 2014 02:45:33 +0000 (02:45 +0000)]
ProfileData: Treat missing function counts as malformed

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

10 years agoChange llvm-config --ldflags to report ${CMAKE_CXX_LINK_FLAGS}
Reid Kleckner [Fri, 25 Apr 2014 01:44:20 +0000 (01:44 +0000)]
Change llvm-config --ldflags to report ${CMAKE_CXX_LINK_FLAGS}

Should fix PR19526.

When Oscar added this code in the intial CMake build system port, he had
a TODO saying that ${CMAKE_SHARED_LINKER_FLAGS} was probably wrong.  I
agree.  I'm using ${CMAKE_CXX_LINK_FLAGS} to point LLVM at my custom
installation of gcc 4.recent, so that seems more correct.  With this
change, I can build creduce against an installed clang, and it picks up
the write flags from --ldflags.

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

10 years agoFix quadratic performance during debug compression due to sections x symbols iteration.
David Blaikie [Fri, 25 Apr 2014 00:48:01 +0000 (00:48 +0000)]
Fix quadratic performance during debug compression due to sections x symbols iteration.

When fixing the symbols in each compressed section we were iterating
over all symbols for each compressed section. In extreme cases this
could snowball severely (5min uncompressed -> 35min compressed) due to
iterating over all symbols for each compressed section (large numbers of
compressed sections can be generated by DWARF type units).

To address this, build a map of the symbols in each section ahead of
time, and access that map if a section is being compressed. This brings
compile time for the aforementioned example down to ~6 minutes.

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

10 years agoRevert "This reapplies r207130 with an additional testcase+and a missing check for"
Adrian Prantl [Fri, 25 Apr 2014 00:42:50 +0000 (00:42 +0000)]
Revert "This reapplies r207130 with an additional testcase+and a missing check for"
Typo in testcase.

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

10 years agoThis reapplies r207130 with an additional testcase+and a missing check for
Adrian Prantl [Fri, 25 Apr 2014 00:38:40 +0000 (00:38 +0000)]
This reapplies r207130 with an additional testcase+and a missing check for
AllocaInst that was missing in one location.
Debug info for optimized code: Support variables that are on the stack and
described by DBG_VALUEs during their lifetime.

Previously, when a variable was at a FrameIndex for any part of its
lifetime, this would shadow all other DBG_VALUEs and only a single
fbreg location would be emitted, which in fact is only valid for a small
range and not the entire lexical scope of the variable. The included
dbg-value-const-byref testcase demonstrates this.

This patch fixes this by
Local
- emitting dbg.value intrinsics for allocas that are passed by reference
- dropping all dbg.declares (they are now fully lowered to dbg.values)
SelectionDAG
- renamed constructors for SDDbgValue for better readability.
- fix UserValue::match() to handle indirect values correctly
- not inserting an MMI table entries for dbg.values that describe allocas.
- lowering dbg.values that describe allocas into *indirect* DBG_VALUEs.
CodeGenPrepare
- leaving dbg.values for an alloca were they are (see comment)
Other
- regenerated/updated instcombine.ll testcase and included source

rdar://problem/16679879
http://reviews.llvm.org/D3374

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

10 years agoRevert "Debug info for optimized code: Support variables that are on the stack and"
Adrian Prantl [Fri, 25 Apr 2014 00:04:49 +0000 (00:04 +0000)]
Revert "Debug info for optimized code: Support variables that are on the stack and"

This reverts commit 207130 for buildbot breakage.

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

10 years agoRevert "Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location"
Adrian Prantl [Thu, 24 Apr 2014 23:53:29 +0000 (23:53 +0000)]
Revert "Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location"

This reverts commit 207130 for buildbot breakage.

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

10 years agoAdd missing include, found by modules build.
Richard Smith [Thu, 24 Apr 2014 23:29:25 +0000 (23:29 +0000)]
Add missing include, found by modules build.

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

10 years agoFunction defined in a header should be inline. Found by modules build.
Richard Smith [Thu, 24 Apr 2014 23:14:32 +0000 (23:14 +0000)]
Function defined in a header should be inline. Found by modules build.

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

10 years ago[DWARF parser] Make a few methods non-public
Alexey Samsonov [Thu, 24 Apr 2014 23:08:56 +0000 (23:08 +0000)]
[DWARF parser] Make a few methods non-public

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

10 years ago[DWARF parser] DWARFUnit ctor doesn't need both parsed and raw .debug_abbrev section...
Alexey Samsonov [Thu, 24 Apr 2014 22:51:03 +0000 (22:51 +0000)]
[DWARF parser] DWARFUnit ctor doesn't need both parsed and raw .debug_abbrev section. Remove the former.

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

10 years ago[DWARF parser] Simplify and re-format a method
Alexey Samsonov [Thu, 24 Apr 2014 22:41:09 +0000 (22:41 +0000)]
[DWARF parser] Simplify and re-format a method

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

10 years ago[LCG] Switch a weird do/while loop that actually couldn't fail its
Chandler Carruth [Thu, 24 Apr 2014 21:19:30 +0000 (21:19 +0000)]
[LCG] Switch a weird do/while loop that actually couldn't fail its
condition into an obviously infinite loop with an assert about the
degenerate condition. No functionality changed.

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

10 years ago[ADT] Generalize pointee_iterator to smart pointers by using decltype.
Chandler Carruth [Thu, 24 Apr 2014 21:10:35 +0000 (21:10 +0000)]
[ADT] Generalize pointee_iterator to smart pointers by using decltype.
Based on review feedback from Dave on the original patch.

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

10 years agoX86: Don't transform shifts into ands when the sign bit is tested.
Benjamin Kramer [Thu, 24 Apr 2014 20:51:37 +0000 (20:51 +0000)]
X86: Don't transform shifts into ands when the sign bit is tested.

Should unbreak MultiSource/Benchmarks/mediabench/g721/g721encode/encode.

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

10 years agoRemove dead inline function that doesn't compile
Reid Kleckner [Thu, 24 Apr 2014 20:19:22 +0000 (20:19 +0000)]
Remove dead inline function that doesn't compile

MSVC doesn't diagnose this, interestingly.

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

10 years agoAdd 'musttail' marker to call instructions
Reid Kleckner [Thu, 24 Apr 2014 20:14:34 +0000 (20:14 +0000)]
Add 'musttail' marker to call instructions

This is similar to the 'tail' marker, except that it guarantees that
tail call optimization will occur.  It also comes with convervative IR
verification rules that ensure that tail call optimization is possible.

Reviewers: nicholas

Differential Revision: http://llvm-reviews.chandlerc.com/D3240

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

10 years agoFix rdtsc.ll test to match r8 on win64
Reid Kleckner [Thu, 24 Apr 2014 20:14:08 +0000 (20:14 +0000)]
Fix rdtsc.ll test to match r8 on win64

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

10 years agoRemove C++11ism (specializing a template in a surrounding namespace) to appease the...
Richard Smith [Thu, 24 Apr 2014 18:49:15 +0000 (18:49 +0000)]
Remove C++11ism (specializing a template in a surrounding namespace) to appease the buildbots.

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

10 years agoDebug info: Let dbg.values inserted by LowerDbgDeclare inherit the location
Adrian Prantl [Thu, 24 Apr 2014 18:44:15 +0000 (18:44 +0000)]
Debug info: Let dbg.values inserted by LowerDbgDeclare inherit the location
of the dbg.value. This gets rid of tons of redundant variable DIEs in
subscopes.

rdar://problem/14874886, rdar://problem/16679936

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

10 years ago[modules] "Specialize" a function by actually specializing a function template
Richard Smith [Thu, 24 Apr 2014 18:27:29 +0000 (18:27 +0000)]
[modules] "Specialize" a function by actually specializing a function template
rather than by adding an overload and hoping that it's declared before the code
that calls it. (In a modules build, it isn't.)

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

10 years agoDebug info for optimized code: Support variables that are on the stack and
Adrian Prantl [Thu, 24 Apr 2014 17:41:45 +0000 (17:41 +0000)]
Debug info for optimized code: Support variables that are on the stack and
described by DBG_VALUEs during their lifetime.

Previously, when a variable was at a FrameIndex for any part of its
lifetime, this would shadow all other DBG_VALUEs and only a single
fbreg location would be emitted, which in fact is only valid for a small
range and not the entire lexical scope of the variable. The included
dbg-value-const-byref testcase demonstrates this.

This patch fixes this by
Local
- emitting dbg.value intrinsics for allocas that are passed by reference
- dropping all dbg.declares (they are now fully lowered to dbg.values)
SelectionDAG
- renamed constructors for SDDbgValue for better readability.
- fix UserValue::match() to handle indirect values correctly
- not inserting an MMI table entries for dbg.values that describe allocas.
- lowering dbg.values that describe allocas into *indirect* DBG_VALUEs.
CodeGenPrepare
- leaving dbg.values for an alloca were they are (see comment)
Other
- regenerated/updated instcombine-intrinsics testcase and included source

rdar://problem/16679879
http://reviews.llvm.org/D3374

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

10 years ago[X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.
Andrea Di Biagio [Thu, 24 Apr 2014 17:18:27 +0000 (17:18 +0000)]
[X86] Add support for Read Time Stamp Counter x86 builtin intrinsics.

This patch:
- Adds two new X86 builtin intrinsics ('int_x86_rdtsc' and
   'int_x86_rdtscp') as GCCBuiltin intrinsics;
- Teaches the backend how to lower the two new builtins;
- Introduces a common function to lower READCYCLECOUNTER dag nodes
  and the two new rdtsc/rdtscp intrinsics;
- Improves (and extends) the existing x86 test 'rdtsc.ll'; now test 'rdtsc.ll'
  correctly verifies that both READCYCLECOUNTER and the two new intrinsics
  work fine for both 64bit and 32bit Subtargets.

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

10 years agoR600/SI: Use address space in allowsUnalignedMemoryAccesses
Matt Arsenault [Thu, 24 Apr 2014 17:08:26 +0000 (17:08 +0000)]
R600/SI: Use address space in allowsUnalignedMemoryAccesses

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

10 years agoSpread some const around for non-mutating uses of MCSymbolData.
David Blaikie [Thu, 24 Apr 2014 16:59:40 +0000 (16:59 +0000)]
Spread some const around for non-mutating uses of MCSymbolData.

I discovered this const-hole while attempting to coalesnce the Symbol
and SymbolMap data structures. There's some pending issues with that,
but I figured this change was easy to flush early.

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

10 years ago[mips] Remove non-ascii character.
Matheus Almeida [Thu, 24 Apr 2014 16:31:10 +0000 (16:31 +0000)]
[mips] Remove non-ascii character.

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