Commit Graph

170085 Commits

Author SHA1 Message Date
Pete Cooper 08a7cb1fa0 When destroying a StringMap, just iterate over the map and destroy the contained elements. Don't reset them back to 0 as their values aren't needed any more. This results in ~StringMap() being mostly empty for POD types in BumpPtrAllocators
llvm-svn: 204204
2014-03-19 00:23:30 +00:00
Rafael Espindola 7bbd5c2636 Revert "Add back r203962, r204028 and r204059."
This reverts commit r204178.

llvm-svn: 204203
2014-03-19 00:13:43 +00:00
David Blaikie 47f4b82d8b DebugInfo: Use the comp_dir of the referencing type units when building debug_line.dwo
This isn't a complete fix - it falls back to non-comp_dir when multiple
compile units are in play. Adding a map of comp_dir to table is part of
the more general solution, but I gave up (in the short term) when I
realized I'd also have to calculate the size of each type unit so as to
produce correct DW_AT_stmt_list attributes.

llvm-svn: 204202
2014-03-19 00:11:28 +00:00
Eli Bendersky 2281ef91e6 Expose "noduplicate" attribute as a property for intrinsics.
The "noduplicate" function attribute exists to prevent certain optimizations
from duplicating calls to the function. This is important on platforms where
certain function call duplications are unsafe (for example execution barriers
for CUDA and OpenCL).

This patch makes it possible to specify intrinsics as "noduplicate" and
translates that to the appropriate function attribute.

llvm-svn: 204200
2014-03-18 23:51:07 +00:00
Rui Ueyama f078eff39c Object/COFF: Add function to check if section number is reserved one.
Differential Revision: http://llvm-reviews.chandlerc.com/D3103

llvm-svn: 204199
2014-03-18 23:37:53 +00:00
NAKAMURA Takumi 2e21f63462 Move yet another test that requires ARM to an ARM test directory.
llvm-svn: 204198
2014-03-18 23:12:09 +00:00
Jim Grosbach e93b257c6a Move tests that require ARM to an ARM test directory.
llvm-svn: 204197
2014-03-18 22:43:59 +00:00
Richard Smith 997ff02c7b Fix a typo in r204164 that made *all* keywords available in OpenCL mode.
llvm-svn: 204196
2014-03-18 22:43:19 +00:00
Duncan P. N. Exon Smith cb1c81afa0 Fix use_iterator crash in ObjCArc from r203364
The use_iterator redesign in r203364 introduced an increment past the
end of a range in -objc-arc-contract.  Added an explicit check for the
end of the range.

<rdar://problem/16333235>

llvm-svn: 204195
2014-03-18 22:32:43 +00:00
Jim Grosbach 2f6bec6ee9 C++ style comments
llvm-svn: 204194
2014-03-18 22:13:13 +00:00
Joerg Sonnenberger 4e08a634e1 Don't take short cuts trying to avoid conditionals. This leads to
negative shift amounts and/or shifts wider than the type. VAX traps on
the former, X86 and other platforms produce incorrect results on the
latter.

llvm-svn: 204193
2014-03-18 22:10:36 +00:00
Jim Grosbach 319026d148 Tidy up. Update per naming conventions.
No functional change.

llvm-svn: 204192
2014-03-18 22:09:10 +00:00
Jim Grosbach eaf6036fb2 MachO: Emit a version-min load command when possible.
When deployment target version information is available, emit it to the
target streamer for inclusion in the object file.

rdar://11337778

llvm-svn: 204191
2014-03-18 22:09:08 +00:00
Jim Grosbach 448334a738 Darwin: Add assembler directives to create version-min load commands.
Allow object files to be tagged with a version-min load command for iOS
or MacOSX.

Teach macho-dump to understand the version-min load commands for
testcases.

rdar://11337778

llvm-svn: 204190
2014-03-18 22:09:05 +00:00
Jim Grosbach 79f91c595d MachO: Comment fields in the version_min load command.
llvm-svn: 204189
2014-03-18 22:08:58 +00:00
Chandler Carruth 4c5001cc9c [LV] While I'm here, use range based for loops which are so much cleaner
for this kind of walk.

llvm-svn: 204188
2014-03-18 22:00:32 +00:00
Chandler Carruth ae324439d0 [LV] The actual change I intended to commit in r204148. Sorry for the
noise.

Original commit log:
Replace some dead code with an assert. When I first ported this pass
from a loop pass to a function pass I did so in the naive, recursive
way. It doesn't actually work, we need a worklist instead. When
I switched to the worklist I didn't delete the naive recursion. That
recursion was also buggy because it was dead and never really exercised.

llvm-svn: 204187
2014-03-18 21:58:38 +00:00
Justin Bogner b4416f58d5 CodeGen: Include a function hash in instrumentation based profiling
The hash itself is still the number of counters, which isn't all that
useful, but this separates the API changes from the actual
implementation of the hash and will make it easier to transition to
the ProfileData library once it's implemented.

llvm-svn: 204186
2014-03-18 21:58:06 +00:00
Justin Bogner bc9c856161 profile: Include the function hash in PGO profiles
llvm-svn: 204185
2014-03-18 21:57:58 +00:00
Chandler Carruth f73079ca89 [LV] Replace some dead code with an assert. When I first ported this
pass from a loop pass to a function pass I did so in the naive,
recursive way. It doesn't actually work, we need a worklist instead.
When I switched to the worklist I didn't delete the naive recursion.
That recursion was also buggy because it was dead and never really
exercised.

llvm-svn: 204184
2014-03-18 21:51:46 +00:00
Eric Christopher 11f806740d More header and forward declaration cleanup.
llvm-svn: 204183
2014-03-18 21:44:12 +00:00
Joerg Sonnenberger 14743127b7 Use CRT_HAS_128BIT.
llvm-svn: 204182
2014-03-18 21:35:30 +00:00
Richard Smith c42c219d57 Simplify and add FIXME. No functionality change.
llvm-svn: 204181
2014-03-18 21:02:14 +00:00
Eric Christopher acbe42badd Add back the headers we're getting via (likely) transitive includes.
We really do use these things in the header.

llvm-svn: 204180
2014-03-18 20:58:35 +00:00
Joerg Sonnenberger bbc979be52 Spacing
llvm-svn: 204179
2014-03-18 20:41:31 +00:00
Rafael Espindola 574bfa12fa Add back r203962, r204028 and r204059.
This reverts commit r204137.

This includes a fix for handling aliases of aliases.

llvm-svn: 204178
2014-03-18 20:40:38 +00:00
Eric Christopher c0bd5f8256 Fix for coding style.
llvm-svn: 204177
2014-03-18 20:39:54 +00:00
Eric Christopher ce4a9445ec Remove a bunch of unnecessary includes and forward declarations.
llvm-svn: 204176
2014-03-18 20:37:10 +00:00
Richard Smith 1b42d1c7ac In the presence of modules, we can have multiple implicit instantiations of the same template. Teach RecursiveASTVisitor to visit all of those, not just one of them. This is difficult to test by itself, but will be covered by an upcoming change.
llvm-svn: 204175
2014-03-18 20:31:31 +00:00
Hans Wennborg aec21ce43e X86 memcpy lowering: use "rep movs" even when esi is used as base pointer
For functions where esi is used as base pointer, we would previously fall back
from lowering memcpy with "rep movs" because that clobbers esi.

With this patch, we just store esi in another physical register, and restore
it afterwards. This adds a little bit of register preassure, but the more
efficient memcpy should be worth it.

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

llvm-svn: 204174
2014-03-18 20:04:34 +00:00
Sergey Matveev 34b26458cb [sanitizer] Fix a bug in AdjustStackSize().
If the user requests OS default stack size, do not adjust it to our minimum
stack size (which is usually much less than the OS default).

llvm-svn: 204173
2014-03-18 19:48:48 +00:00
Rui Ueyama 7ad72ebc5e [PECOFF] Support yet another new type of weak symbol.
COMDAT_SELECT_LARGEST is a COMDAT type that make linker to choose the largest
definition from among all of the definition of a symbol. If the size is the
same, the choice is arbitrary.

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

llvm-svn: 204172
2014-03-18 19:37:50 +00:00
Rui Ueyama 4e39f717ff Use early returns to reduce nesting.
llvm-svn: 204171
2014-03-18 18:58:51 +00:00
Ed Maste a09ed03ce1 Fix expression parsing (on FreeBSD, at least)
This reverts part of r204112 (Expression: cleanup unused include).
It looks like MCJIT.h is required to force MCJIT to be linked.

llvm-svn: 204170
2014-03-18 18:55:06 +00:00
Tobias Grosser 4eb7ddb13a Fix source code formatting
llvm-svn: 204169
2014-03-18 18:51:11 +00:00
Tobias Grosser 72ceb7bc73 Dependences: Further reduce the allowed compile time
llvm.org/PR19081 reports that the polly dependence analysis causes some h264
compilation to hang. We adjust the compute out, to ensure we do not block on
expensive dependence calculations.

llvm-svn: 204168
2014-03-18 18:51:04 +00:00
Tobias Grosser 67f1524797 autoconf: Add PLUTO_FOUND flag
This fixes llvm.org/PR12250.

Contributed-by: Sam Novak <snovak@uwsp.edu>
llvm-svn: 204167
2014-03-18 18:50:58 +00:00
Michael Zolotukhin 7ac41056c8 Fix test lsr-normalization.ll broken in r204161.
llvm-svn: 204166
2014-03-18 18:17:59 +00:00
Tobias Grosser 483fdd4b7f Print function and region name in scop description
llvm-svn: 204165
2014-03-18 18:05:38 +00:00
Yunzhong Gao fcdc45ff2d Creating a printing policy for "half":
Since "half" is an OpenCL keyword and clang accepts __fp16 as an extension for
other languages, error messages and metadata (and hence debug info) should refer
to the half-precision floating point as "__fp16" instead of "half" when
compiling for non-OpenCL languages. This patch creates a new printing policy for
half in a similar manner to what is done for bool and wchar_t.

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

llvm-svn: 204164
2014-03-18 17:55:18 +00:00
Raul E. Silvera a9dafe6793 Add support for scalarizing/splitting vector bswap.
Summary:
  SLP Vectorization of intrinsics (r203707) has exposed cases where the
  expansion of vector bswap is failing (PR19151).

Reviewers: hfinkel

CC: chandlerc

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

llvm-svn: 204163
2014-03-18 17:49:12 +00:00
Adrian Prantl d486b343a0 Debug info: Remove OdrMemberMap from DwarfDebug, it's not necessary.
Follow-up to r203982.

llvm-svn: 204162
2014-03-18 17:41:15 +00:00
Michael Zolotukhin ed0a7761e5 Add stride normalization to SCEV Normalize/Denormalize transformation.
llvm-svn: 204161
2014-03-18 17:34:03 +00:00
Andrea Di Biagio 28f46d9f39 [DAGCombiner] teach how to simplify xor/and/or nodes according to the following rules:
1)  (AND (shuf (A, C, Mask), shuf (B, C, Mask)) -> shuf (AND (A, B), C, Mask)
 2)  (OR  (shuf (A, C, Mask), shuf (B, C, Mask)) -> shuf (OR  (A, B), C, Mask)
 3)  (XOR (shuf (A, C, Mask), shuf (B, C, Mask)) -> shuf (XOR (A, B), V_0, Mask)

 4)  (AND (shuf (C, A, Mask), shuf (C, B, Mask)) -> shuf (C, AND (A, B), Mask)
 5)  (OR  (shuf (C, A, Mask), shuf (C, B, Mask)) -> shuf (C, OR  (A, B), Mask)
 6)  (XOR (shuf (C, A, Mask), shuf (C, B, Mask)) -> shuf (V_0, XOR (A, B), Mask)

llvm-svn: 204160
2014-03-18 17:12:59 +00:00
Fariborz Jahanian ed39e7cfeb Objective-C. Better fix for my previous patch
"No need to issue deprecated warning if deprecated method 
in class extension is being implemented in primary class implementation
(no overriding is involved).
// rdar://16249335". No functionality change.

llvm-svn: 204159
2014-03-18 16:25:22 +00:00
Manuel Jacob dcb78dbc82 X86: Use enums for memory operand decoding instead of integer literals.
Summary:
X86BaseInfo.h defines an enum for the offset of each operand in a memory operand
sequence.  Some code uses it and some does not.  This patch replaces (hopefully)
all remaining locations where an integer literal was used instead of this enum.
No functionality change intended.

Reviewers: nadav

CC: llvm-commits, t.p.northover

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

llvm-svn: 204158
2014-03-18 16:14:11 +00:00
Krzysztof Parzyszek 4d38c82575 Enable CFI on Hexagon.
llvm-svn: 204157
2014-03-18 16:02:37 +00:00
Alexander Kornienko ce08126733 clang-format: Detect function-like macros only when upper case is used.
Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

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

llvm-svn: 204156
2014-03-18 14:35:20 +00:00
Bill Schmidt ff9622ef0e Fix PR19144: Incorrect offset generated for int-to-fp conversion at -O0.
When converting a signed 32-bit integer to double-precision floating point on
hardware without a lfiwax instruction, we have to instead use a lfd followed
by fcfid.  We were erroneously offsetting the address by 4 bytes in
preparation for either a lfiwax or lfiwzx when generating the lfd.  This fixes
that silly error.

This was not caught in the test suite since the conversion tests were run with
-mcpu=pwr7, which implies availability of lfiwax.  I've added another test
case for older hardware that checks the code we expect in the absence of
lfiwax and other flavors of fcfid.  There are fewer tests in this test case
because we punt to DAG selection in more cases on older hardware.  (We must
generate complex fiddly sequences in those cases, and there is marginal
benefit in duplicating that logic in fast-isel.)

llvm-svn: 204155
2014-03-18 14:32:50 +00:00
Dmitry Vyukov c5b7c66bc3 tsan: fix malloc/munmap mismatch
llvm-svn: 204154
2014-03-18 14:28:17 +00:00