David Majnemer [Thu, 5 Mar 2015 18:50:12 +0000 (18:50 +0000)]
X86: Optimize address mode matching for FRAME_ALLOC_RECOVER nodes
We know that the absolute symbol will be less than 2GB and thus will
always fit.
llvm-svn: 231389
Reid Kleckner [Thu, 5 Mar 2015 18:32:14 +0000 (18:32 +0000)]
Revert busted CallSite change from r231386
llvm-svn: 231388
Reid Kleckner [Thu, 5 Mar 2015 18:26:58 +0000 (18:26 +0000)]
Silence -Wmissing-braces warning from clang-cl
The first element of STACKFRAME64 is a struct and Clang wants us to put
braces around it's initialization. Instead, drop the zero. The result
should be the same.
llvm-svn: 231387
Reid Kleckner [Thu, 5 Mar 2015 18:26:34 +0000 (18:26 +0000)]
Replace llvm.frameallocate with llvm.frameescape
Turns out it's pretty straightforward and simplifies the implementation.
Reviewers: andrew.w.kaylor
Differential Revision: http://reviews.llvm.org/D8051
llvm-svn: 231386
Erik Eckstein [Thu, 5 Mar 2015 17:53:00 +0000 (17:53 +0000)]
Revert r231276 (including r231277): Add a lock() function in PassRegistry to speed up multi-thread synchronization.
llvm-svn: 231385
Andrey Churbanov [Thu, 5 Mar 2015 17:50:48 +0000 (17:50 +0000)]
moved Windows-specific flags under the WINDOWS guard in CMake
llvm-svn: 231384
Andrey Churbanov [Thu, 5 Mar 2015 17:48:53 +0000 (17:48 +0000)]
added KMP_NESTED_HOT_TEAMS macro definition
llvm-svn: 231383
Zachary Turner [Thu, 5 Mar 2015 17:47:52 +0000 (17:47 +0000)]
[Windows] Implement PrintStackTrace(FILE*)
llvm::sys::PrintBacktrace(FILE*) is supposed to print a backtrace
of the current thread given the current PC. This function was
unimplemented on Windows, and instead the only time we could
print a backtrace was as the result of an exception through
LLVMUnhandledExceptionFilter.
This patch implements backtracing of self by using
RtlCaptureContext to get a CONTEXT for the current thread, and
moving the printing and StackWalk64 code to a common method that
printing own stack trace and printing stack trace of an exception
can use.
Differential Revision: http://reviews.llvm.org/D8068
Reviewed by: Reid Kleckner
llvm-svn: 231382
Andrey Churbanov [Thu, 5 Mar 2015 17:46:50 +0000 (17:46 +0000)]
minor change: comment improved
llvm-svn: 231381
Simon Pilgrim [Thu, 5 Mar 2015 17:14:04 +0000 (17:14 +0000)]
[DagCombiner] Allow shuffles to merge through bitcasts
Currently shuffles may only be combined if they are of the same type, despite the fact that bitcasts are often introduced in between shuffle nodes (e.g. x86 shuffle type widening).
This patch allows a single input shuffle to peek through bitcasts and if the input is another shuffle will merge them, shuffling using the smallest sized type, and re-applying the bitcasts at the inputs and output instead.
Dropped old ShuffleToZext test - this patch removes the use of the zext and vector-zext.ll covers these anyhow.
Differential Revision: http://reviews.llvm.org/D7939
llvm-svn: 231380
Duncan P. N. Exon Smith [Thu, 5 Mar 2015 17:00:05 +0000 (17:00 +0000)]
FileCheck: Document CHECK-SAME, follow-up to r230612
llvm-svn: 231379
Kit Barton [Thu, 5 Mar 2015 16:24:38 +0000 (16:24 +0000)]
While reviewing the changes to Clang to add builtin support for the vsld, vsrd, and vsrad instructions, it was pointed out that the builtins are generating the LLVM opcodes (shl, lshr, and ashr) not calls to the intrinsics. This patch changes the implementation of the vsld, vsrd, and vsrad instructions from from intrinsics to VXForm_1 instructions and makes them legal with P8 Altivec. It also removes the definition of the int_ppc_altivec_vsld, int_ppc_altivec_vsrd, and int_ppc_altivec_vsrad intrinsics.
llvm-svn: 231378
Marshall Clow [Thu, 5 Mar 2015 16:07:37 +0000 (16:07 +0000)]
Rework reverse_iterator::operator[] so as not to use the base iterators operator [], which can cause constness problems. Fixes PR17883
llvm-svn: 231375
Igor Laevsky [Thu, 5 Mar 2015 15:41:14 +0000 (15:41 +0000)]
Revert change r231366 as it broke clang-native-arm-cortex-a9 Analysis/properties.m test.
llvm-svn: 231374
Tom Stellard [Thu, 5 Mar 2015 15:31:05 +0000 (15:31 +0000)]
Fix bitselect for float/double types v2
We need to reinterpret float/double types as uint/ulong in order to
perform the bitwise operations.
This has been tested with piglit, OpenCV, and the ocl conformance tests.
v2:
- Use vector operations rather than splitting vectors into scalar
components.
Reviewed-by: Aaron Watry <awatry@gmail.com>
llvm-svn: 231373
Elena Demikhovsky [Thu, 5 Mar 2015 15:11:35 +0000 (15:11 +0000)]
AVX-512, SKX: Enabled masked_load/store operations for this target.
Added lowering for ISD::CONCAT_VECTORS and ISD::INSERT_SUBVECTOR for i1 vectors,
it is needed to pass all masked_memop.ll tests for SKX.
llvm-svn: 231371
Alexander Kornienko [Thu, 5 Mar 2015 14:58:03 +0000 (14:58 +0000)]
[clang-tidy] Slighly clarified a comment.
llvm-svn: 231370
Alexander Kornienko [Thu, 5 Mar 2015 14:56:11 +0000 (14:56 +0000)]
[clang-tidy] Replace unrecognized namespace ending comments.
Summary:
Replace unrecognized namespace ending comments. This will help in particular when a namespace ending comment is mistyped or doesn't fit the regexp for other reason, e.g.:
namespace a {
namespace b {
namespace {
} // anoynmous namespace
} // b
} // namesapce a
Reviewers: djasper
Reviewed By: djasper
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D8078
llvm-svn: 231369
Frederic Riss [Thu, 5 Mar 2015 14:43:15 +0000 (14:43 +0000)]
Fix -Woverflow warning in unittest.
llvm-svn: 231368
Dmitry Vyukov [Thu, 5 Mar 2015 14:37:28 +0000 (14:37 +0000)]
tsan: fix signal handling during stop-the-world
Long story short: stop-the-world briefly resets SIGSEGV handler to SIG_DFL.
This breaks programs that handle and continue after SIGSEGV (namely JVM).
See the test and comments for details.
This is reincarnation of reverted r229678 (http://reviews.llvm.org/D7722).
Changed:
- execute TracerThreadDieCallback only on tracer thread
- reset global data in TracerThreadSignalHandler/TracerThreadDieCallback
- handle EINTR from waitpid
Add 3 new test:
- SIGSEGV during leak checking
- StopTheWorld operation during signal storm from an external process
- StopTheWorld operation when the program generates and handles SIGSEGVs
http://reviews.llvm.org/D8032
llvm-svn: 231367
Igor Laevsky [Thu, 5 Mar 2015 14:11:21 +0000 (14:11 +0000)]
Teach lowering to correctly handle invoke statepoint and gc results tied to them. Note that we still can not lower gc.relocates for invoke statepoints.
Also it extracts getCopyFromRegs helper function in SelectionDAGBuilder as we need to be able to customize type of the register exported from basic block during lowering of the gc.result.
llvm-svn: 231366
Alexander Kornienko [Thu, 5 Mar 2015 13:53:21 +0000 (13:53 +0000)]
[clang-tidy] Fix diag message in clang-tidy misc-uniqueptr-reset-release if right side is rvalue
http://reviews.llvm.org/D8071
Patch by Alexey Sokolov!
llvm-svn: 231365
Alexander Kornienko [Thu, 5 Mar 2015 13:46:14 +0000 (13:46 +0000)]
[clang-tidy] Refactor: Move google clang-tidy checks to namespace clang::tidy::google
http://reviews.llvm.org/D7994
Patch by Richard Thomson!
llvm-svn: 231364
Toma Tabacu [Thu, 5 Mar 2015 13:39:14 +0000 (13:39 +0000)]
Recommit "[IAS] Teach -cc1as about the 'target-abi' option."
Added a REQUIRES for the Mips target.
Also, switched to using plain CHECKs, at the suggestion of Eric Christopher.
llvm-svn: 231363
Tobias Grosser [Thu, 5 Mar 2015 09:48:20 +0000 (09:48 +0000)]
Fix compilation after 'Make DataLayout Non-Optional in the Module' commit
llvm-svn: 231362
Kuba Brecka [Thu, 5 Mar 2015 09:47:13 +0000 (09:47 +0000)]
Symbolizer refactoring: Link symbolizer tools into a fallback chain
Reviewed at http://reviews.llvm.org/D8049
llvm-svn: 231361
Arnaud A. de Grandmaison [Thu, 5 Mar 2015 09:12:59 +0000 (09:12 +0000)]
[PBQP] Use a local bit-matrix to speedup searching an edge in the graph.
Build time (user time) for building llvm+clang+lldb in release mode:
- default allocator: 9086 seconds
- with PBQP: 9126 seconds
- with PBQP + local bit matrix cache: 9097 seconds
llvm-svn: 231360
Michael Kuperstein [Thu, 5 Mar 2015 08:38:57 +0000 (08:38 +0000)]
[InstCombine] Fix an assertion when fmul has a ConstantExpr operand
isNormalFp and isFiniteNonZeroFp should not assume vector operands can not be constant expressions.
Patch by Pawel Jurek <pawel.jurek@intel.com>
Differential Revision: http://reviews.llvm.org/D8053
llvm-svn: 231359
Craig Topper [Thu, 5 Mar 2015 07:17:52 +0000 (07:17 +0000)]
Revert "[TableGen] Implement at least some support for multiple explicit results in an instruction pattern. No functional change to existing patterns."
This is failing on several build bots.
llvm-svn: 231358
Craig Topper [Thu, 5 Mar 2015 07:11:36 +0000 (07:11 +0000)]
[TableGen] Implement at least some support for multiple explicit results in an instruction pattern. No functional change to existing patterns.
This should help with the AVX512 masked gather changes Elena is working on. This patch is derived from some of the changes Elena made to tablegen, but modified by me to support arbitrary number of results.
llvm-svn: 231357
Craig Topper [Thu, 5 Mar 2015 07:11:34 +0000 (07:11 +0000)]
[TableGen] Add support constraining a vector type in a pattern to have a specific element type and for constraining a vector type to have the same number of elements as another vector type. This is useful for AVX512 mask operations so we relate the mask type to the type of the other arguments.
llvm-svn: 231356
Tobias Grosser [Thu, 5 Mar 2015 06:52:42 +0000 (06:52 +0000)]
Fix leftover Dependences.cpp -> DependenceInfo.cpp
llvm-svn: 231355
Craig Topper [Thu, 5 Mar 2015 06:38:42 +0000 (06:38 +0000)]
[X86] Use vmovss to handle inserting an element into index 0 of a v8f32 vector of zeros.
llvm-svn: 231354
Frederic Riss [Thu, 5 Mar 2015 06:13:39 +0000 (06:13 +0000)]
Remove useless break after return.
Pointed out by Paul Robinson.
llvm-svn: 231353
Philip Reames [Thu, 5 Mar 2015 05:55:55 +0000 (05:55 +0000)]
Add a few more performance tips
These came from my own experience and may not apply equally to all use cases. Any alternate perspective anyone has should be used to refine these.
As always, grammar and spelling adjustments are more than welcome. Please just directly commit a fix if you see something problematic.
llvm-svn: 231352
Frederic Riss [Thu, 5 Mar 2015 05:29:05 +0000 (05:29 +0000)]
Revert "[dsymutil] MSVC does generate move constructors, but it should accept to default them"
This reverts commit r231350.
It turns out MSVC doesn't generate implicit move constructors and also doesn't accept to default them...
See for example http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc/builds/2786
llvm-svn: 231351
Frederic Riss [Thu, 5 Mar 2015 05:17:06 +0000 (05:17 +0000)]
[dsymutil] MSVC does generate move constructors, but it should accept to default them
llvm-svn: 231350
Philip Reames [Thu, 5 Mar 2015 05:11:05 +0000 (05:11 +0000)]
Add a link to the new PerformanceTips docs from the 3.7 release notes
llvm-svn: 231349
Hans Wennborg [Thu, 5 Mar 2015 03:24:49 +0000 (03:24 +0000)]
Revert r231324 "Remove the conditional addition of the execution dependency fixing"
See PR22799.
llvm-svn: 231348
Chandler Carruth [Thu, 5 Mar 2015 03:19:05 +0000 (03:19 +0000)]
[MBP] Use range based for-loops throughout this code. Several had
already been added and the inconsistency made choosing names and
changing code more annoying. Plus, wow are they better for this code!
llvm-svn: 231347
Argyrios Kyrtzidis [Thu, 5 Mar 2015 03:12:33 +0000 (03:12 +0000)]
[test] Expand a bit on the test case from r231251. NFC.
llvm-svn: 231346
Rui Ueyama [Thu, 5 Mar 2015 02:58:13 +0000 (02:58 +0000)]
Remove dead code.
This hook is called from one of the hottest loops in LLD and does nothing.
llvm-svn: 231345
Nick Lewycky [Thu, 5 Mar 2015 02:56:05 +0000 (02:56 +0000)]
Fix build with GCC:
- GCC doesn't support #pragma mark, only Apple GCC and clang. Wrap the pragma mark's in #if 0 to make gcc ignore them but xcode still see them.
- Wrap a bunch of "#pragma clang" lines in #ifdef __clang__.
- Pacify gcc's -Wparenthesis in a case where it's quite reasonable.
llvm-svn: 231344
Kostya Serebryany [Thu, 5 Mar 2015 02:48:51 +0000 (02:48 +0000)]
[sanitizer] add a run-time flag to dump the coverage counter bitset
llvm-svn: 231343
Jason Molenda [Thu, 5 Mar 2015 02:42:06 +0000 (02:42 +0000)]
Add support for the DWARFv3 (circa 2005) DW_OP_form_tls_address
operator in addition to the vendor-extension DW_OP_GNU_push_tls_address.
clang on PS4 and Darwin will be emitting the standard opcode
as of r231286 via http://reviews.llvm.org/D8018
Behavior of this standard opcode is the same as
DW_OP_GNU_push_tls_address.
<rdar://problem/
20043195>
llvm-svn: 231342
Chandler Carruth [Thu, 5 Mar 2015 02:35:31 +0000 (02:35 +0000)]
[MBP] NFC, run clang-format over this code and tweak things to make the
result reasonable.
This code predated clang-format and so there was a reasonable amount of
crufty formatting that had accumulated. This should ensure that neither
myself nor others end up with formatting-only changes sneaking into
other fixes.
llvm-svn: 231341
Chandler Carruth [Thu, 5 Mar 2015 02:28:25 +0000 (02:28 +0000)]
[MBP] This is no longer 'block-placement2'. ;] The old variants are long
gone, update this code to reflect that.
llvm-svn: 231340
Hans Wennborg [Thu, 5 Mar 2015 02:26:58 +0000 (02:26 +0000)]
Fix msvc-link.c test for environments with link.exe on PATH
Patch by Michael Edwards!
llvm-svn: 231339
Rafael Espindola [Thu, 5 Mar 2015 02:05:42 +0000 (02:05 +0000)]
Use the existing begin and end symbol for debug info.
llvm-svn: 231338
Kostya Serebryany [Thu, 5 Mar 2015 01:30:36 +0000 (01:30 +0000)]
[sanitizer] use simpler symbolizer interface (GetModuleNameForPc) where applicable
llvm-svn: 231337
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:19 +0000 (01:25 +0000)]
Reformat.
llvm-svn: 231336
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:12 +0000 (01:25 +0000)]
Revert r231103, "FullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctor"
It is miscompiled on msc18.
llvm-svn: 231335
NAKAMURA Takumi [Thu, 5 Mar 2015 01:25:06 +0000 (01:25 +0000)]
Revert r231104, "unique_ptrify FullDependenceAnalysis::DV", to appease msc18 C2280.
llvm-svn: 231334
Kostya Serebryany [Thu, 5 Mar 2015 01:20:05 +0000 (01:20 +0000)]
[sanitizer] add nosanitize metadata to more coverage instrumentation instructions
llvm-svn: 231333
Chandler Carruth [Thu, 5 Mar 2015 01:07:03 +0000 (01:07 +0000)]
[MBP] Revert r231238 which attempted to fix a nasty bug where MBP is
just arbitrarily interleaving unrelated control flows once they get
moved "out-of-line" (both outside of natural CFG ordering and with
diamonds that cannot be fully laid out by chaining fallthrough edges).
This easy solution doesn't work in practice, and it isn't just a small
bug. It looks like a very different strategy will be required. I'm
working on that now, and it'll again go behind some flag so that
everyone can experiment and make sure it is working well for them.
llvm-svn: 231332
NAKAMURA Takumi [Thu, 5 Mar 2015 01:02:45 +0000 (01:02 +0000)]
ScalarEvolution.cpp: Appease g++-4.7. He missed implicit "this" in lambda.
llvm-svn: 231331
Rui Ueyama [Thu, 5 Mar 2015 01:02:20 +0000 (01:02 +0000)]
Remove else if a last block ends with return.
llvm-svn: 231330
Rui Ueyama [Thu, 5 Mar 2015 00:55:04 +0000 (00:55 +0000)]
Remove redundant virtual destructor.
DefinedAtom, which is the base class of ELFCommonAtom, has a
virtual destructor, so this is redundant.
llvm-svn: 231329
David Majnemer [Thu, 5 Mar 2015 00:46:22 +0000 (00:46 +0000)]
MS ABI: Implement support for throwing a C++ exception
Throwing a C++ exception, under the MS ABI, is implemented using three
components:
- ThrowInfo structure which contains information like CV qualifiers,
what destructor to call and a pointer to the CatchableTypeArray.
- In a significant departure from the Itanium ABI, copying by-value
occurs in the runtime and not at the catch site. This means we need
to enumerate all possible types that this exception could be caught as
and encode the necessary information to convert from the exception
object's type to the catch handler's type. This includes complicated
derived to base conversions and the execution of copy-constructors.
N.B. This implementation doesn't support the execution of a
copy-constructor from within the runtime for now. Adding support for
that functionality is quite difficult due to things like default
argument expressions which may evaluate arbitrary code hiding in the
copy-constructor's parameters.
Differential Revision: http://reviews.llvm.org/D8066
llvm-svn: 231328
Johannes Doerfert [Thu, 5 Mar 2015 00:43:48 +0000 (00:43 +0000)]
Create a dependence struct to hold dependence information for a SCoP.
The new Dependences struct in the DependenceInfo holds all information
that was formerly part of the DependenceInfo. It also provides the
same interface for the user to access this information.
This is another step to a more general ScopPass interface that does
allow multiple SCoPs to be "in flight".
llvm-svn: 231327
Johannes Doerfert [Thu, 5 Mar 2015 00:40:07 +0000 (00:40 +0000)]
Add missing forward declaration [NFC]
llvm-svn: 231326
Alexey Samsonov [Thu, 5 Mar 2015 00:33:11 +0000 (00:33 +0000)]
[ASan] Fix asan-(32|64)-bits lit tests feature.
It broke down at some point, and all tests with
REQUIRES: asan-(32|64)-bits
line stopped being executed. Restore the intended behavior.
llvm-svn: 231325
Eric Christopher [Thu, 5 Mar 2015 00:28:55 +0000 (00:28 +0000)]
Remove the conditional addition of the execution dependency fixing
pass from the ARM backend as the pass itself will detect any use
of the appropriate register class.
llvm-svn: 231324
Eric Christopher [Thu, 5 Mar 2015 00:23:40 +0000 (00:23 +0000)]
Cleanup and remove a chunk of getARMSubtarget calls in the
ARM TargetMachine pass pipeline construction by pushing them down
into the appropriate pass.
llvm-svn: 231323
Paul Robinson [Thu, 5 Mar 2015 00:08:27 +0000 (00:08 +0000)]
Turn off .debug_pubnames/pubtypes for PS4.
Differential Revision: http://reviews.llvm.org/D8067
llvm-svn: 231322
Rui Ueyama [Thu, 5 Mar 2015 00:07:38 +0000 (00:07 +0000)]
Use range-based for loops to iterate over file nodes.
I converted them to non-range-based loops in r226883 and r226893
because at that moment File::parse() may have side effects and
may update the vector that the reference returned from
LinkingContext::nodes().
Now File::parse() is free from side effects. We can use range-based
loops again.
llvm-svn: 231321
Reid Kleckner [Thu, 5 Mar 2015 00:04:18 +0000 (00:04 +0000)]
Give some obj-c rewriter tests that use MS pragmas a triple as a speculative fix
llvm-svn: 231320
Kostya Serebryany [Wed, 4 Mar 2015 23:41:55 +0000 (23:41 +0000)]
[sanitizer] when dumping coverage bitset, dump seperate file for every module, instead of dumping a single combined bitset
llvm-svn: 231319
Rick Foos [Wed, 4 Mar 2015 23:40:38 +0000 (23:40 +0000)]
Temporary XFAILs for Hexagon
Summary: Temporary XFAIL's until patches done.
Reviewers: echristo, adasgupt, colinl
Reviewed By: colinl
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8044
llvm-svn: 231318
Reid Kleckner [Wed, 4 Mar 2015 23:39:17 +0000 (23:39 +0000)]
Implement section pragma feedback on r205810
Mostly short-circuits some conditionals. Adds target validation of
sections passed to these pragmas.
llvm-svn: 231317
Rui Ueyama [Wed, 4 Mar 2015 23:22:48 +0000 (23:22 +0000)]
PECOFF: Update comments on .drectve section encoding.
llvm-svn: 231316
Enrico Granata [Wed, 4 Mar 2015 23:19:36 +0000 (23:19 +0000)]
Appease the Windows bot
llvm-svn: 231315
Anton Yartsev [Wed, 4 Mar 2015 23:18:21 +0000 (23:18 +0000)]
[analyzer] Bug fix: do not report leaks for alloca()
llvm-svn: 231314
Aaron Ballman [Wed, 4 Mar 2015 23:17:31 +0000 (23:17 +0000)]
Initializer lists are supported in MSVC 2013. Since that's our minimum required version, we can move that to the list of acceptable C++11 features.
llvm-svn: 231313
Hans Wennborg [Wed, 4 Mar 2015 23:16:21 +0000 (23:16 +0000)]
Pass -dll to link.exe when building with -shared (PR22697)
And start building a test for non-clang-cl link.exe invocations.
llvm-svn: 231312
Marshall Clow [Wed, 4 Mar 2015 23:09:15 +0000 (23:09 +0000)]
Move the <dynarray> tests out of the std/ hierarchy, since it's not really part of the standard any more.
llvm-svn: 231311
Enrico Granata [Wed, 4 Mar 2015 22:59:20 +0000 (22:59 +0000)]
Introduce lldbassert(x)
We would like it if LLDB never crashed, especially if we never caused LLDB to crash
On the other hand, having assertions can sometimes be useful
lldbassert(x) is the best of both worlds:
- in debug builds, it turns into a regular assert, which is fine because we don't mind debug LLDB to crash on development machines
- in non-debug builds, it emits a message formatted just like assert(x) would, but then instead of crashing, it dumps a backtrace, suggests filing a bug, and keeps running
llvm-svn: 231310
Argyrios Kyrtzidis [Wed, 4 Mar 2015 22:54:38 +0000 (22:54 +0000)]
[Support] Increase timeout for the LockFileManager back to 5 mins.
Waiting for just 1 min may not be enough for some contexts.
llvm-svn: 231309
Johannes Doerfert [Wed, 4 Mar 2015 22:43:40 +0000 (22:43 +0000)]
Rename the Dependences pass to DependenceInfo [NFC]
We rename the Dependences pass to DependenceInfo as a first step to a
caching pass policy. The new DependenceInfo pass will later provide
"Dependences" for a SCoP.
To keep consistency the test folder is renamed too.
llvm-svn: 231308
Matthias Braun [Wed, 4 Mar 2015 22:31:18 +0000 (22:31 +0000)]
Improve test robustness
Improve test robustness in preparation of coming commits:
- Avoid undefs which may get propagated too much.
- Remove several pointless add 0, instructions
llvm-svn: 231307
Sanjoy Das [Wed, 4 Mar 2015 22:24:23 +0000 (22:24 +0000)]
[IndVarSimplify] use the "canonical" way to infer no-wrap.
Summary:
rL225282 introduced an ad-hoc way to promote some additions to nuw or
nsw. Since then SCEV has become smarter in directly proving no-wrap;
and using the canonical "ext(A op B) == ext(A) op ext(B)" method of
proving no-wrap is just as powerful now. Rip out the existing
complexity in favor of getting SCEV to do all the heaving lifting
internally.
This change does not add any unit tests because it is supposed to be a
non-functional change. Tests added in rL225282 and rL226075 are valid
tests for this change.
Reviewers: atrick, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7981
llvm-svn: 231306
Sanjoy Das [Wed, 4 Mar 2015 22:24:17 +0000 (22:24 +0000)]
[SCEV] make SCEV smarter about proving no-wrap.
Summary:
Teach SCEV to prove no overflow for an add recurrence by proving
something about the range of another add recurrence a loop-invariant
distance away from it.
Reviewers: atrick, hfinkel
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7980
llvm-svn: 231305
Johannes Doerfert [Wed, 4 Mar 2015 22:23:21 +0000 (22:23 +0000)]
Simplify dropConstantScheduleDims [NFC]
llvm-svn: 231304
David Blaikie [Wed, 4 Mar 2015 22:20:52 +0000 (22:20 +0000)]
Provide an explicit move ctor because MSVC can't synthesize one
llvm-svn: 231303
David Blaikie [Wed, 4 Mar 2015 22:15:41 +0000 (22:15 +0000)]
Fix the clang self-host -Werror build
Sorry about the breakage.
llvm-svn: 231302
Rui Ueyama [Wed, 4 Mar 2015 22:13:25 +0000 (22:13 +0000)]
PECOFF: Do not add layout-after edges.
The last use of layout-after edge for PE/COFF was removed in r231290.
Now layout-after edges do nothing. We can stop adding them to the graph.
No functionality change intended.
llvm-svn: 231301
Frederic Riss [Wed, 4 Mar 2015 22:07:44 +0000 (22:07 +0000)]
[dsymutil] Add minimal code to emit DIE trees.
This commit adds code to emit DIE trees that have been pruned from the
parts that haven't been marked as kept in the previous pass.
It works by 'cloning' the input DIE tree (as read by libDebugInfoDwarf)
into a tree of DIE objects. Cloning the DIEs means essentially cloning
their attributes. The code in this commit does only handle scalar and
block attributes (scalar because they are trivial, blocks because they
can't be easily replaced by a scalr placeholder), all the other ones
are replaced by placeholder zero values and will be handled in
further commits.
The added tests mostly check that the DIE tree has the correct layout and
also verify that a few chosen scalar and block attributes correctly make
their way into the output.
llvm-svn: 231300
Frederic Riss [Wed, 4 Mar 2015 22:07:41 +0000 (22:07 +0000)]
DWARFFormValue: Add getAsSignedConstant method.
The implementation accepts explicitely signed forms (DW_FORM_sdata),
but also unsigned forms as long as they fit in an int64_t.
llvm-svn: 231299
Frederic Riss [Wed, 4 Mar 2015 22:07:36 +0000 (22:07 +0000)]
Teach DIEInteger to emit FORM_strp and FORM_ref_addr attributes.
To be used/tested by llvm-dsymutil. (llvm-dsymutil does a 'static' link,
no need for relocations for most things, so it'll just emit raw integers
for most attributes)
llvm-svn: 231298
Frederic Riss [Wed, 4 Mar 2015 22:07:30 +0000 (22:07 +0000)]
Make the DWARFAbbreviationDeclaration::AttributeSpec type public.
It was already exposed through the iterators anyway.
llvm-svn: 231297
David Blaikie [Wed, 4 Mar 2015 22:06:14 +0000 (22:06 +0000)]
Update LangRef for explicit type changes to 'load' instruction
llvm-svn: 231296
Rafael Espindola [Wed, 4 Mar 2015 22:03:21 +0000 (22:03 +0000)]
Expand variables when evaluating absolute expressions.
This allows for variables to be used in .size.
This matches gnu AS functionality.
llvm-svn: 231295
David Blaikie [Wed, 4 Mar 2015 22:02:58 +0000 (22:02 +0000)]
Update LangRef for getelementptr explicit type changes
Here's a rough/first draft - it at least hits the actual textual IR
examples and some of the phrasing. It's probably worth a full pass over,
but I'm not sure how much these docs should reflect the strange
intermediate state we're in anyway.
Totally open to lots of review/feedback/suggestions.
llvm-svn: 231294
Alexey Samsonov [Wed, 4 Mar 2015 21:54:20 +0000 (21:54 +0000)]
[Sanitizer] Fix/suppress compiler warnings in unit tests.
llvm-svn: 231293
Sanjay Patel [Wed, 4 Mar 2015 21:49:03 +0000 (21:49 +0000)]
don't repeat class / function / variable names in comments; NFC
llvm-svn: 231292
Nemanja Ivanovic [Wed, 4 Mar 2015 21:48:22 +0000 (21:48 +0000)]
Add Clang support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7951
llvm-svn: 231291
Rui Ueyama [Wed, 4 Mar 2015 21:40:46 +0000 (21:40 +0000)]
Define DefinedAtom::sectionSize.
Merge::mergeByLargestSection is half-baked since it's defined
in terms of section size, there's no way to get the section size
of an atom.
Currently we work around the issue by traversing the layout edges
to both directions and calculate the sum of all atoms reachable.
I wrote that code but I knew it's hacky. It's even not guaranteed
to work. If you add layout edges before the core linking, it
miscalculates a size.
Also it's of course slow. It's basically a linked list traversal.
In this patch I added DefinedAtom::sectionSize so that we can use
that for mergeByLargestSection. I'm not very happy to add a new
field to DefinedAtom base class, but I think it's legitimate since
mergeByLargestSection is defined for section size, and the section
size is currently just missing.
http://reviews.llvm.org/D7966
llvm-svn: 231290
Alexey Samsonov [Wed, 4 Mar 2015 21:38:10 +0000 (21:38 +0000)]
Exclude LLVM sources from lint check.
Checking files from different repository is not nice, and LLVM code
follows its own style guide anyway.
llvm-svn: 231289
Enrico Granata [Wed, 4 Mar 2015 21:33:45 +0000 (21:33 +0000)]
Add a required #include
llvm-svn: 231288
Jim Ingham [Wed, 4 Mar 2015 21:28:55 +0000 (21:28 +0000)]
Fix a thinko in the case where we return a launch error with no error
string. Return "<unknown error>" rather than the empty launch error...
<rdar://problem/
20026469>
llvm-svn: 231287