Gabor Horvath [Thu, 3 Mar 2016 13:43:23 +0000 (13:43 +0000)]
[clang-tidy] Improve the robustness of a test.
llvm-svn: 262618
Michael Zuckerman [Thu, 3 Mar 2016 13:43:05 +0000 (13:43 +0000)]
[CLANG][AVX512][BUILTIN] movddup{128|256|512}
Differential Revision: http://reviews.llvm.org/D17826
llvm-svn: 262617
Anastasia Stulova [Thu, 3 Mar 2016 13:33:19 +0000 (13:33 +0000)]
[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0
Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5):
- __block storage class is disallowed
- every block declaration must be const qualified and initialized
- a block can't be used as a return type of a function
- a blocks can't be used to declare a structure or union field
- extern speficier is disallowed
Corrected image and sampler types diagnostics with struct and unions.
Review: http://reviews.llvm.org/D16928
llvm-svn: 262616
Gabor Horvath [Thu, 3 Mar 2016 13:08:11 +0000 (13:08 +0000)]
[clang-tidy] Do not emit warnings from misc-suspicious-semicolon when the compilation fails.
llvm-svn: 262615
Johannes Doerfert [Thu, 3 Mar 2016 12:30:19 +0000 (12:30 +0000)]
Fix typo [NFC]
llvm-svn: 262613
Johannes Doerfert [Thu, 3 Mar 2016 12:26:58 +0000 (12:26 +0000)]
[FIX] Consolidation of loads with same pointer but different access relation
This should fix PR19422.
Thanks to Jeremy Huddleston Sequoia for reporting this.
Thanks to Roman Gareev for his investigation and the reduced test case.
llvm-svn: 262612
Michael Zuckerman [Thu, 3 Mar 2016 12:17:50 +0000 (12:17 +0000)]
Fixing a checkfile error in avx512vlbw-builtins.c
Differential Revision: http://reviews.llvm.org/D17814
llvm-svn: 262611
Marshall Clow [Thu, 3 Mar 2016 12:04:39 +0000 (12:04 +0000)]
Fix for PR26812: possible overflow issue in std::allocator::allocate
llvm-svn: 262610
Michael Zuckerman [Thu, 3 Mar 2016 11:34:52 +0000 (11:34 +0000)]
[CLANG][AVX512][BUILTIN] movdqu{qi|hi} {128|256|512}
Differential Revision: http://reviews.llvm.org/D17814
llvm-svn: 262609
Johannes Doerfert [Thu, 3 Mar 2016 11:33:49 +0000 (11:33 +0000)]
[DOC] Add documentation for the supported call instructions
llvm-svn: 262608
Johannes Doerfert [Thu, 3 Mar 2016 11:33:30 +0000 (11:33 +0000)]
[DOC] Add more documentation about the different element type support
llvm-svn: 262607
NAKAMURA Takumi [Thu, 3 Mar 2016 11:09:43 +0000 (11:09 +0000)]
Tweak CMakeLists not for libclang to depend on the variable CLANG_TOOL_EXTRA_BUILD.
llvm-svn: 262606
Alexander Kornienko [Thu, 3 Mar 2016 10:45:59 +0000 (10:45 +0000)]
[docs] Fix docs to work with doxygen 1.8.11
llvm-svn: 262605
Alexander Kornienko [Thu, 3 Mar 2016 10:44:10 +0000 (10:44 +0000)]
[docs] Add missing file
llvm-svn: 262604
Alexander Kornienko [Thu, 3 Mar 2016 10:42:46 +0000 (10:42 +0000)]
[docs] Updated doxygen files to work well with doxygen 1.8.11
Doxygen 1.8.11 doesn't seem to like files with ".intro" extension by default.
llvm-svn: 262603
Pavel Labath [Thu, 3 Mar 2016 10:39:24 +0000 (10:39 +0000)]
Fix OSX breakage caused by r262597
llvm-svn: 262602
Gabor Horvath [Thu, 3 Mar 2016 10:27:32 +0000 (10:27 +0000)]
[clang-tidy] Documentation fixes.
llvm-svn: 262601
Dylan McKay [Thu, 3 Mar 2016 10:08:02 +0000 (10:08 +0000)]
[AVR] Add calling convention parser tokens
Summary: Adds the 'avr_intrcc' and 'avr_signalcc' IR calling convention tokens to the parser.
Reviewers: arsenm
Subscribers: dylanmckay, llvm-commits
Differential Revision: http://reviews.llvm.org/D16348
llvm-svn: 262600
Simon Pilgrim [Thu, 3 Mar 2016 09:43:28 +0000 (09:43 +0000)]
[X86][SSE] Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG
Generalise the existing SIGN_EXTEND to SIGN_EXTEND_VECTOR_INREG combine to support zero extension as well and get rid of a lot of unnecessary ANY_EXTEND + mask patterns.
Differential Revision: http://reviews.llvm.org/D17691
llvm-svn: 262599
Michael Zuckerman [Thu, 3 Mar 2016 09:26:01 +0000 (09:26 +0000)]
[CLANG][AVX512][BUILTIN] movdqa{32|64}{load|store|}{128|256|512}
Differential Revision: http://reviews.llvm.org/D17812
llvm-svn: 262598
Pavel Labath [Thu, 3 Mar 2016 09:02:52 +0000 (09:02 +0000)]
Fetch remote log files from LLGS tests
Summary:
this enables download of remote log files for llgs and debugserver tests (previously we were just
passing the host file name which obviously did not work). Note this also changes the debugserver
logging to work only when logging has been requested on the command line, whereas previously it
would log unconditionally. I can change it back if anyone is relying on this, but I thought I'd
make this consistent.
Reviewers: tfiala
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17798
llvm-svn: 262597
Benjamin Kramer [Thu, 3 Mar 2016 08:58:18 +0000 (08:58 +0000)]
[libclang] Link clang-tidy plugin into libclang if present.
This is a sad workaround for the lack of plugin support in libclang. Depends
on D17807, a tools-extra change that also contains the test case.
This is designed to be easy to remove again if libclang ever grows proper
plugin support.
Differential Revision: http://reviews.llvm.org/D17808
llvm-svn: 262596
Benjamin Kramer [Thu, 3 Mar 2016 08:58:12 +0000 (08:58 +0000)]
[clang-tidy] Add "clang-tidy as a clang plugin" skeleton.
This doesn't really do much at the moment. You can load it via libclang
and set the -checks via an extra command line argument as illustrated in
the test case. Support for other options (including headers check) is
currently missing. Also when using this with libclang some checks may
not work with the precompiled preamble in place.
This can be used to easily show clang-tidy warnings in an editor
integration as all that's needed is adding command line flags that are
passed into libclang. Warnings and FixIts are exposed via the existing
CXDiagnostic machinery.
Differential Revision: http://reviews.llvm.org/D17807
llvm-svn: 262595
Renato Golin [Thu, 3 Mar 2016 08:57:44 +0000 (08:57 +0000)]
Revert "[ARM] Merging 64-bit divmod lib calls into one"
This reverts commit r262507, which broke some ARM buildbots.
llvm-svn: 262594
Michael Zuckerman [Thu, 3 Mar 2016 08:55:20 +0000 (08:55 +0000)]
[Clang][AVX512][BUILTIN] Adding PSRL{W|WI}{128|256|512}
Differential Revision: http://reviews.llvm.org/D17754
llvm-svn: 262593
Michael Zuckerman [Thu, 3 Mar 2016 08:54:05 +0000 (08:54 +0000)]
[LLVM][AVX512] PSRLWI Chnage imm8 to int
Differential Revision: http://reviews.llvm.org/D17753
llvm-svn: 262592
Hongbin Zheng [Thu, 3 Mar 2016 08:15:33 +0000 (08:15 +0000)]
Allow the client of DependenceInfo to obtain dependences at different granularities.
llvm-svn: 262591
George Rimar [Thu, 3 Mar 2016 07:49:35 +0000 (07:49 +0000)]
[ELF] - add support for relocations against local symbols when producing relocatable output.
There was a known limitation for -r option:
relocations against local symbols were not supported.
For example rel[a].eh_frame sections contained relocations against sections
and that was not supported for -r before. Patch fixes that.
Differential review: http://reviews.llvm.org/D17813
llvm-svn: 262590
Tobias Grosser [Thu, 3 Mar 2016 07:03:21 +0000 (07:03 +0000)]
www: Add links to sphinx/doxygen documentation
llvm-svn: 262589
Tobias Grosser [Thu, 3 Mar 2016 07:01:00 +0000 (07:01 +0000)]
docs: Drop modindex from sphinx
For an unknown reason modindex is not be built correctly by sphinx. Take it
out of the index until we can build it correctly.
llvm-svn: 262588
John McCall [Thu, 3 Mar 2016 06:39:32 +0000 (06:39 +0000)]
Semantic analysis for the swiftcall calling convention.
I've tried to keep the infrastructure behind parameter ABI
treatments fairly general.
llvm-svn: 262587
Rui Ueyama [Thu, 3 Mar 2016 06:22:29 +0000 (06:22 +0000)]
Replace ECRAII class with a function.
RCRAII class was a bit tricky. This patch removes that.
llvm-svn: 262586
Matt Arsenault [Thu, 3 Mar 2016 05:43:49 +0000 (05:43 +0000)]
TTI: Fix not using overload of getIntrinsicInstrCost
This was always calling the generic version, so the target
custom implementation was never called.
llvm-svn: 262585
Argyrios Kyrtzidis [Thu, 3 Mar 2016 05:33:54 +0000 (05:33 +0000)]
[index] Report references of ObjC super class/protocols in interfaces and protocols.
llvm-svn: 262584
Argyrios Kyrtzidis [Thu, 3 Mar 2016 05:33:48 +0000 (05:33 +0000)]
[test] Re-enable asan on the test, stack usage should be lower.
llvm-svn: 262583
Alexey Bataev [Thu, 3 Mar 2016 05:21:39 +0000 (05:21 +0000)]
[OPENMP 4.0] Initial support for 'omp declare reduction' construct.
Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct.
User-defined reductions are defined as
#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]
These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The
combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will
denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting
combined value after executing the combiner.
As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause
will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier
omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.
Differential Revision: http://reviews.llvm.org/D11182
llvm-svn: 262582
Mohit K. Bhakkad [Thu, 3 Mar 2016 05:05:20 +0000 (05:05 +0000)]
[LSan] Enable use_registers test for MIPS
Reviewers: samsonov
Subscribers: jaydeep, sagar, llvm-commits
Differential Revision: http://reviews.llvm.org/D17797
llvm-svn: 262581
Junmo Park [Thu, 3 Mar 2016 03:57:20 +0000 (03:57 +0000)]
[BranchFolding] Change function name related with merging MMOs. NFC
Summary:
Removing MMOs is not our prefer behavior any more.
Reviewers: mcrosier, reames
Differential Revision: http://reviews.llvm.org/D17668
llvm-svn: 262580
Tom Stellard [Thu, 3 Mar 2016 03:53:29 +0000 (03:53 +0000)]
AMDGPU: Insert two S_NOP instructions for every high level source statement.
Patch by: Konstantin Zhuravlyov
Summary: Tools, such as debugger, need to pause execution based on user input (i.e. breakpoint). In order to do this, two S_NOP instructions are inserted for each high level source statement: one before first isa instruction of high level source statement, and one after last isa instruction of high level source statement. Further, debugger may replace S_NOP instructions with S_TRAP instructions based on user input.
Reviewers: tstellarAMD, arsenm
Subscribers: echristo, dblaikie, arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D17454
llvm-svn: 262579
Alexey Bataev [Thu, 3 Mar 2016 03:52:24 +0000 (03:52 +0000)]
[OPENMP 4.5] Initial support for data members in 'linear' clause.
OpenMP 4.5 allows to privatize data members of current class in member
functions. Patch adds initial support for privatization of data members
in 'linear' clause, no codegen support.
llvm-svn: 262578
Tom Stellard [Thu, 3 Mar 2016 03:45:09 +0000 (03:45 +0000)]
AMDGPU/SI: Don't try to move scratch wave offset when there are no free SGPRs
Summary:
When there were no free SGPRs, we were trying to move this value into
some of the reserved registers which was causing a segmentation fault.
Reviewers: arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D17590
llvm-svn: 262577
Sean Callanan [Thu, 3 Mar 2016 02:22:05 +0000 (02:22 +0000)]
Caught and fixed a typo in r262572.
I should have checked and imported D's in-class initializer.
Instead I accidentally used ToField's in-class initializer,
which is always NULL so ToField will never get one.
<rdar://problem/
24943405>
llvm-svn: 262576
Hans Wennborg [Thu, 3 Mar 2016 02:06:32 +0000 (02:06 +0000)]
[X86] Enable forwarding bool arguments in tail calls (PR26305)
The code was previously not able to track a boolean argument
at a call site back to the formal argument of the caller.
Differential Revision: http://reviews.llvm.org/D17786
llvm-svn: 262575
Rui Ueyama [Thu, 3 Mar 2016 01:56:23 +0000 (01:56 +0000)]
Inline a trivial CMakeLists.txt.
llvm-svn: 262574
Tim Shen [Thu, 3 Mar 2016 01:27:35 +0000 (01:27 +0000)]
[PPCVSXFMAMutate] Temporarily disable this pass
llvm-svn: 262573
Sean Callanan [Thu, 3 Mar 2016 01:21:28 +0000 (01:21 +0000)]
Fixed a problem where the ASTImporter mishandled in-class initializers.
Previously, the ASTImporter, when copying a FieldDecl, would make the
new FieldDecl use the exact same in-class initializer as the original
FieldDecl, which is a problem since the initializer is in the wrong AST.
The initializer must be imported, just like all the other parts of the
field.
Doug Gregor reviewed this fix.
<rdar://problem/
24943405>
llvm-svn: 262572
Philip Reames [Thu, 3 Mar 2016 00:58:43 +0000 (00:58 +0000)]
[MBP] Renaming a confusing variable and add clarifying comments
Was discussed as part of http://reviews.llvm.org/D17830
llvm-svn: 262571
Eugene Zelenko [Thu, 3 Mar 2016 00:51:40 +0000 (00:51 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.
llvm-svn: 262570
Rui Ueyama [Thu, 3 Mar 2016 00:51:23 +0000 (00:51 +0000)]
Simplify string operations. NFC.
llvm-svn: 262569
Rui Ueyama [Thu, 3 Mar 2016 00:51:21 +0000 (00:51 +0000)]
Use StringRef member function instead of including StringExtras.h
llvm-svn: 262568
Jacques Pienaar [Thu, 3 Mar 2016 00:30:02 +0000 (00:30 +0000)]
[lanai] Fixing file path used in test
llvm-svn: 262567
Jason Molenda [Thu, 3 Mar 2016 00:21:32 +0000 (00:21 +0000)]
Don't build source/Plugins/Process/Linux in the Xcode project file.
These files won't build for ios etc arm builds of lldb and aren't
used for macosx native lldb's.
http://reviews.llvm.org/D17750
<rdar://problem/
24287153>
llvm-svn: 262566
Ekaterina Romanova [Thu, 3 Mar 2016 00:20:11 +0000 (00:20 +0000)]
This patch adds doxygen comments for all the intrinsincs in the header file tmmintrin.h.
The doxygen comments are automatically generated based on Sony's intrinsics document.
I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.
llvm-svn: 262565
Nico Weber [Thu, 3 Mar 2016 00:17:35 +0000 (00:17 +0000)]
Serialize `pragma pointers_to_members` state.
Like r262539, but for pointers_to_members.
llvm-svn: 262552
John McCall [Thu, 3 Mar 2016 00:10:03 +0000 (00:10 +0000)]
Improve some infrastructure for extended parameter infos and
fix a bug with the instantiation of ns_consumed parameter
attributes in ARC.
llvm-svn: 262551
Rui Ueyama [Thu, 3 Mar 2016 00:09:02 +0000 (00:09 +0000)]
Allow joined options to fix llvm.org/pr26730.
llvm-svn: 262550
Matthias Braun [Thu, 3 Mar 2016 00:05:07 +0000 (00:05 +0000)]
TargetSchedule: Allow explicit Unsupported markers in InstRW
llvm-svn: 262549
Matthias Braun [Thu, 3 Mar 2016 00:04:59 +0000 (00:04 +0000)]
TableGen: Accept itinerary data when checking for schedmodel completeness
llvm-svn: 262548
Philip Reames [Thu, 3 Mar 2016 00:01:42 +0000 (00:01 +0000)]
[MBP] Avoid placing random blocks between loop preheader and header
If we have a loop with a rarely taken path, we will prune that from the blocks which get added as part of the loop chain. The problem is that we weren't then recognizing the loop chain as schedulable when considering the preheader when forming the function chain. We'd then fall to various non-predecessors before finally scheduling the loop chain (as if the CFG was unnatural.) The net result was that there could be lots of garbage between a loop preheader and the loop, even though we could have directly fallen into the loop. It also meant we separated hot code with regions of colder code.
The particular reason for the rejection of the loop chain was that we were scanning predecessor of the header, seeing the backedge, believing that was a globally more important predecessor (true), but forgetting to account for the fact the backedge precessor was already part of the existing loop chain (oops!.
Differential Revision: http://reviews.llvm.org/D17830
llvm-svn: 262547
David Majnemer [Thu, 3 Mar 2016 00:01:25 +0000 (00:01 +0000)]
[X86] Don't give catch objects a displacement of zero
Catch objects with a displacement of zero do not initialize a catch
object. The displacement is relative to %rsp at the end of the
function's prologue for x86_64 targets.
If we place an object at the top-of-stack, we will end up wit a
displacement of zero resulting in our catch object remaining
uninitialized.
Address this by creating our catch objects as fixed objects. We will
ensure that the UnwindHelp object is created after the catch objects so
that no catch object will have a displacement of zero.
Differential Revision: http://reviews.llvm.org/D17823
llvm-svn: 262546
Jason Molenda [Wed, 2 Mar 2016 23:39:59 +0000 (23:39 +0000)]
Add SymbolFilePDB to xcode project file to keep it
up to date after 4262528.
llvm-svn: 262543
Nico Weber [Wed, 2 Mar 2016 23:29:29 +0000 (23:29 +0000)]
clang-cl pch test: Instead of copying the input, use /Fp to not write into the test directory.
Also fix a bug with /Fp and absolute paths uncovered by this.
Follow-up to r262487.
llvm-svn: 262541
Sanjay Patel [Wed, 2 Mar 2016 23:22:03 +0000 (23:22 +0000)]
[AArch64] add tests to demonstrate existing codegen for PR26819
llvm-svn: 262540
Nico Weber [Wed, 2 Mar 2016 23:22:00 +0000 (23:22 +0000)]
Serialize `pragma ms_struct` state.
pragma ms_struct has an effect on struct decls, and the effect is serialized
correctly already. But the "is ms_struct currently on" state wasn't before
this change.
This uses the same approach as `pragma clang optimize`: When writing a module,
the state isn't serialized, only when writing a pch file.
llvm-svn: 262539
Matt Arsenault [Wed, 2 Mar 2016 23:00:21 +0000 (23:00 +0000)]
AMDGPU: Simplify boolean conditional return statements
Patch by Richard Thomson
llvm-svn: 262536
Jonathan Peyton [Wed, 2 Mar 2016 22:47:51 +0000 (22:47 +0000)]
Add new OpenMP 4.5 taskloop construct feature
From the standard: The taskloop construct specifies that the iterations of one
or more associated loops will be executed in parallel using OpenMP tasks. The
iterations are distributed across tasks created by the construct and scheduled
to be executed.
This initial implementation uses a simple linear tasks distribution algorithm.
Later we can add other algorithms to speedup generation of huge number of tasks
(i.e., tree-like tasks generation should be faster).
This needs to be put into the OpenMP runtime library in order for the
compiler team to develop the compiler side of the implementation.
Differential Revision: http://reviews.llvm.org/D17404
llvm-svn: 262535
Daniel Jasper [Wed, 2 Mar 2016 22:44:03 +0000 (22:44 +0000)]
clang-format: [JS] Optionally re-quote string literals.
Turns "foo" into 'foo' (or vice versa, depending on configuration).
This makes it more convenient to follow the Google JavaScript style
guide:
https://google.github.io/styleguide/javascriptguide.xml?showone=Strings#Strings
This functionality is behind the option "JavaScriptQuotes", which can be:
* "leave" (no re-quoting)
* "single" (change to single quotes)
* "double" (change to double quotes)
This also changes single quoted JavaScript string literals to be treated
as tok::string_literal, not tok::char_literal, which fixes two unrelated
tests.
Patch by Martin Probst. Thank you.
llvm-svn: 262534
Jonathan Peyton [Wed, 2 Mar 2016 22:43:14 +0000 (22:43 +0000)]
Forgot to add test files for doacross and task priority.
llvm-svn: 262533
Jonathan Peyton [Wed, 2 Mar 2016 22:42:06 +0000 (22:42 +0000)]
Add new OpenMP 4.5 doacross loop nest feature
From the standard: A doacross loop nest is a loop nest that has cross-iteration
dependence. An iteration is dependent on one or more lexicographically earlier
iterations. The ordered clause parameter on a loop directive identifies the
loop(s) associated with the doacross loop nest.
The init/fini routines allocate/free doacross buffer(s) for each loop for each
thread. The wait routine waits for a flag designated by the dependence vector.
The post routine sets the flag designated by current iteration vector. We use
a similar technique of shared buffer indices that covers up to 7 nowait loops
executed simultaneously by different threads (number 7 has no real meaning,
just heuristic value). Also, the size of structures are kept intact via
reducing dummy arrays.
This needs to be put into the OpenMP runtime library in order for the compiler
team to develop the compiler side of the implementation.
Differential Revision: http://reviews.llvm.org/D17399
llvm-svn: 262532
Philip Reames [Wed, 2 Mar 2016 22:40:51 +0000 (22:40 +0000)]
[MBP] Remove overly verbose debug output
llvm-svn: 262531
Amaury Sechet [Wed, 2 Mar 2016 22:36:45 +0000 (22:36 +0000)]
Explode store of arrays in instcombine
Summary: This is the last step toward supporting aggregate memory access in instcombine. This explodes stores of arrays into a serie of stores for each element, allowing them to be optimized.
Reviewers: joker.eph, reames, hfinkel, majnemer, mgrang
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17828
llvm-svn: 262530
Davide Italiano [Wed, 2 Mar 2016 22:33:49 +0000 (22:33 +0000)]
[llvm-nm] Restore the previous behaviour (pre r262525).
It broke some buildbots.
Pointy-hat to: me
llvm-svn: 262529
Zachary Turner [Wed, 2 Mar 2016 22:05:52 +0000 (22:05 +0000)]
Add support for reading line tables from PDB files.
PDB is Microsoft's debug information format, and although we
cannot yet generate it, we still must be able to consume it.
Reason for this is that debug information for system libraries
(e.g. kernel32, C Runtime Library, etc) only have debug info
in PDB format, so in order to be able to support debugging
of system code, we must support it.
Currently this code should compile on every platform, but on
non-Windows platforms the PDB plugin will return 0 capabilities,
meaning that for now PDB is only supported on Windows. This
may change in the future, but the API is designed in such a way
that this will require few (if any) changes on the LLDB side.
In the future we can just flip a switch and everything will
work.
This patch only adds support for line tables. It does not return
information about functions, types, global variables, or anything
else. This functionality will be added in a followup patch.
Differential Revision: http://reviews.llvm.org/D17363
Reviewed by: Greg Clayton
llvm-svn: 262528
Sean Silva [Wed, 2 Mar 2016 22:05:46 +0000 (22:05 +0000)]
Add some minimal portability code paths for PS4.
Summary:
Hi David, SCE folks,
What is implemented in this patch is enough for the upstream libprofile to
work for PGO with the PS4 game codebase I tested ("game7" for you SCE
folks; this is with a standalone build of compiler-rt).
The first change, which is simple, is to stub out gethostname. PS4
doesn't have a simple analog for this that doesn't bring in extra
OS libraries, so for now we do not support `%h` expansion.
This is consistent with internal B#136272.
The second change implies future work, but is a simple change at present.
PS4 does not have `getenv`, so for now we will introduce a shim.
This obviously makes it impossible for many of the tests to be run since
they require setting `LLVM_PROFILE_FILE=`.
I see two paths forward:
1. In the tests we are already wrapping execution with `%run` and so by
setting a PS4-specific expansion for `%run` we can pass the information
in another way We can adapt the getenv shim as appropriate.
We will need to experiment with this internally.
Maggie, Phillip, Filipe? Any ideas? Maybe ping me internally since we
may need to get into some PS4 vagaries. I'm thinking a fake getenv
library that uses some side channel for communication.
2. Another possibility which is more verbose is to use a separate clang
invocation with `-profile-generate=<filename>` to set the filename in
each test.
This might require redundant clang invocations though which may be
undesirable for upstream. David, thoughts?
Also, this is a fairly libprofile-specific workaround, so it e.g.
doesn't help Filipe's ASan work.
Overall, this approach sounds like a bit of a hack to me.
Small detail:
InstrProfilingPort.h seems like the natural place for the getenv shim,
but GCDAProfiling.c needs it as well. InstrProfilingUtil.h is currently
the only header common between InstrProfilingFile.c and GCDAProfiling.c.
I can move the shim to InstrProfilingPort.h and add an include to
GCDAProfiling.c as per your preference David.
Reviewers: davidxl, MaggieYi, phillip.power, filcab
Subscribers: simon.f.whittaker, slingn, probinson, llvm-commits
Differential Revision: http://reviews.llvm.org/D17676
llvm-svn: 262527
Devin Coughlin [Wed, 2 Mar 2016 22:01:03 +0000 (22:01 +0000)]
[analyzer] Move ObjCSuperDeallocChecker out of the alpha package.
It will now be on by default on Darwin.
rdar://problem/6953275
llvm-svn: 262526
Davide Italiano [Wed, 2 Mar 2016 21:59:31 +0000 (21:59 +0000)]
[llvm-nm] Fix rendering of -s grouping with all the othe options.
llvm-svn: 262525
Devin Coughlin [Wed, 2 Mar 2016 21:50:54 +0000 (21:50 +0000)]
[analyzer] Move ObjCDeallocChecker out of the alpha package.
It will now be on by default on Darwin.
rdar://problem/6927496
llvm-svn: 262524
Philip Reames [Wed, 2 Mar 2016 21:45:13 +0000 (21:45 +0000)]
[MBP] Adjust debug output to be more focused and approachable
llvm-svn: 262522
Amaury Sechet [Wed, 2 Mar 2016 21:28:30 +0000 (21:28 +0000)]
Unpack array of all sizes in InstCombine
Summary: This is another step toward improving fca support. This unpack load of array in a series of load to array's elements.
Reviewers: chandlerc, joker.eph, majnemer, reames, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15890
llvm-svn: 262521
Devin Coughlin [Wed, 2 Mar 2016 21:22:48 +0000 (21:22 +0000)]
[analyzer] Fix capitalization in ObjCSuperDeallocChecker diagnostic.
llvm-svn: 262520
Daniel Berlin [Wed, 2 Mar 2016 21:16:28 +0000 (21:16 +0000)]
Really fix ASAN leak/etc issues with MemorySSA unittests
llvm-svn: 262519
Rui Ueyama [Wed, 2 Mar 2016 21:11:36 +0000 (21:11 +0000)]
Use ld.lld instead of "lld -flavor gnu".
llvm-svn: 262518
Kostya Serebryany [Wed, 2 Mar 2016 21:08:16 +0000 (21:08 +0000)]
[libFuzzer] add -Werror for libFuzzer build rule
llvm-svn: 262517
Artem Belevich [Wed, 2 Mar 2016 21:03:20 +0000 (21:03 +0000)]
Fixed test failure platforms with name mangling different from Linux.
* Run cc with -triple x86_64-linux-gnu to make symbol mangling predictable.
* Use temporary file as a fake GPU input so its content
does not interfere with pattern matching.
llvm-svn: 262516
Rong Xu [Wed, 2 Mar 2016 20:59:36 +0000 (20:59 +0000)]
[PGO] Change profile use cc1 option to handle IR level profiles
This patch changes cc1 option for PGO profile use from
-fprofile-instr-use=<path> to -fprofile-instrument-use-path=<path>.
-fprofile-instr-use=<path> is now a driver only option.
In addition to decouple the cc1 option from the driver level option, this patch
also enables IR level profile use. cc1 option handling now reads the profile
header and sets CodeGenOpt ProfileUse (valid values are {None, Clang, LLVM}
-- this is a common enum for -fprofile-instrument={}, for the profile
instrumentation), and invoke the pipeline to enable the respective PGO use pass.
Reviewers: silvas, davidxl
Differential Revision: http://reviews.llvm.org/D17737
llvm-svn: 262515
Xinliang David Li [Wed, 2 Mar 2016 20:59:11 +0000 (20:59 +0000)]
Fix minor bug in test
llvm-svn: 262514
Stephane Sezer [Wed, 2 Mar 2016 20:53:19 +0000 (20:53 +0000)]
Use shallow clones in build-llvm.py.
Summary:
This makes cloning (and therefore the whole build) faster.
The checkout step goes from ~4m to ~30s on my host.
Reviewers: tfiala
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17425
llvm-svn: 262513
Daniel Berlin [Wed, 2 Mar 2016 20:36:22 +0000 (20:36 +0000)]
Revert "Fix ASAN detected errors in code and test" (it was not meant to be committed yet)
This reverts commit
890bbccd600ba1eb050353d06a29650ad0f2eb95.
llvm-svn: 262512
Daniel Berlin [Wed, 2 Mar 2016 20:27:29 +0000 (20:27 +0000)]
Fix ASAN detected errors in code and test
llvm-svn: 262511
Bob Wilson [Wed, 2 Mar 2016 20:02:25 +0000 (20:02 +0000)]
Add another test for the GlobalOpt change in r212079.
This is a test that Akira Hatanaka wrote to test GlobalOpt's handling of
aliases with GEP operands. David Majnemer independently made the same
change to GlobalOpt in r212079. Akira's test is a useful addition, so I'm
pulling it over from the llvm repo for Swift on GitHub.
llvm-svn: 262510
Kostya Serebryany [Wed, 2 Mar 2016 19:45:10 +0000 (19:45 +0000)]
[libFuzzer] more trophies
llvm-svn: 262509
Nico Weber [Wed, 2 Mar 2016 19:38:24 +0000 (19:38 +0000)]
fix test from r262506
llvm-svn: 262508
Renato Golin [Wed, 2 Mar 2016 19:35:45 +0000 (19:35 +0000)]
[ARM] Merging 64-bit divmod lib calls into one
When div+rem calls on the same arguments are found, the ARM back-end merges the
two calls into one __aeabi_divmod call for up to 32-bits values. However,
for 64-bit values, which also have a lib call (__aeabi_ldivmod), it wasn't
merging the calls, and thus calling ldivmod twice and spilling the temporary
results, which generated pretty bad code.
This patch legalises 64-bit lib calls for divmod, so that now all the spilling
and the second call are gone. It also relaxes the DivRem combiner a bit on the
legal type check, since it was already checking for isLegalOrCustom on every
value, so the extra check for isTypeLegal was redundant.
This patch fixes PR17193 (and a long time FIXME in the tests).
llvm-svn: 262507
Nico Weber [Wed, 2 Mar 2016 19:28:54 +0000 (19:28 +0000)]
Serialize `#pragma detect_mismatch`.
This is like r262493, but for pragma detect_mismatch instead of pragma comment.
The two pragmas have similar behavior, so use the same approach for both.
llvm-svn: 262506
Reid Kleckner [Wed, 2 Mar 2016 19:20:59 +0000 (19:20 +0000)]
Revert "[X86] Elide references to _chkstk for dynamic allocas"
This reverts commit r262370.
It turns out there is code out there that does sequences of allocas
greater than 4K: http://crbug.com/591404
The goal of this change was to improve the code size of inalloca call
sequences, but we got tangled up in the mess of dynamic allocas.
Instead, we should come back later with a separate MI pass that uses
dominance to optimize the full sequence. This should also be able to
remove the often unneeded stacksave/stackrestore pairs around the call.
llvm-svn: 262505
Matthias Braun [Wed, 2 Mar 2016 19:20:00 +0000 (19:20 +0000)]
ARM: Introduce conservative load/store optimization mode
Most of the time ARM has the CCR.UNALIGN_TRP bit set to false which
means that unaligned loads/stores do not trap and even extensive testing
will not catch these bugs. However the multi/double variants are not
affected by this bit and will still trap. In effect a more aggressive
load/store optimization will break existing (bad) code.
These bugs do not necessarily manifest in the broken code where the
misaligned pointer is formed but often later in perfectly legal code
where it is accessed. This means recompiling system libraries (which
have no alignment bugs) with a newer compiler will break existing
applications (with alignment bugs) that worked before.
So (under protest) I implemented this safe mode which limits the
formation of multi/double operations to cases that are not affected by
user code (stack operations like spills/reloads) or cases where the
normal operations trap anyway (floating point load/stores). It is
disabled by default.
Differential Revision: http://reviews.llvm.org/D17015
llvm-svn: 262504
Kostya Serebryany [Wed, 2 Mar 2016 19:16:54 +0000 (19:16 +0000)]
[libFuzzer] allow -fsanitize-coverage=0 (disables all coverage)
llvm-svn: 262503
Rui Ueyama [Wed, 2 Mar 2016 19:08:05 +0000 (19:08 +0000)]
Merge DarwinLdDriver and Driver.
Now that DarwinLdDriver is the only derived class of Driver.
This patch merges them and actually removed the class because
they can now just be non-member functions. This change simplifies
a common header, Driver.h.
http://reviews.llvm.org/D17788
llvm-svn: 262502
Rui Ueyama [Wed, 2 Mar 2016 19:06:20 +0000 (19:06 +0000)]
Use C++11 initializers for data members.
http://reviews.llvm.org/D17793
llvm-svn: 262501
Justin Bogner [Wed, 2 Mar 2016 19:01:11 +0000 (19:01 +0000)]
SelectionDAG: Use correctly sized allocation functions for SDNodes
The placement new calls here were all calling the allocation function
in RecyclingAllocator/Recycler for SDNode, instead of the function for
the specific subclass we were constructing.
Since this particular allocator always overallocates it more or less
worked, but would hide what we're actually doing from any memory
tools. Also, if you tried to change this allocator so something like a
BumpPtrAllocator or MallocAllocator, the compiler would crash horribly
all the time.
Part of llvm.org/PR26808.
llvm-svn: 262500