Sanjay Patel [Mon, 28 Mar 2016 21:52:53 +0000 (21:52 +0000)]
trailing whitespace
llvm-svn: 264670
Sean Callanan [Mon, 28 Mar 2016 21:43:01 +0000 (21:43 +0000)]
Improvements to the ASTImporter to support LLDB top-level Clang expressions.
The testcase for this is in LLDB, adeed by r264662.
This patch adds support for a variety of new expression types to the AST
importer, mostly related to C++. It also adds support for importing lambdas
correctly, and adds support for importing the attributes attached to any Decl.
Finally, the patch adds a new templated function to ASTNodeImporter that imports
arbitrary arrays of importable things into a bump-allocated array attached to
getToContext(). This is a pattern we see at many places in ASTNodeImporter;
rather than do it slightly differently at each point, this function does it one
way.
<rdar://problem/
22864976>
llvm-svn: 264669
Derek Schuff [Mon, 28 Mar 2016 21:38:35 +0000 (21:38 +0000)]
Move use of scoped enum in MachineFunctionProperties after its declaration
This should fix the build with MSVC 2013
llvm-svn: 264668
Evgeniy Stepanov [Mon, 28 Mar 2016 21:37:02 +0000 (21:37 +0000)]
Remove personality for declarations in CloneModule.
Personality is copied as part of copyFunctionAttributes, but it is
invalid on a declaration. Remove the personality attribute it the
function body is not cloned.
Also add a verifier run over output modules in the llvm-split tool.
llvm-svn: 264667
Simon Pilgrim [Mon, 28 Mar 2016 21:33:52 +0000 (21:33 +0000)]
[X86][SSE] Vectorize a bit (AND/XOR/OR) op if a BUILD_VECTOR has the same op for all their scalar elements.
If all a BUILD_VECTOR's source elements are the same bit (AND/XOR/OR) operation type and each has one constant operand, lower to a pair of BUILD_VECTOR and just apply the bit operation to the vectors.
The constant operands will form a constant vector meaning that we still only have a single BUILD_VECTOR to lower and we will have replaced all the scalarized operations with a single SSE equivalent.
Its not in our interest to start make a general purpose vectorizer from this, but I'm seeing enough of these scalar bit operations from the later legalization/scalarization stages to support them at least.
Differential Revision: http://reviews.llvm.org/D18492
llvm-svn: 264666
Sean Silva [Mon, 28 Mar 2016 21:32:46 +0000 (21:32 +0000)]
[libprofile] Handle '\\' in __llvm_profile_recursive_mkdir
This is implicitly needed at least by gcc-flag-compatibility.test
The thing that needs it is the `\` preceding the "default.profraw"
appended internally by clang when doing `-fprofile-use=`.
Clang uses `\` because is uses sys::path::append which will use `\` on a
Windows host. This is wrong, but I don't think there's an easy way to
solve it (maybe just always using `/` since places that accept `\` also
tend to accept `/`, but not the other way around).
llvm-svn: 264665
Richard Smith [Mon, 28 Mar 2016 21:31:09 +0000 (21:31 +0000)]
[modules] If both a module file and a module map for the same module are
explicitly provided, and the module map lists a header that does not exist,
unmark the module as 'unavailable' when loading its .pcm file. (Use of the
module might still fail if the relevant headers aren't embedded, but this
behavior is now consistent with how we behave if the module map is not
provided, and with the desired behavior for embedding headers in modules.)
llvm-svn: 264664
Nico Weber [Mon, 28 Mar 2016 21:24:46 +0000 (21:24 +0000)]
docs: Fix footnote after r260042.
r260042 removed a footnote referring to autoconf, but it left
around one item still referring to that footnote (libtool), and
it didn't renumber the later footnote reference.
llvm-svn: 264663
Sean Callanan [Mon, 28 Mar 2016 21:20:05 +0000 (21:20 +0000)]
Expose top-level Clang expressions via the command line and the API.
Top-level Clang expressions are expressions that act as new translation units,
and define their own symbols. They do not have function wrappers like regular
expressions do, and declarations are persistent regardless of use of the dollar
sign in identifiers. Names defined by these are given priority over all other
symbol lookups.
This patch adds a new expression option, '-p' or '--top-level,' which controls
whether the expression is treated this way. It also adds a flag controlling
this to SBExpressionOptions so that this API is usable externally. It also adds
a test that validates that this works. (The test requires a fix to the Clang
AST importer which I will be committing shortly.)
<rdar://problem/
22864976>
llvm-svn: 264662
Sanjay Patel [Mon, 28 Mar 2016 21:14:24 +0000 (21:14 +0000)]
fix CHECK_NEXT -> CHECK-NEXT
llvm-svn: 264661
Sean Callanan [Mon, 28 Mar 2016 21:10:36 +0000 (21:10 +0000)]
Don't try to actually run code when the expression is top-level.
llvm-svn: 264660
Sean Callanan [Mon, 28 Mar 2016 21:07:53 +0000 (21:07 +0000)]
Removed an override of LookupSymbol that mistakenly disabled it for Clang.
llvm-svn: 264659
Vedant Kumar [Mon, 28 Mar 2016 21:06:42 +0000 (21:06 +0000)]
Reapply (2x) "[PGO] Fix name encoding for ObjC-like functions"
Function names in ObjC can have spaces in them. This interacts poorly
with name compression, which uses spaces to separate PGO names. Fix the
issue by using a different separator and update a test.
I chose "\01" as the separator because 1) it's non-printable, 2) we
strip it from PGO names, and 3) it's the next natural choice once "\00"
is discarded (that one's overloaded).
What's changed since the original commit?
- I fixed up the covmap-V2 binary format tests using a linux VM.
- I weakened the CHECK lines in instrprof-comdat.h to account for the
fact that there have been bugfixes to clang coverage. These will be
fixed up in a follow-up.
- I added an assert to make sure we don't get bitten by this again.
- I constructed the c-general.profraw file without name compression
enabled to appease some bots.
Differential Revision: http://reviews.llvm.org/D18516
llvm-svn: 264658
Adrian Prantl [Mon, 28 Mar 2016 21:06:26 +0000 (21:06 +0000)]
Add an IR Verifier check for orphaned DICompileUnits.
A DICompileUnit that is not listed in llvm.dbg.cu will cause assertion
failures and/or crashes in the backend. The Verifier should reject this.
rdar://problem/
25369499
llvm-svn: 264657
Adam Nemet [Mon, 28 Mar 2016 21:04:13 +0000 (21:04 +0000)]
[LVers] Change CHECK_LABEL to CHECK-LABEL (underscore->dash)
Thanks to Sanjoy for catching this.
llvm-svn: 264656
Jacques Pienaar [Mon, 28 Mar 2016 21:02:54 +0000 (21:02 +0000)]
[lanai] Add Lanai backend to clang driver.
Changes to clang to add Lanai backend. Adds a new target, ABI and toolchain.
General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).
Differential Revision: http://reviews.llvm.org/D17002
llvm-svn: 264655
Nico Weber [Mon, 28 Mar 2016 21:00:21 +0000 (21:00 +0000)]
docs: Try to remove weird linebreak from generated html.
llvm-svn: 264654
Rui Ueyama [Mon, 28 Mar 2016 20:59:47 +0000 (20:59 +0000)]
Remove dead flags.
searchArchivesToOverrideTentativeDefinitions and
searchSharedLibrariesToOverrideTentativeDefinitions are always false.
For the dead flags, we have a fairly large amount of code which is
never be executed.
http://reviews.llvm.org/D17791
llvm-svn: 264653
Ryan Govostes [Mon, 28 Mar 2016 20:42:56 +0000 (20:42 +0000)]
[asan] Fix testcase for r264645
llvm-svn: 264652
Reid Kleckner [Mon, 28 Mar 2016 20:42:41 +0000 (20:42 +0000)]
Update the description of Clang's MSVC compatibility flags
llvm-svn: 264651
Duncan P. N. Exon Smith [Mon, 28 Mar 2016 20:39:41 +0000 (20:39 +0000)]
Explicitly test BitstreamReader::setArtificialByteLimit, NFC
Explicitly check that artificial byte limit is rounded correctly by
exposing BitstreamReader::Size through a new accessor, getSizeIfKnown.
The original code for rounding (from r264547) wasn't obviously correct,
and even though r264623 cleaned it up (by calling llvm::alignTo) I think
it's worth testing.
llvm-svn: 264650
Evgeniy Stepanov [Mon, 28 Mar 2016 20:36:28 +0000 (20:36 +0000)]
Handle section vs global name conflict.
This is a fix for PR26941.
When there is both a section and a global definition with the same
name, the global wins.
Section symbols are not added to the symbol table; section references
are left undefined and fixed up in the object writer unless they've
been satisfied by some other definition.
llvm-svn: 264649
Nico Weber [Mon, 28 Mar 2016 20:32:38 +0000 (20:32 +0000)]
docs: Update Ninja link, also fix link syntax.
llvm-svn: 264648
Devin Coughlin [Mon, 28 Mar 2016 20:30:25 +0000 (20:30 +0000)]
[analyzer] Nullability: Don't warn along paths where null returned from non-null.
Change the nullability checker to not warn along paths where null is returned from
a method with a non-null return type, even when the diagnostic for this return
has been suppressed. This prevents warning from methods with non-null return types
that inline methods that themselves return nil but that suppressed the diagnostic.
Also change the PreconditionViolated state component to be called "InvariantViolated"
because it is set when a post-condition is violated, as well.
rdar://problem/
25393539
llvm-svn: 264647
Duncan P. N. Exon Smith [Mon, 28 Mar 2016 20:30:15 +0000 (20:30 +0000)]
Remove accidentally duplicated test
This was identical to setArtificialByteLimitNotWordBoundary.
llvm-svn: 264646
Ryan Govostes [Mon, 28 Mar 2016 20:28:57 +0000 (20:28 +0000)]
[asan] Support dead code stripping on Mach-O platforms
On OS X El Capitan and iOS 9, the linker supports a new section
attribute, live_support, which allows dead stripping to remove dead
globals along with the ASAN metadata about them.
With this change __asan_global structures are emitted in a new
__DATA,__asan_globals section on Darwin.
Additionally, there is a __DATA,__asan_liveness section with the
live_support attribute. Each entry in this section is simply a tuple
that binds together the liveness of a global variable and its ASAN
metadata structure. Thus the metadata structure will be alive if and
only if the global it references is also alive.
Review: http://reviews.llvm.org/D16737
llvm-svn: 264645
Ryan Govostes [Mon, 28 Mar 2016 20:28:17 +0000 (20:28 +0000)]
[asan] Add runtime support for __asan_(un)register_image_globals
This change introduces routines that register and unregister all
instrumented globals in a loaded executable image.
These routines are only implemented on Darwin, where globals metadata
is expected to be placed in the __DATA,__asan_globals section.
Review: http://reviews.llvm.org/D16841
llvm-svn: 264644
Vedant Kumar [Mon, 28 Mar 2016 20:20:40 +0000 (20:20 +0000)]
Revert "Reapply "[PGO] Fix name encoding for ObjC-like functions""
This reverts commit r264641 to investigate why c-general.test is failing
on the bots.
llvm-svn: 264643
Reid Kleckner [Mon, 28 Mar 2016 20:13:55 +0000 (20:13 +0000)]
Paper over the Windows-only enum initialization test failure until the bug is fixed
llvm-svn: 264642
Vedant Kumar [Mon, 28 Mar 2016 20:12:07 +0000 (20:12 +0000)]
Reapply "[PGO] Fix name encoding for ObjC-like functions"
Function names in ObjC can have spaces in them. This interacts poorly
with name compression, which uses spaces to separate PGO names. Fix the
issue by using a different separator and update a test.
I chose "\01" as the separator because 1) it's non-printable, 2) we
strip it from PGO names, and 3) it's the next natural choice once "\00"
is discarded (that one's overloaded).
This reverts the revert commit
beaf3d18. What's changed?
- I fixed up the covmap-V2 binary format tests using a linux VM.
- I updated the expected counts in instrprof-comdat.h to account for
the fact that there have been bugfixes to clang coverage.
- I added an assert to make sure we don't get bitten by this again.
Differential Revision: http://reviews.llvm.org/D18516
llvm-svn: 264641
Kuba Brecka [Mon, 28 Mar 2016 19:36:25 +0000 (19:36 +0000)]
[tsan] Fix a crash when exiting the main thread (e.g. dispatch_main)
This patch fixes the custom ThreadState destruction on OS X to avoid crashing when dispatch_main calls pthread_exit which quits the main thread.
Differential Revision: http://reviews.llvm.org/D18496
llvm-svn: 264627
Sean Silva [Mon, 28 Mar 2016 19:34:22 +0000 (19:34 +0000)]
[libprofile] Make this test not depend on previous runs.
llvm-svn: 264626
Sean Silva [Mon, 28 Mar 2016 19:25:19 +0000 (19:25 +0000)]
[libprofile] Make this test a bit more specific
llvm-svn: 264625
Rafael Espindola [Mon, 28 Mar 2016 19:23:51 +0000 (19:23 +0000)]
Simplify how we represent relocation iterators.
Instead of using a bit to detect if they are "dynamic", just look at
sh_link.
This is a simplification on its own, and will help with using
llvm-objdump in dynamic objects.
llvm-svn: 264624
Douglas Katzman [Mon, 28 Mar 2016 19:23:23 +0000 (19:23 +0000)]
Use 'alignTo' instead of re-inventing it. NFC
llvm-svn: 264623
Mike Spertus [Mon, 28 Mar 2016 19:08:27 +0000 (19:08 +0000)]
This file was accidentally committed with bad line endings. Fixed...
llvm-svn: 264621
Mike Spertus [Mon, 28 Mar 2016 19:06:17 +0000 (19:06 +0000)]
Submitted new file with wrong line endings. Correcting...
llvm-svn: 264620
Easwaran Raman [Mon, 28 Mar 2016 18:58:05 +0000 (18:58 +0000)]
Profile summary cleanup.
Differential Revision: http://reviews.llvm.org/D18468
llvm-svn: 264619
Eugene Zelenko [Mon, 28 Mar 2016 18:54:58 +0000 (18:54 +0000)]
Fix builds on Windows broken in r264598.
llvm-svn: 264618
Jonathan Peyton [Mon, 28 Mar 2016 18:53:10 +0000 (18:53 +0000)]
[STATS] Missing check for MIC in config-ix.cmake
llvm-svn: 264616
Adam Nemet [Mon, 28 Mar 2016 18:47:44 +0000 (18:47 +0000)]
[PGO] Update r264612 to use C-style comment
llvm-svn: 264615
Adam Nemet [Mon, 28 Mar 2016 18:45:30 +0000 (18:45 +0000)]
[PGO] Update r264611 to use C-style comment
llvm-svn: 264614
Adam Nemet [Mon, 28 Mar 2016 18:29:36 +0000 (18:29 +0000)]
[PGO] Comment how function pointers for indirect calls are mapped to function names
Summary:
Hopefully this will make it easier for the next person to figure all
this out...
Reviewers: bogner, davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18490
llvm-svn: 264612
Adam Nemet [Mon, 28 Mar 2016 18:27:44 +0000 (18:27 +0000)]
[PGO] Comment how function pointers for indirect calls are mapped to function names
Summary:
Hopefully this will make it easier for the next person to figure all
this out...
Reviewers: bogner, davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D18490
llvm-svn: 264611
Mike Spertus [Mon, 28 Mar 2016 18:24:22 +0000 (18:24 +0000)]
Convert to Unix line endings due to previous commit error.
llvm-svn: 264610
Reid Kleckner [Mon, 28 Mar 2016 18:19:32 +0000 (18:19 +0000)]
dos2unix CMakeLists.txt
The sign now reads "0 days since the last line ending confusion"
llvm-svn: 264609
Matthias Braun [Mon, 28 Mar 2016 18:18:46 +0000 (18:18 +0000)]
MIRParser: Add %subreg.xxx syntax for subregister index operands
Differential Revision: http://reviews.llvm.org/D18279
llvm-svn: 264608
Matthias Braun [Mon, 28 Mar 2016 18:18:41 +0000 (18:18 +0000)]
CodeGen: Correct specification of PHI nodes
They do have a def machine operand.
Fixing the definition is necessary for an upcoming patch.
Differential Revision: http://reviews.llvm.org/D18384
llvm-svn: 264607
Haicheng Wu [Mon, 28 Mar 2016 18:17:07 +0000 (18:17 +0000)]
[AArch64] Do not lower scalar sdiv/udiv to a shifts + mul sequence when optimizing for minsize
Mimic what x86 does when optimizing sdiv/udiv for minsize.
llvm-svn: 264606
Reid Kleckner [Mon, 28 Mar 2016 18:07:40 +0000 (18:07 +0000)]
Revert "[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops"
This reverts commit r264596.
It does not compile.
llvm-svn: 264604
Mike Spertus [Mon, 28 Mar 2016 18:03:37 +0000 (18:03 +0000)]
Use VS2015 Project Support for Natvis to eliminate the need to manually install clang native visualizer
This is the clang equivalent to llvm commit 264601. When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations.
Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013).
llvm-svn: 264603
Mike Spertus [Mon, 28 Mar 2016 17:59:40 +0000 (17:59 +0000)]
Forgot to commit this file in revision 264601
llvm-svn: 264602
Mike Spertus [Mon, 28 Mar 2016 17:58:38 +0000 (17:58 +0000)]
Use VS2015 Project Support for Natvis to eliminate the need to manually install natvis files
When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations.
Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013)
llvm-svn: 264601
Hal Finkel [Mon, 28 Mar 2016 17:52:08 +0000 (17:52 +0000)]
[PowerPC] On the A2, popcnt[dw] are very slow
The A2 cores support the popcntw/popcntd instructions, but they're microcoded,
and slower than our default software emulation. Specifically, popcnt[dw] take
approximately 74 cycles, whereas our software emulation takes only 24-28
cycles.
I've added a new target feature to indicate a slow popcnt[dw], instead of just
removing the existing target feature from the a2/a2q processor models, because:
1. This allows us to return more accurate information via the TTI interface
(I recognize that this currently makes no practical difference)
2. Is hopefully easier to understand (it allows the core's features to match
its manual while still having the desired effect).
llvm-svn: 264600
David Blaikie [Mon, 28 Mar 2016 17:45:48 +0000 (17:45 +0000)]
Remove else after return
llvm-svn: 264599
Eugene Zelenko [Mon, 28 Mar 2016 17:40:08 +0000 (17:40 +0000)]
Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes.
Differential revision: http://reviews.llvm.org/D18469
llvm-svn: 264598
Nico Weber [Mon, 28 Mar 2016 17:28:06 +0000 (17:28 +0000)]
Windows: Shrink sizeof(MacroInfo) from 256 to 248, MacroDirective 24 to 16
In the Microsoft ABI, only bitfields with identical types get packed together,
so use consistently use one of the two instead of a mix.
Saves 457kB when parsing windows.h.
No intended behavior change.
llvm-svn: 264597
Hyojin Sung [Mon, 28 Mar 2016 17:22:25 +0000 (17:22 +0000)]
[SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops
When eliminating or merging almost empty basic blocks, the existence of non-trivial PHI nodes
is currently used to recognize potential loops of which the block is the header and keep the block.
However, the current algorithm fails if the loops' exit condition is evaluated only with volatile
values hence no PHI nodes in the header. Especially when such a loop is an outer loop of a nested
loop, the loop is collapsed into a single loop which prevent later optimizations from being
applied (e.g., transforming nested loops into simplified forms and loop vectorization).
The patch augments the existing PHI node-based check by adding a pre-test if the BB actually
belongs to a set of loop headers and not eliminating it if yes.
llvm-svn: 264596
Hemant Kulkarni [Mon, 28 Mar 2016 17:20:23 +0000 (17:20 +0000)]
[llvm-readobj] NFC Replace case by macros for PT_* enums
llvm-svn: 264595
Rong Xu [Mon, 28 Mar 2016 17:08:56 +0000 (17:08 +0000)]
[PGO] Don't set the function hotness attribute when populating counters
Don't set the function hotness attribute on the fly. This changes the CFG
branch probability of the caller function, which leads to inconsistent BB
ordering. This patch moves the attribute setting to a separated loop after
the counts in all functions are populated.
Fixes PR27024 - PGO instrumentation profile data is not reflected in correct
basic blocks.
Differential Revision: http://reviews.llvm.org/D18491
llvm-svn: 264594
Derek Schuff [Mon, 28 Mar 2016 17:05:30 +0000 (17:05 +0000)]
Introduce MachineFunctionProperties and the AllVRegsAllocated property
MachineFunctionProperties represents a set of properties that a MachineFunction
can have at particular points in time. Existing examples of this idea are
MachineRegisterInfo::isSSA() and MachineRegisterInfo::tracksLiveness() which
will eventually be switched to use this mechanism.
This change introduces the AllVRegsAllocated property; i.e. the property that
all virtual registers have been allocated and there are no VReg operands
left.
With this mechanism, passes can declare that they require a particular property
to be set, or that they set or clear properties by implementing e.g.
MachineFunctionPass::getRequiredProperties(). The MachineFunctionPass base class
verifies that the requirements are met, and handles the setting and clearing
based on the delcarations. Passes can also directly query and update the current
properties of the MF if they want to have conditional behavior.
This change annotates the target-independent post-regalloc passes; future
changes will also annotate target-specific ones.
Reviewers: qcolombet, hfinkel
Differential Revision: http://reviews.llvm.org/D18421
llvm-svn: 264593
Tobias Grosser [Mon, 28 Mar 2016 17:00:14 +0000 (17:00 +0000)]
docs: Fix section header committed in r264575
Ensure the length of the header underline matches the length of the header.
This prevents SPHINX from erroring on this file and consequently not updating
the documentation.
Also, make this its own point not belonging to the 'increased applicability'
section.
llvm-svn: 264592
Hemant Kulkarni [Mon, 28 Mar 2016 16:48:10 +0000 (16:48 +0000)]
[llvm-size] Implement --common option
Differential Revision: http://reviews.llvm.org/D16820
llvm-svn: 264591
Vedant Kumar [Mon, 28 Mar 2016 16:14:07 +0000 (16:14 +0000)]
Revert "[PGO] Fix name encoding for ObjC-like functions"
This reverts commit r264587. Reverting to investigate 6 unexpected
failures on the ppc bot:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/2822
llvm-svn: 264590
Tom Stellard [Mon, 28 Mar 2016 16:10:13 +0000 (16:10 +0000)]
AMDGPU/SI: Limit load clustering to 16 bytes instead of 4 instructions
Summary:
This helps prevent load clustering from drastically increasing register
pressure by trying to cluster 4 SMRDx8 loads together. The limit of 16
bytes was chosen, because it seems like that was the original intent
of setting the limit to 4 instructions, but more analysis could show
that a different limit is better.
This fixes yields small decreases in register usage with shader-db, but
also helps avoid a large increase in register usage when lane mask
tracking is enabled in the machine scheduler, because lane mask tracking
enables more opportunities for load clustering.
shader-db stats:
2379 shaders in 477 tests
Totals:
SGPRS: 49744 -> 48600 (-2.30 %)
VGPRS: 34120 -> 34076 (-0.13 %)
Code Size: 1282888 -> 1283184 (0.02 %) bytes
LDS: 28 -> 28 (0.00 %) blocks
Scratch: 495616 -> 492544 (-0.62 %) bytes per wave
Max Waves: 6843 -> 6853 (0.15 %)
Wait states: 0 -> 0 (0.00 %)
Reviewers: nhaehnle, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D18451
llvm-svn: 264589
Davide Italiano [Mon, 28 Mar 2016 15:54:01 +0000 (15:54 +0000)]
[SimplifyLibCalls] Transform printf("%s", "a") -> putchar('a').
llvm-svn: 264588
Vedant Kumar [Mon, 28 Mar 2016 15:52:08 +0000 (15:52 +0000)]
[PGO] Fix name encoding for ObjC-like functions
Function names in ObjC can have spaces in them. This interacts poorly
with name compression, which uses spaces to separate PGO names. Fix the
issue by using a different separator and update a test.
I chose "\01" as the separator because 1) it's non-printable, 2) we
strip it from PGO names, and 3) it's the next natural choice once "\00"
is discarded (that one's overloaded).
Differential Revision: http://reviews.llvm.org/D18516
llvm-svn: 264587
Vedant Kumar [Mon, 28 Mar 2016 15:49:08 +0000 (15:49 +0000)]
[Coverage] Strip <unknown> from PGO names if no filenames are available
Patch suggested by David Li!
llvm-svn: 264586
Davide Italiano [Mon, 28 Mar 2016 15:44:21 +0000 (15:44 +0000)]
[LTO] Internalize symbols.
IPO doesn't work very well across symbols referenced
by others TUs. The linker here tries to evaluate
which symbols are safe to internalize and switches
their linkage.
Differential Revision: http://reviews.llvm.org/D18415
llvm-svn: 264585
Krzysztof Parzyszek [Mon, 28 Mar 2016 15:43:03 +0000 (15:43 +0000)]
[Hexagon] Improve handling of unaligned vector loads and stores
llvm-svn: 264584
James Y Knight [Mon, 28 Mar 2016 15:05:30 +0000 (15:05 +0000)]
NFC: skip FenceInst up-front in AtomicExpandPass.
llvm-svn: 264583
Nico Weber [Mon, 28 Mar 2016 14:55:24 +0000 (14:55 +0000)]
Reduce size of DefinitionData from 120 to 96 bytes on Windows.
In the Microsoft ABI, only bitfields with identical types get
packed together, so use unsigned consistently instead of a
bool / unsigned mix.
No intended behavior change.
llvm-svn: 264582
Krzysztof Parzyszek [Mon, 28 Mar 2016 14:52:21 +0000 (14:52 +0000)]
[Hexagon] Only use restore functions for single register at -Oz
llvm-svn: 264581
Krzysztof Parzyszek [Mon, 28 Mar 2016 14:42:03 +0000 (14:42 +0000)]
[Hexagon] Speed up frame lowering when no optimizations are enabled
- Do not optimize stack slots in optnone functions.
- Get aligned-base register from HexagonMachineFunctionInfo instead of
looking for ALIGNA instruction in the function's body.
llvm-svn: 264580
Douglas Katzman [Mon, 28 Mar 2016 14:00:11 +0000 (14:00 +0000)]
Sparc: silently ignore .proc assembler directive
Differential Revision: http://reviews.llvm.org/D18463
llvm-svn: 264579
Jacques Pienaar [Mon, 28 Mar 2016 13:09:54 +0000 (13:09 +0000)]
[lanai] Add Lanai backend.
Add the Lanai backend to lib/Target.
General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).
Differential Revision: http://reviews.llvm.org/D17011
llvm-svn: 264578
Alexey Bataev [Mon, 28 Mar 2016 12:58:34 +0000 (12:58 +0000)]
Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."
Reverting because of failed tests.
llvm-svn: 264577
Alexey Bataev [Mon, 28 Mar 2016 12:52:58 +0000 (12:52 +0000)]
[OPENMP] Allow runtime insert its own code inside OpenMP regions.
Solution unifies interface of RegionCodeGenTy type to allow insert
runtime-specific code before/after main codegen action defined in
CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy
for general OpenMP directives, but must be allowed to insert its own
(required) code to support target specific codegen.
llvm-svn: 264576
Hongbin Zheng [Mon, 28 Mar 2016 12:41:49 +0000 (12:41 +0000)]
Add fine-grain dependences analysis to release notes.
Differential Revision: http://reviews.llvm.org/D17905
llvm-svn: 264575
Michael Zuckerman [Mon, 28 Mar 2016 12:23:09 +0000 (12:23 +0000)]
[CLANG][avx512][BUILTIN] Adding fixupimm{pd|ps|sd|ss}
getexp{sd|ss} getmant{sd|ss} kunpck{di|si} loada{pd|ps} loaddqu{di|hi|qi|si} max{sd|ss} min{sd|ss} kmov16 builtins to clang
Differential Revision: http://reviews.llvm.org/D18215
llvm-svn: 264574
Hal Finkel [Mon, 28 Mar 2016 11:23:21 +0000 (11:23 +0000)]
[SROA] Fix typo in comment
llvm-svn: 264573
Hal Finkel [Mon, 28 Mar 2016 11:13:03 +0000 (11:13 +0000)]
C++11 is required, remove some preprocessor checks for it
We require C++11 to build, so remove a few remaining preprocessor checks for
'__cplusplus >= 201103L'. This should always be true.
llvm-svn: 264572
Kuba Brecka [Mon, 28 Mar 2016 10:21:35 +0000 (10:21 +0000)]
Fix-up for OS X test failure after r264451 ("Add memset, memmove, and memcpy to the common interceptors")
llvm-svn: 264571
Alexey Bataev [Mon, 28 Mar 2016 10:12:03 +0000 (10:12 +0000)]
Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."
This reverts commit
3ee791165100607178073f14531a0dc90c622b36.
llvm-svn: 264570
Alexey Bataev [Mon, 28 Mar 2016 09:53:43 +0000 (09:53 +0000)]
[OPENMP] Allow runtime insert its own code inside OpenMP regions.
Solution unifies interface of RegionCodeGenTy type to allow insert
runtime-specific code before/after main codegen action defined in
CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy
for general OpenMP directives, but must be allowed to insert its own
(required) code to support target specific codegen.
llvm-svn: 264569
Chuang-Yu Cheng [Mon, 28 Mar 2016 09:04:23 +0000 (09:04 +0000)]
[Power9] Implement new altivec instructions: bcd* series
This patch implements the following altivec instructions:
- Decimal Convert From/to National/Zoned/Signed-QWord:
bcdcfn. bcdcfz. bcdctn. bcdctz. bcdcfsq. bcdctsq.
- Decimal Copy-Sign/Set-Sign:
bcdcpsgn. bcdsetsgn.
- Decimal Shift/Unsigned-Shift/Shift-and-Round:
bcds. bcdus. bcdsr.
- Decimal (Unsigned) Truncate:
bcdtrunc. bcdutrunc.
Total 13 instructions
Thanks Amehsan's advice! Thanks Kit's great help!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan
http://reviews.llvm.org/D17838
llvm-svn: 264568
Chuang-Yu Cheng [Mon, 28 Mar 2016 08:34:28 +0000 (08:34 +0000)]
[Power9] Implement new vsx instructions: insert, extract, test data class, min/max, reverse, permute, splat
This change implements the following vsx instructions:
- Scalar Insert/Extract
xsiexpdp xsiexpqp xsxexpdp xsxsigdp xsxexpqp xsxsigqp
- Vector Insert/Extract
xviexpdp xviexpsp xvxexpdp xvxexpsp xvxsigdp xvxsigsp
xxextractuw xxinsertw
- Scalar/Vector Test Data Class
xststdcdp xststdcsp xststdcqp
xvtstdcdp xvtstdcsp
- Maximum/Minimum
xsmaxcdp xsmaxjdp
xsmincdp xsminjdp
- Vector Byte-Reverse/Permute/Splat
xxbrd xxbrh xxbrq xxbrw
xxperm xxpermr
xxspltib
30 instructions
Thanks Nemanja for invaluable discussion! Thanks Kit's great help!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan
http://reviews.llvm.org/D16842
llvm-svn: 264567
Elena Demikhovsky [Mon, 28 Mar 2016 07:47:58 +0000 (07:47 +0000)]
AVX-512: Fixed ICMP instruction selection for i1 operands
ICMP instruction selection fails on SKX and KNL for i1 operand.
I use XOR to resolve:
(A == B) is equivalent to (A xor B) == 0
Differential Revision: http://reviews.llvm.org/D18511
llvm-svn: 264566
Chuang-Yu Cheng [Mon, 28 Mar 2016 07:38:01 +0000 (07:38 +0000)]
[Power9] Implement new vsx instructions: quad-precision move, fp-arithmetic
This change implements the following vsx instructions:
- quad-precision move
xscpsgnqp, xsabsqp, xsnegqp, xsnabsqp
- quad-precision fp-arithmetic
xsaddqp(o) xsdivqp(o) xsmulqp(o) xssqrtqp(o) xssubqp(o)
xsmaddqp(o) xsmsubqp(o) xsnmaddqp(o) xsnmsubqp(o)
22 instructions
Thanks Nemanja and Kit for careful review and invaluable discussion!
Reviewers: hal, nemanja, kbarton, tjablin, amehsan
http://reviews.llvm.org/D16110
llvm-svn: 264565
Richard Smith [Mon, 28 Mar 2016 06:08:37 +0000 (06:08 +0000)]
P0138R2: Allow direct-list-initialization of an enumeration from an integral
value that can convert to the enum's underlying type.
llvm-svn: 264564
Richard Thomson [Mon, 28 Mar 2016 04:15:41 +0000 (04:15 +0000)]
clang-tidy: Fix broken buildbot
VS 2013 does not support char16_t or char32_t
llvm-svn: 264563
David Majnemer [Mon, 28 Mar 2016 03:19:50 +0000 (03:19 +0000)]
Fix serialization/deserialization for __uuidof
I broke this back in r264529 because I forgot to serialize the UuidAttr
member. Fix this by replacing the UuidAttr with a StringRef which is
properly serialized and deserialized.
llvm-svn: 264562
NAKAMURA Takumi [Mon, 28 Mar 2016 02:14:49 +0000 (02:14 +0000)]
llvm/test/Transforms/FunctionImport/funcimport.ll: -stats REQUIRES +Asserts.
llvm-svn: 264561
Rafael Espindola [Mon, 28 Mar 2016 01:31:11 +0000 (01:31 +0000)]
R_AARCH64_PREL64 is relative.
llvm-svn: 264560
Vedant Kumar [Mon, 28 Mar 2016 01:16:12 +0000 (01:16 +0000)]
[Coverage] Fix the way we load "<unknown>:func" records
When emitting coverage mappings for functions with local linkage and an
unknown filename, we use "<unknown>:func" for the PGO function name. The
problem is that we don't strip "<unknown>" from the name when loading
coverage data, like we do for other file names. Fix that and add a test.
llvm-svn: 264559
Duncan P. N. Exon Smith [Mon, 28 Mar 2016 00:03:12 +0000 (00:03 +0000)]
BitcodeWriter: Replace dead code with an assertion, NFC
The caller of ValueEnumerator::EnumerateOperandType never sends in
metadata. Assert that, and remove the unnecessary logic.
llvm-svn: 264558
Duncan P. N. Exon Smith [Sun, 27 Mar 2016 23:59:32 +0000 (23:59 +0000)]
BitcodeWriter: Reuse writeMetadataRecords, NFC
Change writeFunctionMetadata to call writeMetadataRecords. For now
there's no functionality change, but makes it easy to serialize other
types of metadata in the function block in the future.
llvm-svn: 264557
Duncan P. N. Exon Smith [Sun, 27 Mar 2016 23:56:04 +0000 (23:56 +0000)]
BitcodeWriter: Rename some functions for consistency, NFC
To match writeMetadataRecords, writeNamedMetadata and
writeMetadataStrings, change:
WriteModuleMetadata => writeModuleMetadata
WriteFunctionLocalMetadata => writeFunctionMetadata
Write##CLASS => write##CLASS
The only major change is "FunctionLocal" => "Function". The point is to
be less specific, in preparation for emitting normal metadata records
inside function metadata blocks (currently we only emit
`LocalAsMetadata` there).
llvm-svn: 264556
Duncan P. N. Exon Smith [Sun, 27 Mar 2016 23:53:30 +0000 (23:53 +0000)]
BitcodeWriter: Split out writeMetadataRecords, NFC
Besides being a nice cleanup, this is preparation for reusing the code
in function metadata blocks.
llvm-svn: 264555
Duncan P. N. Exon Smith [Sun, 27 Mar 2016 23:38:36 +0000 (23:38 +0000)]
BitcodeWriter: Restructure WriteFunctionLocalMetadata, NFC
Use an early return to simplify logic.
llvm-svn: 264554