NAKAMURA Takumi [Tue, 16 Feb 2016 08:13:36 +0000 (08:13 +0000)]
clang-tools-extra/test/Unit/lit.site.cfg.in: Prune on_clone. I guess it has been unused since r188006.
llvm-svn: 260944
Craig Topper [Tue, 16 Feb 2016 07:45:07 +0000 (07:45 +0000)]
[X86] Fix typos. NFC
llvm-svn: 260943
Craig Topper [Tue, 16 Feb 2016 07:45:04 +0000 (07:45 +0000)]
[X86] Use range-based for loop. NFC
llvm-svn: 260942
Amaury Sechet [Tue, 16 Feb 2016 07:33:23 +0000 (07:33 +0000)]
Do some refactoring in constant generation in the C API echo test. NFC
llvm-svn: 260941
Craig Topper [Tue, 16 Feb 2016 07:28:03 +0000 (07:28 +0000)]
[X86] Fix typo in comment. NFC
llvm-svn: 260940
Amaury Sechet [Tue, 16 Feb 2016 07:08:49 +0000 (07:08 +0000)]
Generate functions in 2 steps in the C API echo test. NFC
llvm-svn: 260939
Junmo Park [Tue, 16 Feb 2016 06:46:58 +0000 (06:46 +0000)]
[SCEVExpander] Make findExistingExpansion smarter
Summary:
Extending findExistingExpansion can use existing value in ExprValueMap.
This patch gives 0.3~0.5% performance improvements on
benchmarks(test-suite, spec2000, spec2006, commercial benchmark)
Reviewers: mzolotukhin, sanjoy, zzheng
Differential Revision: http://reviews.llvm.org/D15559
llvm-svn: 260938
Argyrios Kyrtzidis [Tue, 16 Feb 2016 05:39:33 +0000 (05:39 +0000)]
[Frontend] Make sure WrapperFrontendAction updates CurrentInput after calling BeginSourceFileAction.
I don't have a test case to add unfortunately.
llvm-svn: 260937
Amaury Sechet [Tue, 16 Feb 2016 05:11:24 +0000 (05:11 +0000)]
Restore the capability to manipulate datalayout from the C API
Summary:
This consist in variosu addition to the C API:
LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M);
void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL);
LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T);
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: axw
Differential Revision: http://reviews.llvm.org/D17255
llvm-svn: 260936
Craig Topper [Tue, 16 Feb 2016 04:24:58 +0000 (04:24 +0000)]
[TableGen] Fix inconsistent spacing. NFC
llvm-svn: 260935
Craig Topper [Tue, 16 Feb 2016 04:24:56 +0000 (04:24 +0000)]
[TableGen] Stop passing by reference an integer that doesn't get modified. NFC
llvm-svn: 260934
Craig Topper [Tue, 16 Feb 2016 04:24:54 +0000 (04:24 +0000)]
[TableGen] Remove unused member variable. NFC
llvm-svn: 260933
Jason Molenda [Tue, 16 Feb 2016 04:20:56 +0000 (04:20 +0000)]
Fix buildbot failure because I got an include path wrong.
llvm-svn: 260932
Craig Topper [Tue, 16 Feb 2016 04:17:42 +0000 (04:17 +0000)]
Remove an unnecessary std::move to fix -Wpessimizing-move warning.
llvm-svn: 260931
Jason Molenda [Tue, 16 Feb 2016 04:14:33 +0000 (04:14 +0000)]
Add -Wimplicit-fallthrough command line option to clang in
the xcode project file to catch switch statements that have a
case that falls through unintentionally.
Define LLVM_FALLTHROUGH to indicate instances where a case has code
and intends to fall through. This should be in llvm/Support/Compiler.h;
Peter Collingbourne originally checked in there (r237766), then
reverted (r237941) because he didn't have time to mark up all the
'case' statements that were intended to fall through. I put together
a patch to get this back in llvm http://reviews.llvm.org/D17063 but
it hasn't been approved in the past week. I added a new
lldb-private-defines.h to hold the definition for now.
Every place in lldb where there is a comment that the fall-through
is intentional, I added LLVM_FALLTHROUGH to silence the warning.
I haven't tried to identify whether the fallthrough is a bug or
not in the other places.
I haven't tried to add this to the cmake option build flags.
This warning will only work for clang.
This build cleanly (with some new warnings) on macosx with clang
under xcodebuild, but if this causes problems for people on other
configurations, I'll back it out.
llvm-svn: 260930
NAKAMURA Takumi [Tue, 16 Feb 2016 03:17:13 +0000 (03:17 +0000)]
clang/test/Driver/ps4-linker-win.c: Tweak substitutions if %PATH% ends with '\\', or lit complains with "parser error".
llvm-svn: 260929
Craig Topper [Tue, 16 Feb 2016 02:48:30 +0000 (02:48 +0000)]
[TableGen] Use range-based for loop. NFC
llvm-svn: 260928
Vedant Kumar [Tue, 16 Feb 2016 02:14:44 +0000 (02:14 +0000)]
Simplify users of StringRef::{l,r}trim (clang) (NFC)
r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in clang.
llvm-svn: 260927
Vedant Kumar [Tue, 16 Feb 2016 02:06:01 +0000 (02:06 +0000)]
Simplify users of StringRef::{l,r}trim (NFC)
r260925 introduced a version of the *trim methods which is preferable
when trimming a single kind of character. Update all users in llvm.
llvm-svn: 260926
Vedant Kumar [Tue, 16 Feb 2016 01:48:39 +0000 (01:48 +0000)]
[ADT] Add StringRef::{l,r}trim(char) overloads (NFC)
Add support for trimming a single kind of character from a StringRef.
This makes the common case of trimming null bytes much neater. It's also
probably a bit speedier too, since it avoids creating a std::bitset in
find_{first,last}_not_of.
llvm-svn: 260925
Quentin Colombet [Tue, 16 Feb 2016 01:38:09 +0000 (01:38 +0000)]
[GlobalISel][IRTranslator] Override getPassName.
llvm-svn: 260924
Quentin Colombet [Tue, 16 Feb 2016 01:05:16 +0000 (01:05 +0000)]
[GlobalISel] Add missing file in previous commit.
llvm-svn: 260923
Quentin Colombet [Tue, 16 Feb 2016 00:57:44 +0000 (00:57 +0000)]
[GlobalISel] Get rid of the ifdefs in TargetLowering.
Introduce a new API used only by GlobalISel: CallLowering.
This API will contain target hooks dedicated to call lowering.
llvm-svn: 260922
Akira Hatanaka [Tue, 16 Feb 2016 00:46:03 +0000 (00:46 +0000)]
Remove unnecessary regex in the test cases I fixed in r260496.
llvm-svn: 260921
Amaury Sechet [Tue, 16 Feb 2016 00:23:52 +0000 (00:23 +0000)]
Deprecate LLVMGetDataLayout and replace it by LLVMGetDataLayoutStr
Summary: The name is confusing as it matche another method on the module.
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17283
llvm-svn: 260920
Amaury Sechet [Tue, 16 Feb 2016 00:22:02 +0000 (00:22 +0000)]
Kill LLVMAddTargetData
Summary: It's red, it's dead.
Reviewers: joker.eph, Wallbraker, echristo
Subscribers: llvm-commits, axw
Differential Revision: http://reviews.llvm.org/D17282
llvm-svn: 260919
NAKAMURA Takumi [Tue, 16 Feb 2016 00:17:56 +0000 (00:17 +0000)]
MITests: Update libdeps. llvm/Target/TargetOptions.h depends on MC.
llvm-svn: 260918
Zia Ansari [Mon, 15 Feb 2016 23:44:13 +0000 (23:44 +0000)]
Implemented stack symbol table ordering/packing optimization to improve data locality and code size from SP/FP offset encoding.
Differential Revision: http://reviews.llvm.org/D15393
llvm-svn: 260917
Amaury Sechet [Mon, 15 Feb 2016 23:40:06 +0000 (23:40 +0000)]
Rename LLVMSetDataLayout's argument to match what they stand for
llvm-svn: 260916
Matthias Braun [Mon, 15 Feb 2016 22:09:38 +0000 (22:09 +0000)]
unittests/MI: Add Core library reference
llvm-svn: 260915
Saleem Abdulrasool [Mon, 15 Feb 2016 21:50:28 +0000 (21:50 +0000)]
Silence some clang warnings
Silences -Wmissing-brace and -Wformat-pedantic warnings from clang on Linux. NFC.
llvm-svn: 260914
Matthias Braun [Mon, 15 Feb 2016 21:38:42 +0000 (21:38 +0000)]
SmallPtrSet: Avoid initializing Array in the small case.
This patch avoids the initial memset at the cost of making iterators
slightly more complex. This should be beneficial as most SmallPtrSets
hold no or only a few elements, while iterating over them is less
common.
Differential Revision: http://reviews.llvm.org/D16672
llvm-svn: 260913
Sylvestre Ledru [Mon, 15 Feb 2016 20:38:54 +0000 (20:38 +0000)]
fix an indent issue in the doc which causes sphinx to fail with some versions
llvm-svn: 260912
Matthias Braun [Mon, 15 Feb 2016 20:06:22 +0000 (20:06 +0000)]
APInt: Slightly simplify countLeadingZerosSlowCase()
We always clear the unused bits in the most signifant word so there is
no need to mask them out in countLeadingZerosSlowCase().
Differential Revision: http://reviews.llvm.org/D16621
llvm-svn: 260911
Matthias Braun [Mon, 15 Feb 2016 20:06:19 +0000 (20:06 +0000)]
APInt: Further simplify APInt::EqualSlowCase as suggested by Duncan
llvm-svn: 260910
Jim Ingham [Mon, 15 Feb 2016 20:04:15 +0000 (20:04 +0000)]
Refinement of r260624. It is possible somebody might try to add to the map
while we are finalizing its elements. Prevent that.
<rdar://problem/
24554920>
llvm-svn: 260909
Ahmed Bougacha [Mon, 15 Feb 2016 19:32:54 +0000 (19:32 +0000)]
[X86] Remove now-dead variable and redundant assert. NFC.
The variable was made dead in NDEBUG by r260901, but the assert
was redundant anyway: get rid of both.
llvm-svn: 260908
Matthias Braun [Mon, 15 Feb 2016 19:30:11 +0000 (19:30 +0000)]
Fix typo in LiveIntervalTest
llvm-svn: 260907
Matthias Braun [Mon, 15 Feb 2016 19:25:36 +0000 (19:25 +0000)]
LiveIntervalAnalysis: Support moving of subregister defs in handleMove
This is an updated version which fixes a bug that happened with
uses tied to an earlyclobber operand which end at an unusual slotindex.
If two definitions write to independent subregisters then they can be
put in any order. LiveIntervalAnalysis::handleMove() did not support
this previously because it looks like moving a definition of a vreg past
another one.
This is a modified version of a patch proposed (two years ago) by
Vincent Lejeune! This version does not touch the read-undef flags and is
extended for the case of moving a subregister def behind all uses - this
can happen for subregister defs that are completely unused.
Differential Revision: http://reviews.llvm.org/D9067
llvm-svn: 260906
Matthias Braun [Mon, 15 Feb 2016 19:25:34 +0000 (19:25 +0000)]
Add unittest for LiveIntervalAnalysis::handleMove()
llvm-svn: 260905
Matthias Braun [Mon, 15 Feb 2016 19:25:31 +0000 (19:25 +0000)]
MachineVerifier: Add parameter to choose if MachineFunction::verify() aborts
The abort on error behaviour is unpractical for debugger and unittest
usage.
llvm-svn: 260904
Colin LeMahieu [Mon, 15 Feb 2016 18:47:55 +0000 (18:47 +0000)]
[NFC] Fixing naming convention, lowercase start of function name.
llvm-svn: 260903
Colin LeMahieu [Mon, 15 Feb 2016 18:42:07 +0000 (18:42 +0000)]
[Hexagon] Wrapping all MCExprs inside MCOperands within HexagonMCExpr to simplify handling and allow flags on the expression.
llvm-svn: 260902
Ahmed Bougacha [Mon, 15 Feb 2016 18:07:29 +0000 (18:07 +0000)]
[CodeGen] Document and use getConstant's splat-building feature. NFC.
Differential Revision: http://reviews.llvm.org/D17229
llvm-svn: 260901
Simon Pilgrim [Mon, 15 Feb 2016 17:57:40 +0000 (17:57 +0000)]
[X86][SSE2] Regenerated sse2 tests
llvm-svn: 260900
Jonas Paulsson [Mon, 15 Feb 2016 16:43:15 +0000 (16:43 +0000)]
[ScheduleDAGInstrs] isUnsafeMemoryObject() removed
This function was basically useless, since volatile memacesses or MIs with
unmodelled sideffects become global memory objects, and the other little
checks are also done elsewhere.
Reviewed by Andy Trick
http://reviews.llvm.org/D16881
llvm-svn: 260899
Tim Northover [Mon, 15 Feb 2016 16:38:10 +0000 (16:38 +0000)]
Darwin: fix stdlib handling when CLANG_DEFAULT_STDLIB is set
I'd accidentally skipped the CMake check in a premature optimisation. I'd also
put the original test in completely the wrong place.
Thanks Jonas Hahnfeld!
llvm-svn: 260898
Krzysztof Parzyszek [Mon, 15 Feb 2016 16:15:02 +0000 (16:15 +0000)]
[Hexagon] Missed testcase update in r260895
llvm-svn: 260897
Scott Egerton [Mon, 15 Feb 2016 16:11:51 +0000 (16:11 +0000)]
[mips] Implemented the .hword directive.
Summary:
In order to pass the tests, this required marking R_MIPS_16 relocations
as needing to point to the symbol and not the section.
Reviewers: vkalintiris, dsanders
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D17200
llvm-svn: 260896
Krzysztof Parzyszek [Mon, 15 Feb 2016 16:01:01 +0000 (16:01 +0000)]
[Hexagon] Use zero-extending loads for anyext
llvm-svn: 260895
Silviu Baranga [Mon, 15 Feb 2016 15:38:17 +0000 (15:38 +0000)]
[LV] Add support for insertelt/extractelt processing during type truncation
Summary:
While shrinking types according to the required bits, we can
encounter insert/extract element instructions. This will cause us to
reach an llvm_unreachable statement.
This change adds support for truncating insert/extract element
operations, and adds a regression test.
Reviewers: jmolloy
Subscribers: mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D17078
llvm-svn: 260893
Roman Gareev [Mon, 15 Feb 2016 14:48:50 +0000 (14:48 +0000)]
Tweak the LICM code to reuse the first sub-loop instead of creating a new one
LICM starts with an *empty* AST, and then merges in each sub-loop. While the
add code is appropriate for sub-loop 2 and up, it's utterly unnecessary for
sub-loop 1. If the AST starts off empty, we can just clone/move the contents
of the subloop into the containing AST.
Reviewed-by: Philip Reames <listmail@philipreames.com>
Differential Revision: http://reviews.llvm.org/D16753
llvm-svn: 260892
Simon Pilgrim [Mon, 15 Feb 2016 14:09:35 +0000 (14:09 +0000)]
[X86] More thorough partial-register division checks
For when grep counts are just not enough...
llvm-svn: 260891
Simon Pilgrim [Mon, 15 Feb 2016 14:04:05 +0000 (14:04 +0000)]
[X86] Regenerated 64/128 bit multiply tests
llvm-svn: 260890
Simon Pilgrim [Mon, 15 Feb 2016 13:50:48 +0000 (13:50 +0000)]
[X86][SSE] More thorough testing of all-ones vectors re-materialization
llvm-svn: 260889
Simon Pilgrim [Mon, 15 Feb 2016 13:41:41 +0000 (13:41 +0000)]
[X86][SSE] Regenerated uint2fp special case tests
llvm-svn: 260888
NAKAMURA Takumi [Mon, 15 Feb 2016 13:19:13 +0000 (13:19 +0000)]
Make llvm/test/tools/llvm-symbolizer/pdb/pdb.test Py3-compatible.
llvm-svn: 260887
Johannes Doerfert [Mon, 15 Feb 2016 12:42:05 +0000 (12:42 +0000)]
[FIX] Check the next base pointer for possible invariant loads
A load can only be invariant if its base pointer is invariant too. To
this end, we check if the base pointer is defined inside the region or
outside. In the former case we recursively check if we can (and
therefore will) hoist the base pointer too. Only if that happends we
can hoist the load.
llvm-svn: 260886
Simon Pilgrim [Mon, 15 Feb 2016 12:32:16 +0000 (12:32 +0000)]
[X86][SSE] Regenerated fast isel intrinsics tests
llvm-svn: 260885
Johannes Doerfert [Mon, 15 Feb 2016 12:21:11 +0000 (12:21 +0000)]
Revert "[FIX] Hoist accesses if AA stated they are invariant"
This reverts commit
98efa006c96ac981c00d2e386ec1102bce9f549a.
The fix was broken since we do not use AA in the ScopDetection anymore to
check for invariant accesses.
llvm-svn: 260884
Jonas Hahnfeld [Mon, 15 Feb 2016 11:28:15 +0000 (11:28 +0000)]
[compiler-rt] Fix test failures when switching default C++ library
1. Add two explicit -stdlib=libstdc++ in conjunction with -static-libstdc++
2. Pass -nostdinc++ when adding include paths for libc++ built for tsan. This
prevents clang finding the headers twice which would confuse #include_next
Differential Revision: http://reviews.llvm.org/D17189
llvm-svn: 260883
Andrey Bokhanko [Mon, 15 Feb 2016 10:44:27 +0000 (10:44 +0000)]
PR26449: Tests for builtin_classify_type fix
In my previous commit (rL260881) I forget to svn add tests. This commit adds
them.
Differential Revision: http://reviews.llvm.org/D16846
llvm-svn: 260882
Andrey Bokhanko [Mon, 15 Feb 2016 10:39:04 +0000 (10:39 +0000)]
PR26449: Fixes for bugs in __builtin_classify_type implementation
This patch fixes the following bugs in __builtin_classify_type implementation:
1) Support for member functions and fields
2) Same behavior as GCC in C mode (specifically, return integer_type_class for
enums and pointer_type_class for function pointers and arrays). Behavior in
C++ mode didn't changed.
Also, it refactors the whole implementation, by replacing a sequence of
if-else-if with a couple of switches.
Differential Revision: http://reviews.llvm.org/D16846
llvm-svn: 260881
Scott Egerton [Mon, 15 Feb 2016 10:04:38 +0000 (10:04 +0000)]
Reverted r260879 as it caused test failures in lld.
llvm-svn: 260880
Scott Egerton [Mon, 15 Feb 2016 09:34:15 +0000 (09:34 +0000)]
[mips] Removed the SHF_ALLOC flag from the .pdr section.
Summary:
This section is used for debug information and has no need to be
in memory at runtime. With this patch, LLVM now emits the same flags as
the GNU assembler. This patch also fixes an error when compiling
the Linux kernel, The error is that there are relocations within the
.pdr section in a VDSO.
Reviewers: vkalintiris, dsanders
Subscribers: llvm-commits, dsanders
Differential Revision: http://reviews.llvm.org/D17199
llvm-svn: 260879
Igor Breger [Mon, 15 Feb 2016 08:25:28 +0000 (08:25 +0000)]
AVX512: Change store size of kmask. Store size of v8i1, v4i1 , v2i1 and i1 are changed to 16 bits.
If KMOVB not supported (require AVX512DQ) only KMOVW can be used so store size should be 2 bytes.
Differential Revision: http://reviews.llvm.org/D17138
llvm-svn: 260878
Alexey Bataev [Mon, 15 Feb 2016 08:07:17 +0000 (08:07 +0000)]
[OPENMP] Remove extra sync barriers for 'firstprivate' clause.
Sync barrier will be emitted after generation of firstprivate variables
only if one of the firstprivate vars is used in lastprivate clause.
llvm-svn: 260877
Zia Ansari [Mon, 15 Feb 2016 05:11:51 +0000 (05:11 +0000)]
Fixed non-NULL terminating array bug in SanitizerCommon.StartSubprocessTest that caused them to fail sometimes and act flaky.
Differential Revision: http://reviews.llvm.org/D17228
llvm-svn: 260876
Junmo Park [Mon, 15 Feb 2016 04:30:37 +0000 (04:30 +0000)]
Minor code cleanups. NFC.
llvm-svn: 260875
NAKAMURA Takumi [Mon, 15 Feb 2016 04:29:36 +0000 (04:29 +0000)]
clangIndex requires LLVMIR as Core, since r260858 uses llvm/IR.
llvm-svn: 260874
Felix Berger [Mon, 15 Feb 2016 04:27:56 +0000 (04:27 +0000)]
[clang-tidy] ClangTidy check to flag uninitialized builtin and pointer fields.
Summary:
This patch is a continuation of http://reviews.llvm.org/D10553 by Jonathan B Coe.
The main additions are:
1. For C++11 the check suggests in-class field initialization as fix. This
makes the fields future proof towards the addition of new constructors.
2 For older language versions the fields are added in the right position
in the initializer list with more tests.
3. User documentation.
Reviewers: alexfh, jbcoe
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D16517
llvm-svn: 260873
Felix Berger [Mon, 15 Feb 2016 04:00:39 +0000 (04:00 +0000)]
Add isAnyPointer() matchers. Register missing matchers.
Summary:
The isAnyPointer() matcher is useful for http://reviews.llvm.org/D15623.
Reviewers: alexfh, klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15819
llvm-svn: 260872
Saleem Abdulrasool [Mon, 15 Feb 2016 03:45:18 +0000 (03:45 +0000)]
ELF: silence -Wcast-qual warnings from GCC
Silence 4 -Wcast-qual warnings from GCC 5.1. NFC.
llvm-svn: 260871
Felix Berger [Mon, 15 Feb 2016 03:36:23 +0000 (03:36 +0000)]
[clang-tidy] Only invoke ForRangeCopyCheck on expensive-to-copy types.
Summary:
Fix oversight not checking the value of the Optional<bool> returned by
isExpensiveToCopy().
Reviewers: alexfh
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D17064
llvm-svn: 260870
Felix Berger [Mon, 15 Feb 2016 03:27:54 +0000 (03:27 +0000)]
Improve documentation
llvm-svn: 260869
Saleem Abdulrasool [Mon, 15 Feb 2016 03:23:14 +0000 (03:23 +0000)]
ExpressionParser: silence some GCC warnings
Silence a -Wreorder warning about order of member initialization and a
-Wqual-cast warning about casting away constness. NFC.
llvm-svn: 260868
Saleem Abdulrasool [Mon, 15 Feb 2016 01:51:24 +0000 (01:51 +0000)]
Sema: prevent assertion on stack return checking
In the case that the array indexing itself is within a type dependent context,
bail out of the evaluation. We would previously try to symbolically evaluate
the expression which would then try to evaluate a non-address expression as an
address, triggering an assertion in Asserts builds.
We only need to consider the array subscript expression itself as in the case
that the base itself being type dependent is handled appropriately in EvalAddr.
Resolves PR26599.
llvm-svn: 260867
Argyrios Kyrtzidis [Mon, 15 Feb 2016 01:32:36 +0000 (01:32 +0000)]
[AST/index] Introduce an option 'SuppressTemplateArgsInCXXConstructors' in printing policy.
Enable it for USRs and names when indexing.
Forward references can have different template argument names; including them
makes USRs and names unstable, since the name depends on whether we saw a forward reference or not.
llvm-svn: 260866
Saleem Abdulrasool [Mon, 15 Feb 2016 00:36:52 +0000 (00:36 +0000)]
silence -Wreturn-type warnings
These codepaths would generate warnings with GCC on linux even though the switch
was covered. Add llvm_unreachable markers to indicate that the switch should be
covered. NFC.
llvm-svn: 260865
Saleem Abdulrasool [Mon, 15 Feb 2016 00:36:49 +0000 (00:36 +0000)]
Sema: constify EvalAddr, EvalVal
Propagate const throughout these methods as they are non-mutating analyzers of
state. NFC.
llvm-svn: 260864
Hongbin Zheng [Mon, 15 Feb 2016 00:20:58 +0000 (00:20 +0000)]
[Refactor] Eliminate the global variable "InsnToMemAcc".
Eliminate the global variable "InsnToMemAcc" to make Scop/ScopInfo become
more protable, such that we can safely use them in a CallGraphSCC pass.
Differential Revision: http://reviews.llvm.org/D17238
llvm-svn: 260863
Johannes Doerfert [Sun, 14 Feb 2016 23:37:14 +0000 (23:37 +0000)]
[FIX] Hoist accesses if AA stated they are invariant
Before this patch it could happen that we did not hoist a load that
was a base pointer of another load even though AA already declared the
first one as invariant (during ScopDetection). If this case arises we
will now skipt the "can be overwriten" check because in this case the
over-approximating nature causes us to generate broken code.
llvm-svn: 260862
Argyrios Kyrtzidis [Sun, 14 Feb 2016 22:38:38 +0000 (22:38 +0000)]
[test/Index] Set a specific target for the test.
llvm-svn: 260861
Johannes Doerfert [Sun, 14 Feb 2016 22:31:39 +0000 (22:31 +0000)]
Split ScopArrayInfo::updateSizes into two functions
The former ScopArrayInfo::updateSizes was implicitly divided into an
updateElementType and an updateSizes. Now this partitioning is
explicit.
llvm-svn: 260860
Johannes Doerfert [Sun, 14 Feb 2016 22:30:56 +0000 (22:30 +0000)]
Separate more constant factors of parameters
So far we separated constant factors from multiplications, however,
only when they are at the outermost level of a parameter SCEV. Now,
we also separate constant factors from the parameter SCEV if the
outermost expression is a SCEVAddRecExpr. With the changes to the
SCEVAffinator we can now improve the extractConstantFactor(...)
function at will without worrying about any other code part. Thus,
if needed we can implement a more comprehensive
extractConstantFactor(...) function that will traverse the SCEV
instead of looking only at the outermost level.
Four test cases were affected. One did not change much and the other
three were simplified.
llvm-svn: 260859
Argyrios Kyrtzidis [Sun, 14 Feb 2016 22:30:14 +0000 (22:30 +0000)]
[index] Factor libclang's functionality to determing the mangled name of symbols into the clangIndex library.
llvm-svn: 260858
Tobias Grosser [Sun, 14 Feb 2016 20:56:49 +0000 (20:56 +0000)]
CodeGeneration: Add back verification of generated code
This got accidentally dropped in r260025
llvm-svn: 260857
Sylvestre Ledru [Sun, 14 Feb 2016 20:20:58 +0000 (20:20 +0000)]
Fix some typos in the clang doc
llvm-svn: 260856
Sylvestre Ledru [Sun, 14 Feb 2016 20:16:22 +0000 (20:16 +0000)]
Fix some typos in the llvm doc
llvm-svn: 260855
Tobias Grosser [Sun, 14 Feb 2016 19:59:29 +0000 (19:59 +0000)]
Revert "[ScopDectect] Allow memory accesses with different element types by default"
This reverts commit https://llvm.org/svn/llvm-project/polly/trunk@260853
We unfortunately still have two bugs left which show only up with
-polly-process-unprofitable and which I forgot to test before committing.
llvm-svn: 260854
Tobias Grosser [Sun, 14 Feb 2016 19:11:16 +0000 (19:11 +0000)]
[ScopDectect] Allow memory accesses with different element types by default
First support for this feature was committed in r259784. Support for
loop invariant load hoisting with different types was added by Johannes
Doerfert in r260045. This fixed the last known bug.
llvm-svn: 260853
Simon Pilgrim [Sun, 14 Feb 2016 18:11:52 +0000 (18:11 +0000)]
[X86][AVX] Fixed copy+paste typo in shuffle test
llvm-svn: 260852
Dimitry Andric [Sun, 14 Feb 2016 16:08:20 +0000 (16:08 +0000)]
As reported in https://llvm.org/bugs/show_bug.cgi?id=25496, on FreeBSD,
C++ programs compiled for profiling (using `-pg`) should be linked with
`-lc++_p` (or `-lstdc++_p`, depending on the `-stdlib=` setting), not
with the regular C++ libraries.
Add a `FreeBSD::AddCXXStdlibLibArgs()` override to handle this, and add
a test case for it. While here, extend the test case for the proper
passing of -lm and -lm_p.
Reviewers: compnerd, davide, dws, emaste
Reviewed By: compnerd
Differential Revision: http://reviews.llvm.org/D16264
llvm-svn: 260851
Benjamin Kramer [Sun, 14 Feb 2016 13:18:06 +0000 (13:18 +0000)]
Don't leak the ASTUnit when done with testing.
Found by lsan.
llvm-svn: 260850
Amaury Sechet [Sun, 14 Feb 2016 10:06:34 +0000 (10:06 +0000)]
Use report_fatal_error more consistently in the C API echo test
llvm-svn: 260849
Amaury Sechet [Sun, 14 Feb 2016 09:30:42 +0000 (09:30 +0000)]
Get constant cloning out of CloneValue so it can be used when creating globals.
llvm-svn: 260848
NAKAMURA Takumi [Sun, 14 Feb 2016 09:19:04 +0000 (09:19 +0000)]
c-index-test: Fix libdeps corresponding to r260841.
llvm-svn: 260847
Amaury Sechet [Sun, 14 Feb 2016 09:14:30 +0000 (09:14 +0000)]
Move clone_params around
llvm-svn: 260846
Amaury Sechet [Sun, 14 Feb 2016 08:58:49 +0000 (08:58 +0000)]
Fix star alignment in Core.h
llvm-svn: 260845
Argyrios Kyrtzidis [Sun, 14 Feb 2016 07:08:31 +0000 (07:08 +0000)]
[c-index-test] Fix a gcc build error.
llvm-svn: 260844