Reid Kleckner [Tue, 9 Feb 2016 17:48:27 +0000 (17:48 +0000)]
Revert "Avoid forcing emission of delayed dllexported classes on template instantiation"
This reverts commit r260194.
It caused PR26549. There's probably a better way to do this also.
llvm-svn: 260241
Sanjay Patel [Tue, 9 Feb 2016 17:39:58 +0000 (17:39 +0000)]
[x86] make getOneTrueElt() a helper function ; NFC
As mentioned in http://reviews.llvm.org/D16828 , the related masked load transform
will need this logic, so I'm moving it out to make that patch smaller.
llvm-svn: 260240
Pavel Labath [Tue, 9 Feb 2016 17:28:01 +0000 (17:28 +0000)]
Fix invalid shift operator overload in Scalar
Summary: This also fixes an infinite recursion between lldb_private::operator>> () and Scalar::operator>>= ().
Reviewers: sagar, tberghammer, labath
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D16868
Patch by Marianne Mailhot-Sarrasin
llvm-svn: 260239
David Majnemer [Tue, 9 Feb 2016 17:27:52 +0000 (17:27 +0000)]
[MS ABI] Cleanup emitVTableDefinitions
Use the VFTable components to determine whether or not we should emit
RTTI data instead of duplicating the VFTableBuilder's logic.
llvm-svn: 260238
Vasileios Kalintiris [Tue, 9 Feb 2016 17:00:38 +0000 (17:00 +0000)]
Introduce a cmake module to figure out whether we need to link with libatomic.
Summary:
This fixes the tests under std/atomics for 32-bit MIPS CPUs where the
8-byte atomic operations call into the libatomic library.
Reviewers: dsanders, mclow.lists, EricWF, jroelofs, joerg
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D16613
llvm-svn: 260235
Daniel Sanders [Tue, 9 Feb 2016 16:22:39 +0000 (16:22 +0000)]
[lsan] Run the tests for each supported arch and suffix each one to distinguish them.
Summary:
Previously, the tests only ran for the 64-bit equivalent of the default target
(see -m64).
Given the supported architecture list only contains 64-bit targets, this happens
to work out the same as the supported targets in most cases but may matter for
X86_64/X86_64h on Darwin.
For other targets, the practical effect is that the test names contain the
architecture. This resolves some confusion when lsan tests fail since their
name no longer implies that they are trying to test the default target.
Reviewers: samsonov
Subscribers: tberghammer, danalbert, llvm-commits, srhines
Differential Revision: http://reviews.llvm.org/D16859
llvm-svn: 260232
Daniel Sanders [Tue, 9 Feb 2016 16:20:37 +0000 (16:20 +0000)]
[dfsan] Run the tests for each supported arch and suffix each one to distinguish them.
Summary:
Previously, the tests only ran for the 64-bit equivalent of the default target
(see -m64).
Given the supported architecture list only contains 64-bit targets, this happens
to work out the same as the supported targets in most cases but may matter for
X86_64/X86_64h on Darwin.
For other targets, the practical effect is that the test names contain the
architecture. This resolves some confusion when msan tests fail since their
name no longer implies that they are trying to test the default target.
Reviewers: samsonov
Subscribers: tberghammer, danalbert, llvm-commits, srhines
Differential Revision: http://reviews.llvm.org/D16856
llvm-svn: 260231
Daniel Sanders [Tue, 9 Feb 2016 16:18:15 +0000 (16:18 +0000)]
[msan] Run the tests for each supported arch and suffix each one to distinguish them.
Summary:
Previously, the tests only ran for the 64-bit equivalent of the default target
(see -m64).
Given the supported architecture list only contains 64-bit targets, this happens
to work out the same as the supported targets in most cases but may matter for
X86_64/X86_64h on Darwin.
For other targets, the practical effect is that the test names contain the
architecture. This resolves some confusion when msan tests fail since their
name no longer implies that they are trying to test the default target.
Reviewers: samsonov
Subscribers: tberghammer, danalbert, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D16855
llvm-svn: 260230
Daniel Sanders [Tue, 9 Feb 2016 16:14:31 +0000 (16:14 +0000)]
[sanitizer_common] Correct the nits that should have been committed as part of r260227.
llvm-svn: 260229
Chad Rosier [Tue, 9 Feb 2016 15:59:57 +0000 (15:59 +0000)]
[AArch64] Rename variable to improve readability. NFC.
llvm-svn: 260228
Daniel Sanders [Tue, 9 Feb 2016 15:52:35 +0000 (15:52 +0000)]
[sanitizer_common] Add suffix to lit testsuite name to distinguish subtargets.
Summary:
This fixes duplicate test names in the test results, so:
PASS: SanitizerCommon-asan :: fopen_nullptr.c (304 of 431)
PASS: SanitizerCommon-asan :: fopen_nullptr.c (305 of 431)
is now:
PASS: SanitizerCommon-asan-i386-Linux :: fopen_nullptr.c (282 of 431)
PASS: SanitizerCommon-asan-x86_64-Linux :: fopen_nullptr.c (316 of 431)
Reviewers: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16850
llvm-svn: 260227
Chad Rosier [Tue, 9 Feb 2016 15:51:33 +0000 (15:51 +0000)]
[AArch64] Remove stale comment.
llvm-svn: 260226
Daniel Marjamaki [Tue, 9 Feb 2016 15:43:05 +0000 (15:43 +0000)]
[clang-tidy] Add -target in misc-misplaced-widening-cast test so it will work on various bots
llvm-svn: 260225
Rafael Espindola [Tue, 9 Feb 2016 15:11:01 +0000 (15:11 +0000)]
Use the plt entry as the address of some symbols.
This is the function equivalent of a copy relocation.
Since functions are expected to change sizes, we cannot use copy
relocations. In situations where one would be needed, what is done
instead is:
* Create a plt entry
* Output an undefined symbol whose addr is the plt entry.
The dynamic linker makes sure any shared library uses the plt entry as
the function address.
llvm-svn: 260224
Daniel Marjamaki [Tue, 9 Feb 2016 14:08:49 +0000 (14:08 +0000)]
[clang-tidy] Add 'misc-misplaced-widening-cast' check.
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D16310
llvm-svn: 260223
Aaron Ballman [Tue, 9 Feb 2016 14:04:49 +0000 (14:04 +0000)]
Registering the gnuNullExpr AST matcher as a dynamic matcher so that it is available from clang-query.
llvm-svn: 260222
Teresa Johnson [Tue, 9 Feb 2016 13:28:44 +0000 (13:28 +0000)]
Fix comment for MD5Hash.
llvm-svn: 260221
Alexey Bataev [Tue, 9 Feb 2016 12:16:42 +0000 (12:16 +0000)]
[OPENMP] Fix test incompatibility with arm buildbots.
llvm-svn: 260220
Alexey Bataev [Tue, 9 Feb 2016 11:01:58 +0000 (11:01 +0000)]
Fix possible OOB access found by buildbot
llvm-svn: 260219
Manuel Klimek [Tue, 9 Feb 2016 10:59:21 +0000 (10:59 +0000)]
Add AST matcher reference to documentation directory when building HTML docs.
llvm-svn: 260218
Gabor Horvath [Tue, 9 Feb 2016 10:20:48 +0000 (10:20 +0000)]
[clang-tidy] Make readability-container-size-empty work with inline namespaces. Fix PR25812.
llvm-svn: 260217
Tamas Berghammer [Tue, 9 Feb 2016 10:10:42 +0000 (10:10 +0000)]
Fix a typo in an xfail decorator in TestExprsChar
llvm-svn: 260216
Alexey Bataev [Tue, 9 Feb 2016 09:41:42 +0000 (09:41 +0000)]
[OPENMP] Allow to use the variable in the same 'threadprivate'
directive.
llvm-svn: 260215
Alexey Bataev [Tue, 9 Feb 2016 09:41:33 +0000 (09:41 +0000)]
Do not mark variable as threadprivate if it was marked already.
llvm-svn: 260214
Alexey Bataev [Tue, 9 Feb 2016 09:41:09 +0000 (09:41 +0000)]
[OPENMP] Allow to reference threadprivate variable in same directive.
llvm-svn: 260213
Gabor Horvath [Tue, 9 Feb 2016 09:26:11 +0000 (09:26 +0000)]
[clang-tidy] Replace a custom ASTMatcher with a built-in one.
llvm-svn: 260212
Alexey Bataev [Tue, 9 Feb 2016 08:51:26 +0000 (08:51 +0000)]
Fixed preprocessed output of the first token for pragmas.
Clang did not expanded macros in the very first token of the pragmas
during preprocessed output
llvm-svn: 260211
Simon Pilgrim [Tue, 9 Feb 2016 08:19:19 +0000 (08:19 +0000)]
[X86][AVX2] Fix SIGN_EXTEND vector handling on AVX2 targets.
On AVX2 target we are poorly legalizing SIGN_EXTEND ops for which the input's legalized type doesn't have the same number of elements as the destination, resulting in an ANY_EXTEND followed by a SIGN_EXTEND_INREG.
This patch uses the existing SIGN_EXTEND -> SIGN_EXTEND_VECTOR_INREG combine to extend the input to the size of the result and using SIGN_EXTEND_VECTOR_INREG instead.
Differential Revision: http://reviews.llvm.org/D16994
llvm-svn: 260210
NAKAMURA Takumi [Tue, 9 Feb 2016 07:44:10 +0000 (07:44 +0000)]
lld/test/mach-o/dependency_info.yaml: Forgot to remove XFAIL:win32.
llvm-svn: 260209
NAKAMURA Takumi [Tue, 9 Feb 2016 07:30:24 +0000 (07:30 +0000)]
lld/test/mach-o/dependency_info.yaml: Tweak for dos path.
llvm-svn: 260208
NAKAMURA Takumi [Tue, 9 Feb 2016 07:30:18 +0000 (07:30 +0000)]
check-lld: Introduce %python.
llvm-svn: 260207
NAKAMURA Takumi [Tue, 9 Feb 2016 07:30:11 +0000 (07:30 +0000)]
Introduce the feature 'demangler' in check-lld. Mark lld/test/old-elf/X86_64/demangle.test as REQUIRES:demangler.
llvm-svn: 260206
NAKAMURA Takumi [Tue, 9 Feb 2016 07:30:04 +0000 (07:30 +0000)]
Disable lld/test/old-elf/group-cmd-search.test on win32. "XFAIL:win32" was insufficient.
llvm-svn: 260205
Jonas Hahnfeld [Tue, 9 Feb 2016 07:07:30 +0000 (07:07 +0000)]
[GCC] GOMP_task: Change argument type of if_cond from int to bool
(libgomp has bool as well)
This was causing a test failure in omp_test_if.c when building with GCC in
Debug mode. I have verified that GCC versions 4.9.2 and 5.3.0 now work and
compile-tested this change with clang 3.7.1 and Intel Compiler 16.0.
Differential Revision: http://reviews.llvm.org/D16921
llvm-svn: 260204
Chris Bieneman [Tue, 9 Feb 2016 06:49:08 +0000 (06:49 +0000)]
[CMake] Updating caches README with explanations of useful cache files.
This is in response to silvas' post-commit suggestion.
llvm-svn: 260203
Marshall Clow [Tue, 9 Feb 2016 06:38:56 +0000 (06:38 +0000)]
Minor updates to failing tests. NFC
llvm-svn: 260202
Chris Bieneman [Tue, 9 Feb 2016 06:01:47 +0000 (06:01 +0000)]
[CMake] Providing a CMake cache for 3-stage builds
This cache file can be used to generate a 3-stage clang build. You can configure using the following CMake command:
cmake -C <path to clang>/cmake/caches/3-stage.cmake -G Ninja <path to llvm>
You can then run "ninja stage3-clang" to build stage1, stage2 and stage3 clangs.
This is useful for finding non-determinism the compiler by verifying that stage2 and stage3 are identical.
llvm-svn: 260201
Xinliang David Li [Tue, 9 Feb 2016 05:47:08 +0000 (05:47 +0000)]
Add comments to some tests
llvm-svn: 260200
Enrico Granata [Tue, 9 Feb 2016 05:46:47 +0000 (05:46 +0000)]
Fix an issue where pressing CTRL+C in the interactive script interpreter causes LLDB to crash
This is because PyThreadState_Get() assumes a non-NULL thread state and crashes otherwise; but PyThreadState_GET is just a shortcut (in non-Python-debugging builds) for the global variable that holds the thread state
The behavior of CTRL+C is slightly more erratic than one would like. CTRL+C in the middle of execution of Python code will cause that execution to be interrupted (e.g. time.sleep(1000)), but a CTRL+C at the prompt will just cause a KeyboardInterrupt and not exit the interpreter - worse, it will only trigger the exception once one presses ENTER.
None of this is optimal, of course, but I don't have a lot of time to appease the Python deities with the proper spells right now, and fixing the crasher is already a good thing in and of itself
llvm-svn: 260199
Xinliang David Li [Tue, 9 Feb 2016 05:36:57 +0000 (05:36 +0000)]
Further reduce test overhead
llvm-svn: 260198
Teresa Johnson [Tue, 9 Feb 2016 05:12:44 +0000 (05:12 +0000)]
Refactor PGO function naming and MD5 hashing support out of ProfileData
Summary:
Move the function renaming logic into the Function class, and the
MD5Hash routine into the MD5 header.
This will enable these routines to be shared with ThinLTO, which
will be changed to store the MD5 hash instead of full function name
in the combined index for significant size reductions. And using the same
function naming for locals in the function index facilitates future
integration with indirect call value profiles.
Reviewers: davidxl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17006
llvm-svn: 260197
Nick Lewycky [Tue, 9 Feb 2016 04:47:58 +0000 (04:47 +0000)]
Use std::forward to make ErrorOr<T> constructible from a value that has a user-defined conversion to T. No functionality change intended.
llvm-svn: 260196
Saleem Abdulrasool [Tue, 9 Feb 2016 04:05:37 +0000 (04:05 +0000)]
Use the reserved spellings for attributes
Change the no_sanitize attribute to use the reserved spelling.
llvm-svn: 260195
Reid Kleckner [Tue, 9 Feb 2016 02:51:17 +0000 (02:51 +0000)]
Avoid forcing emission of delayed dllexported classes on template instantiation
Fixes PR26490
llvm-svn: 260194
Sanjoy Das [Tue, 9 Feb 2016 02:31:47 +0000 (02:31 +0000)]
[GMR/OperandBundles] Teach getModRefBehavior about operand bundles
In general, memory restrictions on a called function (e.g. readnone)
cannot be transferred to a CallSite that has operand bundles. It is
possible to make this inference smarter, but lets fix the behavior to be
correct first.
llvm-svn: 260193
Siva Chandra [Tue, 9 Feb 2016 02:18:50 +0000 (02:18 +0000)]
[TestExprsChar] Fix a typo is failure archs list
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17014
llvm-svn: 260192
Pete Cooper [Tue, 9 Feb 2016 02:10:39 +0000 (02:10 +0000)]
Add cmdline options for LC_DATA_IN_CODE load command.
Also added the defaults for whether to generate this load command, which
the cmdline options are able to override.
There was also a difference to ld64 which is fixed here in that ld64 will
generate an empty data in code command if requested.
rdar://problem/
24472630
llvm-svn: 260191
Richard Smith [Tue, 9 Feb 2016 02:09:16 +0000 (02:09 +0000)]
Remove TrailingObjects::operator delete. It's still suffering from
compiler-specific issues. Instead, repeat an 'operator delete' definition in
each derived class that is actually deleted, and give up on the static type
safety of an error when sized delete is accidentally used on a type derived
from TrailingObjects.
llvm-svn: 260190
Richard Smith [Tue, 9 Feb 2016 01:57:24 +0000 (01:57 +0000)]
Remove 'llvm::TrailingObjects::operator delete', clang side.
llvm-svn: 260189
Pete Cooper [Tue, 9 Feb 2016 01:38:13 +0000 (01:38 +0000)]
Generate LC_FUNCTION_STARTS load command.
This load command generates data in the LINKEDIT section which
is a list of ULEB128 delta's to all of the functions in the __text section.
It is then 0 terminated and pointer aligned to pad.
ld64 exposes the -function-starts and no-function-starts cmdline options
to override behaviour from the defaults based on file types.
rdar://problem/
24472630
llvm-svn: 260188
David L Kreitzer [Tue, 9 Feb 2016 01:35:45 +0000 (01:35 +0000)]
Fix the LLVM_ENABLE_MODULES build after adding TargetOpcodes.def in r259726.
Differential Revision: http://reviews.llvm.org/D17005
llvm-svn: 260186
Pete Cooper [Tue, 9 Feb 2016 01:34:13 +0000 (01:34 +0000)]
We should never dead strip mach header symbols.
This was a bug in our handling of these symbols compared to ld64.
Turns out that ld64 always marks these symbols as being not dead stripped.
llvm-svn: 260185
Pete Cooper [Tue, 9 Feb 2016 01:27:30 +0000 (01:27 +0000)]
Reorder enum entry as its used for atom sorting.
The atom content type enum is used as a tie breaker to sort atoms.
In that case, we want MachHeader to be before typeCode as it really will
be before the code in the final executable.
Test case to follow in the next commit or two.
llvm-svn: 260184
Sanjoy Das [Tue, 9 Feb 2016 01:21:57 +0000 (01:21 +0000)]
Add an "addUsedAAAnalyses" helper function
Summary:
Passes that call `getAnalysisIfAvailable<T>` also need to call
`addUsedIfAvailable<T>` in `getAnalysisUsage` to indicate to the
legacy pass manager that it uses `T`. This contract was being
violated by passes that used `createLegacyPMAAResults`. This change
fixes this by exposing a helper in AliasAnalysis.h,
`addUsedAAAnalyses`, that is complementary to createLegacyPMAAResults
and does the right thing when called from `getAnalysisUsage`.
Reviewers: chandlerc
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D17010
llvm-svn: 260183
Sanjoy Das [Tue, 9 Feb 2016 01:21:50 +0000 (01:21 +0000)]
Remove SCEVAAWrapperPass from createLegacyPMAAResults; NFC
Summary:
createLegacyPMAAResults is only called by CGSCC and Module passes, so
the call to getAnalysisIfAvailable<SCEVAAWrapperPass>() never
succeeds (SCEVAAWrapperPass is a function pass).
Reviewers: chandlerc
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D17009
llvm-svn: 260182
Richard Smith [Tue, 9 Feb 2016 01:05:04 +0000 (01:05 +0000)]
Fix undefined behavior when compiling in C++14 due to sized operator delete
being called with the wrong size: convert CGFunctionInfo to use TrailingObjects
and ask TrailingObjects to provide a working 'operator delete' for us.
llvm-svn: 260181
Richard Smith [Tue, 9 Feb 2016 01:03:42 +0000 (01:03 +0000)]
Re-commit r259942 (reverted in r260053) with a different workaround for the MSVC bug.
This fixes undefined behavior in C++14 due to the size of the object being
deleted being different from sizeof(dynamic type) when it is allocated with
trailing objects.
MSVC seems to have several bugs around using-declarations changing the access
of a member inherited from a base class, so use forwarding functions instead of
using-declarations to make TrailingObjects::operator delete accessible where
desired.
llvm-svn: 260180
David Blaikie [Tue, 9 Feb 2016 01:02:24 +0000 (01:02 +0000)]
Simplify some expressions involving unique_ptr and ErrorOr
llvm-svn: 260179
Zachary Turner [Tue, 9 Feb 2016 00:36:34 +0000 (00:36 +0000)]
Remove skip and xfail decorators for target architecture.
This removes the following decorators:
* skipIfI386
* expectedFailureI386
* expectedFailurex86_64
* skipIfArch
* skipUnlessArch
* skipUnlessI386
And other related decorators. All code using those decorators
is updated to use expectedFailureAll and skipIf
llvm-svn: 260178
Zachary Turner [Tue, 9 Feb 2016 00:36:27 +0000 (00:36 +0000)]
Remove skipIfHostPlatform and skipUnlessHostPlatform decorators.
llvm-svn: 260177
Zachary Turner [Tue, 9 Feb 2016 00:36:22 +0000 (00:36 +0000)]
Remove the skipUnlessArch decorator.
Convert everything over to using skipIf.
llvm-svn: 260176
Evgeniy Stepanov [Tue, 9 Feb 2016 00:28:57 +0000 (00:28 +0000)]
[asan] Fix build on Windows and PowerPC.
llvm-svn: 260175
Wei Mi [Tue, 9 Feb 2016 00:07:08 +0000 (00:07 +0000)]
This patch is to fix PR26529 caused by r259736.
IndVarSimplify assumes scAddRecExpr to be expanded in literal form instead of
canonical form by calling disableCanonicalMode after it creates SCEVExpander.
When CanonicalMode is disabled, SCEVExpander::expand should always return PHI
node for scAddRecExpr. r259736 broke the assumption.
The fix is to let SCEVExpander::expand skip the reuse Value logic if
CanonicalMode is false.
In addition, Besides IndVarSimplify, LSR pass also calls disableCanonicalMode
before doing rewrite. We can remove the original check of LSRMode in reuse
Value logic and use CanonicalMode instead.
llvm-svn: 260174
Davide Italiano [Mon, 8 Feb 2016 23:50:23 +0000 (23:50 +0000)]
[llvm-nm] Remove excessive parenthesis, noticed by David Blaikie.
llvm-svn: 260173
Eric Fiselier [Mon, 8 Feb 2016 23:47:13 +0000 (23:47 +0000)]
Revert r260012 due to __gnu_cxx::hash_map breakage
llvm-svn: 260172
Rong Xu [Mon, 8 Feb 2016 23:11:16 +0000 (23:11 +0000)]
[PGO] Revert r260146 as it breaks Darwin platforms.
r260146 | xur | 2016-02-08 13:07:46 -0800 (Mon, 08 Feb 2016) | 13 lines
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
llvm-svn: 260170
Michael Zolotukhin [Mon, 8 Feb 2016 23:03:59 +0000 (23:03 +0000)]
Factor out UnrollAnalyzer to Analysis, and add unit tests for it.
Summary:
Unrolling Analyzer is already pretty complicated, and it becomes harder and harder to exercise it with usual IR tests, as with them we can only check the final decision: whether the loop is unrolled or not. This change factors this framework out from LoopUnrollPass to analyses, which allows to use unit tests.
The change itself is supposed to be NFC, except adding a couple of tests.
I plan to add more tests as I add new functionality and find/fix bugs.
Reviewers: chandlerc, hfinkel, sanjoy
Subscribers: zzheng, sanjoy, llvm-commits
Differential Revision: http://reviews.llvm.org/D16623
llvm-svn: 260169
Simon Pilgrim [Mon, 8 Feb 2016 23:03:46 +0000 (23:03 +0000)]
[X86][SSE1] Add MOVLHPS/MOVHLPS lowering and memory folding support
As discussed on PR26491, this patch adds support for lowering v4f32 shuffles to the MOVLHPS/MOVHLPS instructions. It also adds support for memory folding with their MOVLPS/MOVHPS load equivalents.
This first patch only really helps SSE1 targets as SSE2+ targets will widen the shuffle mask and use v2f64 equivalents (although they still combine to MOVLHPS/MOVHLPS for v2f64 splats). This will have to be addressed in a future patch, most likely when we add support for binary target shuffle combines.
Differential Revision: http://reviews.llvm.org/D16956
llvm-svn: 260168
Evgeniy Stepanov [Mon, 8 Feb 2016 23:01:06 +0000 (23:01 +0000)]
[asan] Fix Windows build.
llvm-svn: 260167
Davide Italiano [Mon, 8 Feb 2016 22:58:26 +0000 (22:58 +0000)]
[llvm-nm] Yet another attempt of simplifying code.
llvm-svn: 260166
Evgeniy Stepanov [Mon, 8 Feb 2016 22:54:46 +0000 (22:54 +0000)]
[asan] Remove leftover debug print statement.
llvm-svn: 260165
Andrew Kaylor [Mon, 8 Feb 2016 22:52:51 +0000 (22:52 +0000)]
[regalloc][WinEH] Do not mark intervals as not spillable if they contain a regmask
Differential Revision: http://reviews.llvm.org/D16831
llvm-svn: 260164
Evgeniy Stepanov [Mon, 8 Feb 2016 22:50:25 +0000 (22:50 +0000)]
[asan] Implement SEGV read vs write detection for ARM and AArch64.
llvm-svn: 260163
Justin Bogner [Mon, 8 Feb 2016 22:49:40 +0000 (22:49 +0000)]
llvm-cov: Fix reading gcov data that does not have function names
In order for recent gcov versions to read the coverage data, you have
to use UseCfgChecksum=true and FunctionNamesInData=false options for
coverage profiling pass. This is because gcov is expecting the
function section in .gcda to be exactly 3 words in size, containing
ident and two checksums.
While llvm-cov is compatible with UseCfgChecksum=true, it always
expects a function name in .gcda function sections (it's not
compatible with FunctionNamesInData=false). Thus it's currently
impossible to generate one set of coverage files that works with both
gcov and llvm-cov.
This change fixes the reading of coverage information to only read the
function name if it's present.
Patch by Arseny Kapoulkine. Thanks!
llvm-svn: 260162
Xinliang David Li [Mon, 8 Feb 2016 22:41:37 +0000 (22:41 +0000)]
[PGO] Cover more cases of implicitly generated C++ methods
llvm-svn: 260161
Ekaterina Romanova [Mon, 8 Feb 2016 22:35:09 +0000 (22:35 +0000)]
This patch adds doxygen comments for all the intrinsincs in the header file pmmintrin.h. The doxygen comments are automatically generated based on Sony's intrinsics document.
Differential Revision: http://reviews.llvm.org/D16913
llvm-svn: 260160
Nico Weber [Mon, 8 Feb 2016 22:23:09 +0000 (22:23 +0000)]
Make ParentMap work with explicit specializations of function templates.
For an explicit specialization, we first build a FunctionDecl, and then
we call SubstDecl() on it to build a second FunctionDecl, which has the
first FunctionDecl as canonical decl.
The address of an explicit specialization of function template used to be the
canonical decl of the FunctionDecl. This is different from all the other
DeduceTemplateArguments() calls in SemaOverload, and since the canonical decl
isn't visited by ParentMap while the redecl is, it also made ParentMap assert
when computing the parent of a address-of-explicit-specialization-fun-template.
To fix, remove the getCanonicalDecl() call. No behavior difference for clang,
but it fixes an assert in ParentMap (which is e.g. used by libTooling).
llvm-svn: 260159
Nathan Wilson [Mon, 8 Feb 2016 22:02:50 +0000 (22:02 +0000)]
[Concepts] Remove the IsConcept bit and associated member functions from VarDecl
because the information is now stored in TemplateDecl.
llvm-svn: 260155
Justin Bogner [Mon, 8 Feb 2016 21:55:19 +0000 (21:55 +0000)]
cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO
Apparently option is for bools and cmake-gui will display this
strangely with option.
Pointed out by edward-san - thanks!
llvm-svn: 260154
Pete Cooper [Mon, 8 Feb 2016 21:50:45 +0000 (21:50 +0000)]
Move includes inside guards. NFC.
These includes were before the #ifndef/#define guards. Moving them to
where they should be.
llvm-svn: 260153
Dan Gohman [Mon, 8 Feb 2016 21:50:13 +0000 (21:50 +0000)]
[WebAssembly] Update the br_if instructions' operand orders to match the spec.
llvm-svn: 260152
Sanjay Patel [Mon, 8 Feb 2016 21:32:43 +0000 (21:32 +0000)]
rangify; NFC
llvm-svn: 260151
Rong Xu [Mon, 8 Feb 2016 21:18:18 +0000 (21:18 +0000)]
[PGO] Update InstrProfData.inc to sync with llvm
Sync InstrProfData.inc with the one in llvm.
llvm-svn: 260148
George Burgess IV [Mon, 8 Feb 2016 21:10:00 +0000 (21:10 +0000)]
Fix typo in asan_flags.
Patch by Michael Stapelberg.
llvm-svn: 260147
Rong Xu [Mon, 8 Feb 2016 21:07:46 +0000 (21:07 +0000)]
[PGO] Differentiate Clang instrumentation and IR level instrumentation profiles
This patch uses one bit in profile version to differentiate Clang
instrumentation and IR level instrumentation profiles.
PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so
that the compiler runtime can set the right profile kind.
PGOInstrumenation now checks this bit to make sure it's an IR level
instrumentation profile.
Differential Revision: http://reviews.llvm.org/D15540
llvm-svn: 260146
Sanjay Patel [Mon, 8 Feb 2016 21:05:08 +0000 (21:05 +0000)]
[x86] convert masked store of one element to scalar store
Another opportunity to reduce masked stores: in D16691, we decided not to attempt the 'one mask element is set'
transform in InstCombine, but this should be a win for any AVX machine.
Code comments note that this transform could be extended for other targets / cases.
Differential Revision: http://reviews.llvm.org/D16828
llvm-svn: 260145
Justin Bogner [Mon, 8 Feb 2016 21:01:24 +0000 (21:01 +0000)]
cmake: Accept "thin" or "full" as arguments to -DLLVM_ENABLE_LTO
Mehdi suggested in a review of r259766 that it's also useful to easily
set the type of LTO. Augment the cmake variable to support that.
llvm-svn: 260143
Xinliang David Li [Mon, 8 Feb 2016 20:46:26 +0000 (20:46 +0000)]
[PGO] Simpflify test and increase coverage
llvm-svn: 260142
Xinliang David Li [Mon, 8 Feb 2016 20:08:21 +0000 (20:08 +0000)]
Fix build bot failure
llvm-svn: 260138
Tom Stellard [Mon, 8 Feb 2016 19:49:20 +0000 (19:49 +0000)]
AMDGPU/SI: Implement a work-around for smrd corrupting vccz bit
Summary:
We will hit this once we have enabled uniform branches. The
smrd-vccz-bug.ll test will be added with the uniform branch commit.
Reviewers: mareko, arsenm
Subscribers: arsenm, llvm-commits
Differential Revision: http://reviews.llvm.org/D16725
llvm-svn: 260137
Hans Wennborg [Mon, 8 Feb 2016 19:45:24 +0000 (19:45 +0000)]
Add triple to h-registers-3.ll to make bots happy after r260133
llvm-svn: 260136
Zachary Turner [Mon, 8 Feb 2016 19:35:18 +0000 (19:35 +0000)]
A number of improvements to decorator conditionals.
* Change the `not_in` function to be called `no_match`. This makes
it clear that keyword arguments can be more than just lists.
* Change the name of `_check_list_or_lambda` to
`_match_decorator_property`. Again clarifying that decorator params
are not always lists.
* Always use a regex match when matching strings. This allows automatic
support for regex matching on all decorator properties. Also support
compiled regex values.
* Fix a bug in the compiler check used by _decorateTest. The two
arguments were reversed, the condition was always wrong.
* Change one test that uses skipUnlessArch to use skipIf, to
demonstrate that skipIf can now handle more scenarios.
Differential Revision: http://reviews.llvm.org/D16938
llvm-svn: 260135
Zachary Turner [Mon, 8 Feb 2016 19:34:59 +0000 (19:34 +0000)]
Remove expectedFailureWindows decorator.
expectedFailureWindows is equivalent to using the general
expectedFailureAll decorator with oslist="windows". Additionally,
by moving towards these common decorators we can solve the issue
of having to support decorators that can be called with or without
arguments. Once all decorators are always called with arguments,
and this is enforced by design (because you can't specify the condition
you're decorating for without passing an argument) the implementation
of the decorators can become much simpler
Differential Revision: http://reviews.llvm.org/D16936
llvm-svn: 260134
Hans Wennborg [Mon, 8 Feb 2016 19:34:30 +0000 (19:34 +0000)]
[X86] Don't zero/sign-extend i1, i8, or i16 return values to 32 bits (PR22532)
This matches GCC and MSVC's behaviour, and saves on code size.
We were already not extending i1 return values on x86_64 after r127766. This
takes that patch further by applying it to x86 target as well, and also for i8
and i16.
The ABI docs have been unclear about the required behaviour here. The new i386
psABI [1] clearly states (Table 2.4, page 14) that i1, i8, and i16 return
vales do not need to be extended beyond 8 bits. The x86_64 ABI doc is being
updated to say the same [2].
Differential Revision: http://reviews.llvm.org/D16907
[1]. https://01.org/sites/default/files/file_attach/intel386-psabi-1.0.pdf
[2]. https://groups.google.com/d/msg/x86-64-abi/E8O33onbnGQ/_RFWw_ixDQAJ
llvm-svn: 260133
Kostya Serebryany [Mon, 8 Feb 2016 19:33:36 +0000 (19:33 +0000)]
[asan] fix the Windows build (MSVC says: cannot specify explicit initializer for arrays)
llvm-svn: 260132
Tim Northover [Mon, 8 Feb 2016 19:33:18 +0000 (19:33 +0000)]
AArch64: match correct order in subtraction pattern.
The accumulator in multiply-and-subtract instructions is actually subtracted
*from* so these patterns were computing the wrong value.
llvm-svn: 260131
Sanjay Patel [Mon, 8 Feb 2016 19:27:33 +0000 (19:27 +0000)]
fix typos; NFC
llvm-svn: 260130
Vedant Kumar [Mon, 8 Feb 2016 19:25:45 +0000 (19:25 +0000)]
[Coverage] Fix crash when handling certain macro expansions
When handling 'if' statements, we crash if the condition and the consequent
branch are spanned by a single macro expansion.
The crash occurs because of a sanity 'reset' in popRegions(): if an expansion
exactly spans an entire region, we set MostRecentLocation to the start of the
expansion (its 'include location'). This ensures we don't handleFileExit()
ourselves out of the expansion before we're done processing all of the regions
within it. This is tested in test/CoverageMapping/macro-expressions.c.
This causes a problem when an expansion spans both the condition and the
consequent branch of an 'if' statement. MostRecentLocation is updated to the
start of the 'if' statement in popRegions(), so the file for the expansion
isn't exited by the time we're done handling the statement. We then crash with
'fatal: File exit not handled before popRegions'.
The fix for this is to detect these kinds of expansions, and conservatively
update MostRecentLocation to the end of expansion region containing the
conditional. I've added tests to make sure we don't have the same problem with
other kinds of statements.
rdar://problem/
23630316
Differential Revision: http://reviews.llvm.org/D16934
llvm-svn: 260129
Kostya Serebryany [Mon, 8 Feb 2016 19:21:08 +0000 (19:21 +0000)]
[asan] re-commit r259961, this time making the test Linux-Only
llvm-svn: 260128
Xinliang David Li [Mon, 8 Feb 2016 19:14:14 +0000 (19:14 +0000)]
Simplify test cases
llvm-svn: 260126