oota-llvm.git
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

10 years agoAArch64/ARM64: add ARM64 runs to more MC tests.
Tim Northover [Thu, 24 Apr 2014 15:04:26 +0000 (15:04 +0000)]
AArch64/ARM64: add ARM64 runs to more MC tests.

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

10 years agoAArch64/ARM64: run AArch64 NEON MC tests through ARM64 too.
Tim Northover [Thu, 24 Apr 2014 15:04:20 +0000 (15:04 +0000)]
AArch64/ARM64: run AArch64 NEON MC tests through ARM64 too.

This skips a couple of compare ones due to the different syntaxt for
floating-point 0.0. AArch64 does it more canonically, and we'll need to fiddle
ARM64 to make it work.

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

10 years agoFix memory leak of MCSymbolData in MCAsmStreamer.
David Blaikie [Thu, 24 Apr 2014 14:33:36 +0000 (14:33 +0000)]
Fix memory leak of MCSymbolData in MCAsmStreamer.

Leak identified by LSan and reported by Kostya Serebryany.

Let's get a bit experimental here... in theory our minimum compiler
versions support unordered_map.

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

10 years agoAArch64: print NEON lists with a space.
Tim Northover [Thu, 24 Apr 2014 14:06:20 +0000 (14:06 +0000)]
AArch64: print NEON lists with a space.

This matches ARM64 behaviour, which I think is clearer. It also puts all the
churn from that difference into one easily ignored commit.

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

10 years ago[asan] Use MCInstrInfo in inline asm instrumentation.
Evgeniy Stepanov [Thu, 24 Apr 2014 13:29:34 +0000 (13:29 +0000)]
[asan] Use MCInstrInfo in inline asm instrumentation.

Patch by Yuri Gorshenin.

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

10 years agoAArch64/ARM64: enable remaining MC elf tests.
Tim Northover [Thu, 24 Apr 2014 12:56:41 +0000 (12:56 +0000)]
AArch64/ARM64: enable remaining MC elf tests.

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

10 years agoAArch64/ARM64: allow negative addends, at least on ELF.
Tim Northover [Thu, 24 Apr 2014 12:56:38 +0000 (12:56 +0000)]
AArch64/ARM64: allow negative addends, at least on ELF.

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

10 years agoARM64: support relocated "TBZ/TBNZ" instructions.
Tim Northover [Thu, 24 Apr 2014 12:56:34 +0000 (12:56 +0000)]
ARM64: support relocated "TBZ/TBNZ" instructions.

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

10 years agoAArch64/ARM64: support relocated ADR instruction
Tim Northover [Thu, 24 Apr 2014 12:56:30 +0000 (12:56 +0000)]
AArch64/ARM64: support relocated ADR instruction

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

10 years agoAArch64/ARM64: add support for :abs_gN_s: MOVZ modifiers
Tim Northover [Thu, 24 Apr 2014 12:56:27 +0000 (12:56 +0000)]
AArch64/ARM64: add support for :abs_gN_s: MOVZ modifiers

We only need assembly support, so it's fairly easy.

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

10 years agoARM64: shut up warning about variable only used in assert.
Tim Northover [Thu, 24 Apr 2014 12:22:12 +0000 (12:22 +0000)]
ARM64: shut up warning about variable only used in assert.

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

10 years agoAArch64/ARM64: disentangle the "B.CC" and "LDR lit" operands
Tim Northover [Thu, 24 Apr 2014 12:12:10 +0000 (12:12 +0000)]
AArch64/ARM64: disentangle the "B.CC" and "LDR lit" operands

These can have different relocations in ELF. In particular both:

    b.eq global
    ldr x0, global

are valid, giving different relocations. The only possible way to distinguish
them is via a different fixup, so the operands had to be separated throughout
the backend.

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

10 years agoAArch64/ARM64: enable some MC tests on ARM64
Tim Northover [Thu, 24 Apr 2014 12:12:01 +0000 (12:12 +0000)]
AArch64/ARM64: enable some MC tests on ARM64

This will also (as with CodeGen) disable testing when the ARM64 backend is not
present.

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

10 years agoAArch64/ARM64: port bitfield test to ARM64.
Tim Northover [Thu, 24 Apr 2014 12:11:56 +0000 (12:11 +0000)]
AArch64/ARM64: port bitfield test to ARM64.

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

10 years agoAArch64/ARM64: implement BFI optimisation
Tim Northover [Thu, 24 Apr 2014 12:11:53 +0000 (12:11 +0000)]
AArch64/ARM64: implement BFI optimisation

ARM64 was not producing pure BFI instructions for bitfield insertion
operations, unlike AArch64. The approach had to be a little different (in
ISelDAGToDAG rather than ISelLowering), and the outcomes aren't identical but
hopefully this gives it similar power.

This should address PR19424.

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

10 years agoAArch64/ARM64: port more tests
Tim Northover [Thu, 24 Apr 2014 12:11:46 +0000 (12:11 +0000)]
AArch64/ARM64: port more tests

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

10 years ago[LCG] Incorporate the core trick of improvements on the naive Tarjan's
Chandler Carruth [Thu, 24 Apr 2014 11:05:20 +0000 (11:05 +0000)]
[LCG] Incorporate the core trick of improvements on the naive Tarjan's
algorithm here: http://dl.acm.org/citation.cfm?id=177301.

The idea of isolating the roots has even more relevance when using the
stack not just to implement the DFS but also to implement the recursive
step. Because we use it for the recursive step, to isolate the roots we
need to maintain two stacks: one for our recursive DFS walk, and another
of the nodes that have been walked. The nice thing is that the latter
will be half the size. It also fixes a complete hack where we scanned
backwards over the stack to find the next potential-root to continue
processing. Now that is always the top of the DFS stack.

While this is a really nice improvement already (IMO) it further opens
the door for two important simplifications:

1) De-duplicating some of the code across the two different walks. I've
   actually made the duplication a bit worse in some senses with this
   patch because the two are starting to converge.
2) Dramatically simplifying the loop structures of both walks.

I wanted to do those separately as they'll be essentially *just* CFG
restructuring. This patch on the other hand actually uses different
datastructures to implement the algorithm itself.

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

10 years ago[LCG] Rotate logic applied to the top of the DFSStack to instead be
Chandler Carruth [Thu, 24 Apr 2014 09:59:59 +0000 (09:59 +0000)]
[LCG] Rotate logic applied to the top of the DFSStack to instead be
applied prior to pushing a node onto the DFSStack. This is the first
step toward avoiding the stack entirely for leaf nodes. It also
simplifies things a bit and I think is pointing the way toward factoring
some more of the shared logic out of the two implementations.

It is also making it more obvious how to restructure the loops
themselves to be a bit easier to read (although no different in terms of
functionality).

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

10 years ago[LCG] Re-order expectations to provide more useful output when debugging
Chandler Carruth [Thu, 24 Apr 2014 09:59:56 +0000 (09:59 +0000)]
[LCG] Re-order expectations to provide more useful output when debugging
an issue. This way you see that the number of nodes was wrong before
a crash due to accessing too many nodes.

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

10 years ago[asan] Fix instrumentation of x86 intel syntax inline assembly.
Evgeniy Stepanov [Thu, 24 Apr 2014 09:56:15 +0000 (09:56 +0000)]
[asan] Fix instrumentation of x86 intel syntax inline assembly.

Patch by Yuri Gorshenin.

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

10 years ago[LCG] Switch the parent SCC tracking from a SmallSetVector to
Chandler Carruth [Thu, 24 Apr 2014 09:22:31 +0000 (09:22 +0000)]
[LCG] Switch the parent SCC tracking from a SmallSetVector to
a SmallPtrSet. Currently, there is no need for stable iteration in this
dimension, and I now thing there won't need to be going forward.

If this is ever re-introduced in any form, it needs to not be
a SetVector based solution because removal cannot be linear. There will
be many SCCs with large numbers of parents. When encountering these, the
incremental SCC update for intra-SCC edge removal was quadratic due to
linear removal (kind of).

I'm really hoping we can avoid having an ordering property here at all
though...

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

10 years ago[LCG] We don't actually need a set in each SCC to track the nodes. We
Chandler Carruth [Thu, 24 Apr 2014 08:55:36 +0000 (08:55 +0000)]
[LCG] We don't actually need a set in each SCC to track the nodes. We
can use the node -> SCC mapping in the top-level graph to test this on
the rare occasions we need it.

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

10 years ago[CLNUP] Test commit. Remove newline.
Zinovy Nis [Thu, 24 Apr 2014 08:42:58 +0000 (08:42 +0000)]
[CLNUP] Test commit. Remove newline.

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

10 years agoX86: Emit test instead of constant shift + compare if the shift result is unused.
Benjamin Kramer [Thu, 24 Apr 2014 08:15:31 +0000 (08:15 +0000)]
X86: Emit test instead of constant shift + compare if the shift result is unused.

This allows us to compile
  return (mask & 0x8 ? a : b);
into
  testb $8, %dil
  cmovnel %edx, %esi
instead of
  andl  $8, %edi
  shrl  $3, %edi
  cmovnel %edx, %esi

which we formed previously because dag combiner canonicalizes setcc of and into shift.

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

10 years ago[LCG] Switch the SCC's parent iterators to be value iterators rather
Chandler Carruth [Thu, 24 Apr 2014 07:48:18 +0000 (07:48 +0000)]
[LCG] Switch the SCC's parent iterators to be value iterators rather
than pointer iterators.

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

10 years agoAllow vectorization of few missed llvm intrinsic calls in BBVectorizor by handling...
Karthik Bhat [Thu, 24 Apr 2014 07:29:55 +0000 (07:29 +0000)]
Allow vectorization of few missed llvm intrinsic calls in BBVectorizor by handling them in isVectorizableIntrinsic function.

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

10 years ago[ADT] Attempt to appease another MSVC oddity by moving the injected
Chandler Carruth [Thu, 24 Apr 2014 06:59:50 +0000 (06:59 +0000)]
[ADT] Attempt to appease another MSVC oddity by moving the injected
class name usage into a context we can put typename on it.

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

10 years ago[C++] Use 'nullptr'.
Craig Topper [Thu, 24 Apr 2014 06:44:33 +0000 (06:44 +0000)]
[C++] Use 'nullptr'.

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

10 years ago[ADT] Try to appease MSVC by sinking the enable_if from a default
Chandler Carruth [Thu, 24 Apr 2014 06:16:12 +0000 (06:16 +0000)]
[ADT] Try to appease MSVC by sinking the enable_if from a default
template argument to a default argument to the constructor.

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

10 years agoFix for PR18921, "vmov" part.
Stepan Dyatkovskiy [Thu, 24 Apr 2014 06:03:01 +0000 (06:03 +0000)]
Fix for PR18921, "vmov" part.
Added support for bytes replication feature, so it could be GAS compatible.

E.g. instructions below:
"vmov.i32 d0, 0xffffffff"
"vmvn.i32 d0, 0xabababab"
"vmov.i32 d0, 0xabababab"
"vmov.i16 d0, 0xabab"
are incorrect, but we could deal with such cases.

For first one we should emit:
"vmov.i8 d0, 0xff"
For second one ("vmvn"):
"vmov.i8 d0, 0x54"
For last two instructions it should emit:
"vmov.i8 d0, 0xab"

P.S.: In ARMAsmParser.cpp I have also fixed few nearby style issues in old code.
Just for keeping method bodies in harmony with themselves.

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

10 years agoUse the shiny new iterator adaptor tool to implement the
Chandler Carruth [Thu, 24 Apr 2014 05:33:53 +0000 (05:33 +0000)]
Use the shiny new iterator adaptor tool to implement the
value_op_iterator.

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

10 years ago[ADT] Factor out the facade aspect of the iterator_adaptor_base into its
Chandler Carruth [Thu, 24 Apr 2014 04:07:06 +0000 (04:07 +0000)]
[ADT] Factor out the facade aspect of the iterator_adaptor_base into its
own CRTP base class for more general purpose use. Add some clarifying
comments for the exact way in which the adaptor uses it. Hopefully this
will help us write increasingly full featured iterators. This is
becoming important as they start to be used heavily inside of ranges.

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

10 years ago[ADT] Add a generic iterator utility for adapting iterators much like
Chandler Carruth [Thu, 24 Apr 2014 03:31:23 +0000 (03:31 +0000)]
[ADT] Add a generic iterator utility for adapting iterators much like
Boost's iterator_adaptor, and a specific adaptor which iterates over
pointees when wrapped around an iterator over pointers.

This is the result of a long discussion on IRC with Duncan Smith, Dave
Blaikie, Richard Smith, and myself. Essentially, I could use some subset
of the iterator facade facilities often used from Boost, and everyone
seemed interested in having the functionality in a reasonably generic
form. I've tried to strike a balance between the pragmatism and the
established Boost design. The primary differences are:

1) Delegating to the standard iterator interface names rather than
   special names that then make up a second iterator-like API.
2) Using the name 'pointee_iterator' which seems more clear than
   'indirect_iterator'. The whole business of calling the '*p' operation
   'pointer indirection' in the standard is ... quite confusing. And
   'dereference' is no better of a term for moving from a pointer to
   a reference.

Hoping Duncan, and others continue to provide comments on this until
we've got a nice, minimal abstraction.

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

10 years agoRemove unused parameter
David Blaikie [Thu, 24 Apr 2014 01:25:10 +0000 (01:25 +0000)]
Remove unused parameter

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

10 years agoRemove the intermediate AccelTypes maps in DWARF units.
David Blaikie [Thu, 24 Apr 2014 01:23:49 +0000 (01:23 +0000)]
Remove the intermediate AccelTypes maps in DWARF units.

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

10 years agoRemove the intermediate AccelNamespace maps in DWARF units.
David Blaikie [Thu, 24 Apr 2014 01:02:42 +0000 (01:02 +0000)]
Remove the intermediate AccelNamespace maps in DWARF units.

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

10 years ago[InstCombine][x86] Constant fold psll intrinsics.
Michael J. Spencer [Thu, 24 Apr 2014 00:58:18 +0000 (00:58 +0000)]
[InstCombine][x86] Constant fold psll intrinsics.

This excludes avx512 as I don't have hardware to verify. It excludes _dq
variants because they are represented in the IR as <{2,4} x i64> when it's
actually a byte shift of the entire i{128,265}.

This also excludes _dq_bs as they aren't at all supported by the backend.
There are also no corresponding instructions in the ISA. I have no idea why
they exist...

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

10 years agoRemove the intermediate AccelObjC maps in DWARF units
David Blaikie [Thu, 24 Apr 2014 00:53:32 +0000 (00:53 +0000)]
Remove the intermediate AccelObjC maps in DWARF units

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

10 years agoOptimize some special cases for SSE4a insertqi
Filipe Cabecinhas [Thu, 24 Apr 2014 00:38:14 +0000 (00:38 +0000)]
Optimize some special cases for SSE4a insertqi

Summary:
Since the upper 64 bits of the destination register are undefined when
performing this operation, we can substitute it and let the optimizer
figure out that only a copy is needed.

Also added range merging, if an instruction copies a range that can be
merged with a previous copied range.

Added test cases for both optimizations.

Reviewers: grosbach, nadav

CC: llvm-commits
Differential Revision: http://reviews.llvm.org/D3357

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

10 years agoHandle addrspacecast when looking at memcpys from globals
Matt Arsenault [Thu, 24 Apr 2014 00:01:09 +0000 (00:01 +0000)]
Handle addrspacecast when looking at memcpys from globals

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