Sanjay Patel [Wed, 23 Mar 2016 20:16:37 +0000 (20:16 +0000)]
[x86] make peekThroughBitcasts() a helper function
This should be hoisted further up so it can be used in DAGCombiner and other backends,
but I'm limiting the scope in the interest of patch minimalism.
It's not quite NFC because some of the replaced code was using an 'if' check rather
than a 'while' loop, so those cases would only look through a single bitcast.
llvm-svn: 264186
Chad Rosier [Wed, 23 Mar 2016 20:07:28 +0000 (20:07 +0000)]
[AArch64] Replace return 0 with return false. NFC.
llvm-svn: 264185
Richard Smith [Wed, 23 Mar 2016 20:07:07 +0000 (20:07 +0000)]
Make sure to perform dependent access checks when instantiating a
lambda-expression. We don't actually instantiate the closure type / operator()
in the template in order to produce the closure type / operator() in the
instantiation, so this isn't caught by the normal path.
llvm-svn: 264184
Kyle Butt [Wed, 23 Mar 2016 19:51:22 +0000 (19:51 +0000)]
Codegen: [PPC] Word Rotates are Zero Extending.
Add Word rotates to the list of instructions that are zero extending.
This allows them to be used in dot form to compare with zero.
llvm-svn: 264183
Nico Weber [Wed, 23 Mar 2016 18:46:57 +0000 (18:46 +0000)]
clang-cl: Fix remaining bugs in interaction of /Yc and /FI /showIncludes.
Instead of putting the /Yc header into ExtraDeps, give DependencyOutputOptions
a dedicated field for /Yc mode, and let HeaderIncludesCallback hang on to the
full DependencyOutputOptions object, not just ExtraDeps.
Reverts parts of r263352 that are now no longer needed.
llvm-svn: 264182
Davide Italiano [Wed, 23 Mar 2016 18:41:48 +0000 (18:41 +0000)]
[LTO] Keep linkonce symbols when required.
Similarly to how we do with linkonce_odr symbols already, but
change their linkage to weak.
llvm-svn: 264181
George Burgess IV [Wed, 23 Mar 2016 18:31:55 +0000 (18:31 +0000)]
Fix bugs in the MemorySSA walker.
There are a few bugs in the walker that this patch addresses.
Primarily:
- Caching can break when we have multiple BBs without phis
- We weren't optimizing some phis properly
- Because of how the DFS iterator works, there were times where we
wouldn't cache any results of our DFS
I left the test cases with FIXMEs in, because I'm not sure how much
effort it will take to get those to work (read: We'll probably
ultimately have to end up redoing the walker, or we'll have to come up
with some creative caching tricks), and more test coverage = better.
Differential Revision: http://reviews.llvm.org/D18065
llvm-svn: 264180
Easwaran Raman [Wed, 23 Mar 2016 18:18:26 +0000 (18:18 +0000)]
Add getBlockProfileCount method to BlockFrequencyInfo
Differential Revision: http://reviews.llvm.org/D18233
llvm-svn: 264179
Nico Weber [Wed, 23 Mar 2016 18:17:02 +0000 (18:17 +0000)]
clang-cl: Add more tests for the interaction of /FI and /Yc /Yu.
Most things even work; see the included FIXMEs for things that need polishing.
Also don't warn about unused flags for the `/Yuh2.h /FIh1.h /FIh2.h`. The
common case is that the pch was built with `/Ych2.h /FIh1.h /FIh2.h`, so h1.h
is in the PCH, and we shouldn't warn about /FIh1.h not having an effect.
(If we wanted to get fancy, we could store the list of -include flags in the
pch and then check that it matches later on.)
llvm-svn: 264178
Justin Bogner [Wed, 23 Mar 2016 18:15:33 +0000 (18:15 +0000)]
SelectionDAG: Remove a tautological dyn_cast. NFC
Index is already a StoreSDNode, so this dyn_cast doesn't do anything.
llvm-svn: 264177
Davide Italiano [Wed, 23 Mar 2016 18:15:06 +0000 (18:15 +0000)]
[LTO/Tests] Fix typo. Visibility -> Linkage. Pointy-hat to me.
llvm-svn: 264176
Davide Italiano [Wed, 23 Mar 2016 18:13:32 +0000 (18:13 +0000)]
[LTO/tests] Check optimized bitcode instead of produced shared library.
As requested by Rafael.
llvm-svn: 264175
Nico Weber [Wed, 23 Mar 2016 18:00:22 +0000 (18:00 +0000)]
clang-cl: Include /FI headers in /showIncludes output.
-H in gcc mode doesn't print -include headers, but they are included in
depfiles written by MMD and friends. Since /showIncludes is what's used instead
of depfiles, printing /FI there seems important (and matches cl.exe).
Instead of giving HeaderIncludeGen more options, just switch on ShowAllHeaders
in clang-cl mode and let clang::InitializePreprocessor() not put -include flags
in the <command line> block. This changes the behavior of -E slightly, and it
removes the <command line> flag from the output triggered by setting the
obscure CC_PRINT_HEADERS=1 env var to true while running clang. Both of these
seem ok to change.
http://reviews.llvm.org/D18401
llvm-svn: 264174
Stephane Sezer [Wed, 23 Mar 2016 18:00:13 +0000 (18:00 +0000)]
Implement ObjectFilePECOFF::GetEntryPointAddress.
Reviewers: zturner, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17970
llvm-svn: 264173
Pete Cooper [Wed, 23 Mar 2016 18:00:10 +0000 (18:00 +0000)]
Copy MachO struct to temporary to avoid unaligned load UB.
We were already copying this data to a temporary for endian swaps. Now
we just always copy it, but still only do the endian swaps when needed.
llvm-svn: 264172
Davide Italiano [Wed, 23 Mar 2016 17:59:07 +0000 (17:59 +0000)]
[LTO] Only change linkage if we keep the symbol.
llvm-svn: 264171
Faisal Vali [Wed, 23 Mar 2016 17:39:51 +0000 (17:39 +0000)]
[NFC] Delete an unused function parameter from a static function
llvm-svn: 264170
Mike Spertus [Wed, 23 Mar 2016 17:29:42 +0000 (17:29 +0000)]
Visualize fields of records as they were declared in Visual Studio debugger
llvm-svn: 264169
Kuba Brecka [Wed, 23 Mar 2016 16:54:23 +0000 (16:54 +0000)]
Follow-up for r264162 to fix the CMake build (update LLDBDependencies.cmake).
llvm-svn: 264168
Manman Ren [Wed, 23 Mar 2016 16:28:28 +0000 (16:28 +0000)]
ObjC: Handle boolean fixed type for enum.
Before this commit, we assert failure in ImplicitCastExpr
"unheralded conversion to bool". This commit fixes the assertion by using
the correct cast type when the fixed type is boolean.
This commit also fixes the behavior for Microsoft mode as well, since
Obj-C and Microsoft mode share the same code path.
rdar://
24999533
llvm-svn: 264167
Jonathan Peyton [Wed, 23 Mar 2016 16:27:25 +0000 (16:27 +0000)]
Fix Visual Studio builds
Have Visual Studio use MemoryBarrier() instead of _mm_mfence() and remove
__declspec align attribute from function parameters in kmp_atomic.h
llvm-svn: 264166
Artyom Skrobov [Wed, 23 Mar 2016 16:18:13 +0000 (16:18 +0000)]
Replace a string comparison in ARMSubtarget.h with a tablegen entry in ARM.td (NFC)
Reviewers: rengolin, t.p.northover
Subscribers: aemerson, llvm-commits, rengolin
Differential Revision: http://reviews.llvm.org/D18393
llvm-svn: 264165
Chih-Hung Hsieh [Wed, 23 Mar 2016 16:14:12 +0000 (16:14 +0000)]
[analyzer] Fix typo s/initalize/initialize/
Differential Revision: http://reviews.llvm.org/D18363
llvm-svn: 264164
Nico Weber [Wed, 23 Mar 2016 15:37:41 +0000 (15:37 +0000)]
clang-cl: Don't warn about /Oy- being unused in 64-bit builds.
http://reviews.llvm.org/D18392
llvm-svn: 264163
Kuba Brecka [Wed, 23 Mar 2016 15:36:22 +0000 (15:36 +0000)]
Add ThreadSanitizer debugging support.
This patch adds ThreadSanitizer support into LLDB:
- Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented.
- A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo.
- SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection.
- Added some test cases.
Reviewed by Greg Clayton.
llvm-svn: 264162
Silviu Baranga [Wed, 23 Mar 2016 15:29:30 +0000 (15:29 +0000)]
[SCEV] Change the SCEV Predicates interfaces for conversion to AddRecExpr to return SCEVAddRecExpr* instead of SCEV*
Summary:
This changes the conversion functions from SCEV * to SCEVAddRecExpr from
ScalarEvolution and PredicatedScalarEvolution to return a SCEVAddRecExpr*
instead of a SCEV* (which removes the need of most clients to do a
dyn_cast right after calling these functions).
We also don't add new predicates if the transformation was not successful.
This is not entirely a NFC (as it can theoretically remove some predicates
from LAA when we have an unknown dependece), but I couldn't find an obvious
regression test for it.
Reviewers: sanjoy
Subscribers: sanjoy, mzolotukhin, llvm-commits
Differential Revision: http://reviews.llvm.org/D18368
llvm-svn: 264161
Rafael Espindola [Wed, 23 Mar 2016 14:58:25 +0000 (14:58 +0000)]
Not every x86 relocation is relative.
Without this predicate we were not producing R_386_RELATIVE relocations.
llvm-svn: 264160
Alexander Kornienko [Wed, 23 Mar 2016 14:28:52 +0000 (14:28 +0000)]
Use an enum instead of hardcoded indices. NFC.
llvm-svn: 264158
Simon Pilgrim [Wed, 23 Mar 2016 14:00:28 +0000 (14:00 +0000)]
[X86] Regenerated WidenArith test
llvm-svn: 264157
Oliver Stannard [Wed, 23 Mar 2016 13:45:03 +0000 (13:45 +0000)]
[AArch64] Replace some uses of report_fatal_error with reportError in AArch64 ELF object writer
If we can't handle a relocation type, report it as an error in the source,
rather than asserting. I've added a more descriptive message and a test for the
only cases of this that I've been able to trigger.
Differential Revision: http://reviews.llvm.org/D18388
llvm-svn: 264156
Artyom Skrobov [Wed, 23 Mar 2016 13:32:33 +0000 (13:32 +0000)]
Combine identical check-prefixes in Clang test/Preprocessor/arm-target-features.c
Reviewers: rengolin, t.p.northover
Subscribers: aemerson, cfe-commits, rengolin
Differential Revision: http://reviews.llvm.org/D18391
llvm-svn: 264155
Tobias Grosser [Wed, 23 Mar 2016 13:21:02 +0000 (13:21 +0000)]
Drop explicit -polly-delinearize parameter
Delinearization is now enabled by default and does not need to explicitly need
to be enabled in our tests.
llvm-svn: 264154
Andrew Wilkins [Wed, 23 Mar 2016 12:39:21 +0000 (12:39 +0000)]
[cmake] fix libgo-llgo paths in install target
llvm-svn: 264153
Renato Golin [Wed, 23 Mar 2016 11:24:30 +0000 (11:24 +0000)]
Revert "[tsan] Disable randomized address space on linux aarch64."
This reverts commits r264068 and r264079, and they were breaking the build and
weren't reverted in time, nor they exhibited expected behaviour from the
reviewers. There is more to discuss than just a test fix.
llvm-svn: 264150
Andrey Turetskiy [Wed, 23 Mar 2016 11:15:10 +0000 (11:15 +0000)]
[X86] Add "x87" in x86 target feature map.
Differential Revision: http://reviews.llvm.org/D13980
llvm-svn: 264149
Andrey Turetskiy [Wed, 23 Mar 2016 11:13:54 +0000 (11:13 +0000)]
[X86] Introduction of FeatureX87.
Add FeatureX87 in X86 backend to be able to define CPUs which doesn't have x87.
Differential Revision: http://reviews.llvm.org/D13979
llvm-svn: 264148
Hrvoje Varga [Wed, 23 Mar 2016 10:29:38 +0000 (10:29 +0000)]
[mips][microMIPS] Delay slot filler modifications
Differential Revision: http://reviews.llvm.org/D18181
llvm-svn: 264147
Haojian Wu [Wed, 23 Mar 2016 09:33:07 +0000 (09:33 +0000)]
Add check for unneeded copies of locals
Summary: Extends the UnnecessaryCopyInitialization to detect copies of local variables and parameters that are unneeded.
Patch by Matt Kulukundis!
Reviewers: alexfh, hokein
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18149
llvm-svn: 264146
Simon Atanasyan [Wed, 23 Mar 2016 09:28:02 +0000 (09:28 +0000)]
[ELF][MIPS] Add comment with MIPS GOT relocations handling description. NFC.
llvm-svn: 264145
Tobias Grosser [Wed, 23 Mar 2016 09:27:41 +0000 (09:27 +0000)]
www: Drop one more </div>
llvm-svn: 264144
Tobias Grosser [Wed, 23 Mar 2016 09:26:39 +0000 (09:26 +0000)]
www: Drop polyhedral news reference.
The feed2html service used has been unavailable a couple of times and always
causes the polly website to fail to load correctly.
llvm-svn: 264143
Tobias Grosser [Wed, 23 Mar 2016 06:57:51 +0000 (06:57 +0000)]
Codegen:Do not invalidate dominator tree when bailing out during code generation
When codegenerating invariant loads in some rare cases we cannot generate code
and bail out. This change ensures that we maintain a valid dominator tree
in these situations. This fixes llvm.org/PR26736
Contributed-by: Matthias Reisinger <d412vv1n@gmail.com>
llvm-svn: 264142
Justin Bogner [Wed, 23 Mar 2016 06:54:42 +0000 (06:54 +0000)]
FAQ: Remove the entire Build Problems section
This is all horribly outdated, and is mostly about the autoconf build
system that doesn't even exist anymore. These questions aren't
frequent, and these answers aren't useful.
llvm-svn: 264141
Tobias Grosser [Wed, 23 Mar 2016 06:40:15 +0000 (06:40 +0000)]
Add option to disallow modref function calls in scops.
This might be useful to evaluate the benefit of us handling modref funciton
calls. Also, a new bug that was triggered by modref function calls was
recently reported http://llvm.org/PR27035. To ensure the same issue does not
cause troubles for other people, we temporarily disable this until the bug
is resolved.
llvm-svn: 264140
Justin Bogner [Wed, 23 Mar 2016 06:38:53 +0000 (06:38 +0000)]
FAQ: We require GCC 4.7 - nobody's asking about build failures with 3.3.2
llvm-svn: 264139
Vedant Kumar [Wed, 23 Mar 2016 05:18:50 +0000 (05:18 +0000)]
[docs] Fix typo in ProgrammersManual.rst
Patch by Miod Vallat!
llvm-svn: 264138
Valery Pykhtin [Wed, 23 Mar 2016 04:27:26 +0000 (04:27 +0000)]
[AMDGPU] Fix missing assembler predicates.
Differential Revision: http://reviews.llvm.org/D18351
llvm-svn: 264137
Davide Italiano [Wed, 23 Mar 2016 03:20:46 +0000 (03:20 +0000)]
[Tests] Remove the correct files.
llvm-svn: 264136
Lang Hames [Wed, 23 Mar 2016 03:18:16 +0000 (03:18 +0000)]
[Docs] Clarify boolean conversion for Error and Expected<T> in the Programmer's
Manual.
llvm-svn: 264135
Davide Italiano [Wed, 23 Mar 2016 02:45:53 +0000 (02:45 +0000)]
[LTO] Remove dead code.
llvm-svn: 264133
George Burgess IV [Wed, 23 Mar 2016 02:33:58 +0000 (02:33 +0000)]
[Sema] Allow implicit conversions of &overloaded_fn in C.
Also includes a minor ``enable_if`` docs update.
Currently, our address-of overload machinery will only allow implicit
conversions of overloaded functions to void* in C. For example:
```
void f(int) __attribute__((overloadable));
void f(double) __attribute__((overloadable, enable_if(0, "")));
void *fp = f; // OK. This is C and the target is void*.
void (*fp2)(void) = f; // Error. This is C, but the target isn't void*.
```
This patch makes the assignment of `fp2` select the `f(int)` overload,
rather than emitting an error (N.B. you'll still get a warning about the
`fp2` assignment if you use -Wincompatible-pointer-types).
Differential Revision: http://reviews.llvm.org/D13704
llvm-svn: 264132
Sanjoy Das [Wed, 23 Mar 2016 02:28:35 +0000 (02:28 +0000)]
Remove stale comment
llvm-svn: 264131
Sanjoy Das [Wed, 23 Mar 2016 02:24:15 +0000 (02:24 +0000)]
[StatepointLowering] Don't do two DenseMap lookups; nfci
llvm-svn: 264130
Sanjoy Das [Wed, 23 Mar 2016 02:24:13 +0000 (02:24 +0000)]
[StatepointLowering] Minor NFC cleanups
- Use auto
- Name variables in LLVM style
- Use llvm::find instead of std::find
- Blank lines between declarations
llvm-svn: 264129
Sanjoy Das [Wed, 23 Mar 2016 02:24:10 +0000 (02:24 +0000)]
[StatepointLowering] Minor nfc refactoring
Now that StatepointLoweringInfo represents base pointers, derived
pointers and gc relocates as SmallVectors and not ArrayRefs, we no
longer need to allocate "backing storage" on stack in LowerStatepoint.
So elide the backing storage, and inline the trivial body of
getIncomingStatepointGCValues.
llvm-svn: 264128
Sanjoy Das [Wed, 23 Mar 2016 02:24:07 +0000 (02:24 +0000)]
[StatepointLowering] Schedule gc relocates before uniqueing them
Otherwise we can see an "unexpected" gc.relocate that we uniqued away.
llvm-svn: 264127
Tom Stellard [Wed, 23 Mar 2016 01:53:22 +0000 (01:53 +0000)]
AMDGPU: Cache information about register pressure sets
We can statically decide whether or not a register pressure set is for
SGPRs or VGPRs, so we don't need to re-compute this information in
SIRegisterInfo::getRegPressureSetLimit().
Differential Revision: http://reviews.llvm.org/D14805
llvm-svn: 264126
Chris Bieneman [Wed, 23 Mar 2016 01:47:05 +0000 (01:47 +0000)]
[Apple Clang] Expose llvm-config from stage2 builds in stage1
This exposes the stage2-llvm-config target though the stage1 build configuration.
llvm-svn: 264125
Junmo Park [Wed, 23 Mar 2016 01:38:35 +0000 (01:38 +0000)]
Minor code cleanup. NFC.
llvm-svn: 264124
Enrico Granata [Wed, 23 Mar 2016 01:21:55 +0000 (01:21 +0000)]
Change 'apropos' such that it doesn't look into the "long help/syntax" strings for commands
This solves issues such as 'apropos foo' returning valid matches just because syntax examples happen to use 'foo' as a placeholder token
Fixes rdar://9043025
llvm-svn: 264123
Davide Italiano [Wed, 23 Mar 2016 00:43:35 +0000 (00:43 +0000)]
[ModuleUtils] Use range-based loop. NFC.
llvm-svn: 264122
Sean Silva [Wed, 23 Mar 2016 00:31:21 +0000 (00:31 +0000)]
[docs] Use reST link.
llvm-svn: 264121
Sean Silva [Wed, 23 Mar 2016 00:30:57 +0000 (00:30 +0000)]
Bring back Makefile.sphinx
It is not part of autoconf and should not have been removed in r258861.
llvm-svn: 264120
Sean Silva [Wed, 23 Mar 2016 00:25:13 +0000 (00:25 +0000)]
[docs] Clarify the sense of --compile-command
In retrospect, it seems "obvious" that the sense of the return code is
the same as if it crashed on "interesting" inputs. But that didn't stop
me from spending more time than I care to admit verifying this.
llvm-svn: 264119
Michael Kruse [Tue, 22 Mar 2016 23:27:42 +0000 (23:27 +0000)]
[ScopInfo] Fix domains after loops.
ISL can conclude additional conditions on parameters from restrictions
on loop variables. Such conditions persist when leaving the loop and the
loop variable is projected out. This results in a narrower domain for
exiting the loop than entering it and is logically impossible for
non-infinite loops.
We fix this by not adding a lower bound i>=0 when constructing BB
domains, but defer it to when also the upper bound it computed, which
was done redundantly even before this patch.
This reduces the number of LNT fails with -polly-process-unprofitable
-polly-position=before-vectorizer from 8 to 6.
llvm-svn: 264118
Sean Silva [Tue, 22 Mar 2016 23:19:40 +0000 (23:19 +0000)]
Tidy up this test a bit.
llvm-svn: 264117
Pete Cooper [Tue, 22 Mar 2016 23:07:34 +0000 (23:07 +0000)]
Move empty atom check to target independent code. NFC.
Turns out that checking only x86 for empty atoms to fix UBSan then
requires the same code in the other targets too. Better to just
check this in the main run loop instead of in each target.
Should be NFC, other than fixing UBSan failures.
llvm-svn: 264116
Pete Cooper [Tue, 22 Mar 2016 22:59:35 +0000 (22:59 +0000)]
Avoid memcpy from nullptr. NFC.
This was caught by the UBSan bot. When the atom has no size, we would
issue a memcpy with size0 and a nullptr for the source.
Also, this code should never have references inside an empty atom so
add an assert for that while we're here.
llvm-svn: 264115
Pete Cooper [Tue, 22 Mar 2016 22:51:03 +0000 (22:51 +0000)]
Don't memcpy from a null source. Found by UBSan
llvm-svn: 264114
Sean Callanan [Tue, 22 Mar 2016 22:42:42 +0000 (22:42 +0000)]
Reverted a change in r264074 that made lldb-mi use lldb_private APIs.
FileSystem::Fopen is a lldb_private API, but lldb-mi uses only the
public API. Depending on lldb_private APIs makes Xcode builds fail.
I reverted the portion of r264074 that added such a dependency.
llvm-svn: 264113
Derek Bruening [Tue, 22 Mar 2016 22:32:03 +0000 (22:32 +0000)]
Test commit to verify repository access and fix a typo.
llvm-svn: 264112
Davide Italiano [Tue, 22 Mar 2016 22:31:34 +0000 (22:31 +0000)]
[LTO] Keep linkonce_odr symbols when appropriate.
Ensure we keep the symbol we need to before it reaches
the Writer (and hit an assertion), changing its linkage
from linkonce_odr to weak. For a more detailed description
of the problem, see PR19901 where a similar problem was
fixed for the gold plugin. Thanks to Rafael for providing
a testcase.
llvm-svn: 264111
Joerg Sonnenberger [Tue, 22 Mar 2016 22:24:52 +0000 (22:24 +0000)]
Typo
llvm-svn: 264110
Justin Bogner [Tue, 22 Mar 2016 22:24:29 +0000 (22:24 +0000)]
MC: Don't access the filesystem in MCContext's constructor
MCContext shouldn't be accessing the filesystem - that's a gross
layering violation and makes it awkward to use as a library or in a
daemon where it may not even be allowed filesystem access.
The CWD lookup here is normally redundant anyway, since the calling
context either also looks up the CWD or sets this to something more
specific. Here, we fix up the one caller that doesn't already set up a
debug compilation dir and make it clear that the responsibility for
such set up is in the users of MCContext.
llvm-svn: 264109
Enrico Granata [Tue, 22 Mar 2016 22:12:59 +0000 (22:12 +0000)]
Make it so that a command alias can actually remove the help/long help from its parent command by setting itself to an empty help string
llvm-svn: 264108
Justin Lebar [Tue, 22 Mar 2016 22:08:01 +0000 (22:08 +0000)]
[NVVM] Remove noduplicate attribute from synchronizing intrinsics.
Summary:
I've completed my audit of all the code that looks at noduplicate and
added handling of convergent where appropriate, so we no longer need
noduplicate on these intrinsics.
Reviewers: jholewinski
Subscribers: llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D18168
llvm-svn: 264107
Justin Lebar [Tue, 22 Mar 2016 22:06:19 +0000 (22:06 +0000)]
[CUDA] Don't allow templated variadic functions.
Reviewers: tra
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18373
llvm-svn: 264106
Tobias Grosser [Tue, 22 Mar 2016 22:05:32 +0000 (22:05 +0000)]
Invalidate scop on encountering a complex control flow
We bail out if current scop has a complex control flow as this could lead to
building of large domain conditions. This is to reduce compile time. This
addresses r26382.
Contributed-by: Chris Jenneisch <chrisj@codeaurora.org>
Differential Revision: http://reviews.llvm.org/D18362
llvm-svn: 264105
Siva Chandra [Tue, 22 Mar 2016 21:37:56 +0000 (21:37 +0000)]
[lldb-mi] Uncomment a line in CMakeLists.txt to make linux build happy.
Reviewers: zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D18377
llvm-svn: 264104
Rafael Espindola [Tue, 22 Mar 2016 21:35:47 +0000 (21:35 +0000)]
Drop comdats from the dst module if they are not selected.
A really unfortunate design of llvm-link and related libraries is that
they operate one module at a time.
This means they can copy a GV to the destination module that should not
be there in the final result because a later bitcode file takes
precedence.
We already handled cases like a strong GV replacing a weak for example.
One case that is not currently handled is a comdat replacing another.
This doesn't happen in ELF, but with COFF largest selection kind it is
possible.
In "llvm-link a.ll b.ll" if the selected comdat was from a.ll,
everything will work and we will not copy the comdat from b.ll.
But if we run "llvm-link b.ll a.ll", we fail to delete the already
copied comdat from b.ll. This patch fixes that.
llvm-svn: 264103
George Burgess IV [Tue, 22 Mar 2016 21:25:08 +0000 (21:25 +0000)]
Keep CodeGenPrepare from preserving the domtree.
CGP modifies the domtree in some cases, so saying that it preserves the
domtree is a lie. We'll be able to selectively preserve it with the new
pass manager.
Differential Revision: http://reviews.llvm.org/D16893
llvm-svn: 264099
JF Bastien [Tue, 22 Mar 2016 21:12:48 +0000 (21:12 +0000)]
Update cxx-features test to C++1z
Forked from the following patch:
http://reviews.llvm.org/D17950
llvm-svn: 264098
Pete Cooper [Tue, 22 Mar 2016 21:08:39 +0000 (21:08 +0000)]
Fix operator= on OwningAtomPtr to call destructor when needed.
If the LHS of 'a = b' already had an atom in it then we wouldn't
call the destructor. This happens when we use something like
std::remove_if which is done in the CompactUnwindPass. Should fix
the leaks on the mach-o/unwind-info-simple-x86_64.yaml test case.
Lang and I are going to take a look at removing OwningAtomPtr in
favour of a std::unique_ptr but just trying to get the bots green
so we have a good baseline first.
llvm-svn: 264097
Enrico Granata [Tue, 22 Mar 2016 21:07:54 +0000 (21:07 +0000)]
Fix a bug caused by my alias refactoring where, if an alias was defined in terms of another alias, trying to run the nested command would actually cause a crash in the command interpreter
llvm-svn: 264096
Sean Callanan [Tue, 22 Mar 2016 21:05:51 +0000 (21:05 +0000)]
Backend support for top-level Clang epxressions
This patch adds a new ExecutionPolicy, eExecutionPolicyTopLevel, which
tells the expression parser that the expression should be JITted as top
level code but nothing (except static initializers) should be run. I
have modified the Clang expression parser to recognize this execution
policy. On top of the existing patches that support storing IR and
maintaining a map of arbitrary Decls, this is mainly just patching up a
few places in the expression parser.
I intend to submit a patch for review that exposes this functionality
through the "expression" command and through the SB API. That patch
also includes a testcase for all of this.
<rdar://problem/
22864976>
llvm-svn: 264095
Sean Silva [Tue, 22 Mar 2016 21:04:03 +0000 (21:04 +0000)]
Mark SymbolBody::getSymbol as `const`.
llvm-svn: 264094
Rui Ueyama [Tue, 22 Mar 2016 20:58:15 +0000 (20:58 +0000)]
We do not use libLTO, so fix the error.
llvm-svn: 264093
John Thompson [Tue, 22 Mar 2016 20:57:51 +0000 (20:57 +0000)]
D18325: Added mm_malloc module export.
llvm-svn: 264092
Rui Ueyama [Tue, 22 Mar 2016 20:52:10 +0000 (20:52 +0000)]
ELF: Create LTO.{cpp,h} and move LTO-related code to that file.
The code for LTO has been growing, so now is probably a good time to
move it to its own file. SymbolTable.cpp is for symbol table, and
because compiling bitcode files are semantically not a part of
symbol table, this is I think a good thing to do.
http://reviews.llvm.org/D18370
llvm-svn: 264091
Sean Silva [Tue, 22 Mar 2016 20:25:32 +0000 (20:25 +0000)]
[lto] Provide a file name for the combined LTO object.
Otherwise, we get diagnostics like:
undefined symbol: foo in
Which isn't particularly useful.
llvm-svn: 264089
Matthias Braun [Tue, 22 Mar 2016 20:24:34 +0000 (20:24 +0000)]
Revert "Support arbitrary addrspace pointers in masked load/store intrinsics"
This commit broke LTO builds. Reverting it to unbreak the bots while the
issue is investigated. See also:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20160321/341002.html
This reverts r263158
llvm-svn: 264088
Enrico Granata [Tue, 22 Mar 2016 20:16:51 +0000 (20:16 +0000)]
Changes to the Xcode project file to make LLDB build again after llvm/Support/ConvertUTF.h was brought into the driver
llvm-svn: 264087
Simon Pilgrim [Tue, 22 Mar 2016 20:10:49 +0000 (20:10 +0000)]
[X86][AVX] Added AVX1 tests for 256-bit vector idiv-by-constant
Prep work based on feedback for D18307
llvm-svn: 264086
Simon Pilgrim [Tue, 22 Mar 2016 19:59:53 +0000 (19:59 +0000)]
[SelectionDAG] Ensure constant folded legalized vector element types are compatible with the BUILD_VECTOR type
Found during fuzz testing - 32-bit x86 targets were legalizing a <2 x i1> compare result to <2 x i32> when <2 x i64> was expected.
llvm-svn: 264085
Tim Northover [Tue, 22 Mar 2016 19:14:38 +0000 (19:14 +0000)]
CodeGen: check return types match when emitting tail call to builtin.
We were just completely ignoring the types when determining whether we could
safely emit a libcall as a tail call. This is clearly wrong.
Theoretically, we could dig deeper looking for incidental matches (much like
the generic code in Analysis.cpp does), but it's probably not worth it for the
few libcalls that exist.
llvm-svn: 264084
Sanjoy Das [Tue, 22 Mar 2016 18:45:41 +0000 (18:45 +0000)]
Remove unnecessary branch from test
(Addresses post commit review by Reid Kleckner)
llvm-svn: 264083
Adam Nemet [Tue, 22 Mar 2016 18:38:15 +0000 (18:38 +0000)]
[LoopVersioning] Relax an assert for LCSSA PHIs
When you have multiple LCSSA (single-operand) PHIs that are converted
into two-operand PHIs due to versioning, only assert that the PHI
currently being converted has a single operand. I.e. we don't want to
check PHIs that were converted earlier in the loop.
Fixes PR27023.
Thanks to Karl-Johan Karlsson for the minimized testcase!
llvm-svn: 264081
Etienne Bergeron [Tue, 22 Mar 2016 18:21:17 +0000 (18:21 +0000)]
[clang-tidy] Fix broken test with redundant string init (msvc).
Summary:
There is a silly bug that got introduced after fixing incorrect paths with this patch:
http://reviews.llvm.org/D18293
The tests was present twice in the file.
Reviewers: alexfh, rnk
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D18365
llvm-svn: 264080
Yabin Cui [Tue, 22 Mar 2016 18:12:18 +0000 (18:12 +0000)]
[tsan] Fix check-tsan build by using CHECK_NE.
Reviewers: llvm-commits, srhines, dvyukov
Subscribers: srhines
Differential Revision: http://reviews.llvm.org/D18361
llvm-svn: 264079
Sanjoy Das [Tue, 22 Mar 2016 18:10:39 +0000 (18:10 +0000)]
Allow lowering call sites with both funclets and deopt state
Lowering funclets is a no-op, so we can just go ahead and lower the
deopt state.
llvm-svn: 264078