Commit Graph

208431 Commits

Author SHA1 Message Date
Yaron Keren 4da1a3754a Revert the 32bit part of r245084; mingw values were correct before it.
llvm-svn: 245618
2015-08-20 21:36:14 +00:00
Tobias Grosser daaed0e19f Do not intersect with AssumedContext in calculateMinMaxAccess
Originally, we intersected the iteration space with the AssumedContext before
computing the minimal/maximal memory offset in our run-time alias checks. With
this patch we drop this intersection as the AssumedContext can - for larger or
more complex scops - become very complicated (contain many disjuncts). When
intersecting an object with many disjuncts with other objects, the number of
disjuncts in these other objects also increases quickly. As a result, the
compile time is unnecessarily increased. This patch now drops the intersection
with the assumed context to ensure we do not pay unnecessary compile time
costs.

With this patch we see -3.17% reduction in compile time for 3mm with default
flags and -17.87% when compiling 3mm with -DPOLYBENCH_USE_C99_PROTO flag. We
did not observe any regressions in LNT.

Contributed-by: Pratik Bhatu <cs12b1010@iith.ac.in>

Reviewers: grosser

Differential Revision: http://reviews.llvm.org/D12198

llvm-svn: 245617
2015-08-20 21:29:26 +00:00
Aaron Ballman 6569387327 Do not crash when static analysis encounters a FunctionDecl that has a delayed template parse of its body.
llvm-svn: 245616
2015-08-20 21:27:35 +00:00
Adhemerval Zanella d46da9ac31 [asan] Fix build issue from r245596
This patch fixes the build issue for:

sanitizer_platform.h:88:4: error: #error "invalid SANITIZER_AARCH64_VMA size"

llvm-svn: 245614
2015-08-20 21:06:26 +00:00
Ahmed Bougacha 0cdc7719f0 [X86] Look for scalar through one bitcast when lowering to VBROADCAST.
Fixes PR23464: one way to use the broadcast intrinsics is:

  _mm256_broadcastw_epi16(_mm_cvtsi32_si128(*(int*)src));

We don't currently fold this, but now that we use native IR for
the intrinsics (r245605), we can look through one bitcast to find
the broadcast scalar.

Differential Revision: http://reviews.llvm.org/D10557

llvm-svn: 245613
2015-08-20 21:02:39 +00:00
Ahmed Bougacha 69a17acb74 [X86] Add some broadcast-from-memory tests.
llvm-svn: 245612
2015-08-20 20:59:41 +00:00
Jingyue Wu ca3ef11a9b [NVPTX] truncating 64-bit to 32-bit is free
Summary:
Add an LSR test that exercises isTruncateFree. Without this change, LSR creates
another indvar representing the truncated value.

Reviewers: jholewinski, eliben

Subscribers: jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D12058

llvm-svn: 245611
2015-08-20 20:59:02 +00:00
Chaoren Lin ee3c206021 Inline fake snprintf to avoid linkage issues on Windows.
Summary:
dllexport doesn't work if linking against a static library with its own
copy of snprintf.

Reviewers: zturner

Subscribers: zturner, lldb-commits

Differential Revision: http://reviews.llvm.org/D12206

llvm-svn: 245610
2015-08-20 20:53:15 +00:00
Richard Smith 419bb33b0b PR24483: Delete some dead/incorrect code that triggered assertions.
llvm-svn: 245609
2015-08-20 20:45:25 +00:00
Stephane Sezer 03fc3f7657 Fix some format strings in ProcessGDBRemote.cpp.
Summary: Size specifier should come after `%` not before.

Reviewers: clayborg, ADodds

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12203

llvm-svn: 245608
2015-08-20 20:43:29 +00:00
Yaron Keren 7a4062eaf9 Fix test on Windows to accept both gcc and gcc.exe.
llvm-svn: 245607
2015-08-20 20:37:58 +00:00
Ahmed Bougacha 1a498705e4 [X86] Replace avx2 broadcast intrinsics with native IR.
Since r245605, the clang headers don't use these anymore.
r245165 updated some of the tests already; update the others, add
an autoupgrade, remove the intrinsics, and cleanup the definitions.

Differential Revision: http://reviews.llvm.org/D10555

llvm-svn: 245606
2015-08-20 20:36:19 +00:00
Ahmed Bougacha 5e354cb547 [Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.
This lets us optimize them better. We agreed to remove the intrinsics,
instead of combining them later, as, at -O0, we generate the expected
instructions. Plus, it's a nice cleanup.

Differential Revision: http://reviews.llvm.org/D10556

llvm-svn: 245605
2015-08-20 20:27:21 +00:00
Chris Bieneman 6511eb5194 [CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.
In CMake variables that haven't been set are evaluated to empty strings, so we don't need to set the variables to empty strings.

llvm-svn: 245604
2015-08-20 20:12:20 +00:00
Chris Bieneman eb0e518923 [CMake] Exclude 'bootstrap' target from 'all' where possible.
EXCLUDE_FROM_ALL in ExternalProject is only available on CMake 3.1 and later.

llvm-svn: 245603
2015-08-20 20:12:18 +00:00
Jonathan Peyton 621743b90e Update z_Linux_asm.s to use platform macros
z_Linux_asm.s can use the KMP_OS_* / KMP_MIC macros instead of the predefined
compiler macro checks.  The macro logic to determine KMP_MIC is moved from
kmp_os.h to kmp_platform.h.

llvm-svn: 245602
2015-08-20 19:46:14 +00:00
Eric Fiselier 30ec17981a Remove completed items from TODO.TXT
llvm-svn: 245601
2015-08-20 19:22:35 +00:00
Aaron Ballman 7fc9feac3e Change the test to use the new python script instead of the more verbose RUN line.
llvm-svn: 245600
2015-08-20 19:21:07 +00:00
Tobias Grosser fc490a99f5 Do really not unroll the vector loop in combination with register tiling
The previous commit lacked a test case for register tiling + pre-vectorization
and we obviously got it immediately wrong.

llvm-svn: 245599
2015-08-20 19:08:16 +00:00
Tobias Grosser d83b8a83ec Add option to control reduction detection
llvm-svn: 245598
2015-08-20 19:08:11 +00:00
Tobias Grosser 40985016b2 Fix formatting
llvm-svn: 245597
2015-08-20 19:08:05 +00:00
Adhemerval Zanella eccc939e34 [asan] Enable ASan for AArch64/42-bit VMA
This patch adds support for asan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels).  The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt.  The default VMA is 39 bits.

For 42-bit VMA aarch64 uses SANITIZIER_CAN_USER_ALLOCATOR64.

llvm-svn: 245596
2015-08-20 18:49:40 +00:00
Douglas Katzman 38857551b5 [Sparc] Add '-EL' when invoking gcc to link little-endian binaries.
Differential Revision: http://reviews.llvm.org/D12201

llvm-svn: 245595
2015-08-20 18:32:26 +00:00
Adhemerval Zanella e00b497242 [asan] Add ASAN support for AArch64 42-bit VMA
This patch adds support for asan on aarch64-linux with 42-bit VMA
(current default config for 64K pagesize kernels).  The support is
enabled by defining the SANITIZER_AARCH64_VMA to 42 at build time
for both clang/llvm and compiler-rt.  The default VMA is 39 bits.

llvm-svn: 245594
2015-08-20 18:30:40 +00:00
Johannes Doerfert 120de4be96 Simplify the SCoP creation and bookkeeping
To avoid multiple exits and the resulting complicated conditions when
  creating a SCoP we now use the single hasFeasibleRuntimeContext()
  check to decide if a SCoP should be dismissed right after
  construction. If building runtime checks failed the assumed context is
  made infeasible, hence the optimized version will never be executed
  and the SCoP can be dismissed.

llvm-svn: 245593
2015-08-20 18:30:08 +00:00
Artem Belevich 7230a22d5e Revert r245496 "[CUDA] Add appropriate host/device attribute to builtins."
It's breaking internal test.

llvm-svn: 245592
2015-08-20 18:28:56 +00:00
Jingyue Wu 10fcea5d4b [ValueTracking] computeOverflowForSignedAdd and isKnownNonNegative
Summary:
Refactor, NFC

Extracts computeOverflowForSignedAdd and isKnownNonNegative from NaryReassociate to ValueTracking in case
others need it.

Reviewers: reames

Subscribers: majnemer, llvm-commits

Differential Revision: http://reviews.llvm.org/D11313

llvm-svn: 245591
2015-08-20 18:27:04 +00:00
Bruno Cardoso Lopes ed6b9bfeab [LVI] Avoid iterator invalidation in LazyValueInfoCache::threadEdge
Do that by copying out the elements to another SmallPtrSet.
Follow up from r245309.

llvm-svn: 245590
2015-08-20 18:24:54 +00:00
Adrian Prantl baf90fc265 Fix a bug that caused SimplifyCFG to drop DebugLocs.
Instruction::dropUnknownMetadata(KnownSet) is supposed to preserve all
metadata in KnownSet, but the condition for DebugLocs was inverted.

Most users of dropUnknownMetadata() actually worked around this by not
adding LLVMContext::MD_dbg to their list of KnowIDs.
This is now made explicit.

llvm-svn: 245589
2015-08-20 18:24:02 +00:00
Adrian Prantl a317cd2583 Fix a debug location handling bug in GVN.
Caught by the famous "DebugLoc describes the currect SubProgram" assertion.

When GVN is removing a nonlocal load it updates the debug location of the
SSA value it replaced the load with with the one of the load. In the
testcase this actually overwrites a valid debug location with an empty one.

In reality GVN has to make an arbitrary choice between two equally valid
debug locations. This patch changes to behavior to only update the
location if the value doesn't already have a debug location.

llvm-svn: 245588
2015-08-20 18:23:56 +00:00
Alexander Kornienko 8e9110c160 [clang-tidy] Mention check_clang_tidy.py instead of check_clang_tidy.sh in the docs.
llvm-svn: 245587
2015-08-20 18:16:13 +00:00
Alexander Kornienko a7970eb424 [clang-tidy] Use check_clang_tidy.py instead of check_clang_tidy.sh by default.
llvm-svn: 245586
2015-08-20 18:11:13 +00:00
Johannes Doerfert 5d5b30649a Check feasibility for the runtime check context wrt. the domain.
If nothing is executed we can bail out early. Otherwise we can use the
  constraints that ensure at least one statement is executed for
  simplification.

llvm-svn: 245585
2015-08-20 18:06:30 +00:00
Johannes Doerfert 4eed5bea54 Link ScopArrayInfo objects
We will record if a SAI is the base of another SAI or derived from it.
  This will allow to reason about indirect base pointers later on and
  allows a clearer picture of indirection also in the SCoP dump.

llvm-svn: 245584
2015-08-20 18:04:22 +00:00
Alexander Kornienko 43556bb7f0 [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests.
Summary:
Add check_clang_tidy.py script that is functionally identical to the
check_clang_tidy.py, but should also be functional on windows.

I've verified that the script works on linux. Would be nice if folks using
Windows could test the patch before I break windows bots ;)

Reviewers: chapuni, aaron.ballman

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12180

llvm-svn: 245583
2015-08-20 17:58:07 +00:00
Chris Bieneman 2335bb7e16 [CMake] Fixing r245581 based on feedback from Filcab.
llvm-svn: 245582
2015-08-20 17:46:58 +00:00
Chris Bieneman 73107c6122 [CMake] [OS X] Don't require command line tools installations for running compiler-rt tests.
If you're on an Apple platform and /usr/include doesn't exist, we should set a sysroot flag when calling clang.

llvm-svn: 245581
2015-08-20 17:35:56 +00:00
Chris Bieneman 5eae197ab0 [CMake] Fix building unit tests on Darwin
Summary:
There are a number of issues with unit tests on Darwin. These patches address the following:
* Unit tests should be passed -arch (-m32/-m64 isn't sufficient)
* Unit tests should be passed ${DARWIN_osx_CFLAGS} because they're being built for OS X
* Test architectures should be filtered based on base system capabilities (i.e. don't try running x86_64h tests on pre-haswell hardware).

Reviewers: bogner, filcab, kubabrecka

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12174

llvm-svn: 245580
2015-08-20 17:32:06 +00:00
Adam Nemet e48134093d [LVer] Fix FIXME: hide addPHINodes, NFC
Since Ashutosh made findDefsUsedOutsideOfLoop public, we can clean this
up.

Now clients that don't compute DefsUsedOutsideOfLoop can just call
versionLoop() and computing DefsUsedOutsideOfLoop will happen
implicitly.  With that there is no reason to expose addPHINodes anymore.

Ashutosh, you can now drop the calls to findDefsUsedOutsideOfLoop and
addPHINodes in LVerLICM and things should just work.

llvm-svn: 245579
2015-08-20 17:22:29 +00:00
James Molloy bf17009a97 [ARM] Don't try and custom lower a vNi64 SETCC.
It won't go well. We've already marked 64-bit SETCCs as non-Custom, but it's just possible that a SETCC has a legal result type but an illegal operand type. If this happens, bail out before we create unselectable nodes.

Fixes PR24292. I tried to create a testcase but in 99% of cases we can't trigger this - not surprising that this bug has been latent since 2009.

llvm-svn: 245577
2015-08-20 16:33:44 +00:00
Rafael Espindola c30c7c493f Fix symbol value computation when part of the expression is weak.
This matches the behaviour of the gnu assembler and is part of
fixing pr24486.

llvm-svn: 245576
2015-08-20 16:18:30 +00:00
Douglas Katzman 58195a2d74 [Sparc]: correct the 'set' synthetic instruction
Differential Revision: http://reviews.llvm.org/D12194

llvm-svn: 245575
2015-08-20 16:16:16 +00:00
Aaron Ballman 9392ced263 Add a new clang-tidy check (misc-move-constructor-init) that diagnoses move constructor initializations that call copy constructors instead of move constructors.
llvm-svn: 245571
2015-08-20 15:52:52 +00:00
Balaram Makam ccf59731e3 Optimize bitwise even/odd test (-x&1 -> x&1) to not use negation.
Summary: We know that -x & 1 is equivalent to x & 1, avoid using negation for testing if a negative integer is even or odd.

Reviewers: majnemer

Subscribers: junbuml, mssimpso, gberry, mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D12156

llvm-svn: 245569
2015-08-20 15:35:00 +00:00
NAKAMURA Takumi ae6b329c8f Tweak clang-tidy-diff.py to pass JSON argument correctly to clang-tidy on win32 arg parser.
- Single quotation is not recognized.
  - Use """ to pass a double quotation.

It also reverts r211831.

llvm-svn: 245567
2015-08-20 15:04:46 +00:00
NAKAMURA Takumi 1544a819b7 Tweak clang-tools-extra/test/clang-tidy/file-filter.cpp to pass on win32.
FIXME: "-I %S/Inputs/file-filter/system/.." must be redundant.
On Win32, file-filter/system\system-header1.h precedes file-filter\header*.h due to code order between '/' and '\\'.

We should remove such a tweak to introduce the *right* path canonicalization.

Posix:
  file-filter/header*.h
  file-filter/system/system-header1.h

Win32:
  file-filter/system\system-header1.h
  file-filter\header*.h

Win32, tweaked:
  file-filter/system/..\header*.h
  file-filter/system\system-header1.h

It had been disabled since r220837.

llvm-svn: 245566
2015-08-20 15:04:39 +00:00
NAKAMURA Takumi ba598b5581 clang-tools-extra/test/lit.cfg: Prune an obsolete feature, python27. Now we requires python>=2.7.
clang-tools-extra/test/clang-tidy/clang-tidy-diff.cpp was the only user.

llvm-svn: 245565
2015-08-20 15:04:32 +00:00
Tobias Grosser 42e2489553 Add experimental support for trivial register tiling
Register tiling in Polly is for now just an additional level of tiling which
is fully unrolled. It is disabled by default. To make this useful for more than
experiments, we still need a cost function as well as possibly further
optimizations that teach LLVM to actually put some of the values we got into
scalar registers.

llvm-svn: 245564
2015-08-20 13:45:05 +00:00
Tobias Grosser 0483271662 Add support for two-level tiling
By default we only use one level of tiling for loops, but in general tiling
for multiple levels is trivial for us. Hence, we add a set of options that
allow people to play with a second level of tiling. If this is profitable for
some cases we can work on heuristics that allow us to identify these cases
and use two-level tiling for them.

llvm-svn: 245563
2015-08-20 13:45:02 +00:00
Aaron Ballman 2ec4928219 Silence a "not all control paths return a value" warning; NFC.
llvm-svn: 245562
2015-08-20 13:31:16 +00:00